Issue Details (XML | Word | Printable)

Key: MDL-15253
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Nicolas Connault
Reporter: Daniel Servos
Votes: 0
Watchers: 2
Operations

Add/Edit UI Mockup to this issue
If you were logged in you would be able to see more operations.
Moodle

private method grade_report::setup_groups() should be public?

Created: 16/Jun/08 02:07 PM   Updated: 16/Jun/08 05:31 PM
Return to search
Component/s: Gradebook
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File grade_report_fix.txt (0.6 kB)


Participants: Daniel Servos and Nicolas Connault
Security Level: None
Resolved date: 16/Jun/08
Affected Branches: MOODLE_20_STABLE
Fixed Branches: MOODLE_20_STABLE


 Description  « Hide
Method setup_groups() in class grade_report has been changed to private in Moodle 2.0 development head when it should be public (or the grader plug-in needs fixing).

report/grader and some other grade book plug-ins extend the class grade_report and call setup_groups() witch used to be public. This means that grader and other plug-ins will throw a Fatal error: "Fatal error: Call to private method grade_report::setup_groups() from context 'grade_report_grader' in /var/www/localhost/htdocs/moodle/grade/report/grader/lib.php on line 147" when trying to show or deal with groups.

This can be fixed by making setup_groups public or protected. I am rather sure it should be one of those as no method in grade_report calls setup_groups so making it private means nothing is or can use it.

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Daniel Servos added a comment - 16/Jun/08 02:14 PM - edited
Added a patch to fix this issue.

Daniel Servos made changes - 16/Jun/08 02:14 PM
Field Original Value New Value
Attachment grade_report_fix.txt [ 14238 ]
Petr Skoda made changes - 16/Jun/08 03:21 PM
Assignee Petr Skoda [ skodak ] Nicolas Connault [ nicolasconnault ]
Nicolas Connault committed 1 file to 'Moodle CVS' - 16/Jun/08 05:30 PM
MDL-15253 Changed setup_group access from private to protected.
MODIFY grade/report/lib.php   Rev. 1.42    (+2 -2 lines)
Nicolas Connault added a comment - 16/Jun/08 05:31 PM
Thanks Daniel for this accurate report. It is fixed now.

Nicolas Connault made changes - 16/Jun/08 05:31 PM
Resolution Fixed [ 1 ]
Status Open [ 1 ] Resolved [ 5 ]
Fix Version/s 2.0 [ 10122 ]