moodlepeers / moodle-mod_groupformation

Formation of optimized learning groups - by topic preference or best match of individuals' characteristics and preferences; in one easy to use Moodle acticity
GNU General Public License v3.0
6 stars 5 forks source link

DB exception for students answering the questionaire #13

Closed spegenau closed 8 years ago

spegenau commented 8 years ago
[11-Oct-2016 10:20:55 Europe/Berlin] Default exception handler: Fehler beim Schreiben der Datenbank Debug: The statement has been terminated.
INSERT INTO mdl_groupformation_answer (groupformation,userid,category,questionid,answer,timestamp) OUTPUT inserted.id VALUES (?,?,?,?,?,?)
[array (
  0 => '32',
  1 => '13403',
  2 => 'topic',
  3 => NULL,
  4 => '1',
  5 => 1476174055,
)]
Error code: dmlwriteexception
* line 477 of /lib/dml/moodle_database.php: dml_write_exception thrown
* line 282 of /lib/dml/mssql_native_moodle_database.php: call to moodle_database->query_end()
* line 935 of /lib/dml/mssql_native_moodle_database.php: call to mssql_native_moodle_database->query_end()
* line 994 of /lib/dml/mssql_native_moodle_database.php: call to mssql_native_moodle_database->insert_record_raw()
* line 440 of /mod/groupformation/classes/moodle_interface/user_manager.php: call to mssql_native_moodle_database->insert_record()
* line 142 of /mod/groupformation/questionnaire_view.php: call to mod_groupformation_user_manager->save_answer()

The field questionid must not be NULL.

rroepke commented 8 years ago

Just a typo in

line 410 of /mod/groupformation/classes/moodle_interface/user_manager.php: 
if (!in_array($category,array('knowledge',**'topic'**))){

'topic' instead of 'topics'

There is a fixing commit (1fdeb16e6e28ebd58a977add3b415ba3ceba78f5) but due to version changes in previous commits you should just make the fix by yourself and do not pull the content of the development-branch.