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...
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.
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".
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.
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.
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
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
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!
Incidentally, I would use the value Not set rather than Prevent.
>Incidentally, I would use the value Not set rather than Prevent.
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.
Are you using Moodle 1.9.1?
Lynn
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!
mike
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?
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.
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?