From 519413892e8cdd51a6ea3c03b911de7dc40ee14b Mon Sep 17 00:00:00 2001
From: David Balch
Date: Wed, 29 Feb 2012 10:03:13 +0000
Subject: [PATCH 1/2] MDL-31822 course: Show custom Section name on Front page.
---
index.php | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/index.php b/index.php
index 2a19e45c5a5..aea0b2bbb1d 100644
--- a/index.php
+++ b/index.php
@@ -130,6 +130,10 @@
echo '
';
}
+ if (!is_null($section->name)) {
+ echo $OUTPUT->heading($section->name, 1, 'sectionname');
+ }
+
$context = context_course::instance(SITEID);
$summarytext = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course', 'section', $section->id);
$summaryformatoptions = new stdClass();
From 696754706224291c34e0b2e06560313dba7b4bed Mon Sep 17 00:00:00 2001
From: David Monllao
Date: Fri, 5 Dec 2014 09:22:02 +0800
Subject: [PATCH 2/2] MDL-31822 course: Formatting the section name
---
index.php | 10 ++++++++--
1 file changed, 8 insertions(+), 2 deletions(-)
diff --git a/index.php b/index.php
index aea0b2bbb1d..1d9e81642dd 100644
--- a/index.php
+++ b/index.php
@@ -130,11 +130,17 @@
echo '';
}
+ $context = context_course::instance(SITEID);
+
+ // If the section name is set we show it.
if (!is_null($section->name)) {
- echo $OUTPUT->heading($section->name, 1, 'sectionname');
+ echo $OUTPUT->heading(
+ format_string($section->name, true, array('context' => $context)),
+ 2,
+ 'sectionname'
+ );
}
- $context = context_course::instance(SITEID);
$summarytext = file_rewrite_pluginfile_urls($section->summary, 'pluginfile.php', $context->id, 'course', 'section', $section->id);
$summaryformatoptions = new stdClass();
$summaryformatoptions->noclean = true;