Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72244

Glossary filter causes "Undefined property: cm_info::$uservisible"



    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.9.8
    • None
    • Glossary, Libraries


      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:

      1. Login as admin
        1. Set Debug level to DEVELOPER and check "Display debug messages"
        2. Activate glossary auto-linking filter
          • Apply to content and headings
        3. Create course
        4. Enroll student
        5. Create group G
        6. Create glossary
          • Restrict access for glossary to group G
        7. Create glossary entry
          • Check "This entry should be automatically linked"
      2. Login as student
        1. Go to course

      You get the error shown in the attached screenshot.




            Unassigned Unassigned
            tschroeder Tim Schroeder
            Ilya Tregubov, Kevin Percy, Mathew May, Mihail Geshoski, Shamim Rezaie, David Woloszyn, Huong Nguyen, Jake Dallimore, Michael Hawkins, Stevani Andolo
            0 Vote for this issue
            4 Start watching this issue