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

Availability: OR conditions do not work correctly when filtering user lists

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide

      0. You must have availability enabled.
      1. Create a new user account with email address frogs@frogs.frogs
      2. Create a new course with default settings.
      3. Enrol the new user account, and one other test account, with Student role on the new course.
      4. Add an Assignment on the course. Use all default settings but under 'Restrict access', add this complicated set of restrictions:

      Student must match any of the following

      Student must match all of the following
      Date from 1 Sept 2015 00:00
      and
      User profile field Email address is equal to frogs@frogs.frogs

      OR

      Date from 4 Sept 2015 00:00
      5. Save and display
      6. Click 'View all submissions'

      EXPECTED: The list of users should show both the 'frogs' test user, and the other test user
      BEFORE FIX: The list of users shows only the 'frogs' test user and not the other test user

      Show
      0. You must have availability enabled. 1. Create a new user account with email address frogs@frogs.frogs 2. Create a new course with default settings. 3. Enrol the new user account, and one other test account, with Student role on the new course. 4. Add an Assignment on the course. Use all default settings but under 'Restrict access', add this complicated set of restrictions: Student must match any of the following Student must match all of the following Date from 1 Sept 2015 00:00 and User profile field Email address is equal to frogs@frogs.frogs OR Date from 4 Sept 2015 00:00 5. Save and display 6. Click 'View all submissions' EXPECTED: The list of users should show both the 'frogs' test user, and the other test user BEFORE FIX: The list of users shows only the 'frogs' test user and not the other test user
    • Affected Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Fixed Branches:
      MOODLE_28_STABLE, MOODLE_29_STABLE
    • Pull Master Branch:
      MDL-51652-master

      Description

      It appears that while Restrict access/conditional availability for assignment visibility is fine, it is only checking the conditions where users are explicitly stated to assemble the participants list for the assignment. This creates a situation where submitted assignments are not accessible to teachers for grading. Here's an example:

      Create an assignment.
      Set Restrict access on the assignment OR on the summary of the block where the assignment exists.
      Create two access conditions such that one student gets access prior to the other students:
      Student must match any of the following
      Student must match all of the following
      Date from 1 Sept 2015 00:00
      and
      User profile field Email address is equal to student@yoursystem.edu
      OR
      Date from 4 Sept 2015 00:00

      I've tested with email address, name and ID conditions with the same results. As expected, the visibility of the assignment or content in the block becomes available only to the student who is included in the conditions once the first date is met. Once the OR date condition is fulfilled, the remaining students are able to see and submit the work; however, if there is a condition to limit based on a user profile field the assignment is never updated with the correct participant information.

      This essentially creates assignment submissions that are inaccessible to the teacher for view or grading. Notice when viewing the assignment Grading summary page the Participants number will not change from 1 unless the student profile condition is removed or a condition is added to the OR date to specifically include the other students.

      For example, changing the second condition to the condition below will result in the participant count of the assignment updating when it becomes available on Sept 4:
      Date from 4 Sept 2014 00:00
      and
      User profile field Email address is not equal to student@yoursystem.edu

        Attachments

          Activity

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              5 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                9/Nov/15