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

Grade display outside of the gradebook reports

XMLWordPrintable

    • MOODLE_28_STABLE
    • MDL-50582-master
    • Hide

      How to reproduce for assignment:

      1. Create a new course with a user enrolled.
      2. Ensure at Grade administration > Setup > Course grade settings that the Min and max grades used in calculation setting is set to Min and max grades as specified in grade item settings.
      3. Create a new assignment, max points 50.
      4. Grade the user with 50/50 points.
      5. In both the gradebook and in the assignment, the user has 100%.
      6. Change the assignment's max points to 100.
      7. In both the gradebook and in the assignment, the user has 50%.
      8. Go to Grade administration > Setup > Course grade settings that the Min and max grades used in calculation setting is set to Initial min and max grades.
      9. In the gradebook, the user has 100% and in the assignment, the user has 50%. (Note: this is caused by the use of grade_format_gradevalue in \assign::display_grade)
      10. Now go to Activity reports > Outline report (Don't know how to navigate here, but URL looks like this: /report/outline/user.php?id=USERID&course=COURSEID&mode=outline).
      11. Note that the grade here also shows as 50% (Note: this is caused by the use of grade_get_grades).
      Show
      How to reproduce for assignment: Create a new course with a user enrolled. Ensure at Grade administration > Setup > Course grade settings that the Min and max grades used in calculation setting is set to Min and max grades as specified in grade item settings . Create a new assignment, max points 50. Grade the user with 50/50 points. In both the gradebook and in the assignment, the user has 100%. Change the assignment's max points to 100. In both the gradebook and in the assignment, the user has 50%. Go to Grade administration > Setup > Course grade settings that the Min and max grades used in calculation setting is set to Initial min and max grades . In the gradebook, the user has 100% and in the assignment, the user has 50%. (Note: this is caused by the use of grade_format_gradevalue in \assign::display_grade) Now go to Activity reports > Outline report (Don't know how to navigate here, but URL looks like this: /report/outline/user.php?id=USERID&course=COURSEID&mode=outline). Note that the grade here also shows as 50% (Note: this is caused by the use of grade_get_grades).

      First, sorry, I have bugged a lot of folks about this issue already. The waters are still a little murky though and now it looks like core code is potentially affected which widened the scope.

      OK, with that out of the way, here we go.

      Background: MDL-48618 and its linked regression issues: MDL-47059 and MDL-47078. tl;dr The display of grades in the gradebook has changed. Now with a setting, grades can be displayed with using the min/max of the grade or of the grade item.

      The problem we are seeing is that the change in the display of the grade happens outside of the grade_format_gradevalue functions. Which then, we assume, invalidates any existing calls to the grade_format_gradevalue functions.

      These grade_format_gradevalue functions are used by our plugins and 3rd party plugins and by core methods, most notably, grade_get_grades, grade_get_course_grades and grade_get_course_grade. Of these, grade_get_grades is well used within standard Moodle.

      So, open questions would be, is this a bug? If yes, then we are wondering how core might fix these grade methods so that we can implement the same fix in our plugins.

            Unassigned Unassigned
            bushido Mark Nielsen
            Votes:
            8 Vote for this issue
            Watchers:
            23 Start watching this issue

              Created:
              Updated:
              Resolved:

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

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