Moodle
  1. Moodle
  2. MDL-31510

Students in Groups see ALL Assignments in the Gradebook regardless of their Group allocation

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: 2.1
    • Fix Version/s: 2.1.6, 2.2.3
    • Component/s: Gradebook
    • Labels:
    • Testing Instructions:
      Hide

      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.

      Show
      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.
    • Workaround:
      Hide

      There are none that we know of- only frustration and confusion for the students AND teachers!

      Show
      There are none that we know of- only frustration and confusion for the students AND teachers!
    • Affected Branches:
      MOODLE_21_STABLE
    • Fixed Branches:
      MOODLE_21_STABLE, MOODLE_22_STABLE
    • Pull Master Branch:
      MDL-31510_group_activities
    • Rank:
      38053

      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.

        Issue Links

          Activity

          Hide
          Michael de Raadt added a comment -

          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.

          Show
          Michael de Raadt added a comment - 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.
          Hide
          Raymond Antonio added a comment -

          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

          Show
          Raymond Antonio added a comment - 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
          Hide
          Andrew Davis added a comment -

          Hi Raymond. Can you provide a diff URL?

          Show
          Andrew Davis added a comment - Hi Raymond. Can you provide a diff URL?
          Hide
          Andrew Davis added a comment -

          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.

          Show
          Andrew Davis added a comment - 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.
          Hide
          Andrew Davis added a comment -

          Adding branch info for a possible solution.

          Show
          Andrew Davis added a comment - Adding branch info for a possible solution.
          Hide
          Andrew Davis added a comment -

          Adding testing instructions. Putting this up for peer review.

          Show
          Andrew Davis added a comment - Adding testing instructions. Putting this up for peer review.
          Hide
          Adrian Greeve added a comment -

          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.

          Show
          Adrian Greeve added a comment - 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.
          Hide
          Andrew Davis added a comment -

          Added a missing step to the testing instructions

          Show
          Andrew Davis added a comment - Added a missing step to the testing instructions
          Hide
          Andrew Davis added a comment -

          Adding branches and putting this up for integration.

          Show
          Andrew Davis added a comment - Adding branches and putting this up for integration.
          Hide
          Eloy Lafuente (stronk7) added a comment -

          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

          Show
          Eloy Lafuente (stronk7) added a comment - 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
          Hide
          Sam Hemelryk added a comment -

          Thanks Andrew, this has been integrated now. I did make one additional commit to fix whitespace.

          Cheers
          Sam

          Show
          Sam Hemelryk added a comment - Thanks Andrew, this has been integrated now. I did make one additional commit to fix whitespace. Cheers Sam
          Hide
          Rossiani Wijaya added a comment -

          This looks great.

          Test passed.

          Show
          Rossiani Wijaya added a comment - This looks great. Test passed.
          Hide
          Eloy Lafuente (stronk7) added a comment -
          UPDATE tracker_issues
             SET status = 'Closed',
                comment = 'Thanks!'
          WHEN participants = 'Did a gorgeous work'
          

          This landed upstream some hours ago (some - me - developer fell slept in the sofa yesterday before spamming this).

          Show
          Eloy Lafuente (stronk7) added a comment - UPDATE tracker_issues SET status = 'Closed', comment = 'Thanks!' WHEN participants = 'Did a gorgeous work' This landed upstream some hours ago (some - me - developer fell slept in the sofa yesterday before spamming this).
          Hide
          Amanda Doughty added a comment -

          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.

          Show
          Amanda Doughty added a comment - 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.
          Hide
          Andrew Davis added a comment -

          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.

          Show
          Andrew Davis added a comment - 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.

            People

            • Votes:
              8 Vote for this issue
              Watchers:
              10 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: