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

Glossary block prevents Participants page from displaying

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 2.0
    • Fix Version/s: 2.0.1
    • Component/s: Glossary
    • Labels:
      None
    • Affected Branches:
      MOODLE_20_STABLE
    • Fixed Branches:
      MOODLE_20_STABLE

      Description

      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;

        Gliffy Diagrams

          Activity

          Hide
          skodak Petr Skoda added a comment -

          Fixed, thanks!

          Petr

          Show
          skodak Petr Skoda added a comment - Fixed, thanks! Petr

            People

            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:
                Fix Release Date:
                25/Dec/10