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

fix: default setting not updating with updated default settings #466

Conversation

KristinAoki
Copy link
Member

JIRA Ticket: TNL-10995

Description
Currently when a problem is saved with the default setting (focusing on max attempts, show answer, show reset button, and randomization). The current behavior assigns the default values to the block on save; however, this causes issues when a course author changes the default setting values. The author has to go back to all the blocks and manually update the blocks to the new default settings. This PR fixes this bug and does not save the default values to the block. The setting are only saved to the block if they differ from the default values.

Testing

  1. Create a Problem
  2. Add content and leave settings untouched.
  3. Go to the Advanced Settings page
  4. Change the default maximum attempt settings
  5. Go back to the problem you just created
  6. Open the settings panels
  7. Confirm that the maximum attempts setting matches the new value from the Advanced Settings page

Copy link

codecov bot commented Mar 25, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 89.25%. Comparing base (4fa1695) to head (df04db1).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #466   +/-   ##
=======================================
  Coverage   89.24%   89.25%           
=======================================
  Files         246      246           
  Lines        4471     4475    +4     
  Branches      916      917    +1     
=======================================
+ Hits         3990     3994    +4     
  Misses        454      454           
  Partials       27       27           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@KristinAoki KristinAoki merged commit 905bea0 into main Mar 28, 2024
10 checks passed
@KristinAoki KristinAoki deleted the KristinAoki/fix-default-settings-not-changeing-when-default-changes branch March 28, 2024 19:00
BryanttV pushed a commit to eduNEXT/frontend-lib-content-components that referenced this pull request Apr 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants