Skip to content

Commit

Permalink
Merge branch 'MDL-77014-400' of https://github.com/lucaboesch/moodle
Browse files Browse the repository at this point in the history
…into MOODLE_400_STABLE
  • Loading branch information
andrewnicols committed Mar 9, 2023
2 parents 8cba18b + 655cae8 commit f91555d
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
Expand Up @@ -76,3 +76,13 @@ Feature: Activity navigation in a single activity course
Given I log in as "student2"
When I am on "Course 1" course homepage
Then I should see "You cannot enrol yourself in this course"

Scenario: The single activity course format supports multilang course names
Given the "multilang" filter is "on"
And the "multilang" filter applies to "content and headings"
When I am on the "Course 1" "course editing" page logged in as "teacher1"
And I expand all fieldsets
And I set the field "Course full name" in the "General" "fieldset" to "<span lang=\"de\" class=\"multilang\">Kurs</span><span lang=\"en\" class=\"multilang\">Course</span> 1"
And I click on "Save and display" "button"
Then I should see "Course 1" in the ".page-header-headings" "css_element"
And I should not see "KursCourse 1" in the ".page-header-headings" "css_element"
2 changes: 1 addition & 1 deletion theme/boost/classes/output/core_renderer.php
Expand Up @@ -158,7 +158,7 @@ public function context_header($headerinfo = null, $headinglevel = 1): string {
$prefix = null;
if ($context->contextlevel == CONTEXT_MODULE) {
if ($this->page->course->format === 'singleactivity') {
$heading = $this->page->course->fullname;
$heading = format_string($this->page->course->fullname, true, ['context' => $context]);
} else {
$heading = $this->page->cm->get_formatted_name();
$imagedata = html_writer::img($this->page->cm->get_icon_url()->out(false), '',
Expand Down

0 comments on commit f91555d

Please sign in to comment.