Grades displayed by group

Grades displayed by group

by Dave Schneider -
Number of replies: 23
Hi all,

I'm trying to get Moodle to only show the grades for the people in a single group. I only one the Non-Editing teacher to have access to the students grades that are in their assigned group. In the permissions, when I prohibit accessing other groups, in the grades window, all enrolled students still show up, even though their group name is the only one available in the group drop-down. If I go in and permit them to have the ability to access other groups, if they select their group from the drop-down, then it DOES filter out the group.. I just can't let them have access to all groups. Any ideas on how to get it to where when they look in grades, their group is the only one displayed in the drop-down AND only the participants in their group display?

Any help is appreciated! Thank you...
In reply to Dave Schneider

Re: Grades displayed by group

by Dave Schneider -
Anybody have any suggestions? Thank you..smile
In reply to Dave Schneider

Re: Grades displayed by group

by juan pablo ramirez -
Same problem, did you find any solution?
In reply to juan pablo ramirez

Re: Grades displayed by group

by Ross Hume -
I found this problem too. There is a nasty hack - I'm really new to Moodle so no idea whether this is going to break other things.
The problem seems to be in /grade/report/grader/lib.php on ~line 141
The call to setup_groups() only fires if the pref "showgroups" is set. However, I think this will only be set if the dropdown display of groups is chosen. If not (i.e. in the case when the viewer is restricted to only one group), the whole list of student participants is shown.
Taking off the if clause around setup_groups() seems to work fine for me, but I'm sure someone with a bit more knowledge could set me straight on this.
In reply to Ross Hume

Re: Grades displayed by group

by Dan Leighton -
Many of the issues seem to be helped by ensuring that in the Course Settings the group mode is set to anything apart from No Groups.
In reply to Ross Hume

Re: Grades displayed by group

by Stephanie Belt -

Ross,

I am new to Moodle as well and I am experiencing this same issue.  I am very interested in trying this fix, but I really don't even know where to begin.  This is our first go around at anything like this, so we are really feeling around in the dark when it comes to things like this.  I am interested to learn how I even get to "/grade/report/grader/lib.php on ~line 141". 

In reply to Stephanie Belt

Re: Grades displayed by group

by Ross Hume -
Stephanie - I'd be careful about messing about with this if you're not too sure what you're up to...!
However, I meant that you need to edit the actual file found at /moodle/grade/report/grader/lib.php. You will need to have access to the file via ftp.
Once you have the file, find the line on about 141 that looks like this:
// Setup groups if requested
 if ($this->get_pref('showgroups')) {
 $this->setup_groups();
 }
And then put double forward slashes in front of the 2nd and 4th lines so it looks like this:

// Setup groups if requested
 //if ($this->get_pref('showgroups')) {
 $this->setup_groups();
 //}
Copy the new version of the file back to the server.

You can always change it back if everything breaks...

Hope that helps, but I just want to reiterate my warning about it possibly interfering with other operations.
In reply to Ross Hume

Re: Grades displayed by group

by Stephanie Belt -
Thank you very much!  I will take your advice and while I would really like to eventually learn to take care of this myself, I probably wont attempt it yet.  I think I will talk with our other System Admins and discuss our options.  Again, thank you so much for your help!!
In reply to Ross Hume

Re: Grades displayed by group

by John Isner -
Hi Ross and Stephanie,
When you discover a problem like this, it is always better to search the tracker to see if the problem has already been reported. If it hasn't, then you should create a new issue in the tracker. That way, the developers can fix the problem for everyone, not just the people who happen to read this forum. If the bug is major, the developers often backport the fix to older versions.

I don't see this issue in Moodle 1.9, so I think you should report it. Just go to tracker.moodle.org, create a new account if you don't already have one, then Create new issue, giving enough detail so that the developers can recreate the problem. Ross, you can attach your patch to the bug report.
In reply to John Isner

Re: Grades displayed by group

by Ross Hume -
Thanks for the guidance John.

I have searched the tracker, and there are similar issues but not quite the same, so I have started a new issue here: MDL-15617
In reply to Ross Hume

Re: Grades displayed by group

by Lynn Daley -
Hi guys, have you ensured that your course setting is set to separate groups under group mode. I have this set and my teachers can most definitely only see their own groups.

You also need to ensure that the permissions for your non-editing teacher role is set to prevent for 'Access all groups'. I can't remember whether that is the default or whether I had to change it.

