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

Filtering in grader fails if user does not have moodle/user:editownprofile capability

    XMLWordPrintable

Details

    • MOODLE_38_STABLE, MOODLE_39_STABLE, MOODLE_401_STABLE, MOODLE_402_STABLE, MOODLE_403_STABLE
    • MOODLE_402_STABLE, MOODLE_403_STABLE
    • MDL-69497-402
    • MDL-69497-403
    • Hide

      Setup

      1. Log in as admin
      2. Create two new users:
        • Teacher One
        • Student One
      3. Create a course
      4. Enrol Teacher One as a teacher on the course
      5. Enrol Student One as a student on the course
      6. Add an Assignment activity to the course
      7. Navigate to Users > Permissions > Define roles in site administration
      8. Edit the Authenticated user role
        • moodle/user:editownprofile = Prohibit
      9. Log out

      Manual test

      1. Log in as Teacher One
      2. Navigate to course assignment activity
      3. Press Grade
      4. Open the Filter element (top right of the page, next to the 1 of 1 text)
      5. Set Filter to Submitted
      6. Navigate back to the assignment activity, and press Grade again
        • Ignore the userisfilteredout error at this point, if MDL-76719 has not yet been resolved
      7. Re-open the Filter element
      8. Confirm the filter field value is Submitted
      Show
      Setup Log in as admin Create two new users: Teacher One Student One Create a course Enrol Teacher One as a teacher on the course Enrol Student One as a student on the course Add an Assignment activity to the course Navigate to Users > Permissions > Define roles in site administration Edit the Authenticated user role moodle/user:editownprofile = Prohibit Log out Manual test Log in as Teacher One Navigate to course assignment activity Press Grade Open the Filter element (top right of the page, next to the 1 of 1 text) Set Filter to Submitted Navigate back to the assignment activity, and press Grade again Ignore the userisfilteredout error at this point, if MDL-76719 has not yet been resolved Re-open the Filter element Confirm the filter field value is Submitted

    Description

      When a teacher is grading an assignment, there is an option in the top right to filter by “Submitted”, “Not submitted”, “Requires Grading” etc. Selecting one of these filter options triggers an ajax request to set the "assign_filter" preference before actually retrieving the filtered student submissions. If the ‘moodle/user:editownprofile’ capability is not set or not allowed for teachers, this results in a “nopermission” error. Since the filtering of student submissions depends on the user preference value being set, the filtering fails and instead it returns all (unfiltered) student submissions. The editownprofile capability should not prevent a teacher from being able to filter while grading.

      Attachments

        Issue Links

          Activity

            People

              pholden Paul Holden
              mvangelovski Michael
              Mathew May Mathew May
              Ilya Tregubov Ilya Tregubov
              Kim Jared Lucas Kim Jared Lucas
              Votes:
              4 Vote for this issue
              Watchers:
              12 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

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

                  Clockify

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