• MOODLE_405_STABLE
    • Hide

      Enable grade penalty

      1. Go to Grades > General settings in site administration:
        • Enable Grade penalty (gradepenalty_enabled)
      2. Go to Grades > Grade penalty > Manage penalty plugins in site administration:
        • Click on 'toggle' button to enable 'Late submission penalties' plugin
      3. Go to Grade penalties > Supported modules:
        • Click to select "Assignment"
        • Save changes
      4. Go to Grade penalties > Late submission penalties > Penalty rules:
        1. Create some penalty rules

      Create an assignment with penalty:

      1. Create a test course
      2. Create an assignment in the course:
        1. Set due date to "Yesterday" / a date in the past
        2. Submission types: File submissions
        3. Make sure grade type is set to point
        4. Enable "Grade penalties" under "Grade" section
      3. Enrol a student to the course
      4. Login as the student
      5. Add an submission
      6. Log in as an teacher to mark the submission
        1. Expected behavior: The grade in grade book is deducted according to the penalty rules
        2. In the submission list: the grade is original grade (without penalty), the finaly grade is the one with penalty
      7. Go to "Penalty rules" on Assignment navigation bar
      8. Change penalty rules
      9. Then click on "upgrade grades" button
      10. Wait or run cron job so that "recalculate_penalties" adhoc task can be run:
        1. Expected: the adhoc task "recalculate_penalties" should run
        2. The final grade of the student should be recalculated according to the new rules
      Show
      Enable grade penalty Go to Grades > General setting s in site administration: Enable Grade penalty (gradepenalty_enabled) Go to Grades > Grade penalty > Manage penalty plugins in site administration: Click on 'toggle' button to enable 'Late submission penalties' plugin Go to Grade penalties > Supported modules: Click to select "Assignment" Save changes Go to Grade penalties > Late submission penalties > Penalty rules: Create some penalty rules Create an assignment with penalty: Create a test course Create an assignment in the course: Set due date to "Yesterday" / a date in the past Submission types: File submissions Make sure grade type is set to point Enable "Grade penalties" under "Grade" section Enrol a student to the course Login as the student Add an submission Log in as an teacher to mark the submission Expected behavior: The grade in grade book is deducted according to the penalty rules In the submission list: the grade is original grade (without penalty), the finaly grade is the one with penalty Go to " Penalty rules " on Assignment navigation bar Change penalty rules Then click on "upgrade grades" button Wait or run cron job so that "recalculate_penalties" adhoc task can be run: Expected: the adhoc task "recalculate_penalties" should run The final grade of the student should be recalculated according to the new rules
    • Hide

      Code verified against automated checks.

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

      More information about this report

      Built on: Wed 27 Nov 2024 05:30:29 AM UTC

      Show
      Code verified against automated checks. Checked MDL-82120 using repository: https://github.com/catalyst/moodle main (0 errors / 0 warnings) [branch: MDL-82120 | CI Job ] More information about this report Built on: Wed 27 Nov 2024 05:30:29 AM UTC
    • Show
      Launching automatic jobs for branch MDL-82120 https://ci.moodle.org/view/Testing/job/DEV.02%20-%20Developer-requested%20PHPUnit/17554/ PHPUnit (sqlsrv / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/59765/ Behat (NonJS - boost and classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/59766/ Behat (Firefox - boost / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/59767/ Behat (Firefox - classic / complete) https://ci.moodle.org/view/Testing/job/DEV.01%20-%20Developer-requested%20Behat/59768/ App tests (stable app version) / complete) Built on: Wed Nov 27 08:42:32 UTC 2024

      In summary, the penalty feature works as below:

      • A module, for example assignment, apply a grade to a submission as usual
      • Then, the module, should call apply_grade_penalty_to_user (lib/gradelib.php) to apply penalty to the submission (if applicable)
      • The function will do the followings:
        • before_penalty_applied: this is implemented in penalty plugins to calculate deducted marks
        • upgrade the finaly grade with the deducted marks
        • after_penalty_applied: can be used to log the penalty details

      The re-caculation works as below:

      • Penalty rules are changed
      • User can optionally choose to run recalculation
      • Once the re-calcuation is triggered, adhoc tasks will be queued for the re-calculation

       

        1. penalty_configuration_without_recalculation.png
          31 kB
          Nathan Nguyen
        2. New plugin type - grade penalty.png
          51 kB
          Nathan Nguyen
        3. gradepenalty_enabled.png
          34 kB
          Nathan Nguyen
        4. gradepenalty_enabled-1.png
          34 kB
          Nathan Nguyen
        5. create_first_rule.png
          24 kB
          Nathan Nguyen
        6. rule_editing.png
          20 kB
          Nathan Nguyen
        7. penalty_rules.png
          36 kB
          Nathan Nguyen
        8. Screencast from 04-07-24.webm
          200 kB
          Alexander Van der Bellen
        9. penalty_rules-1.png
          77 kB
          Nathan Nguyen
        10. manage rules.png
          77 kB
          Nathan Nguyen
        11. Screencast from 23-07-24.webm
          1.53 MB
          Alexander Van der Bellen
        12. Enabled.png
          47 kB
          Nathan Nguyen
        13. Rule_Table.png
          37 kB
          Nathan Nguyen
        14. Edit_Rule.png
          75 kB
          Nathan Nguyen
        15. Penalty Core.jpeg
          71 kB
          Nathan Nguyen

            Nguyen Nathan Nguyen
            Nguyen Nathan Nguyen
            Alexander Van der Bellen Alexander Van der Bellen
            Votes:
            0 Vote for this issue
            Watchers:
            10 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 6 hours, 4 minutes
                6h 4m

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