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

Remove the 'Never' option from the 'Additional attempts' setting

XMLWordPrintable

    • MOODLE_405_STABLE
    • MDL-80741-main
    • Hide

      Setup (before applying the patch)

      1. Make sure that the following site default assignment settings (Site administration > Plugins > Assignment > Assignment settings) are set:
        • Additional attempts = Never
        • Maximum attempts = Unlimited
      2. Create a course.
      3. Enrol a student in the course.
      4. In the course create the following assignments:
        1. "Assignment 1" - using the default assignment configuration settings.
        2. "Assignment 2" - under the Submission settings section set:
          1. "Additional attempts" = Manually
          2. "Maximum attempts" = Unlimited

      Test 1 (upgrade)

      1. Log in as an admin.
      2. Apply the patch and run the upgrade.
        • confirm the upgrade is successfully executed, without any errors.
      3. Go to Site administration > Plugins > Assignment > Assignment settings.
        • confirm the label text for the "assign | maxattempts" setting is  "Allowed attempts" setting and its default value is now set to "1".
        • confirm the label text for the "assign | attemptreopenmethod" setting is  "Grant attempts" setting and its default value is now set to "Automatically until pass".
      4. Go to the course.
      5. Go to Assignment 1.
      6. Go to the Settings page of the assignment, and expand the Submission settings section.
        • confirm that "Allowed attempts" is set to 1.
        • confirm the "Grant attempts" setting is NOT visible.
      7. Go to Assignment 2.
      8. Go to the Settings page of the assignment, and expand the Submission settings section.
        • confirm that "Allowed attempts" is still set to "Unlimited".
        • confirm the "Grant attempts" setting is visible and still set to "Manually"

      Test 2 (configuration and usage - with the patch applied)

      1. Log in as admin,
      2. Go to the course.
      3. Attempt creating a new assignment "Assignment 3" and expand the Submissions settings section.
        • confirm that "Allowed attempts" is set to 1.
        • confirm the "Grant attempts" setting is NOT visible.
      4. Change the value of the "Allowed attempts" to "Unlimited" (or any other value that is not "1")
        • confirm the "Grant attempts" setting is now visible and pre-set to "Automatically until pass"
      5. Change the value of the "Allowed attempts" to "1" and save the assignment.
      6. Log in as a student.
      7. Go to "Assignment 3" and submit a submission.
      8. Log in as an admin.
      9. Go to "Assignment 3"
        • confirm that there is no option on the submissions page or the grader page to grant an additional attempt to the student.
      10. Go to the Settings page of "Assignment 3", expand the Submission settings section and set:
        • "Allowed attempts" = "5".
        • "Grant attempts" = "Manually".
      11. After saving the changes, confirm that additional attempts can be granted to the student through the grader or the submissions page.
      Show
      Setup (before applying the patch) Make sure that the following site default assignment settings (Site administration > Plugins > Assignment > Assignment settings) are set: Additional attempts = Never Maximum attempts = Unlimited Create a course. Enrol a student in the course. In the course create the following assignments: "Assignment 1" - using the default assignment configuration settings. "Assignment 2" - under the Submission settings section set: "Additional attempts" = Manually "Maximum attempts" = Unlimited Test 1 (upgrade) Log in as an admin. Apply the patch and run the upgrade. confirm the upgrade is successfully executed, without any errors. Go to Site administration > Plugins > Assignment > Assignment settings. confirm the label text for the "assign | maxattempts" setting is  "Allowed attempts" setting and its default value is now set to "1". confirm the label text for the "assign | attemptreopenmethod" setting is  "Grant attempts" setting and its default value is now set to "Automatically until pass". Go to the course. Go to Assignment 1. Go to the Settings page of the assignment, and expand the Submission settings section. confirm that "Allowed attempts" is set to 1. confirm the "Grant attempts" setting is NOT visible. Go to Assignment 2. Go to the Settings page of the assignment, and expand the Submission settings section. confirm that "Allowed attempts" is still set to "Unlimited". confirm the "Grant attempts" setting is visible and still set to "Manually" Test 2 (configuration and usage - with the patch applied) Log in as admin, Go to the course. Attempt creating a new assignment "Assignment 3" and expand the Submissions settings section. confirm that "Allowed attempts" is set to 1. confirm the "Grant attempts" setting is NOT visible. Change the value of the "Allowed attempts" to "Unlimited" (or any other value that is not "1") confirm the "Grant attempts" setting is now visible and pre-set to "Automatically until pass" Change the value of the "Allowed attempts" to "1" and save the assignment. Log in as a student. Go to "Assignment 3" and submit a submission. Log in as an admin. Go to "Assignment 3" confirm that there is no option on the submissions page or the grader page to grant an additional attempt to the student. Go to the Settings page of "Assignment 3", expand the Submission settings section and set: "Allowed attempts" = "5". "Grant attempts" = "Manually". After saving the changes, confirm that additional attempts can be granted to the student through the grader or the submissions page.
    • 3
    • Team Alpha - Sprint 3 I1-2024

      In the assignment's settings page (including site-wide configuration), the 'Never' option from the 'Additional attempts' setting is redundant. The same behaviour is achieved if the setting 'Maximum attempts' is set to 1. Also, the 'Additional attempts' setting should be conditionally displayed based on the selected option from the 'Maximum attempts' setting because it only makes sense to show this setting when more than 1 attempts are allowed.

      Acceptance criteria:

      • Remove the 'Never' option from the 'Additional attempts' form element in the assignment's setting page, assignments's site-wide configuration and all its usage in the code.
      • The 'Maximum attempts' setting option controls whether the 'Additional attempts' setting is available. (visible only when 'Maximum attempts' > 1).
      • Change the default value of the 'Maximum attempts' to 1.
      • Upgrade step to correct the existing db records based on the changes to the settings.
      • Improve the strings used for the form labels.
      • Update the existing automated tests.

            Geshoski Mihail Geshoski
            Geshoski Mihail Geshoski
            Ilya Tregubov Ilya Tregubov
            Shamim Rezaie Shamim Rezaie
            Kim Jared Lucas Kim Jared Lucas
            Votes:
            0 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 days, 2 hours, 19 minutes
                4d 2h 19m

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