History | Log In     View a printable version of the current page.  
We are currently focused especially on Moodle 2.0, Moodle 1.9.x bugs and Moodle 1.9.x testing.    Confused? Lost? Please read this introduction to the Tracker.
Issue Details (XML | Word | Printable)

Key: MDL-15712
Type: Bug Bug
Status: Resolved Resolved
Resolution: Fixed
Priority: Major Major
Assignee: Petr Škoda
Reporter: Daniel Servos
Votes: 0
Watchers: 0
Operations

If you were logged in you would be able to see more operations.
Moodle

groups_get_course_group returns incorect value

Created: 19/Jul/08 03:37 PM   Updated: 19/Jul/08 06:30 PM
Component/s: Gradebook, Groups
Affects Version/s: 2.0
Fix Version/s: 2.0

File Attachments: 1. Text File grouplib_patch_to_groups_get_course_group.txt (0.5 kb)

Issue Links:
Duplicate
 

Database: Any
Participants: Daniel Servos and Petr Škoda
Security Level: None


 Description  « Hide
When $SESSION was change from an array to an object in the development branch it partly broke the function groups_get_course_group in grouplib.php.

In groups_get_course_group there is the fallowing check:

if (!array_key_exists('activegroup', $SESSION))

Since $SESSION is now an object it will allways return false and then runs:

$SESSION->activegroup = array();

This means that in the case when the param $update is not passed as true to groups_get_course_group the URI value 'group' is ignored and the wrong active group is returned.

This effects the gradebook in that the group selector no longer works and for the grader report all groups are shown even when only one group is selected to be shown.

I have attached a patch that fixes the problem for my local install, however i am not sure of it's correctness as i am not filmilure with the moodle_sessions class

 All   Comments   Change History   Version Control      Sort Order: Ascending order - Click to sort in descending order
Petr Škoda - 19/Jul/08 04:08 PM
thanks, committed into cvs