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

Grade penalty exemptions system

    • MOODLE_500_STABLE
    • MDL-84981-main
    • Hide

      Setup:

      • Enable grade penalties.
        • Enable Late submission penalties under: /grade/penalty/manage_penalty_plugins.php
        • Select Assignment under: /admin/settings.php?section=supportedplugins
        • Setup an example penalty rule under: /grade/penalty/duedate/manage_penalty_rule.php?contextid=1
          • Click Edit.
          • Set Final penalty rule to 50 and click Save changes.
      • Generate a course and users.
        • From your root site directory, run: php admin/tool/generator/cli/maketestsite.php --size=XS
      • Configure a course.
        • Navigate to one of the generated courses (e.g. Test course: S)
        • Create some groups.
          • Participants > Groups > Create group
        • Add group members.
        • Create or edit an assignment (e.g. Assignment 1)
          • Set the due date to some time in the past.
          • Set Submission types to Online text.
          • Enable Grade penalties under the Grade section.

      Testing:

      On course and assign module pages, under the Grade penalties tab, you will find a new Penalty exemptions settings page.

      You will find a similar page under Site Administration > Grades > Manage penalty exemptions.

      1. Navigate to the assignment page > Grade penalties > Manage penalty exemptions.
      2. Add some user exemptions.
      3. Add some group exemptions.
      4. Confirm edit and delete work as expected.
      5. Make some submissions for the assignment by logging in as students and submitting.
      6. Grade the submissions.
        • Please node grade recalculation happens in an ad-hoc task for the assign module.
        • You can execute these tasks from the browser by clicking Run all for the recalculate_penalties task under: /admin/tool/task/adhoctasks.php
      7. Verify penalties do not apply to exempt users.
      8. Verify exemptions also work as expected when applied from the course and system context instead.
      9. Verify the grader report page and assignment activity pages correctly show exemption icons next to grades.
      10. Verify unit tests pass and have sufficient coverage.

      Testing backup and restore:

      1. Create a group exemption and user exemption in the course context.
      2. Create a group exemption and user exemption in the assignment context.
      3. Backup and restore the course with default settings.
      4. Verify the restored course has copies of the exemptions.

       

      Show
      Setup: Enable grade penalties. Enable  Late submission penalties under: /grade/penalty/manage_penalty_plugins.php Select Assignment under: /admin/settings.php?section=supportedplugins Setup an example penalty rule under: /grade/penalty/duedate/manage_penalty_rule.php?contextid=1 Click Edit . Set Final penalty rule to 50 and click Save changes . Generate a course and users. From your root site directory, run: php admin/tool/generator/cli/maketestsite.php --size=XS Configure a course. Navigate to one of the generated courses (e.g. Test course: S ) Create some groups. Participants > Groups > Create group Add group members. Create or edit an assignment (e.g. Assignment 1 ) Set the due date to some time in the past. Set Submission types to Online text . Enable Grade penalties under the Grade section. Testing: On course and assign module pages, under the Grade penalties tab, you will find a new Penalty exemptions settings page. You will find a similar page under Site Administration > Grades > Manage penalty exemptions . Navigate to the assignment page > Grade penalties > Manage penalty exemptions . Add some user exemptions. Add some group exemptions. Confirm edit and delete work as expected. Make some submissions for the assignment by logging in as students and submitting. Grade the submissions. Please node grade recalculation happens in an ad-hoc task for the assign module. You can execute these tasks from the browser by clicking Run all for the recalculate_penalties task under: /admin/tool/task/adhoctasks.php Verify penalties do not apply to exempt users. Verify exemptions also work as expected when applied from the course and system context instead. Verify the grader report page and assignment activity pages correctly show exemption icons next to grades. Verify unit tests pass and have sufficient coverage. Testing backup and restore: Create a group exemption and user exemption in the course context. Create a group exemption and user exemption in the assignment context. Backup and restore the course with default settings. Verify the restored course has copies of the exemptions.  
    • Hide

      Code verified against automated checks with warnings.

      Checked MDL-84981 using repository: https://github.com/catalyst/moodle

      Should these errors be fixed?

      Built on: Wed Jun 11 03:04:18 UTC 2025

      Show
      Code verified against automated checks with warnings. Checked MDL-84981 using repository: https://github.com/catalyst/moodle main (0 errors / 2 warnings) [branch: MDL-84981-main | CI Job ] overview (0/0) , phplint (0/0) , phpcs (0/0) , js (0/0) , css (0/0) , phpdoc (0/0) , commit (0/0) , savepoint (0/0) , thirdparty (0/0) , externalbackup (0/2) , grunt (0/0) , shifter (0/0) , mustache (0/0) , gherkin (0/0) , Should these errors be fixed? Built on: Wed Jun 11 03:04:18 UTC 2025
    • Show
      Launching automatic jobs for branch MDL-84981 -main https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/19658/ PHPUnit (sqlsrv) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67201/ Behat (NonJS - boost and classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67202/ Behat (Firefox - boost) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67203/ Behat (Firefox - classic) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/67204/ App tests (stable app version) Built on: Wed Jun 11 06:30:16 UTC 2025

      Features:

      • Grade penalty exemptions integrated into the core_grades namespace.
        • Plugins and core systems can use the API to store exemption information based on component, item type, item id, and context id.
        • Optional text field for describing the reason for the exemption.
      • Exemption support for the gradepenalty_duedate plugin.
        • New UI to exempt users or groups from grade penalties.
        • Exemptions can be applied at the system, course, or module level.

       

            avdb Alexander Van der Bellen
            avdb Alexander Van der Bellen
            Dmitrii Metelkin Dmitrii Metelkin
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 minutes
                4m

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