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

Only the last 'View annotated PDF' button on the page works

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      Setup
      1. Create a course with 3 students (s1, s2) and a teacher (t1)
      2. Make sure "unoconv" document converter is installed and enabled (and working).
      3. Create an assignment with the following settings:
        Submission types Online text
        Feedback types Annotate PDF
        Require students to click the submit button Yes
        Attempts reopened Manually
      4. Log in as each user and create an online text submission. Make sure that each submission's text is unique from one another.
      Switching users on the grading page
      1. Edit mod/assign/feedback/editpdf/ajax.php and add "sleep(10);" at the top of the file (second line).
      2. Log in as a teacher
      3. Grade the first student, while the grading page says "Generating the PDF", click the arrow on the top right to change to the second student.
      4. Verify the PDF for the second student is shown (after the 10 second wait).
      Viewing annotated PDFs
      1. Revert the changes that you made on the previous section. git reset --hard
      2. Reload the grading page.
      3. Grade s1 and s2's submissions. On the PDF annotation tool, scribble the user's name/username of the submission that you are grading.
      4. Go to "View all submissions" table.
      5. Click on the "View annotated PDF..." link for each student.
      6. Verify the correct feedback document is shown for each student. 
      Viewing annotated PDFs for multiple attempts
      1. On the assignment grading table, click on Edit for s1's submission, then select "Allow another attempt"
      2. On another browser session (e.g. incognito window), log in as s1.
      3. Create another submission.
      4. Back on t1's browser, grade and annotate s1's new submission.
      5. Go back to s1's browser window.
      6. Refresh s1's browser window.
      7. Click "View annotated PDF..." under the Feedback section
      8. Confirm that you can see the annotations made by t1 for s1's latest attempt.
      9. Click "View annotated PDF..." under the Previous attempts section
      10. Confirm that you can see the annotations made by t1 for s1's first attempt.
      Show
      Setup Create a course with 3 students (s1, s2) and a teacher (t1) Make sure "unoconv" document converter is installed and enabled (and working). Create an assignment with the following settings: Submission types Online text Feedback types Annotate PDF Require students to click the submit button Yes Attempts reopened Manually Log in as each user and create an online text submission. Make sure that each submission's text is unique from one another. Switching users on the grading page Edit  mod/assign/feedback/editpdf/ajax.php and add "sleep(10);" at the top of the file (second line). Log in as a teacher Grade the first student, while the grading page says "Generating the PDF", click the arrow on the top right to change to the second student. Verify the PDF for the second student is shown (after the 10 second wait). Viewing annotated PDFs Revert the changes that you made on the previous section. git reset --hard Reload the grading page. Grade s1 and s2's submissions. On the PDF annotation tool, scribble the user's name/username of the submission that you are grading. Go to "View all submissions" table. Click on the "View annotated PDF..." link for each student. Verify the correct feedback document is shown for each student.  Viewing annotated PDFs for multiple attempts On the assignment grading table, click on Edit for s1's submission, then select " Allow another attempt " On another browser session (e.g. incognito window), log in as s1. Create another submission. Back on t1's browser, grade and annotate s1's new submission. Go back to s1's browser window. Refresh s1's browser window. Click " View annotated PDF... " under the Feedback section Confirm that you can see the annotations made by t1 for s1's latest attempt. Click " View annotated PDF... " under the Previous attempts section Confirm that you can see the annotations made by t1 for s1's first attempt.
    • Affected Branches:
      MOODLE_33_STABLE, MOODLE_34_STABLE, MOODLE_35_STABLE, MOODLE_36_STABLE
    • Fixed Branches:
      MOODLE_35_STABLE, MOODLE_36_STABLE
    • Pull from Repository:
    • Pull 3.5 Branch:
    • Pull 3.6 Branch:
    • Pull Master Branch:
      MDL-61405-master

      Description

      If there are multiple 'View annotated PDF...' buttons on the page, e.g. when using the grading table, only the last one works; the others just result in a 'Generating the PDF...' modal.

      This isn't a problem for students, who will only have one button in their feedback summary, and teachers can work around it by filtering the table.

      It seems to happen as a result of the EDITOR object being destroyed at https://github.com/moodle/moodle/blob/315a0a3aaf6be4f71362b3e1dd958c69cd464fbd/mod/assign/feedback/editpdf/yui/build/moodle-assignfeedback_editpdf-editor/moodle-assignfeedback_editpdf-editor-debug.js#L4674 which was introduced in https://tracker.moodle.org/browse/MDL-55528, so not an issue pre-3.3.

        Attachments

          Issue Links

            Activity

              People

              • Votes:
                6 Vote for this issue
                Watchers:
                14 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  11/Mar/19

                  Time Tracking

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