I'm using moodle during 8 years. I've made lot of plugins changes and upgrades.
Today, I'm using the 4.2 version.
I have a problem (before this last upgrade) with activity completion.
The message is the next :
"dmlreadexception
Erreur de lecture de la base de données
File /lib/dml/moodle_database.php
Line 494
Unknown column 'cm.completionpassgrade' in 'where clause' SELECT DISTINCT c.id AS course, cr.id AS criteriaid, ra.userid AS userid, mc.timemodified AS timecompleted FROM doksvtal_course_completion_criteria cr INNER JOIN doksvtal_course c ON cr.course = c.id INNER JOIN doksvtal_context con ON con.instanceid = c.id INNER JOIN doksvtal_role_assignments ra ON ra.contextid = con.id INNER JOIN doksvtal_course_modules cm ON cm.id = cr.moduleinstance INNER JOIN doksvtal_course_modules_completion mc ON mc.coursemoduleid = cr.moduleinstance AND mc.userid = ra.userid LEFT JOIN doksvtal_course_completion_crit_compl cc ON cc.criteriaid = cr.id AND cc.userid = ra.userid WHERE cr.criteriatype = ? AND con.contextlevel = ? AND c.enablecompletion = 1 AND cc.id IS NULL AND ( mc.completionstate = ? OR (cm.completionpassgrade = 1 AND mc.completionstate = ?) OR (cm.completionpassgrade = 0 AND (mc.completionstate = ? OR mc.completionstate = ?)) ) AND c.id = ? AND ra.userid = ? [array ( 0 => 4, 1 => 50, 2 => 1, 3 => 2, 4 => 2, 5 => 3, 6 => '527', 7 => '2', )] Error code: dmlreadexception * line 494 of /lib/dml/moodle_database.php: dml_read_exception thrown * line 293 of /lib/dml/moodle_read_slave_trait.php: call to moodle_database->query_end() * line 1375 of /lib/dml/mysqli_native_moodle_database.php: call to mysqli_native_moodle_database->query_end() * line 1679 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql() * line 173 of /completion/classes/api.php: call to moodle_database->get_record_sql() * line 1325 of /lib/completionlib.php: call to core_completion\api::mark_course_completions_activity_criteria() * line 679 of /lib/completionlib.php: call to completion_info->internal_set_data() * line 100 of /completion/classes/external.php: call to completion_info->update_state() * line ? of unknownfile: call to core_completion_external::update_activity_completion_status_manually() * line 251 of /lib/external/classes/external_api.php: call to call_user_func_array() * line 83 of /lib/ajax/service.php: call to core_external\external_api::call_external_function()"After many tests and researches, I really don't know how I can solve it.
Maybe somebody have the solution ?
Thanks in advance !
Long life to moodle and thanks to the community.
Oliver