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 forum activity

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.9.2, 3.10, 3.11
    • Fix Version/s: None
    • Component/s: Forum, Grading methods
    • Labels:
    • Affected Branches:
      MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE

      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

          Activity

            People

            Assignee:
            Unassigned Unassigned
            Reporter:
            dmitriim Dmitrii Metelkin
            Participants:
            Component watchers:
            Andrew Nicols, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze, Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Peter Dias
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Dates

              Created:
              Updated: