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

Trainer can not access grading view (ERROR: null value in column "attemptnumber" violates not-null constraint)

XMLWordPrintable

      One of our trainers can not access to the assignment submission when he uses "action=grading". And even administrators get the same error!

      I didn't searched on this issue until now, but hopefully I can do it later on. It's just weird, that moodle tries to insert a record just by viewing an assignment...

      Debug info

      ERROR: null value in column "attemptnumber" violates not-null constraint
      INSERT INTO assign_grades (assignment,userid,timecreated,timemodified,grade,grader,attemptnumber) VALUES($1,$2,$3,$4,$5,$6,$7) RETURNING id
      [array (
         'assignment' => '590',
         'userid' => '223',
         'timecreated' => 1392977454,
         'timemodified' => 1392977454,
         'grade' => -1,
         'grader' => '2',
         'attemptnumber' => NULL,
      )]
      

      Error code

      dmlwriteexception
      

      Stack trace

      line 444 of /lib/dml/moodle_database.php: dml_write_exception thrown
      line 239 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 848 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 900 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
      line 2660 of /mod/assign/locallib.php: call to pgsql_native_moodle_database->insert_record()
      line 588 of /mod/assign/feedback/editpdf/classes/document_services.php: call to assign->get_user_grade()
      line 66 of /mod/assign/feedback/editpdf/locallib.php: call to assignfeedback_editpdf\document_services::get_feedback_document()
      line 225 of /mod/assign/feedback/editpdf/locallib.php: call to assign_feedback_editpdf->get_widget()
      line 205 of /mod/assign/feedback/editpdf/locallib.php: call to assign_feedback_editpdf->view()
      line 1097 of /mod/assign/gradingtable.php: call to assign_feedback_editpdf->view_summary()
      line 1206 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 433 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 3068 of /mod/assign/locallib.php: call to plugin_renderer_base->render()
      line 3107 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()
      

            damyon Damyon Wiese
            eberhardt Jan Eberhardt
            Frédéric Massart Frédéric Massart
            Marina Glancy Marina Glancy
            CiBoT CiBoT
            Votes:
            5 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:
              Resolved:

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