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

Implement 'treset' parameter on the assignment grading page

XMLWordPrintable

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE, MOODLE_400_STABLE
    • MOODLE_401_STABLE
    • master-MDL-74234-v2
    • Hide

      Setup:

      1. Make sure that config.php has $CFG->cachejs = true; in it.
      2. Create a course.
      3. Create 4 users: Teacher One, Student One, Student Two, Student Three.
      4. Enrol Student One and Student Two with Student role.
      5. Enrol Teacher One with Teacher role.
      6. Create an Assignment.
      7. Log in as Student One and submit a submission.
      8. Log in as Student Two and submit a submission.
      9. Log in as Teacher One.

      Passing user id that doesn't exist:

      1. Access Assignment activity and click View all submissions.
      2. Click on Grade button for Student One.
      3. In the browser address bar replace userid parameter with non-existing user id (eg 99999) and hit Enter.
      4. Confirm, that This user is not in this course! error is displayed.
      5. Confirm, that No users selected is displayed on the top of the grading page.
      6. Confirm, that grading panel is empty and not displaying any data.
      7. Confirm, that userid parameter in the browser address bar hasn't been changed (still set to 99999).

      Passing user id that is not enrolled:

      1. Access Assignment activity and click View all submissions.
      2. Click on Grade button for Student One.
      3. In the browser address bar replace userid parameter with Student Three user id and hit Enter.
      4. Confirm, that This user is not in this course! error is displayed.
      5. Confirm, that No users selected is displayed on the top of the grading page.
      6. Confirm, that grading panel is empty and not displaying any data.
      7. Confirm, that userid parameter in the browser address bar hasn't been changed (still set to Student Three user id).

      Passing user id that is filtered out:

      1. Access Assignment activity and click View all submissions.
      2. Click on O link in the Surname alphabet bar.
      3. Confirm, that only Student One is displayed in the grading table.
      4. Click on Grade button for Student One.
      5. Confirm, that the submission for Student One is displayed.
      6. In the browser address bar replace userid parameter with Student Two user id and hit Enter.
      7. Confirm, that This user does not match filters and table preferences! error is displayed.
      8. Confirm, that No users selected is displayed on the top of the grading page.
      9. Confirm, that grading panel is empty and not displaying any data.
      10. Confirm, that userid parameter in the browser address bar hasn't been changed (still set to Student Two user id).
      11. Click on Reset table preferences link.
      12. Confirm, that the submission for Student Two is displayed.

      Disable JS caching:

      1. Set $CFG->cachejs = false; in your config.php and repeat all the testing one more time.
      Show
      Setup: Make sure that config.php has $CFG->cachejs = true; in it. Create a course. Create 4 users: Teacher One, Student One, Student Two, Student Three. Enrol Student One and Student Two with Student role. Enrol Teacher One with Teacher role. Create an Assignment . Log in as Student One and submit a submission. Log in as Student Two and submit a submission. Log in as Teacher One. Passing user id that doesn't exist: Access Assignment activity and click View all submissions . Click on Grade button for Student One. In the browser address bar replace userid parameter with non-existing user id (eg 99999) and hit Enter . Confirm , that This user is not in this course! error is displayed. Confirm , that No users selected is displayed on the top of the grading page. Confirm , that grading panel is empty and not displaying any data. Confirm , that userid parameter in the browser address bar hasn't been changed (still set to 99999). Passing user id that is not enrolled: Access Assignment activity and click View all submissions . Click on Grade button for Student One. In the browser address bar replace userid parameter with Student Three user id and hit Enter . Confirm , that This user is not in this course! error is displayed. Confirm , that No users selected is displayed on the top of the grading page. Confirm , that grading panel is empty and not displaying any data. Confirm , that userid parameter in the browser address bar hasn't been changed (still set to Student Three user id). Passing user id that is filtered out: Access Assignment activity and click View all submissions . Click on O link in the Surname alphabet bar. Confirm , that only Student One is displayed in the grading table. Click on Grade button for Student One. Confirm , that the submission for Student One is displayed. In the browser address bar replace userid parameter with Student Two user id and hit Enter . Confirm , that This user does not match filters and table preferences! error is displayed. Confirm , that No users selected is displayed on the top of the grading page. Confirm , that grading panel is empty and not displaying any data. Confirm , that userid parameter in the browser address bar hasn't been changed (still set to Student Two user id). Click on Reset table preferences link. Confirm , that the submission for Student Two is displayed. Disable JS caching: Set $CFG->cachejs = false; in your config.php and repeat all the testing one more time.

      It's been found that after MDL-60474 has landed the core it's sometimes not possible to access grading page for a student when firstname and lastname filters are set.

      Some academics use custom reports with manually constructed URLs to access students' submissions. When they access https://somesite.com/mod/assign/view.php?id=11111&rownum=0&action=grader&userid=222 they get automatically redirected to https://somesite.com/mod/assign/view.php?id=11111&rownum=0&action=grader&userid=333 page. This happens when they accessed this assignment before and set firstname/lastname filters so user 222 is not shown on the submission list.

      I was thinking about possible solution here and the only one came to my mind. We could implement 'treset' parameter for action=grader same way as it's implemented for "View all submissions" page (/mod/assign/view.php?id=11111&action=grading&treset=1), so when someone is accessing https://somesite.com/mod/assign/view.php?id=11111&rownum=0&action=grader&userid=222&treset=1 page the firstname/lastname preferences will be automatically reset and therefore grading page for user 222 will be displayed.

        1. Capture d’écran 2022-12-19 122334.jpg
          Capture d’écran 2022-12-19 122334.jpg
          57 kB
        2. MDL-74234_false_test 1.png
          MDL-74234_false_test 1.png
          63 kB
        3. MDL-74234_false_test 2.png
          MDL-74234_false_test 2.png
          60 kB
        4. MDL-74234_false_test 3_1.png
          MDL-74234_false_test 3_1.png
          114 kB
        5. MDL-74234_false_test 3_2.png
          MDL-74234_false_test 3_2.png
          62 kB
        6. MDL-74234_false_test 3_3.png
          MDL-74234_false_test 3_3.png
          119 kB
        7. MDL-74234_true_test 1.png
          MDL-74234_true_test 1.png
          63 kB
        8. MDL-74234_true_test 2.png
          MDL-74234_true_test 2.png
          60 kB
        9. MDL-74234_true_test 3_1.png
          MDL-74234_true_test 3_1.png
          115 kB
        10. MDL-74234_true_test 3_2.png
          MDL-74234_true_test 3_2.png
          62 kB
        11. MDL-74234_true_test 3_3.png
          MDL-74234_true_test 3_3.png
          119 kB
        12. screenshot-1.png
          screenshot-1.png
          552 kB
        13. screenshot-2.png
          screenshot-2.png
          440 kB
        14. screenshot-3.png
          screenshot-3.png
          383 kB

            mikhailgolenkov Misha Golenkov
            mikhailgolenkov Misha Golenkov
            Andrew Madden Andrew Madden
            Sara Arjona (@sarjona) Sara Arjona (@sarjona)
            Angelia Dela Cruz Angelia Dela Cruz
            Votes:
            0 Vote for this issue
            Watchers:
            7 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 1 hour, 30 minutes
                1h 30m

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