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

Choosing bulk removal of empty submissions causes an error

    XMLWordPrintable

Details

    • MOODLE_37_STABLE, MOODLE_38_STABLE
    • MOODLE_38_STABLE, MOODLE_39_STABLE
    • MDL-67294-master
    • Hide
      1. Login as Admin.
      2. Create a Course.
      3. Enrol a Student in Course.
      4. Create an Assignment activity in the Course.
        • enable 'File submissions' (Submission types)
      5. Go to the Assignment.
      6. Click on 'View all submissions' button
      7. In the grading table click on the "Grade" button for Student
        1. You should see the grading panel for the Student
      8. In the grading panel, click on the "View all submissions" link (top left corner)
      9. In the 'All submissions' page
        • select the Student in table (click on checkbox)
        • select 'Remove submission' from 'With selected...' field. 
        • click "Go" (confirm the action)
          • make sure you do NOT see any errors on the page.
      Show
      Login as Admin. Create a Course. Enrol a Student in Course. Create an Assignment activity in the Course. enable ' File submissions ' (Submission types) Go to the Assignment. Click on 'View all submissions' button In the grading table click on the "Grade" button for Student You should see the grading panel for the Student In the grading panel, click on the "View all submissions " link (top left corner) In the 'All submissions' page select the Student in table (click on checkbox) select 'Remove submission ' from 'With selected...' field.  click "Go" (confirm the action) make sure you do NOT see any errors on the page.
    • 3.9 release work board

    Description

      To reproduce:

      1. Create an assignment which accepts file submissions
      2. Go to the assignment
      3. View all submissions
      4. Open the grader pane for one person by clicking 'Grade'
      5. Go back to the view all submissions page
      6. Select one or more assignments without any submission.
      7. Go to the bulk actions menu.
      8. Select "Remove submission" then press "Go"
      9. The following error is then thrown:

        Coding error detected, it must be fixed by a programmer: moodle_database::update_record_raw() id field must be specified.
         
        More information about this error
         
        ×Debug info:
        Error code: codingerror
        ×Stack trace:
        line 1159 of /lib/dml/pgsql_native_moodle_database.php: coding_exception thrown
        line 1216 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->update_record_raw()
        line 327 of /mod/assign/submission/file/locallib.php: call to pgsql_native_moodle_database->update_record()
        line 7960 of /mod/assign/locallib.php: call to assign_submission_file->remove()
        line 8028 of /mod/assign/locallib.php: call to assign->remove_submission()
        line 4935 of /mod/assign/locallib.php: call to assign->process_remove_submission()
        line 533 of /mod/assign/locallib.php: call to assign->process_grading_batch_operation()
        line 55 of /mod/assign/view.php: call to assign->view()
        ×Output buffer: <br /> <b>Warning</b>: Creating default object from empty value in <b>/home/jun/moodles/stable_master/moodle/mod/assign/submission/file/locallib.php</b> on line <b>326</b><br />
        

      Attachments

        Issue Links

          Activity

            People

              Geshoski Mihail Geshoski
              jpataleta Jun Pataleta
              Jake Dallimore Jake Dallimore
              Jun Pataleta Jun Pataleta
              Anna Carissa Sadia Anna Carissa Sadia
              Adrian Greeve, Jake Dallimore, Mathew May, Mihail Geshoski, Sujith Haridasan
              Votes:
              0 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:
                13/Jul/20

                Time Tracking

                  Estimated:
                  Original Estimate - 0 minutes
                  0m
                  Remaining:
                  Remaining Estimate - 0 minutes
                  0m
                  Logged:
                  Time Spent - 4 hours, 15 minutes
                  4h 15m