'All parameters are optional, and are added to the created problem if specified.
Arguments:
graceperiod:
due:
max_attempts:
showanswer:
force_save_button:
rerandomize: all strings, as specified in the policy for the problem
problem_state: a dict to to be serialized into the instance_state of the
module.
attempts: also added to instance state.  Will be converted to an int.'

@classmethod
def create(cls, attempts=None, problem_state=None, correct=False, xml=None, override_get_score=True, **kwargs):

    location = Location('edX', 'capa_test', '2012_Fall', 'problem', 'SampleProblem{0}'.format(cls.next_num()), None)
    if (xml is None):
        xml = cls.sample_problem_xml
    field_data = {'data': xml}
    field_data.update(kwargs)
    descriptor = Mock(weight='1')
    if (problem_state is not None):
        field_data.update(problem_state)
    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 override_get_score:
        if correct:
            module.score = Score(raw_earned=1, raw_possible=1)
        else:
            module.score = Score(raw_earned=0, raw_possible=1)
    module.graded = 'False'
    return module
