An auto-linked entry in a glossary that's not available to some course participants causes this to show for them with the glossary auto-linking filter activated:
Undefined property: cm_info::$uservisible
When we activated the glossary auto-linking filter for our site some of our users just saw a white page with this error after logging in. They couldn't use Moodle anymore. Others saw the error in other places. It also caused scheduled tasks to fail.
See the attached stack traces (made with Moodle 3.9.8). The relevant part is this:
- {main}
- ...
- format_string
- ...
- filter_glossary->filter()
- ...
- mod_glossary\local\concept_cache::get_course_concepts()
- cm_info->__get() # reading property cm_info->uservisible
- cm_info->get_user_visible()
- cm_info->obtain_dynamic_data()
- ...
- availability_group\condition->get_description
- format_string
- ...
- filter_glossary->filter()
- ...
- mod_glossary\local\concept_cache::get_course_concepts()
- # reading property cm_info->uservisible, which is now just a private member, from outside its class
- # error
To reproduce:
- Login as admin
- Set Debug level to DEVELOPER and check "Display debug messages"
- Activate glossary auto-linking filter
- Apply to content and headings
- Create course
- Enroll student
- Create group G
- Create glossary
- Restrict access for glossary to group G
- Create glossary entry
- Check "This entry should be automatically linked"
- Login as student
- Go to course
You get the error shown in the attached screenshot.
- will be (partly) resolved by
-
MDL-70537 Recursive $cm property access causes 'Cannot access private property cm_info::*' (PHP 7.4)
-
- Closed
-