Closed mariajgrimaldi closed 5 months ago
See https://github.com/openedx/wg-build-test-release/issues/371#issuecomment-2141200372 for extra debugging details. Thanks!
FYI @arbrandes @brian-smith-tcril @openedx/2u-tnl, please tag anyone who can help.
in some quick testing on the sandbox using the network tab in the browser inspector (filtering to method:POST
) I was able to find that checking "unlimited attempts" sends nothing for max_attempts
in the metadata
part of the payload. By manually entering 0
for number of attempts I was able to get the "You have used 0 of x attempts" message to go away.
@brian-smith-tcril: Exactly, thanks for testing it out! I mentioned something similar in the comment I left here. However, I'm not sure why setting unlimited attempts first works sending the correct metadata but not changing it to unlimited.
EDIT: Oh, I just realized it works because that's the default.
I believe it defaults to zero if no max_attempts
value is submitted when creating the problem, but not sending a value for max_attempts
when editing is interpreted as "don't change the value for max_attempts
"
@brian-smith-tcril right! Thank you :))
I was testing around in the quince sandbox and I couldn't reproduce the error there: See how the max_attempts is set to "" when selecting unlimited attempts, as Brian mentioned. In case this helps :)
@KristinAoki thank you so much for taking care of this! I have a question, though: how can we backport this to the redwood release?
FYI @brian-smith-tcril
@mariajgrimaldi The change was included in https://github.com/openedx/frontend-app-course-authoring/pull/1071 which upgrades the npm pack for course authoring. I think that the upgrade PR might needs to be backported, but not 100% sure.
@KristinAoki: I created the backport, I hope that's enough! https://github.com/openedx/frontend-app-course-authoring/pull/1075
Expected behavior
As a course author, I want to set up a problem with unlimited attempts, so that students can submit their answers as many times as they want.
Actual behavior
As a course author, I cannot assign a problem with unlimited attempts. It happens when you already have a set number of attempts and want to change to unlimited attempts.
Steps to reproduce
5
, and save.https://github.com/openedx/wg-build-test-release/assets/64033729/f722b3a2-ed43-4081-ac13-dd84c7008291
Additional information
It happens in all problems, but it does not happen with the legacy editor.
Original issue: https://github.com/openedx/wg-build-test-release/issues/371