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

Advanced uploading of files causes Coding Error when assigned as non-editing-teacher

    Details

    • Testing Instructions:
      Hide

      1. Create an advanced file upload assignment in a course. Accept all defaults
      2. Add a user as a non-editing-teacher to the course
      3. Log in as that non-editing-teacher
      4. Access the assignment
      5. Check to make sure the display is the same as for the teacher/admin - no ability to upload a file and no "Send for marking" button at the bottom of the page

      Show
      1. Create an advanced file upload assignment in a course. Accept all defaults 2. Add a user as a non-editing-teacher to the course 3. Log in as that non-editing-teacher 4. Access the assignment 5. Check to make sure the display is the same as for the teacher/admin - no ability to upload a file and no "Send for marking" button at the bottom of the page
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE, MOODLE_21_STABLE
    • Pull Master Branch:
      master_MDL-28559

      Description

      To reproduce....

      1. Create an advanced file upload assignment in a course. Accept all defaults
      2. Add a user as a non-editing-teacher to the course
      3. Log in as that non-editing-teacher
      4. Access the assignment
      5. Note "Send for marking" button at the bottom of the page (I think this is spurious)
      6. Click the "send for marking" button and then "Conitinue"

      Coding error and....

      Stack trace:
      line 913 of /lib/dml/pgsql_native_moodle_database.php: coding_exception thrown
      line 976 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->update_record_raw()
      line 665 of /mod/assignment/type/upload/assignment.class.php: call to pgsql_native_moodle_database->update_record()
      line 419 of /mod/assignment/type/upload/assignment.class.php: call to assignment_upload->finalize()
      line 44 of /mod/assignment/upload.php: call to assignment_upload->upload()
      Output buffer: <br /> <b>Notice</b>: Trying to get property of non-object in <b>/var/www/moodle2/mod/assignment/type/upload/assignment.class.php</b> on line <b>661</b><br />

      This is -
      <code php>
      $updated->id = $submission->id;
      </code>

      on my install (build 2011033004.00)

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Votes:
                0 Vote for this issue
                Watchers:
                1 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved:
                  Fix Release Date:
                  28/Nov/11