Hope this helps, Lynn
In reply to Lynn Daley

Re: Grades displayed by group

by Stephanie Belt -

Thank you so much!

I have checked both of these things and everything looks right.  That is why I am so confused.  We have reported this as an issue, hopefully we can get it figured out very soon!

Thank you again for the help!

In reply to Lynn Daley

Re: Grades displayed by group

by John Isner -
Very good advice. Non-editing teacher has moodle/site:accessallgroups ("Access all groups") = Allow by default.

Incidentally, I would use the value Not set rather than Prevent.
In reply to John Isner

Re: Grades displayed by group

by Lynn Daley -
Why is that John? I couldn't really see a difference.

>Incidentally, I would use the value Not set rather than Prevent.
In reply to Lynn Daley

Re: Grades displayed by group

by Jonathan Moore -
In any given situation a user will actually have multiple roles active. You inherit permissions from multiple roles at many contexts. If you can get the needed behavior with Not Set, it interacts better with these inherited permissions than a Prevent. If you use Prevent in a role, it can "block" a user from getting an Allow value in another role.

A good illustration of this is too look at the permissions on the default built-in roles. I think other than guest none of the default roles use Prevent.




In reply to Jonathan Moore

Re: Grades displayed by group

by Lynn Daley -
Oh right cheers, I think I understand. So not set cascades down the chain until it reaches a difference, and the bottom of the chain defaults to not allowed?
In reply to Lynn Daley

Re: Grades displayed by group

by Ross Hume -
Hi Lynn - Thanks for the ideas, however, my group mode is set to "separate groups" and "Access all groups" is also set to prevent...

Are you using Moodle 1.9.1?
In reply to Ross Hume

Re: Grades displayed by group

by Lynn Daley -
Hi Ross, I'm using Moodle 1.9 + (Build: 20080402) which seems to work, so I think will stay with this build until it is sorted out as I too cannot be having tutors accessing other groups.

Lynn
In reply to Dave Schneider

Re: Grades displayed by group

by Jeff Eastman -
Hi Everyone,

I've been trying for what seems like forever to work this problem out. I have serveral groups in a course and each group has a moderator that needs access to their group members' grades, but no one elses. I've tried modifying lib.php, and setting view all courses to "not set", and various other alterations to the "non-editing teacher" role.

Does anyone have a solution to this yet? I'm using version 1.9, build (2007101509). This is so frustrating.

Also, on a side note, if anyone's interested I have a link to a hack to create site wide groups, originally posted by Dakota Duff.

Any help would be greatly appreciated!
In reply to Dave Schneider

Re: Grades displayed by group

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
Looks like this an unusual bug in Moodle. The problem is that it doesn't get the users by group unless the report preferences are set to "Show groups". If a user is in a separate group, that option isn't available to them, but it is to the report's default settings. I changed the report's default settings to "Show groups". Now the grade report works as expected.

mike
In reply to Mike Churchward

Re: Grades displayed by group

by Dakota Duff -

Ah ha! So glad I found this. My teachers were getting restless.

Seems to me this Moodle bug needs squashed. Is there somewhere in the tracker where we can vote on this?

In reply to Dakota Duff

Re: Grades displayed by group

by Mike Churchward -
Picture of Core developers Picture of Plugin developers Picture of Testers
In reply to Mike Churchward

Re: Grades displayed by group

by Dakota Duff -

I get a "Permissions Violation" error when trying to load that page.

Where's the tracker for the tracker?

Oh well. Thanks for the solution, anyway.

In reply to Dakota Duff

Re: Grades displayed by group

by David Nash -
I have this issue again now since upgrading to 1.9.3

I have covered all the criteria required and I cannot get it to work now.

As Admin I can view a the gradebook and filter via the Group dropdown menu no problem to view users in each group.

The Non Editing teachers, set to Access All Groups = prevent

The Course Settings and the quizzes in the course are all set to Group mode and Visible only.

The previous issue was resolved using the hack of:

// Setup groups if requested
//if ($this->get_pref('showgroups')) {
$this->setup_groups();
// }

in moodle/grade/report/grader/lib.php line 139

The upgrade obviously replaced the padge, so I recommented put the lines, but this time it does not work.

The Non Editing Teachers can see all users in the gradebook, instead of just their group only.

I need to resolve this asap please?