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

Advanced grading page doesn't display how guide score is converted to the grade for activities

    XMLWordPrintable

Details

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MOODLE_310_STABLE, MOODLE_39_STABLE
    • MDL-70034_master
    • Hide
      Test 1
      1. Create a course
      2. Create a forum activity and expand the 'Whole forum grading' section and set 'Type' to 'Point', 'Maximum grade' to '50' and 'Grading method' to 'Marking guide'.
      3. Click 'Save and display'.
      4. Click on 'Define new grading form from scratch'.
      5. Create a couple of criterions (ensure to enter a name for each) with a total score of less than 50.
      6. Click "Save marking guide and get it ready".
      7. Confirm you are directed to the mod/forum/view.php page.
      8. Click on the cog in the top-right corner and then 'Advanced grading'.
      9. Confirm you get a warning about marking guide maximum grade is different to the activity one.
      10. Click the "Edit the current form definition" button.
      11. Set it so the total scores of the criterions exceeds 50.
      12. Click "Save"
      13. Confirm you get a warning about going over the maximum score.

       

      Show
      Test 1 Create a course Create a forum activity and expand the 'Whole forum grading' section and set 'Type' to 'Point', 'Maximum grade' to '50' and 'Grading method' to 'Marking guide'. Click 'Save and display'. Click on 'Define new grading form from scratch'. Create a couple of criterions (ensure to enter a name for each) with a total score of less than 50. Click "Save marking guide and get it ready". Confirm you are directed to the mod/forum/view.php page. Click on the cog in the top-right corner and then 'Advanced grading'. Confirm you get a warning about marking guide maximum grade is different to the activity one. Click the "Edit the current form definition" button. Set it so the total scores of the criterions exceeds 50. Click "Save" Confirm you get a warning about going over the maximum score.  

    Description

      Following message doesn't get displayed on the advanced grading page when required.

      'WARNING: Your marking guide has a maximum grade of <b>{$a->maxscore} points</b> but the maximum grade set in your activity is {$a->modulegrade} The maximum score set in your marking guide will be scaled to the maximum grade in the module.<br />
      Intermediate scores will be converted respectively and rounded to the nearest available grade.'

      Steps to replicate: 

      1.  Create a course 
      2. Create a forum activity with Grade set to Point and Maximum grade = 50
      3. Set Grading method to Marking guide
      4. On advanced grading screen Define new grading from from scratch and create a couple of criterions with total max Score more than 50.
      5. Save  marking guide and get it ready.
      6. On advanced grading screen:

      expected: Warning message displayed

      actual: no warning message displayed 

       

      This happens because for some reason forum activity  has "grade_forum" field in "forum" table, but rest of the activities e.g.  "lesson" or "assign" have it as "grade".

      This breaks logic when we expect "grade" field to be available as part of "moduleinstance" object received here https://github.com/moodle/moodle/blob/master/grade/grading/form/guide/lib.php#L356

      and used here https://github.com/moodle/moodle/blob/master/grade/grading/form/guide/renderer.php#L774

      Attachments

        Issue Links

          Activity

            People

              markn Mark Nelson
              dmitriim Dmitrii Metelkin
              Dmitrii Metelkin Dmitrii Metelkin
              Sara Arjona (@sarjona) Sara Arjona (@sarjona)
              Janelle Barcega Janelle Barcega
              Andrew Lyons, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Stevani Andolo, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                18/Jan/21

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 hour, 3 minutes
                  1h 3m