Details

While testing this it will be handy to have two browsers, ie FF and chrome, so you can be logged in as admin and a student at the same time.

As admin...

Check that you have the system setting enablegroupmembersonly turned OFF.

In a course create two groups. Then create two groupings. Put one group in each grouping. Give them all names that you won't get confused ie "first group" "first grouping" "second group" "second grouping" or similar.

Put a student into one of the groups (remember which one).

Edit an activity, show advanced and set "grouping" to the grouping the student is in.

As student go to the user report for the appropriate course. You should be able to see the activity.

As admin, set the activity grouping to the other grouping.

As student refresh the user report. You should still be able to see the activity.

As admin turn on enablegroupmembersonly. Go to the activity settings and check "Available for group members only" if it isnt already.

As a student refresh the user report. You should now NOT be able to see the activity as its assigned to a grouping the student is not in.

As admin edit the activity and set the activity to be for the student's grouping.

As student refresh again and now you should be able to see the activity.

While testing this it will be handy to have two browsers, ie FF and chrome, so you can be logged in as admin and a student at the same time.
As admin...
Check that you have the system setting enablegroupmembersonly turned OFF.
In a course create two groups. Then create two groupings. Put one group in each grouping. Give them all names that you won't get confused ie "first group" "first grouping" "second group" "second grouping" or similar.
Put a student into one of the groups (remember which one).
Edit an activity, show advanced and set "grouping" to the grouping the student is in.
As student go to the user report for the appropriate course. You should be able to see the activity.
As admin, set the activity grouping to the other grouping.
As student refresh the user report. You should still be able to see the activity.
As admin turn on enablegroupmembersonly. Go to the activity settings and check "Available for group members only" if it isnt already.
As a student refresh the user report. You should now NOT be able to see the activity as its assigned to a grouping the student is not in.
As admin edit the activity and set the activity to be for the student's grouping.
As student refresh again and now you should be able to see the activity.

Description

If a student views their Gradebook in a Course (regardless of their Group &/or the individual Assignments/Assessments visiblity settings) they see ALL Assignments/Assessments of ALL Assessments from all Groups which is confusing as they are not sure which Assignments/Assessments relate specifically to them. Please see a JPEG example below.

Just as a teacher can view only one group in the Gradebook should they choose it's not unreasonable for a student to see only the Assignments/Assessments that relate to them.

Michael de Raadt
added a comment - 07/Feb/12 3:38 PM Thanks for reporting that.
I've put that on the backlog.
In the meantime feel free to help us work on this issue. If you are able to provide a patch, please add a patch label so we will spot it.

Raymond Antonio
added a comment - 19/Mar/12 9:55 AM Hi Michael,
I have got around to developing a patch for this bug and it is ready for testing. The patch sits on my github mooodle repo on MDL-31510 branch at git@github.com:raymondAntonio/moodle.git.
cheers,
Ray

Actually it looks like this has been almost but not quite fixed at some point. MDL-26476 looks like a possible candidate. There is still some work to do however.

Currently in the master branch if you enabled enablegroupmembersonly (allowing activities to be limited to a single grouping) and limit an activity to a grouping then students in other groupings still have the activity on their user report. The activity name is disabled. Its a link for students in the correct grouping.

The activity should be being hidden entirely. It does appear at all on the course page.

Andrew Davis
added a comment - 07/Apr/12 6:04 PM Actually it looks like this has been almost but not quite fixed at some point. MDL-26476 looks like a possible candidate. There is still some work to do however.
Currently in the master branch if you enabled enablegroupmembersonly (allowing activities to be limited to a single grouping) and limit an activity to a grouping then students in other groupings still have the activity on their user report. The activity name is disabled. Its a link for students in the correct grouping.
The activity should be being hidden entirely. It does appear at all on the course page.

The code looks good. I tried testing out the patch but I couldn't seem to get the activity to disappear from the activity report. I followed the testing instructions with a quiz activity. Looking at the code $cm->visible was always set at 1. It could possible be my settings. If you could possibly just double check that section before heading to integration review.

Adrian Greeve
added a comment - 24/Apr/12 1:13 PM Hi Andrew,
The code looks good. I tried testing out the patch but I couldn't seem to get the activity to disappear from the activity report. I followed the testing instructions with a quiz activity. Looking at the code $cm->visible was always set at 1. It could possible be my settings. If you could possibly just double check that section before heading to integration review.

The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.

Eloy Lafuente (stronk7)
added a comment - 27/Apr/12 11:15 PM The main moodle.git repository has just been updated with latest weekly modifications. You may wish to rebase your PULL branches to simplify history and avoid any possible merge conflicts. This would also make integrator's life easier next week.
TIA and ciao

Amanda Doughty
added a comment - 13/Aug/13 2:52 PM I am confused by this. The following two issues imply this will never be fixed:
https://tracker.moodle.org/browse/MDL-28225
https://tracker.moodle.org/browse/MDL-13868
However my users are certain it was fixed as per this issue in 2.3 and is broken again in 2.4.

Hi Amanda. Those two issues you linked to are quite old. I don't recall what was going on at the time but certainly students should not see assignments for groups they are not in if the course is set to "separate groups".

If this bug has reappeared in 2.4 please go to MDL-41168 and add a comment explaining what you're seeing.

Andrew Davis
added a comment - 15/Aug/13 1:44 AM Hi Amanda. Those two issues you linked to are quite old. I don't recall what was going on at the time but certainly students should not see assignments for groups they are not in if the course is set to "separate groups".
If this bug has reappeared in 2.4 please go to MDL-41168 and add a comment explaining what you're seeing.