Commit 1f6fe321 by Sef Kloninger

capa: submit/final submit button naming

We have found that users were getting confued by the buttons named
"check," and on their last allowed attempt, "final check."  Check looks
implies something for the user only, not a real problem submission.

So this changes the wording to "Submit" for most attempts, and "Final
Submit" for the last attempt allowed.

We (Stanford) had made a prior change to only say "Submit" on the final
attempt, but condisering that now that seems even more confusing.
parent fa66184d
...@@ -320,15 +320,15 @@ class CapaModule(CapaFields, XModule): ...@@ -320,15 +320,15 @@ class CapaModule(CapaFields, XModule):
""" """
Determine the name for the "check" button. Determine the name for the "check" button.
It could have different names depending on whether it's the student's Usually it is just "Submit", but if this is the student's
final attempt or not, but right now it doesn't - it's always "Submit" final attempt, change the name to "Final Submit" so they
know it's their last one.
""" """
if self.max_attempts is not None: if self.max_attempts is not None:
final_check = (self.attempts >= self.max_attempts - 1) final_check = (self.attempts >= self.max_attempts - 1)
else: else:
final_check = False final_check = False
return "Final Submit" if final_check else "Submit"
return "Submit" if final_check else "Submit"
def should_show_check_button(self): def should_show_check_button(self):
""" """
......
...@@ -815,16 +815,15 @@ class CapaModuleTest(unittest.TestCase): ...@@ -815,16 +815,15 @@ class CapaModuleTest(unittest.TestCase):
module = CapaFactory.create(attempts=attempts + 1, max_attempts=attempts) module = CapaFactory.create(attempts=attempts + 1, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Submit") self.assertEqual(module.check_button_name(), "Submit")
# We've got the button name set to "Submit" even if it's not the final attempt
module = CapaFactory.create(attempts=attempts - 2, max_attempts=attempts) module = CapaFactory.create(attempts=attempts - 2, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Submit") self.assertEqual(module.check_button_name(), "Final Submit")
module = CapaFactory.create(attempts=attempts - 3, max_attempts=attempts) module = CapaFactory.create(attempts=attempts - 3, max_attempts=attempts)
self.assertEqual(module.check_button_name(), "Submit") self.assertEqual(module.check_button_name(), "Final Submit")
# If no limit on attempts, still show "Submit" # If no limit on attempts
module = CapaFactory.create(attempts=attempts - 3) module = CapaFactory.create(attempts=attempts - 3)
self.assertEqual(module.check_button_name(), "Submit") self.assertEqual(module.check_button_name(), "Final Submit")
module = CapaFactory.create(attempts=0) module = CapaFactory.create(attempts=0)
self.assertEqual(module.check_button_name(), "Submit") self.assertEqual(module.check_button_name(), "Submit")
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment