'Optional parameters here are cut down to what we actually use vs. the regular CapaFactory.'

@classmethod
def create(cls, max_attempts=None, attempts=None, correct=False, last_submission_time=None, submission_wait_seconds=None):

    location = Location('edX', 'capa_test', 'run', 'problem', 'SampleProblem{0}'.format(cls.next_num()))
    field_data = {'data': cls.sample_problem_xml}
    if (max_attempts is not None):
        field_data['max_attempts'] = max_attempts
    if (last_submission_time is not None):
        field_data['last_submission_time'] = last_submission_time
    if (submission_wait_seconds is not None):
        field_data['submission_wait_seconds'] = submission_wait_seconds
    descriptor = Mock(weight='1')
    if (attempts is not None):
        field_data['attempts'] = int(attempts)
    system = get_test_system()
    system.render_template = Mock(return_value='<div>Test    Template    HTML</div>')
    module = CapaModule(descriptor, system, DictFieldData(field_data), ScopeIds(None, None, location, location))
    if correct:
        module.score = Score(raw_earned=1, raw_possible=1)
    else:
        module.score = Score(raw_earned=0, raw_possible=1)
    return module
