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

Group submissions with annotated PDF fail



    • Bug
    • Status: Closed
    • Minor
    • Resolution: Duplicate
    • 2.6.4
    • None
    • Assignment


      Steps to replicate:
      1. Create an assignment activity with the settings:

      • Students submit in groups - Yes
      • Require all group members submit - No

      2. As a student, submit a pdf assignment file.
      3. Grade this group submission, and include an annotated PDF while grading
      4. When returning to the "View/grade all submissions" page you get the following:

      Error writing to database

      More information about this error
      Debug info: Column 'attemptnumber' cannot be null
      INSERT INTO mdl_assign_grades (assignment,userid,timecreated,timemodified,grade,grader,attemptnumber) VALUES(?,?,?,?,?,?,?)
      [array (
      0 => '1',
      1 => '3',
      2 => 1409875018,
      3 => 1409875018,
      4 => -1,
      5 => '2',
      6 => NULL,
      Error code: dmlwriteexception
      Stack trace:

      line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
      line 1122 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->insert_record_raw()
      line 2667 of /mod/assign/locallib.php: call to mysqli_native_moodle_database->insert_record()
      line 679 of /mod/assign/feedback/editpdf/classes/document_services.php: call to assign->get_user_grade()
      line 69 of /mod/assign/feedback/editpdf/locallib.php: call to assignfeedback_editpdf\document_services::get_feedback_document()
      line 240 of /mod/assign/feedback/editpdf/locallib.php: call to assign_feedback_editpdf->get_widget()
      line 220 of /mod/assign/feedback/editpdf/locallib.php: call to assign_feedback_editpdf->view()
      line 1100 of /mod/assign/gradingtable.php: call to assign_feedback_editpdf->view_summary()
      line 1209 of /mod/assign/gradingtable.php: call to assign_grading_table->format_plugin_summary_with_link()
      line 729 of /lib/tablelib.php: call to assign_grading_table->other_cols()
      line 429 of /mod/assign/gradingtable.php: call to flexible_table->format_row()
      line 1330 of /lib/tablelib.php: call to assign_grading_table->format_row()
      line 1442 of /lib/tablelib.php: call to table_sql->build_table()
      line 1185 of /mod/assign/renderer.php: call to table_sql->out()
      line 981 of /mod/assign/renderer.php: call to mod_assign_renderer->flexible_table()
      line 221 of /lib/outputrenderers.php: call to mod_assign_renderer->render_assign_grading_table()
      line 3082 of /mod/assign/locallib.php: call to plugin_renderer_base->render()
      line 3114 of /mod/assign/locallib.php: call to assign->view_grading_table()
      line 505 of /mod/assign/locallib.php: call to assign->view_grading_page()
      line 53 of /mod/assign/view.php: call to assign->view()

      This seems to be an issue caused by there being a record for the user with this assignment id in the mdl_assign_grades table, but there is no corresponding record in the mdl_assign_submission table.


        Issue Links



              Unassigned Unassigned
              timprice Tim Price
              Adrian Greeve, Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie
              5 Vote for this issue
              9 Start watching this issue