From d9d74c8e3d82a0d3fac084ca99bd2a58712bd11b Mon Sep 17 00:00:00 2001 From: Petr Skoda Date: Sun, 11 Apr 2010 12:55:59 +0000 Subject: [PATCH] MDL-22054 converting course formats to have own lang packs AMOS START MOV [namescorm,core],[sectionname,format_scorm] MOV [namesocial,core],[sectionname,format_social] MOV [nametopics,core],[sectionname,format_topics] MOV [nameweeks,core],[sectionname,format_weeks] AMOS END --- course/format/scorm/lang/en/format_scorm.php | 1 + course/format/social/lang/en/format_social.php | 1 + course/format/topics/lang/en/format_topics.php | 1 + course/format/weeks/lang/en/format_weeks.php | 1 + course/lib.php | 6 +----- lang/en/moodle.php | 4 ---- 6 files changed, 5 insertions(+), 9 deletions(-) diff --git a/course/format/scorm/lang/en/format_scorm.php b/course/format/scorm/lang/en/format_scorm.php index f41af461ca9..8b684c1b0b0 100644 --- a/course/format/scorm/lang/en/format_scorm.php +++ b/course/format/scorm/lang/en/format_scorm.php @@ -23,4 +23,5 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['sectionname'] = 'SCORM'; $string['pluginname'] = 'SCORM format'; diff --git a/course/format/social/lang/en/format_social.php b/course/format/social/lang/en/format_social.php index fb19d6537c1..0316353af53 100644 --- a/course/format/social/lang/en/format_social.php +++ b/course/format/social/lang/en/format_social.php @@ -23,4 +23,5 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['sectionname'] = 'section'; $string['pluginname'] = 'Social format'; diff --git a/course/format/topics/lang/en/format_topics.php b/course/format/topics/lang/en/format_topics.php index 9126a98ca5a..31df02e067c 100644 --- a/course/format/topics/lang/en/format_topics.php +++ b/course/format/topics/lang/en/format_topics.php @@ -23,4 +23,5 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['sectionname'] = 'topic'; $string['pluginname'] = 'Topics format'; diff --git a/course/format/weeks/lang/en/format_weeks.php b/course/format/weeks/lang/en/format_weeks.php index ab0070210d9..e60d81838da 100644 --- a/course/format/weeks/lang/en/format_weeks.php +++ b/course/format/weeks/lang/en/format_weeks.php @@ -23,4 +23,5 @@ * @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later */ +$string['sectionname'] = 'week'; $string['pluginname'] = 'Weekly format'; diff --git a/course/lib.php b/course/lib.php index 477df92c243..54f8b38a811 100644 --- a/course/lib.php +++ b/course/lib.php @@ -3169,11 +3169,7 @@ function move_category($category, $newparentcat) { * @return Name that the course format prefers for sections */ function get_section_name($format) { - $sectionname = get_string("name$format","format_$format"); - if($sectionname == "[[name$format]]") { - $sectionname = get_string("name$format"); - } - return $sectionname; + return get_string('sectionname', "format_$format"); } /** diff --git a/lang/en/moodle.php b/lang/en/moodle.php index da6f85394ba..858b1150330 100644 --- a/lang/en/moodle.php +++ b/lang/en/moodle.php @@ -1095,10 +1095,6 @@ $string['mycourses'] = 'My courses'; $string['mymoodledashboard'] = 'My Moodle dashboard'; $string['myprofile'] = 'My profile'; $string['name'] = 'Name'; -$string['namescorm'] = 'SCORM'; -$string['namesocial'] = 'section'; -$string['nametopics'] = 'topic'; -$string['nameweeks'] = 'week'; $string['navigation'] = 'Navigation'; $string['needed'] = 'Needed'; $string['never'] = 'Never';