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

"ERROR: invalid input syntax for integer when "Set marking workflow state" in assignment

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Duplicate
    • Icon: Major Major
    • None
    • 2.5.5, 2.6.1, 2.7
    • Assignment
    • MOODLE_25_STABLE, MOODLE_26_STABLE, MOODLE_27_STABLE
    • Hide

      In an Assignment activity, select some students with the checkboxes and choose 'Lock submissions' from the "With selected..." list. Click 'Go' and accept the confirmation. You should not receive an error about "a required parameter (userid) is missing".

      Alternatively, in an assignment with marking workflow and marker allocation enabled, select some students with the checkboxes and choose "Set allocated marker" from the "With selected..." list. Click 'Go' and accept the confirmation. You should not receive a database error about "invalid input syntax for integer".

      Show
      In an Assignment activity, select some students with the checkboxes and choose 'Lock submissions' from the "With selected..." list. Click 'Go' and accept the confirmation. You should not receive an error about "a required parameter (userid) is missing". Alternatively, in an assignment with marking workflow and marker allocation enabled, select some students with the checkboxes and choose "Set allocated marker" from the "With selected..." list. Click 'Go' and accept the confirmation. You should not receive a database error about "invalid input syntax for integer".

      To reproduce,

      • Use a course with some enrolled users
      • Create an assignment, accept all defaults but in Grade section set "Use marking workflow" to "Yes"
      • Display the assignment
      • Click the "View/grade all submissions" link
      • Click the 'select' box in the heading to select all users
      • The in the "with selected" drop down choose "Set marking workflow state" and click Go
      • A confirmation pop up appears, select OK

      Error....

      Debug info: ERROR: invalid input syntax for integer: ""
      SELECT * FROM mdl_user WHERE id = $1
      [array (
      0 => '',
      )]
      Error code: dmlreadexception
      Stack trace:
      line 441 of /lib/dml/moodle_database.php: dml_read_exception thrown
      line 239 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
      line 744 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
      line 1415 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
      line 1387 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
      line 1366 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
      line 3397 of /mod/assign/locallib.php: call to moodle_database->get_record()
      line 521 of /mod/assign/locallib.php: call to assign->view_batch_set_workflow_state()
      line 53 of /mod/assign/view.php: call to assign->view()

      There would be no submissions following the above, but I did try it with an assignment having submissions and the result is the same

      (NB: I have no idea if this is 'Assignment' or 'Assignment (2.2)'. It's the standard one in 2.6 anyway.

            jonof Jonathon Fowler
            howardsmiller Howard Miller
            Damyon Wiese Damyon Wiese
            Votes:
            5 Vote for this issue
            Watchers:
            9 Start watching this issue

              Created:
              Updated:
              Resolved:

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