Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-62868

Restrict access by grouping not working immediately after it is set up

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      1. Create a course with 2 students
      2. Create 2 groups, 1 student in each one. Student 1 in A, Student 2 in B.
      3. Create 2 groupings, one group in each one. Group A in Grouping A, Group B in Grouping B.
      4. Create 2 activities, one restricted to Grouping A, the other to Grouping B
      5. Now, as student 1, log in. One activity will be accessible, the other won't.
      6. Now, in another session (to save logging out and back in again), modify Grouping B (currently only has Group B) and add Group A to it.
      7. Now, as the student, referesh the page.
      8. Verify that you can now access both activities.
      9. Now, back in the teacher's session, remove Group A from Grouping B
      10. Again, as the student, refresh the page.
      11. Verify that you again only have access to a single activity.
      Show
      Create a course with 2 students Create 2 groups, 1 student in each one. Student 1 in A, Student 2 in B. Create 2 groupings, one group in each one. Group A in Grouping A, Group B in Grouping B. Create 2 activities, one restricted to Grouping A, the other to Grouping B Now, as student 1, log in. One activity will be accessible, the other won't. Now, in another session (to save logging out and back in again), modify Grouping B (currently only has Group B) and add Group A to it. Now, as the student, referesh the page. Verify that you can now access both activities. Now, back in the teacher's session, remove Group A from Grouping B Again, as the student, refresh the page. Verify that you again only have access to a single activity.
    • Difficulty:
      Easy
    • Affected Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_34_STABLE, MOODLE_35_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull Master Branch:
      MDL-62868-master

      Description

      Replication Steps (Added by Jake)

      1. Create a course with 2 students
      2. Create 2 groups, 1 student in each one. Student 1 in A, Student 2 in B.
      3. Create 2 groupings, one group in each one. Group A in Grouping A, Group B in Grouping B.
      4. Create 2 activities, one restricted to Grouping A, the other to Grouping B
      5. Now, as student 1, log in. One activity will be accessible, the other won't.
      6. Now, in another session (to save logging out and back in again), modify Grouping B (currently only has Group B) and add Group A to it.
      7. Now, as the student, referesh the page.
        Expected: You should be able to access both activities.
        Actual: You still can only access the first activity which is restricted to Grouping A.

      Original report from David

      As far as I can see, this is not working for any type of activity. This is not a quiz-specific bug.

      Steps to reproduce: (I did this on https://qa.moodle.net/course/view.php?id=2).

      1. Create a test course.
      2. Enrol a test student 'student'.
      3. Create a group 'Group A' and add 'student' to it.
      4. Greate a grouping 'Grouping A' and add 'Group A' to it.
      5. Create an activity of any type (I tried with both quiz and assignment).
      6. Under 'Restrict access' set 'Must belong to a group in Grouping A' (I.e. Set a 'Grouping = Grouping A' restriction)
      7. Log in as student.
      8. Try to access the activity.

      Expected result: the student can access the activity.

      Actual result: when you click on the name of the activity, you are redirected back to the cousre page, with notification "Online Text Assignment Assignment
      Not available unless: You belong to a group in Grouping A" displayed at the top.

      I think this might be a transient problem (so caching???): After the above steps, if you remove 'student' from 'Group A', then add them back, then it seems to start working. Probably 'Purge all caches' would also fix it.

      So, this is certainly order-dependent, and since I wrote the steps above after my testing was complete, I hope I got the order right.

      Original report:

      In a course I have numerous groups and groupings. Recently, I created three different quizzes (A, B, C) that I wanted only available to three different groupings (A, B, C). In each grouping there were 4 groups.

      The "Common module settings" Group mode is "Separate groups" and Restrict access was set to grouping must match the following and the grouping A was set for quiz A and Grouping B for Quiz B and Grouping C for quiz C. Students in the groups in grouping A, B, C were unable to access their respective quizzes.

      After removing the restrict access setting they were able to see the quizzes, but were able to access the other quizzes as well.

      In looking at the quiz results the separate groups by grouping is working correctly. For example, I can only see the groups in grouping A only in the A quiz.

      The groups are also in different groupings based on instructor and other assignments, but according to the documentation this shouldn't be a problem.

        Attachments

          Activity

            People

            • Votes:
              1 Vote for this issue
              Watchers:
              7 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                10/Sep/18