Test fixes

This commit is contained in:
Vik Paruchuri
2013-07-18 15:08:52 -04:00
parent 480e97a3fd
commit 84c4b7f139
3 changed files with 4 additions and 4 deletions

View File

@@ -134,7 +134,7 @@ class ContentStoreToyCourseTest(ModuleStoreTestCase):
self.check_components_on_page(ADVANCED_COMPONENT_TYPES, ['Video Alpha',
'Word cloud',
'Annotation',
'Open Ended Grading',
'Open Response Assessment',
'Peer Grading Interface'])
def test_advanced_components_require_two_clicks(self):

View File

@@ -614,14 +614,14 @@ class CombinedOpenEndedV1Module():
return self.out_of_sync_error(data)
self.student_attempts +=1
if self.student_attempts >= self.attempts:
if self.student_attempts >= self.max_attempts:
return {
'success': False,
# This is a student_facing_error
'error': (
'You have attempted this question {0} times. '
'You are only allowed to attempt it {1} times.'
).format(self.student_attempts, self.attempts)
).format(self.student_attempts, self.max_attempts)
}
self.state = self.INITIAL
self.ready_to_reset = False

View File

@@ -335,7 +335,7 @@ class CombinedOpenEndedModuleTest(unittest.TestCase):
's3_interface': test_util_open_ended.S3_INTERFACE,
'open_ended_grading_interface': test_util_open_ended.OPEN_ENDED_GRADING_INTERFACE,
'skip_basic_checks': False,
'is_graded': True,
'graded': True,
}
oeparam = etree.XML('''