diff --git a/classes/output/mobile.php b/classes/output/mobile.php index 63e028f..350a448 100644 --- a/classes/output/mobile.php +++ b/classes/output/mobile.php @@ -26,6 +26,7 @@ defined('MOODLE_INTERNAL') || die(); require_once($CFG->dirroot . '/mod/subcourse/locallib.php'); +require_once($CFG->libdir . '/externallib.php'); /** * Controls the display of the plugin in the Mobile App. @@ -71,7 +72,7 @@ public static function main_view($args) { } if ($refcourse) { - $refcourse->fullname = external_format_string($refcourse->fullname, $context); + $refcourse->fullname = \external_format_string($refcourse->fullname, $context); $refcourse->url = new \moodle_url('/course/view.php', ['id' => $refcourse->id]); $progress = \core_completion\progress::get_course_progress_percentage($refcourse); } @@ -79,7 +80,7 @@ public static function main_view($args) { $currentgrade = subcourse_get_current_grade($subcourse, $USER->id); // Pre-format some of the texts for the mobile app. - $subcourse->name = external_format_string($subcourse->name, $context); + $subcourse->name = \external_format_string($subcourse->name, $context); [$subcourse->intro, $subcourse->introformat] = external_format_text($subcourse->intro, $subcourse->introformat, $context, 'mod_subcourse', 'intro');