Posts made by Visvanath Ratnaweera

Picture of Particularly helpful Moodlers Picture of Translators

Moodle 4.5.6 LTS

This is new site, started at around Moodle 4.5.2. When in any course one goes to > Participants > Enrol users and try to open the drop-down Select cohorts, it throws:

ELECT * FROM {context} WHERE id = ?
[array (
  0 => 2971,
)]
Error code: invalidrecord
* line 1662 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
* line 1638 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
* line 482 of /lib/classes/context.php: call to moodle_database->get_record()
* line 330 of /customfield/classes/data_controller.php: call to core\context::instance_by_id()
* line 370 of /customfield/classes/data_controller.php: call to core_customfield\data_controller->get_context()
* line 89 of /customfield/field/text/classes/data_controller.php: call to core_customfield\data_controller->export_value()
* line 921 of /cohort/externallib.php: call to customfield_text\data_controller->export_value()
* line 418 of /cohort/externallib.php: call to core_cohort_external::get_custom_fields_data()
* line ? of unknownfile: call to core_cohort_external::search_cohorts()
* line 253 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()
SELECT * FROM {context} WHERE id = ?
[array (
  0 => 2971,
)]
Error code: invalidrecord
* line 1662 of /lib/dml/moodle_database.php: dml_missing_record_exception thrown
* line 1638 of /lib/dml/moodle_database.php: call to moodle_database->get_record_select()
* line 482 of /lib/classes/context.php: call to moodle_database->get_record()
* line 330 of /customfield/classes/data_controller.php: call to core\context::instance_by_id()
* line 370 of /customfield/classes/data_controller.php: call to core_customfield\data_controller->get_context()
* line 89 of /customfield/field/text/classes/data_controller.php: call to core_customfield\data_controller->export_value()
* line 921 of /cohort/externallib.php: call to customfield_text\data_controller->export_value()
* line 418 of /cohort/externallib.php: call to core_cohort_external::get_custom_fields_data()
* line ? of unknownfile: call to core_cohort_external::search_cohorts()
* line 253 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()

It must have started very recently, in the last couple of days. There were no changes from the system side. Can´t see anything suspicious in the Config changes.

The "external" is suspicious though, the users a manually authenticated, the site is not connected to any external enrolment system.

Oh, yes, there is a single Cohort custom field - of type Short text.

Average of ratings: -
Picture of Particularly helpful Moodlers Picture of Translators

[OT]

Isn't that logical? You want to disable the question versioning system. /admin/settings.php?section=manageqbanks >  'Question history' must be that! big grin 

The other day I got a support enquiry from a Moodle user with full step-by-step instructions on how to fix it - that in two languages. Very convenient. Only thing, the solution was a generic one circulating in the Net, completely irrelevant to that specific problem. You may guess who was behind that intellectual outpour!

And, amazingly, /. is reading our minds:

https://it.slashdot.org/story/25/08/19/1849240/googles-ai-overviews-led-users-astray-reports-say-some-phone-numbers-are-scams (the same day!)