Moodle

Grader report's range row produces errors when set to inherit, and when some grade_items are Letter

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.9
  • Fix Version/s: 1.9
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_19_STABLE
  • Fixed Branches:
    MOODLE_19_STABLE

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

  1. 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.

Activity

Hide
Nicolas Connault added a comment -

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.

Show
Nicolas Connault added a comment - 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.
Hide
Petr Škoda (skodak) added a comment -

grrr, missing return statement, fixed - sorry...

Show
Petr Škoda (skodak) added a comment - grrr, missing return statement, fixed - sorry...

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: