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

Assign incorrectly reports status of document combination

XMLWordPrintable

    • MOODLE_33_STABLE
    • MOODLE_33_STABLE
    • MDL-59885-master
    • Hide
      1. Install and enable the attached fileconverter plugin (it would be prudent to do this on a fresh install):
        1. Extract the contents of the zip to files/convert
        2. Browse to "Site administration > Plugins > Document converters > Manage document converters" and open the eye on the "Dummy" converter - ensure all other converters are disabled
      2. Create an assignment with file submissions enabled
      3. As a student submit a png or jpg file for the assignment
      4. Log back in as admin and ensure you have your browser's network monitor open
      5. Grade the assignment submitted previously
      6. Verify you see multiple requests to a URL that looks like mod/assign/feedback/editpdf/ajax.php?sesskey=zeduN5kMkx&action=pollconversions&userid=3&attemptnumber=0&assignmentid=1&readonly=0 (action=pollconversions is the important part)
        • NB: The dummy plugin reports that a file was converted randomly (1 in 5 chance) so it's possible you will only see one request to that URL. If that happens run through the steps again with a different student until you see the URL polled like 4 or 5 times.
      7. Verify you see a handsome lad after the conversion is finished
      Show
      Install and enable the attached fileconverter plugin (it would be prudent to do this on a fresh install): Extract the contents of the zip to files/convert Browse to "Site administration > Plugins > Document converters > Manage document converters" and open the eye on the "Dummy" converter - ensure all other converters are disabled Create an assignment with file submissions enabled As a student submit a png or jpg file for the assignment Log back in as admin and ensure you have your browser's network monitor open Grade the assignment submitted previously Verify you see multiple requests to a URL that looks like mod/assign/feedback/editpdf/ajax.php?sesskey=zeduN5kMkx&action=pollconversions&userid=3&attemptnumber=0&assignmentid=1&readonly=0 (action=pollconversions is the important part) NB: The dummy plugin reports that a file was converted randomly (1 in 5 chance) so it's possible you will only see one request to that URL. If that happens run through the steps again with a different student until you see the URL polled like 4 or 5 times. Verify you see a handsome lad after the conversion is finished

      combined_document.php is incorrectly setting the status of the document combination thanks to this case:

      switch ($status) {
          case \core_files\conversion::STATUS_IN_PROGRESS:
          case \core_files\conversion::STATUS_PENDING:
              $pending = true;
          case \core_files\conversion::STATUS_FAILED:                  
      

      There should be a break; after STATUS_PENDING

      This has the effect that the assignment grader interface doesn't keep polling until the document has finished converting.

            cameron1729 cameron1729
            cameron1729 cameron1729
            Jake Dallimore Jake Dallimore
            Jun Pataleta Jun Pataleta
            Damyon Wiese Damyon Wiese
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved:

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