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 error after answering character questions (only current master, not release version) #34

Closed jkonert closed 7 years ago

jkonert commented 7 years ago

Hint: this code is cloned from Github: https://github.com/moodlepeers/moodle-mod_groupformation, The code on the Moodle website doesn't give the Error after answering the questions: https://moodle.org/plugins/mod_groupformation

This Error appeared after answering the questions in (3- Character) and clicking on Next:

Debug info: ERROR: null value in column "questionid" violates not-null constraint DETAIL: Failing row contains (47, 1, character, null, 104, 4, 1484924476). INSERT INTO mdl_groupformation_answer (groupformation,userid,category,questionid,answer,timestamp) VALUES($1,$2,$3,$4,$5,$6) RETURNING id [array ( 'groupformation' => '1', 'userid' => '104', 'category' => 'character', 'questionid' => NULL, 'answer' => '4', 'timestamp' => 1484924476, )] Error code: dmlwriteexception Stack trace: line 446 of /lib/dml/moodle_database.php: dml_write_exception thrown line 244 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end() line 889 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end() line 945 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->insert_record_raw() line 449 of /mod/groupformation/classes/moodle_interface/user_manager.php: call to pgsql_native_moodle_database->insert_record() line 618 of /mod/groupformation/classes/controller/questionnaire_controller.php: call to mod_groupformation_user_manager->save_answer() line 129 of /mod/groupformation/questionnaire_view.php: call to mod_groupformation_questionnaire_controller->save_answers() Output buffer:
Notice: Trying to get property of non-object in /var/www/moodle/mod/groupformation/classes/moodle_interface/user_manager.php on line 423

rroepke commented 7 years ago

Solved with migration to Moodle 3.2