Moodle
  1. Moodle
  2. MDL-36897

Theachers looking at the summary page for a student's attempt should be redirected to the review page.

    Details

    • Type: Bug Bug
    • Status: Closed
    • Priority: Minor Minor
    • Resolution: Fixed
    • Affects Version/s: 2.3.1, 2.4
    • Fix Version/s: 2.2.7, 2.3.4, 2.4.1
    • Component/s: Quiz
    • Labels:
    • Testing Instructions:
      Hide

      1. You need a course with a quiz.

      2. As a student, attempt and submit the quiz.

      3. As teacher, go to the logs report for the course, and click on the link for the student's 'view summary' action.

      4. The URL of the link should be .../mod/quiz/summary.php... and when you click it you should be redirected to .../mod/quiz/review.php...

      Show
      1. You need a course with a quiz. 2. As a student, attempt and submit the quiz. 3. As teacher, go to the logs report for the course, and click on the link for the student's 'view summary' action. 4. The URL of the link should be .../mod/quiz/summary.php... and when you click it you should be redirected to .../mod/quiz/review.php...
    • Affected Branches:
      MOODLE_23_STABLE, MOODLE_24_STABLE
    • Fixed Branches:
      MOODLE_22_STABLE, MOODLE_23_STABLE, MOODLE_24_STABLE
    • Pull from Repository:
    • Pull Master Branch:
    • Rank:
      46431

      Description

      When the teacher clicks on the link for a "Quiz view summary" action in the logs report, they should end up seeing the review page for the attempt, rather than an error saying "Not your attempt".

      There is already similar logic at the top of the attempt.php page, to redirect teachers to the review page.

        Activity

        Hide
        Tim Hunt added a comment -

        Submitting for integration.

        Show
        Tim Hunt added a comment - Submitting for integration.
        Hide
        Dan Poltawski added a comment -

        Integrated to master, 24, 23 and 22.

        Thanks Tim.

        Show
        Dan Poltawski added a comment - Integrated to master, 24, 23 and 22. Thanks Tim.
        Hide
        Adrian Greeve added a comment -

        Tested on the 2.2, 2.3 and master integration branches.

        I'm getting the following notice

        Notice: Undefined variable: page in /home/adrian/moodles/integration_master/moodle/mod/quiz/summary.php on line 42 Call Stack: 0.0003 686896 1. main() /home/adrian/moodles/integration_master/moodle/mod/quiz/summary.php:0

        With a bit of a look, it seems that the following could be added to line 32 of mod/quiz/summary.php to fix this problem.

        $page = $PAGE->set_url('/mod/quiz/summary.php', array('attempt' => $attemptid));
        
        Show
        Adrian Greeve added a comment - Tested on the 2.2, 2.3 and master integration branches. I'm getting the following notice Notice: Undefined variable: page in /home/adrian/moodles/integration_master/moodle/mod/quiz/summary.php on line 42 Call Stack: 0.0003 686896 1. main() /home/adrian/moodles/integration_master/moodle/mod/quiz/summary.php:0 With a bit of a look, it seems that the following could be added to line 32 of mod/quiz/summary.php to fix this problem. $page = $PAGE->set_url('/mod/quiz/summary.php', array('attempt' => $attemptid));
        Hide
        Tim Hunt added a comment -

        Bum! Stupid copy-and-paste error. Actually, we do not need $PAGE there at all (and it is an int, not a URL. It is the page number within the quiz).

        New commit pushed to each of the three branches I made before. That should just merge. You will need to cherry-pick to 2.4. Thanks, and sorry.

        Show
        Tim Hunt added a comment - Bum! Stupid copy-and-paste error. Actually, we do not need $PAGE there at all (and it is an int, not a URL. It is the page number within the quiz). New commit pushed to each of the three branches I made before. That should just merge. You will need to cherry-pick to 2.4. Thanks, and sorry.
        Hide
        Dan Poltawski added a comment -

        Thanks Tim. I've pulled that in. Back to testing.

        Show
        Dan Poltawski added a comment - Thanks Tim. I've pulled that in. Back to testing.
        Hide
        Adrian Greeve added a comment -

        Re-tested.
        Works as described.
        Thanks.

        Show
        Adrian Greeve added a comment - Re-tested. Works as described. Thanks.
        Hide
        Eloy Lafuente (stronk7) added a comment -

        Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now!

        Closing, ciao

        Show
        Eloy Lafuente (stronk7) added a comment - Many thanks for your effort, the whole Moodle Community will be enjoying your great solutions starting now! Closing, ciao

          People

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

            Dates

            • Created:
              Updated:
              Resolved: