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

Assignment readonly viewer next button not working

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Minor Minor
    • None
    • 4.1.10
    • Assignment
    • None
    • MOODLE_401_STABLE

      A student viewing annotated PDF feedback cannot navigate using the next button, but page-selection and previous buttons work.

      After some digging it appears that MDL-75898 has caused a regression such that EDITOR.pagecount is not being set, and so the next button is always disabled as EDITOR.currentpage is always greater than 0 (ie EDITOR.pagecount).

      I do not fully understand the intricacies, but I think the solution is to add a line to set the pagecount:

                              if (this.get('readonly') === true) {
                                  this.pagecount = data.pagecount;
                                  this.prepare_pages_for_display(data);
                                  return;
                              }

      At least this worked in my debugging.

      See here: line 3796 of mod/assign/feedback/editpdf/yui/src/editor/js/editor.js

      https://github.com/moodle/moodle/commit/a243d466209959437079e1e232f3fcb9aca1bdd7#diff-4471508051a0d012ff12ad2f2c96d3c1ee00d1e0fabe8e6dee2d45fb172793d9R499-R502

      https://github.com/moodle/moodle/blob/a243d466209959437079e1e232f3fcb9aca1bdd7/mod/assign/feedback/editpdf/yui/src/editor/js/editor.js#L499-L502

      Alternatively, should prepare_pages_for_display() set the pagecount?

            Unassigned Unassigned
            JohnPercival John Percival
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved:

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