Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
2.8.7
-
None
-
None
-
2015050901
-
MOODLE_28_STABLE
Description
Replication Steps:
- Create new course
- Create Checklist activity
- Edit Checklist activity, change "Maximum grade".
- Should result in "Error reading from database"
Debug info:
Unknown column 'completionpercent' in 'field list'
|
SELECT completionpercent FROM mdl_checklist WHERE id = ?
|
[array (
|
0 => '1',
|
)]
|
Error code: dmlreadexception
|
Stack trace:
line 443 of /lib/dml/moodle_database.php: dml_read_exception thrown
|
line 1080 of /lib/dml/mysqli_native_moodle_database.php: call to moodle_database->query_end()
|
line 1476 of /lib/dml/moodle_database.php: call to mysqli_native_moodle_database->get_records_sql()
|
line 1549 of /lib/dml/moodle_database.php: call to moodle_database->get_record_sql()
|
line 1530 of /lib/dml/moodle_database.php: call to moodle_database->get_field_sql()
|
line 1509 of /lib/dml/moodle_database.php: call to moodle_database->get_field_select()
|
line 97 of /mod/checklist/lib.php: call to moodle_database->get_field()
|
line 541 of /course/modlib.php: call to checklist_update_instance()
|
line 264 of /course/modedit.php: call to update_moduleinfo()
|
Creating the int(10) database field [prefix]_checklist.completionpercent resolves this issue. It appears there may not have been created in previous plugin upgrades. This site was migrated from self-hosting so I'm not sure what previous versions they ran. This may be a one off issue and it should now affect new installs. Reporting it here in case someone else runs into the same issue and can provide further information.