Details
Description
To reproduce:
1. Setup 2 grade items in a course
2. Set the site settings grade_report_averagesdisplaytype and grade_report_rangesdisplaytype to Inherit
3. Set the course's preferences averagesdisplaytype and rangesdisplaytype to default(inherit)
4. Set one of the grade item's display settings to Letter, the other to Percentage
I get this:
( ! ) Warning: end() [function.end]: Passed variable is not an array or object in D:\VertrigoServ\www\moodle_head\grade\report\grader\lib.php on line 1001
Call Stack
- Time Memory Function Location
1 0.0234 128608 {main}( ) ..(null):0
2 1.8421 16314368 grade_report_grader->get_rangehtml( ) ..(null):162
3 1.8714 16316080 end ( ) ..(null):1001
( ! ) Warning: reset() [function.reset]: Passed variable is not an array or object in D:\VertrigoServ\www\moodle_head\grade\report\grader\lib.php on line 1002
Call Stack
# Time Memory Function Location
1 0.0234 128608 {main}( ) ..(null):0
2 1.8421 16314368 grade_report_grader->get_rangehtml( ) ..(null):162
3 1.8716 16316312 reset ( ) ..(null):1002
Which is caused by a contextid for the item with Letter displaytype which doesn't have a match in the grade_letters table. I'm not sure what's supposed to happen here.
Actually, the issue isn't inherit, it's LETTER in general.
If the ranges row is set to LETTER display type, errors occur and nothing gets shown. Other values (REAL or PERCENTAGE) work fine.