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

Error converting submissions for annotation when student is unenrolled from course

    XMLWordPrintable

    Details

    • Testing Instructions:
      Hide
      • Create a course
      • Add an assignment
      • Enrol 2 users as students
      • As each student, submit a Word file to the assignment
      • Unenrol 1 of the students from the course
      • Make sure 2 entries exist in m_assignfeedback_editpdf_queue
      • Run the convert annotation task (make sure unoconv and ghostscript are configured correctly)
        php admin/tool/task/cli/schedule_task.php --execute=\\assignfeedback_editpdf\\task
        convert_submissions
        • Note: The second conversion attempt is expected to fail with "Conversion failed with error:nopermission" because the user has been removed from the course
      • See if both entries in m_assignfeedback_editpdf_queue are cleared when the cron runs.
      Show
      Create a course Add an assignment Enrol 2 users as students As each student, submit a Word file to the assignment Unenrol 1 of the students from the course Make sure 2 entries exist in m_assignfeedback_editpdf_queue Run the convert annotation task (make sure unoconv and ghostscript are configured correctly) php admin/tool/task/cli/schedule_task.php --execute=\\assignfeedback_editpdf\\task convert_submissions Note: The second conversion attempt is expected to fail with "Conversion failed with error:nopermission" because the user has been removed from the course See if both entries in m_assignfeedback_editpdf_queue are cleared when the cron runs.
    • Affected Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Fixed Branches:
      MOODLE_31_STABLE, MOODLE_32_STABLE
    • Pull from Repository:
    • Pull 3.1 Branch:
    • Pull Master Branch:
      MDL-56810_master

      Description

      I just discovered that there's an error (that stops the whole process -> no exception catch) in convert submissions for annotation when a student is unenrolled from a course after having submitted an assignment.

      Steps to reproduce:

      • Create a course, add an assignment and enrol a user as a student
      • As the student, submit an assignment (Word file)
      • Unenrol the student from the course.
      • Run the convert annotation task (make sure unoconv and ghostscript are configured correctly):

        php admin/tool/task/cli/schedule_task.php --execute=\\assignfeedback_editpdf\\task\\convert_submissions
        

      • You will have the following error:

        Execute scheduled task: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions)
        Convert 1 submission attempt(s) for assignment 3
        ... used 7 dbqueries
        ... used 0.11418199539185 seconds
        Scheduled task failed: Prepare submissions for annotation (assignfeedback_editpdf\task\convert_submissions),error/nopermission
        Backtrace:
        * line 485 of /mod/assign/feedback/editpdf/classes/document_services.php: call to print_error()
        * line 98 of /mod/assign/feedback/editpdf/classes/task/convert_submissions.php: call to assignfeedback_editpdf\document_services::get_page_images_for_attempt()
        * line 137 of /admin/tool/task/cli/schedule_task.php: call to assignfeedback_editpdf\task\convert_submissions->execute()
        

        Attachments

          Activity

            People

            • Votes:
              2 Vote for this issue
              Watchers:
              9 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                14/Nov/16