update from 3.10 to 4.1.1 Exception - Class '\availability_password\condition' not found

update from 3.10 to 4.1.1 Exception - Class '\availability_password\condition' not found

by Dan Bell -
Number of replies: 2

I started with Moodle 3.7 this morning.

I updated my php and installed to 3.10 first.

A quick look and everything seemed fine, but the plan was to go to 4.1.1.

After update was complete at 4.1.1, I added Adaptable theme.

The Course overview block had been removed from the dashboard, so I went to the default dashboard page to add it. It allows me to add it, but no courses appear AND the following error appears. Note that \availability\classes\tree.php is NOT missing.

Another note - I updated another testing LMS server with the same versions recently and no problem. Ofcourse this happens on my prodcution server. Any help is appreciated.

Exception - Class '\availability_password\condition' not found
File:  \availability\classes\tree.php
Line: 234
Error code: generalexceptionmessage
* line 234 of \availability\classes\tree.php: Error thrown
* line 144 of \availability\classes\info.php: call to core_availability\tree->__construct()
* line 114 of \availability\classes\info.php: call to core_availability\info->decode_availability()
* line 196 of \availability\classes\info.php: call to core_availability\info->get_availability_tree()
* line 2251 of \lib\modinfolib.php: call to core_availability\info->is_available()
* line 1743 of \lib\modinfolib.php: call to cm_info->obtain_dynamic_data()
* line 1209 of \lib\completionlib.php: call to cm_info->get_custom_data()
* line 1065 of \lib\completionlib.php: call to completion_info->get_other_cm_completion_data()
* line 82 of \completion\classes\progress.php: call to completion_info->get_data()
* line 210 of \course\classes\external\course_summary_exporter.php: call to core_completion\progress::get_course_progress_percentage()
* line 62 of \course\classes\external\course_summary_exporter.php: call to core_course\external\course_summary_exporter::get_course_progress()
* line 125 of \lib\classes\external\exporter.php: call to core_course\external\course_summary_exporter->get_other_values()
* line 3922 of \course\externallib.php: call to core\external\exporter->export()
* line ? of unknownfile: call to core_course_external::{closure}()
* line 3923 of \course\externallib.php: call to array_map()
* line 261 of \lib\externallib.php: call to core_course_external::get_enrolled_courses_by_timeline_classification()
* line 81 of \lib\ajax\service.php: call to external_api::call_external_function()


Average of ratings: -
In reply to Dan Bell

Re: update from 3.10 to 4.1.1 Exception - Class '\availability_password\condition' not found

by Leon Stringer -
Picture of Core developers Picture of Particularly helpful Moodlers

This looks like it refers to the Restriction by Password plugin (availability_password). Have you got that installed? This plugin's files should be in the subfolder availability/condition/password.

In reply to Leon Stringer

Re: update from 3.10 to 4.1.1 Exception - Class '\availability_password\condition' not found

by Dan Bell -
Thank you Leon. That fixed it. It looks like it was plugin we tried out a while back and never used it. It didnt have an update option when we update, it just said it was missing. Anyways, I just uninstalled it and Course Overview started working for me.