Problem in creating new Assignment in 2.6+

Problem in creating new Assignment in 2.6+

by Moodle Admin -
Number of replies: 0

Hi there,

I know this issue has been reported again in the past (see here) but the suggested solution (if any) is not clearly described anywhere. 

I guess a developer should fix this, should I raise it as an issue?


The issue is:

When any user attempts to create a new assignment we get an 'error writing to database' message.

With full debugging on this is the error ...

-------- start of debug info -----------

Error writing to database

More information about this error

Debug info: Column 'requireallteammemberssubmit' cannot be null
INSERT INTO mdl_assign (name,timemodified,course,intro,introformat,alwaysshowdescription,submissiondrafts,requiresubmissionstatement,sendnotifications,sendlatenotifications,duedate,cutoffdate,allowsubmissionsfromdate,grade,completionsubmit,teamsubmission,requireallteammemberssubmit,blindmarking,attemptreopenmethod,markingworkflow,markingallocation) VALUES(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)
[array (
0 => 'test',
1 => 1389807332,
2 => '214',
3 => '<p>test</p>',
4 => '1',
5 => 0,
6 => '0',
7 => '0',
8 => '0',
9 => '0',
10 => 0,
11 => 0,
12 => 0,
13 => '100',
14 => 0,
15 => '0',
16 => NULL,
17 => '0',
18 => 'none',
19 => '0',
20 => NULL,
)]
Error code: dmlwriteexception
Stack trace:
line 444 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 579 of /mod/assign/locallib.php: call to mysqli_native_moodle_database->insert_record()
line 41 of /mod/assign/lib.php: call to assign->add_instance()
line 101 of /course/modlib.php: call to assign_add_instance()
line 270 of /course/modedit.php: call to add_moduleinfo()
Output buffer: Notice: Undefined property: stdClass::$requireallteammemberssubmit in /var/www/html/moodle2/moodle/mod/assign/locallib.php on line 564 Notice: Undefined property: stdClass::$markingallocation in /var/www/html/moodle2/moodle/mod/assign/locallib.php on line 577

------------- end of info ---------------------


Any help would be much appreciated, thank you!

Average of ratings: -