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

Glossary block prevents Participants page from displaying

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Minor Minor
    • 2.0.1
    • 2.0
    • Glossary
    • None
    • MOODLE_20_STABLE
    • MOODLE_20_STABLE

      When trying to view the participants page for a course that has both:
      a) a 'Random glossary entry' block; and
      b) at least one entry in that block;
      Trying to view the 'course participants' page fails.

      Expected Output: Participants page displays.
      Actual Output: "Fatal error: Call to undefined function file_rewrite_pluginfile_urls() in /var/www/html/moodle20/blocks/glossary_random/block_glossary_random.php on line 95" (or a blank page if debugging is off).

      Seems all thats needed is to require the filelib.php at the start of the function.

      diff --git a/blocks/glossary_random/block_glossary_random.php b/blocks/glossary_random/block_glossary_random.php
      index 4764430..19aa1d8 100644
      --- a/blocks/glossary_random/block_glossary_random.php
      +++ b/blocks/glossary_random/block_glossary_random.php
      @@ -11,6 +11,7 @@ class block_glossary_random extends block_base {
       
           function specialization() {
               global $CFG, $DB;
      +        require_once($CFG->libdir . '/filelib.php');
               $this->course = $this->page->course;

            skodak Petr Skoda
            aolley Adam Olley
            Nobody Nobody (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:

                Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.