Skip to content

Commit

Permalink
MBS-8535 Fix for Moodle 4.2 (Error in core test_get_component_classes…
Browse files Browse the repository at this point in the history
…_in_namespace)
  • Loading branch information
Paola Maneggia committed Dec 7, 2023
1 parent 3ec4251 commit 3083147
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions classes/output/mobile.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
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.
Expand Down Expand Up @@ -72,16 +71,16 @@ public static function main_view($args) {
}

if ($refcourse) {
$refcourse->fullname = \external_format_string($refcourse->fullname, $context);
$refcourse->fullname = \core_external\util::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);
}

$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->intro, $subcourse->introformat] = external_format_text($subcourse->intro, $subcourse->introformat, $context,
$subcourse->name = \core_external\util::format_string($subcourse->name, $context);
[$subcourse->intro, $subcourse->introformat] = \core_external\util::format_text($subcourse->intro, $subcourse->introformat, $context,
'mod_subcourse', 'intro');

$data = [
Expand Down

0 comments on commit 3083147

Please sign in to comment.