Merge branch 'wip-MDL-56439-master' of git://github.com/marinaglancy/moodle
authorDan Poltawski <dan@moodle.com>
Mon, 24 Oct 2016 13:33:53 +0000 (14:33 +0100)
committerDan Poltawski <dan@moodle.com>
Mon, 24 Oct 2016 13:33:53 +0000 (14:33 +0100)
course/format/lib.php

index edc7dbf..35d371d 100644 (file)
@@ -96,6 +96,9 @@ abstract class format_base {
      * @return string
      */
     protected static final function get_format_or_default($format) {
+        global $CFG;
+        require_once($CFG->dirroot . '/course/lib.php');
+
         if (array_key_exists($format, self::$classesforformat)) {
             return self::$classesforformat[$format];
         }