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;
|