course formats MDL-22647 Course format names are now properly supported and used. Big thanks to Brandon Turner for the patch.

This commit is contained in:
Sam Hemelryk
2010-06-08 06:21:25 +00:00
parent 669a9e56a8
commit 7487c85699
34 changed files with 374 additions and 307 deletions
+3 -10
View File
@@ -66,16 +66,9 @@ if ($mform->is_cancelled()){
redirect("view.php?id=$course->id");
}
/// Inelegant hack for bug 3408
if ($course->format == 'site') {
$sectionname = get_string('site');
$stredit = get_string('edita', '', " $sectionname");
$strsummaryof = get_string('summaryof', '', " $sectionname");
} else {
$sectionname = get_section_name($course->format);
$stredit = get_string('edita', '', " $sectionname $section->section");
$strsummaryof = get_string('summaryof', '', " $sectionname $section->section");
}
$sectionname = get_section_name($course, $section);
$stredit = get_string('edita', '', " $sectionname");
$strsummaryof = get_string('summaryof', '', " $sectionname");
$PAGE->set_title($stredit);
$PAGE->set_heading($course->fullname);