Option added for controlling number of attempts - #30
Conversation
|
Thanks for this! It mostly looks fine from a quick glance at the code...I'll do a more detailed check before merging. One thing I did notice is def append_quiz_allowed_attempts(self, text: int):This will need to be def append_quiz_allowed_attempts(self, text: str):because all of these sorts of functions receive literal text arguments. It is then up to the function to verify that Since 0 attempts is special, do you think it would make sense to use "inf" or "infinity" or something similar, instead of (or in addition to) zero? Then "inf" etc. would be converted to 0 internally in creating the QTI. |
|
Glad you find this useful also. And yes, that makes sense as when I switched to And yes, I think with 0 being special, having a 'fuzzy' option where users can use |
Note: Please bear with me, as this is my first experience with a real-world pull request. Let me know if there are any questions or you have any feedback.
Motivation: The current commit does not allow users to set the number of quiz attempts allowed and the default settings are for only 1 attempt.
Overview of changes:
0to set unlimited attemptsappend_quiz_allowed_attemptsintext2qti/quiz.py. I know basic Python, so was not sure if how I handled this follows best practices.README.mdquiz.mdtest file, which set attempts=1 in default manner. Added option line toquiz.mdtest file set to 0, 1, 2, 5, and 100 and uploaded to Canvas to confirm unlimited, 1, 2, 5, and 100 allowed attempts, respectively.