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

Make quiz access rules able to affect quiz review too

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Development in progress
    • Priority: Minor
    • Resolution: Unresolved
    • Affects Version/s: 1.9, 2.9.1
    • Fix Version/s: None
    • Component/s: Quiz
    • Testing Instructions:
      Hide

      As this is API changes, you'd need to modify one of the existing rules to be able to test. 

      1. Apply provided diff to your code base to make sure that  mod/quiz/accessrule/ipaddress implements a new method
      2. Create a course and quiz with question(s). Ensure that at least one question has an image in the question text.
      3. Attempt and finish the quiz as a student and save review URL (e.g. /mod/quiz/review.php?attempt=12&cmid=3389)
      4. In different browser session, login as site admin and in the quiz settings set "Require network address"  to some random IP to make sure that the access will be blocked. 
      5. As the student attempted the quiz navigate to the quiz page, make sure that no Review link not displayed on quiz view page.
      6. As the student attempted the quiz, navigate to saved review URL
      7. You should see an error message, that you can't access review page.

      Test teacher access:

      1. Edit the non-editing teacher role, and make sure that role has capability mod/quiz:viewreports, but not mod/quiz:preview.
      2. Log in as a user that is an non-editing teacher in the test course.
      3. View the quiz, and go to the reports. (Click on the link like 'Attempts: 1'.)
      4. Click on a 'Review attempt' link.
      5. Verify that yout can review the attempt, without the error message mentioned above appearing.
      6. Verify that where there is an image in the question text, that image is visible.
      Show
      As this is API changes, you'd need to modify one of the existing rules to be able to test.  Apply provided diff to your code base to make sure that  mod/quiz/accessrule/ipaddress implements a new method Create a course and quiz with question(s). Ensure that at least one question has an image in the question text. Attempt and finish the quiz as a student and save review URL (e.g. /mod/quiz/review.php?attempt=12&cmid=3389) In different browser session, login as site admin and in the quiz settings set "Require network address"  to some random IP to make sure that the access will be blocked.  As the student attempted the quiz navigate to the quiz page, make sure that no Review link not displayed on quiz view page . As the student attempted the quiz, navigate to saved review URL You should see an error message, that you can't access review page . Test teacher access: Edit the non-editing teacher role, and make sure that role has capability mod/quiz:viewreports, but not mod/quiz:preview. Log in as a user that is an non-editing teacher in the test course. View the quiz, and go to the reports. (Click on the link like 'Attempts: 1'.) Click on a 'Review attempt' link. Verify that yout can review the attempt, without the error message mentioned above appearing. Verify that where there is an image in the question text, that image is visible.
    • Affected Branches:
      MOODLE_19_STABLE, MOODLE_29_STABLE
    • Pull from Repository:
    • Pull Master Branch:
      MDL-16936-prevent_review_access-master

      Description

      I think that correct solution for that issue (and similar ones) now is to allow quiz access rules to affect quiz reviews. I guess each rule should have an additional checkbox near in quiz settings, specifying whether it should affect quiz review too.
      [Was]
      Some instructors conduct their quizzes only in a proctored testing center, which has static IP addresses. These instructors would like to be able to apply the IP address restriction to the review as well. In other words, the quiz would be reviewed only from the same IP range in which it was available for attempts.

      I envision an extra checkbox in the "review options" area of the quiz settings that would turn this option on.

      This feature was previously suggested on the forums here: http://moodle.org/mod/forum/discuss.php?d=57943

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              dmitriim Dmitrii Metelkin
              Reporter:
              nateh Nate H
              Peer reviewer:
              Nicholas Hoobin Nicholas Hoobin
              Participants:
              Component watchers:
              Tim Hunt, Andrew Lyons, Dongsheng Cai, Huong Nguyen, Jun Pataleta, Michael Hawkins, Shamim Rezaie, Simey Lameze
              Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

                Dates

                Created:
                Updated:

                  Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 1 minute
                  1m