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

Fix log and loglive report user selectors to show the list in expected order

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-80565-403
    • MDL-80565-main
    • Hide

      Covered by phpunit.

      Setup

      1. Create a course with the following settings: Groups -> Group mode -> Separate groups.
      2. Enrol s1 and s2 as students and t1 as teacher.
      3. Add, at least, one activity to the course.
      4. Go to Participants -> Users -> Permissions -> Teacher -> Access all groups -> Prevent.
      5. Create 2 groups in that course. Enrol the students to different groups.
      6. Login as s1 and s2 and access any of the activities in the course (to generate some logs).

      Scenario 1. Separate groups and teacher belongs to all the groups.

      1. Make the teacher a member of both groups.
      2. Login as t1 and access the course.
      3. Go to Reports -> Logs.
      4. Check the Group selector is shown and it contains all the groups.
      5. Check in the "All participants" selector, there are listed all the users in the course.
      6. Select a group and click "Get these logs".
      7. Check it shows logs for this group.
      8. Check in the "All participants" selector, there are only listed the users in the selected group.
      9. Go to Reports -> Live logs and leave it open.
      10. In a new window, log in using a student from each group and access the course.
      11. Go back to the Live logs window, reload the page and check the logs for these users are displayed.

       

      Scenario 2. Separate groups and the teacher only belongs to one group.

      1. Make the teacher a member of one group only.
      2. Login as t1 and access the course.
      3. Go to Reports -> Logs.
      4. Check the Group selector is shown but only contains the group to which the user belongs.
      5. Check in the "All participants" selector, there are only listed the users in the group to which the user belongs.
      6. Click the "Get these logs" button.
      7. Check the logs are displayed properly.
      8. In a new window, log in using a student from each group and access the course.
      9. Go back to the Live logs window, reload the page and check that only are displayed the logs for the user in the same group as teacher t1.

       

      Scenario 3. Visible groups and the teacher only belongs to one group.

      1. Make the teacher a member of one group only.
      2. Edit course settings and change Group mode to "Visible groups".
      3. Login as t1 and access the course.
      4. Go to Reports -> Logs.
      5. Check the Group selector is shown and it contains all the groups.
      6. Check in the "All participants" selector, there are listed all the users in the course.
      7. Click the "Get these logs" button.
      8. Check the logs are displayed properly.
      9. In a new window, log in using a student from each group and access the course.
      10. Go back to the Live logs window, reload the page and check the logs for these users are displayed.
      Show
      Covered by phpunit. Setup Create a course with the following settings: Groups -> Group mode -> Separate groups. Enrol s1 and s2 as students and t1 as teacher. Add, at least, one activity to the course. Go to Participants -> Users -> Permissions -> Teacher -> Access all groups -> Prevent. Create 2 groups in that course. Enrol the students to different groups. Login as s1 and s2 and access any of the activities in the course (to generate some logs). Scenario 1. Separate groups and teacher belongs to all the groups. Make the teacher a member of both groups. Login as t1 and access the course. Go to Reports -> Logs. Check the Group selector is shown and it contains all the groups. Check in the "All participants" selector, there are listed all the users in the course. Select a group and click "Get these logs". Check it shows logs for this group. Check in the "All participants" selector, there are only listed the users in the selected group. Go to Reports -> Live logs and leave it open. In a new window, log in using a student from each group and access the course. Go back to the Live logs window, reload the page and check the logs for these users are displayed.   Scenario 2. Separate groups and the teacher only belongs to one group. Make the teacher a member of one group only. Login as t1 and access the course. Go to Reports -> Logs. Check the Group selector is shown but only contains the group to which the user belongs. Check in the "All participants" selector, there are only listed the users in the group to which the user belongs. Click the "Get these logs" button. Check the logs are displayed properly. In a new window, log in using a student from each group and access the course. Go back to the Live logs window, reload the page and check that only are displayed the logs for the user in the same group as teacher t1.   Scenario 3. Visible groups and the teacher only belongs to one group. Make the teacher a member of one group only. Edit course settings and change Group mode to "Visible groups". Login as t1 and access the course. Go to Reports -> Logs. Check the Group selector is shown and it contains all the groups. Check in the "All participants" selector, there are listed all the users in the course. Click the "Get these logs" button. Check the logs are displayed properly. In a new window, log in using a student from each group and access the course. Go back to the Live logs window, reload the page and check the logs for these users are displayed.
    • 3
    • HQ2024 Sprint I1.1 Moppies

      This issue relates to MDL-41465 that is introducing a regression in the user selector of both the course Log and Live log page.

      The ticket in question deals with the issue that a Non-Editing teacher who is in a given group (Course in Separate groups), would see all users in the participant drop down even though he does not belong to the same group.

      To reproduce this:

      • Create a test course (using the Development > Make Test Course)
      • In the new course, add a couple of groups (or use the AutoGroup feature)
      • Make sure the group mode for the course is "Separate groups"
      • Enrol 2 Non-Editing teachers t1 and t2
      • t1 should not belong to any group, t2 should either belong to one or several groups

      If we logged in as teacher t2:

      1. Before the patch:
        1. the group selector (1) would not appear
        2. the list of participant would be the full list from the course (breaking the "Separate Group" separation) => this is mainly what the patch was addressing
      2. After the patch:
        1. the group selector(1) appears
        2. the list of participant is limited to the groups the teacher is in
        3. BUT the list of participants in (2) is not in alphabetical order anymore

      So the main issue here is about selector. I spotted other issue (as well as timhunt) in the code, that we would need to address.

       

       

       

        1. image-2024-01-11-11-07-14-206.png
          image-2024-01-11-11-07-14-206.png
          85 kB
        2. image-2024-01-11-11-13-14-999.png
          image-2024-01-11-11-13-14-999.png
          74 kB
        3. enrolled_users.png
          enrolled_users.png
          53 kB
        4. logs_cutted.png
          logs_cutted.png
          150 kB
        5. MDL-80565- Scenario 1.png
          MDL-80565- Scenario 1.png
          769 kB
        6. MDL-80565- Scenario 2.png
          MDL-80565- Scenario 2.png
          682 kB
        7. MDL-80565- Scenario 3.png
          MDL-80565- Scenario 3.png
          671 kB
        8. image-2024-03-21-15-06-08-915.png
          image-2024-03-21-15-06-08-915.png
          68 kB
        9. logs_nothingtodisplay.png
          logs_nothingtodisplay.png
          59 kB

            laurent.david@moodle.com Laurent David
            timhunt Tim Hunt
            Jordi Pujol-Ahulló Jordi Pujol-Ahulló
            Ilya Tregubov Ilya Tregubov
            Ron Carl Alfon Yu Ron Carl Alfon Yu
            Votes:
            2 Vote for this issue
            Watchers:
            13 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 days, 7 hours, 1 minute
                2d 7h 1m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.