Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-53392

Remove/fix the alert and noscript when changing grade max in mod_assign

XMLWordPrintable

    • MOODLE_31_STABLE
    • MOODLE_30_STABLE, MOODLE_31_STABLE
    • MDL-53392_master
    • Hide

      Prerequisites: (All Versions)
      You must have a course with a student enrolled.

      Test Steps (master and 31 Only):
      As an admin user:

      1. Navigate to your course home page
      2. Turn editing on
      3. Create a new assignment with default settings
      4. Assign a grade to the enrolled student for the assignment you just created
      5. Disable javascript
      6. Navigate back to course home and edit your assignment settings
      7. Scroll to the 'Grade' section and confirm that:
        a) The grade field is accompanied by the message - "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
        b) There are no other messages/text warnings presented in the Grade section.
        c) The 'Maximum Grade' field IS editable.
      8. Change the maximum grade to 10000 but leave the 'Rescale existing grades' select set to 'Choose'.
      9. Save the form
      10. Confirm that the form fails validation
      11. Change the maximum grade to 50 and change the 'Rescale existing grades' select set to 'Yes'.
      12. Save the form
      13. Confirm that the form saves successfully
      14. Enable javascript
      15. Navigate back to course home and edit your assignment settings
      16. Scroll to the 'Grade' section and confirm that:
        a) The grade field is accompanied by the message - "Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades."
        b) There are no other messages/text warnings presented in the Grade section.
        c) The 'Maximum Grade' field IS NOT editable.
      17. Change the 'Maximum grade' to 80 and change the 'Rescale existing grades' select set to 'Yes'.
      18. Save the form
      19. Confirm that the form saves successfully

      Test Steps (30):
      As an admin user:

      1. Navigate to your course home page
      2. Turn editing on
      3. Create a new assignment with default settings
      4. Assign a grade to the enrolled student for the assignment you just created
      5. Disable javascript
      6. Navigate back to course home and edit your assignment settings
      7. Scroll to the 'Grade' section and confirm that:
        a) You see warning text above the 'Grade' field in the 'Grade' section - "This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade".
        b) The 'Maximum points' field IS editable.
      8. Navigate back to course home
      9. Enable javascript
      10. Edit your assignment settings
      11. Scroll to the 'Grade' section and confirm that:
        a) There is NO warning above the 'Grade' field in the 'Grade' section.
        b) The 'Maximum points' field is editable.
      12. Change the 'Maximum points' field to 9999 and click somewhere else (not a link) on the page so the input loses focus and triggers a change event.
      13. Confirm that:
        a) You see a JS alert box, displaying the text, "This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade."
      14. Close the alert
      15. Change the maximum points to 50
      16. Save the form
      17. Confirm that the form saves successfully
      Show
      Prerequisites: (All Versions) You must have a course with a student enrolled. Test Steps (master and 31 Only): As an admin user: Navigate to your course home page Turn editing on Create a new assignment with default settings Assign a grade to the enrolled student for the assignment you just created Disable javascript Navigate back to course home and edit your assignment settings Scroll to the 'Grade' section and confirm that : a) The grade field is accompanied by the message - " Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades. " b) There are no other messages/text warnings presented in the Grade section. c) The 'Maximum Grade' field IS editable. Change the maximum grade to 10000 but leave the 'Rescale existing grades' select set to 'Choose'. Save the form Confirm that the form fails validation Change the maximum grade to 50 and change the 'Rescale existing grades' select set to 'Yes'. Save the form Confirm that the form saves successfully Enable javascript Navigate back to course home and edit your assignment settings Scroll to the 'Grade' section and confirm that : a) The grade field is accompanied by the message - " Some grades have already been awarded, so the grade type cannot be changed. If you wish to change the maximum grade, you must first choose whether or not to rescale existing grades. " b) There are no other messages/text warnings presented in the Grade section. c) The 'Maximum Grade' field IS NOT editable. Change the 'Maximum grade' to 80 and change the 'Rescale existing grades' select set to 'Yes'. Save the form Confirm that the form saves successfully Test Steps (30): As an admin user: Navigate to your course home page Turn editing on Create a new assignment with default settings Assign a grade to the enrolled student for the assignment you just created Disable javascript Navigate back to course home and edit your assignment settings Scroll to the 'Grade' section and confirm that : a) You see warning text above the 'Grade' field in the 'Grade' section - "This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade" . b) The 'Maximum points' field IS editable. Navigate back to course home Enable javascript Edit your assignment settings Scroll to the 'Grade' section and confirm that : a) There is NO warning above the 'Grade' field in the 'Grade' section. b) The 'Maximum points' field is editable. Change the 'Maximum points' field to 9999 and click somewhere else (not a link) on the page so the input loses focus and triggers a change event. Confirm that: a) You see a JS alert box, displaying the text, " This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade. " Close the alert Change the maximum points to 50 Save the form Confirm that the form saves successfully
    • 3.2 Sprint 1

      There's code in M.mod_assign.init_grade_change (mod/assign/module.js) and mod_assign_mod_form (mod/assign/mod_form.php) that still use the old changegradewarning string which is no longer true as of MDL-48634.

      This assignment has graded submissions and changing the grade will not automatically re-calculate existing submission grades. You must re-grade all existing submissions, if you wish to change the grade.

      It shows up for people who are not using javascript, which is no longer a requirement but we should still remove the old legacy code from moodle, and avoid confusing someone who may have javascript disabled.

      Not sure how to get the alert to show up, but it would be good to investigate into that further.

            jaked Jake Dallimore
            johno John Okely
            cameron1729 cameron1729
            Dan Poltawski Dan Poltawski
            Jun Pataleta Jun Pataleta
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.