Moodle

Gradebook will not show all participants when groups are defined, and course group mode is set to no

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Fixed
  • Affects Version/s: 1.8, 1.8.1, 1.8.2, 1.8.3
  • Fix Version/s: 1.8.4
  • Component/s: Gradebook
  • Labels:
    None
  • Affected Branches:
    MOODLE_18_STABLE
  • Fixed Branches:
    MOODLE_18_STABLE

Description

If there are groups defined in a course, and the course-level groups mode is set to 'no', the gradebook will not always display all participants.

To reproduce (tested on demo.moodle.org):

Set up a course with Group Mode = Visible or Separate. Add at least one group to the course. Go to Participants or Gradebook and choose one of the groups to view. Now edit the course settings and change Group Mode to No. When you view the gradebook, only the group you previously selected will show.

If the course group mode is no, the gradebook should default to showing all participants.

This has been fixed in gradebook_plusV2 - see http://tracker.moodle.org/browse/CONTRIB-105.

Activity

Hide
Anthony Borrow added a comment -

Yu - Here is a patch for Moodle core (18STABLE) based off of the patch that was used for GBPv2 (CONTRIB-105). I'm trying to encourage that any fixes found and made to GBPv2 also get applied to Moodle core. Let me know if you have any questions. I would check these in myself; however, I do not have the time to adequately test them so I have been hesitant to change things in Moodle core. Thanks for your continued work with Moodle. Peace - Anthony

Show
Anthony Borrow added a comment - Yu - Here is a patch for Moodle core (18STABLE) based off of the patch that was used for GBPv2 (CONTRIB-105). I'm trying to encourage that any fixes found and made to GBPv2 also get applied to Moodle core. Let me know if you have any questions. I would check these in myself; however, I do not have the time to adequately test them so I have been hesitant to change things in Moodle core. Thanks for your continued work with Moodle. Peace - Anthony
Hide
Yu Zhang added a comment -

Hi, thanks for the report and patch. I noticed that the patches use

if ($currentgroup = get_current_group($course->id) && groupmode($course) != 0) {

I think this is not correct because && has higher precedence than = (assignment) so I put parenthesis around the assignment.

if (($currentgroup = get_current_group($course->id)) && groupmode($course) != 0) {

Please let me know if this is not correct.

Cheer,

Yu

Show
Yu Zhang added a comment - Hi, thanks for the report and patch. I noticed that the patches use if ($currentgroup = get_current_group($course->id) && groupmode($course) != 0) { I think this is not correct because && has higher precedence than = (assignment) so I put parenthesis around the assignment. if (($currentgroup = get_current_group($course->id)) && groupmode($course) != 0) { Please let me know if this is not correct. Cheer, Yu

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: