mirror of
https://github.com/moodle/moodle.git
synced 2025-08-04 16:36:37 +02:00
MDL-71913 mod_resource: Hide unnecessary headings
This commit is contained in:
parent
3e97273b21
commit
0dd4ddb1e8
2 changed files with 8 additions and 3 deletions
|
@ -51,7 +51,9 @@ $PAGE->set_title($course->shortname.': '.$strresources);
|
|||
$PAGE->set_heading($course->fullname);
|
||||
$PAGE->navbar->add($strresources);
|
||||
echo $OUTPUT->header();
|
||||
echo $OUTPUT->heading($strresources);
|
||||
if (!$PAGE->has_secondary_navigation()) {
|
||||
echo $OUTPUT->heading($strresources);
|
||||
}
|
||||
|
||||
if (!$resources = get_all_instances_in_course('resource', $course)) {
|
||||
notice(get_string('thereareno', 'moodle', $strresources), "$CFG->wwwroot/course/view.php?id=$course->id");
|
||||
|
|
|
@ -279,8 +279,11 @@ function resource_print_header($resource, $cm, $course) {
|
|||
* @return void
|
||||
*/
|
||||
function resource_print_heading($resource, $cm, $course, $notused = false) {
|
||||
global $OUTPUT;
|
||||
global $OUTPUT, $PAGE;
|
||||
|
||||
if (!$PAGE->has_secondary_navigation()) {
|
||||
echo $OUTPUT->heading(format_string($resource->name), 2);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue