Add-ons
  1. Add-ons
  2. CONTRIB-3604

MSSQL error when marking work using block

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 2.2.2
    • Fix Version/s: None
    • Component/s: Block: AJAX Marking
    • Labels:
      None
    • Affected Branches:
      MOODLE_22_STABLE
    • Rank:
      39490

      Description

      When marking work via the block, the following error occurs on save:

      Debug info: SQLState: 23000<br>
      Error Code: 515<br>
      Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]Cannot insert the value NULL into column 'grade', table 'moodle_DB.dbo.mdl_assignment_submissions'; column does not allow nulls. UPDATE fails.<br>
      SQLState: 01000<br>
      Error Code: 3621<br>
      Message: [Microsoft][SQL Server Native Client 10.0][SQL Server]The statement has been terminated.<br>

      UPDATE mdl_assignment_submissions SET assignment = '7',userid = '225',timecreated = '1334839267',timemodified = '1334839267',numfiles = '1',grade = NULL,submissioncomment = N'<p>To be marked. [TEST]</p>',format = '0',teacher = '6',timemarked = '1335093153',mailed = '0' WHERE id = '871'
      [array (
      0 => '7',
      1 => '225',
      2 => '1334839267',
      3 => '1334839267',
      4 => '1',
      5 => NULL,
      6 => '<p>To be marked. [TEST]</p>',
      7 => 0,
      8 => '6',
      9 => 1335093153,
      10 => 0,
      11 => '871',
      )]
      Stack trace:
      line 397 of \lib\dml\moodle_database.php: dml_write_exception thrown
      line 252 of \lib\dml\sqlsrv_native_moodle_database.php: call to moodle_database->query_end()
      line 368 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->query_end()
      line 1024 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->do_query()
      line 1056 of \lib\dml\sqlsrv_native_moodle_database.php: call to sqlsrv_native_moodle_database->update_record_raw()
      line 364 of \blocks\ajax_marking\modules\assignment\block_ajax_marking_assignment.class.php: call to sqlsrv_native_moodle_database->update_record()
      line 84 of \blocks\ajax_marking\actions\grading_popup.php: call to block_ajax_marking_assignment->process_data()

        Activity

        Hide
        Matt Gibson added a comment -

        Hi Dan. When doing this, are you using the advanced rubrics?

        Show
        Matt Gibson added a comment - Hi Dan. When doing this, are you using the advanced rubrics?

          People

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

            Dates

            • Created:
              Updated:

              Development