Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unlimited attempts cannot be updated in problem editor #480

Closed
mariajgrimaldi opened this issue May 31, 2024 · 10 comments · Fixed by #483
Closed

Unlimited attempts cannot be updated in problem editor #480

mariajgrimaldi opened this issue May 31, 2024 · 10 comments · Fixed by #483
Assignees
Labels
release blocker Blocks the upcoming release (fix needed) release testing Affects the upcoming release (attention needed)

Comments

@mariajgrimaldi
Copy link
Member

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

  1. From Studio create a problem.
  2. Configure the problem with a number of attempts, e.g.: 5, and save.
  3. Edit the problem try to assign unlimited attempts, and save
  4. The problem continues to have the same number of attempts assigned previously
TC_AUTHOR_151.mp4

Additional information

It happens in all problems, but it does not happen with the legacy editor.

Original issue: openedx/wg-build-test-release#371

@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented May 31, 2024

See openedx/wg-build-test-release#371 (comment) for extra debugging details. Thanks!

@mariajgrimaldi
Copy link
Member Author

FYI @arbrandes @brian-smith-tcril @openedx/2u-tnl, please tag anyone who can help.

@KristinAoki KristinAoki self-assigned this May 31, 2024
@brian-smith-tcril
Copy link
Contributor

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.

@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented May 31, 2024

@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.

@brian-smith-tcril
Copy link
Contributor

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"

@mariajgrimaldi
Copy link
Member Author

@brian-smith-tcril right! Thank you :))

@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented Jun 2, 2024

I was testing around in the quince sandbox and I couldn't reproduce the error there:
image
See how the max_attempts is set to "" when selecting unlimited attempts, as Brian mentioned. In case this helps :)

@mariajgrimaldi mariajgrimaldi added the release testing Affects the upcoming release (attention needed) label Jun 2, 2024
@mariajgrimaldi mariajgrimaldi moved this from Backlog to In progress in Build-Test-Release Working Group Jun 3, 2024
@crathbun428 crathbun428 added the release blocker Blocks the upcoming release (fix needed) label Jun 3, 2024
@KristinAoki KristinAoki linked a pull request Jun 4, 2024 that will close this issue
@github-project-automation github-project-automation bot moved this from In progress to Done in Build-Test-Release Working Group Jun 4, 2024
@mariajgrimaldi
Copy link
Member Author

mariajgrimaldi commented Jun 6, 2024

@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

@KristinAoki
Copy link
Member

@mariajgrimaldi The change was included in openedx/frontend-app-authoring#1071 which upgrades the npm pack for course authoring. I think that the upgrade PR might needs to be backported, but not 100% sure.

@mariajgrimaldi
Copy link
Member Author

@KristinAoki: I created the backport, I hope that's enough! openedx/frontend-app-authoring#1075

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
release blocker Blocks the upcoming release (fix needed) release testing Affects the upcoming release (attention needed)
Projects
Development

Successfully merging a pull request may close this issue.

4 participants