MDL-71148 core_navigation: Provide a menu header in a system context.

- Part of: MDL-69588
This commit is contained in:
Peter Dias 2021-04-08 12:37:16 +08:00 committed by Mathew May
parent 1464843a25
commit fe285d5496
3 changed files with 3 additions and 1 deletions

View File

@ -1007,6 +1007,7 @@ $string['hits'] = 'Hits';
$string['hitsoncourse'] = 'Hits on {$a->coursename} by {$a->username}';
$string['hitsoncoursetoday'] = 'Today\'s hits on {$a->coursename} by {$a->username}';
$string['home'] = 'Home';
$string['homeheader'] = 'Home menu';
$string['hour'] = 'hour';
$string['hours'] = 'hours';
$string['howtomakethemes'] = 'How to make new themes';

View File

@ -132,6 +132,7 @@ class secondary extends view {
$this->load_module_navigation();
break;
case CONTEXT_SYSTEM:
$this->headertitle = get_string('homeheader');
$this->load_admin_navigation();
break;
}

View File

@ -135,7 +135,7 @@ class secondary_test extends \advanced_testcase {
return [
'Testing in a course context' => ['course', 'coursehome', 'courseheader', 'Course page'],
'Testing in a module context' => ['module', 'modulepage', 'activityheader', 'Activity'],
'Testing in a site admin' => ['system', 'siteadminnode', 'menu', 'Site administration'],
'Testing in a site admin' => ['system', 'siteadminnode', 'homeheader', 'Site administration'],
];
}
}