MDL-10583 course format - allow course formats to specify their section name ; merged...
authorstronk7 <stronk7>
Thu, 5 Feb 2009 13:13:31 +0000 (13:13 +0000)
committerstronk7 <stronk7>
Thu, 5 Feb 2009 13:13:31 +0000 (13:13 +0000)
course/editsection.php

index f5a090c0a282c4405b0c6f0fb70d539e22845659..58a8c4b2b47612b301948b44ab4a5a1b744d4ed5 100644 (file)
         $stredit      = get_string('edit', '', " $sectionname");
         $strsummaryof = get_string('summaryof', '', " $sectionname");
     } else {
-        $sectionname  = get_string("name$course->format");
+    /// Look for section name into specific course format lang file
+        $sectionname  = get_string("name$course->format", "format_$course->format");
+        if ($sectionname == "[[name$course->format]]") {
+        /// Section name not in course format lang file, go to default moodle file
+            $sectionname = get_string("name$course->format");
+        }
         $stredit      = get_string('edit', '', " $sectionname $section->section");
         $strsummaryof = get_string('summaryof', '', " $sectionname $form->section");
     }