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

Can not create a new instance of the assignment module with no completion setting

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.4
    • Fix Version/s: 2.4
    • Component/s: Assignment
    • Labels:

      Description

      Can not create a new instance of the assignment module with no completion setting

      Debug info: ERROR: null value in column "completionsubmit" violates not-null constraint
      INSERT INTO mdl_assign (name,timemodified,course,intro,introformat,alwaysshowdescription,preventlatesubmissions,submissiondrafts,requiresubmissionstatement,sendnotifications,sendlatenotifications,duedate,allowsubmissionsfromdate,grade,completionsubmit) VALUES($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15) RETURNING id
      [array (
      'name' => 'new assignment',
      'timemodified' => 1345608855,
      'course' => '3',
      'intro' => '<p>ttttttttt</p>',
      'introformat' => '1',
      'alwaysshowdescription' => '1',
      'preventlatesubmissions' => '0',
      'submissiondrafts' => '0',
      'requiresubmissionstatement' => '1',
      'sendnotifications' => '0',
      'sendlatenotifications' => '0',
      'duedate' => 1346213400,
      'allowsubmissionsfromdate' => 1345608600,
      'grade' => '100',
      'completionsubmit' => NULL,
      )]
      Error code: dmlwriteexception
      Stack trace:
       
          line 410 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 819 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
          line 871 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw()
          line 421 of /mod/assign/locallib.php: call to pgsql_native_moodle_database->insert_record()
          line 39 of /mod/assign/lib.php: call to assign->add_instance()
          line 447 of /course/modedit.php: call to assign_add_instance()
       
      Output buffer: Notice: Undefined property: stdClass::$completionsubmit in /home/raymond/moodle/mod/assign/locallib.php on line 420 

        Gliffy Diagrams

          Attachments

            Issue Links

              Activity

                People

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

                  Dates

                  • Created:
                    Updated:
                    Resolved:
                    Fix Release Date:
                    3/Dec/12