-
Bug
-
Resolution: Fixed
-
Minor
-
3.10.3, 3.11.3, 4.0
-
PostgreSQL
-
MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_400_STABLE
-
MOODLE_310_STABLE, MOODLE_311_STABLE
-
Error occurs when you start adding the cohort_sync enrol metod, and click the Cancel button without filing up the form.
Our environment:
Nginx, PHP 7.3, Postgres 11.
To reproduce.
- Create at least one system cohort.
- Create course
- Enter the Course
- Click participants
- Under the cog click Enrolment methods
- Choose Cohort sync in Add method dropdown
- Click Cancel
After that you got the error:
Error reading from database
More information about this error
×Debug info: BŁĄD: invalid input syntax for integer: ""
SELECT * FROM mdl_cohort WHERE id = $1 ORDER BY name
– line 1500 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
– line 603 of /lib/pear/HTML/QuickForm/select.php: call to MoodleQuickForm_cohort->setValue()
– line 230 of /lib/form/autocomplete.php: call to HTML_QuickForm_select->onQuickFormEvent()
– line 2071 of /lib/formslib.php: call to MoodleQuickForm_autocomplete->onQuickFormEvent()
– line 324 of /lib/formslib.php: call to MoodleQuickForm->updateSubmission()
– line 228 of /lib/formslib.php: call to moodleform->_process_submission()
– line 69 of /enrol/editinstance.php: call to moodleform->__construct()
[array (
0 => '',
)]
Error code: dmlreadexception
×Stack trace: * line 486 of /lib/dml/moodle_database.php: dml_read_exception thrown
- line 329 of /lib/dml/pgsql_native_moodle_database.php: call to moodle_database->query_end()
- line 920 of /lib/dml/pgsql_native_moodle_database.php: call to pgsql_native_moodle_database->query_end()
- line 1500 of /lib/dml/moodle_database.php: call to pgsql_native_moodle_database->get_records_sql()
- line 136 of /lib/form/cohort.php: call to moodle_database->get_records_select()
- line 603 of /lib/pear/HTML/QuickForm/select.php: call to MoodleQuickForm_cohort->setValue()
- line 230 of /lib/form/autocomplete.php: call to HTML_QuickForm_select->onQuickFormEvent()
- line 2071 of /lib/formslib.php: call to MoodleQuickForm_autocomplete->onQuickFormEvent()
- line 324 of /lib/formslib.php: call to MoodleQuickForm->updateSubmission()
- line 228 of /lib/formslib.php: call to moodleform->_process_submission()
- line 69 of /enrol/editinstance.php: call to moodleform->__construct()