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

Feedback files can't be saved when no submission record exists



    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Inactive
    • Affects Version/s: 2.5.4
    • Fix Version/s: None
    • Component/s: Assignment (2.2)
    • Labels:
    • Affected Branches:


      In an "advanced uploading of files" assignment where no submissions have been made, go to the grading screen, click "Grade" on a student's entry, and upload a feedback file and click "Save".

      Expected: Feedback file is being stored.
      Actual: An error message occurs, see below.

      Note: This may seem an unusual use case - uploading feedback files without submission -, but some of our lecturers use this for uploading per-student assignment questions. It might also be useful if student haven't uploaded their submission but have sent it by other means, e.g. via e-mail, instead.

      The error message is:

      Unknown exception related to local files (Invalid itemid)
      Debug info:
      Error code: storedfileproblem
      Stack trace:
          line 1001 of /lib/filestorage/file_storage.php: file_exception thrown
          line 932 of /lib/filelib.php: call to file_storage->create_file_from_storedfile()
          line 296 of /lib/filelib.php: call to file_save_draft_area_files()
          line 2687 of /mod/assignment/lib.php: call to file_postupdate_standard_filemanager()
          line 1799 of /mod/assignment/lib.php: call to assignment_grading_form->get_data()
          line 324 of /mod/assignment/type/upload/assignment.class.php: call to assignment_base->process_feedback()
          line 679 of /mod/assignment/lib.php: call to assignment_upload->process_feedback()
          line 314 of /mod/assignment/type/upload/assignment.class.php: call to assignment_base->submissions()
          line 57 of /mod/assignment/submissions.php: call to assignment_upload->submissions()

      Note the following corresponding piece of mod/assignment/lib.php, around line 2679:

              } else {
                  $itemid = null; //TODO: this is wrong, itemid MUST be known when saving files!! (skodak)




            • Votes:
              2 Vote for this issue
              4 Start watching this issue


              • Created: