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

Cannot download all submissions if the assignment has "Online text" submission type

XMLWordPrintable

    • MOODLE_311_STABLE, MOODLE_400_STABLE
    • MOODLE_311_STABLE
    • MDL-70842_master_v3
    • Hide

      Test for this issue:

      1. Create a course.
      2. Create an assignment activity with "Online text" Submission type.
      3. Submit an assignment with "Online text".
      4. Go to activity view page and choose "Download all submissions" from cog menu on the right side.
      5. Confirm, the download function works as expected.
      6. Create another assignment activity with both "Files" and "Online text" Submission types.
      7. Add a submission with some text and attach a file.
      8. Submit the submission.
      9. Go to activity view page and choose "Download all submissions" from cog menu on the right side.
      10. Confirm, the download function works as expected.

       

      Confirm the original function from MDL-68533 also works.

      Show
      Test for this issue: Create a course. Create an assignment activity with "Online text" Submission type. Submit an assignment with "Online text". Go to activity view page and choose "Download all submissions" from cog menu on the right side. Confirm , the download function works as expected. Create another assignment activity with both "Files" and "Online text" Submission types. Add a submission with some text and attach a file. Submit the submission. Go to activity view page and choose "Download all submissions" from cog menu on the right side. Confirm , the download function works as expected.   Confirm the original function from MDL-68533 also works.

      When I tried to "Download all submissions" for the assignment which has "Online text" submission type, the downloaded zip has broken and couldn't be opened.

      It's happening in ver 3.11 or 4.0. not before 3.10.

      Step to reproduce the issue:

      1. Create a course.
      2. Create an assignment activity with "Online text" Submission types.
      3. Submit an assignment with "Online text".
      4. Go to activity view page and choose "Download all submissions" from cog menu on the right side.

      I can see the error below in vanilla moodle:

      Exception - Argument 2 passed to core_files\local\archive_writer\zip_writer::add_file_from_stored_file() must be an instance of stored_file, array given, called in [dirroot]/mod/assign/locallib.php on line 3658

      More information about this error

      ×Debug info:
      Error code: generalexceptionmessage
      ×Stack trace:
      line 112 of /files/classes/local/archive_writer/zip_writer.php: TypeError thrown
      line 3658 of /mod/assign/locallib.php: call to core_files\local\archive_writer\zip_writer->add_file_from_stored_file()
      line 652 of /mod/assign/locallib.php: call to assign->download_submissions()
      line 55 of /mod/assign/view.php: call to assign->view() 

      It looks the issue is from regression of MDL-68533

            tomotsuyuki Tomo Tsuyuki
            tomotsuyuki Tomo Tsuyuki
            Misha Golenkov Misha Golenkov
            Victor Déniz Falcón Victor Déniz Falcón
            Gladys Basiana Gladys Basiana
            Votes:
            1 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

                Estimated:
                Original Estimate - Not Specified
                Not Specified
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 2 hours, 30 minutes
                2h 30m

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