Details
-
Type:
Bug
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 1.8.4
-
Fix Version/s: None
-
Component/s: Assignment (2.2)
-
Labels:None
-
Affected Branches:MOODLE_18_STABLE
Description
Steps to reproduce
============
1. create new assignment
2. set a scale as a grading method
3. do not grade any submission!
4. go to the grade book and see the assignment grades
What I expected
==========
The name of the scale should be displayed in the grade book.
What actually happened
===============
The assignment is considered as one with maximum grade "100" points. This leads to wrong final grade calculation because students never receive points in this assignment. That's why I set this as critical issue.
The patch attached fixes the issue.
Problem analysis
===========
mod/assignment/lib.php should return a scale name as a maxgrade for scale based assignments. If there are no grades yet, lib.php returns just empty string (that's the bug) and grade book replaces this by "100" (maybe some default value?)
The patch fixes assignment/lib.php so it returns the name of the scale in $return->maxgrade also in case there are no grades yet (as it should always do).