persist hints to database, remove check button if too many attempts

This commit is contained in:
Vik Paruchuri
2012-11-02 12:27:03 -04:00
parent f292fefedc
commit 38d90b0899
2 changed files with 4 additions and 1 deletions

View File

@@ -9,6 +9,7 @@ $(document).on('click', 'section.sa-wrapper input#show', ( ->
$('section.sa-wrapper p#rubric').append("Your answer: #{answer}")
$('section.sa-wrapper p#rubric').append(response.rubric)
else
$('section.sa-wrapper input#show').remove()
$('section.sa-wrapper p#rubric').append(response.message)
));

View File

@@ -27,7 +27,8 @@ from xmodule.contentstore.content import XASSET_SRCREF_PREFIX, StaticContent
log = logging.getLogger("mitx.courseware")
#Set the default number of max attempts. Should be 1 for production
max_attempts = 100
#Set higher for debugging/testing
max_attempts = 1
def only_one(lst, default="", process=lambda x: x):
"""
@@ -274,6 +275,7 @@ class SelfAssessmentModule(XModule):
state = {'seed': 1,
'student_answers': self.answer,
'hint' : self.hint,
'correct_map': {'self_assess': {'correctness': self.correctness,
'npoints': points,
'msg': "",