mirror of
https://github.com/moodle/moodle.git
synced 2025-04-13 04:22:07 +02:00
MDL-22054 converting course formats to have own lang packs
AMOS START MOV [formatscorm,core],[pluginname,format_scorm] MOV [formatsocial,core],[pluginname,format_social] MOV [formattopics,core],[pluginname,format_topics] MOV [formatweeks,core],[pluginname,format_weeks] AMOS END
This commit is contained in:
parent
28a74542fe
commit
ff67afbd95
@ -20,10 +20,7 @@ if ($hassiteconfig
|
||||
$courseformats = get_plugin_list('format');
|
||||
$formcourseformats = array();
|
||||
foreach ($courseformats as $courseformat => $courseformatdir) {
|
||||
$formcourseformats["$courseformat"] = get_string("format$courseformat","format_$courseformat");
|
||||
if ($formcourseformats["$courseformat"]=="[[format$courseformat]]") {
|
||||
$formcourseformats["$courseformat"] = get_string("format$courseformat");
|
||||
}
|
||||
$formcourseformats[$courseformat] = get_string('pluginname', "format_$courseformat");
|
||||
}
|
||||
$temp->add(new admin_setting_configselect('moodlecourse/format', get_string('format'), get_string('coursehelpformat'), 'weeks',$formcourseformats));
|
||||
for ($i=1; $i<=52; $i++) {
|
||||
|
@ -126,10 +126,7 @@ class course_edit_form extends moodleform {
|
||||
$courseformats = get_plugin_list('format');
|
||||
$formcourseformats = array();
|
||||
foreach ($courseformats as $courseformat => $formatdir) {
|
||||
$formcourseformats["$courseformat"] = get_string("format$courseformat", "format_$courseformat");
|
||||
if($formcourseformats["$courseformat"]=="[[format$courseformat]]") {
|
||||
$formcourseformats["$courseformat"] = get_string("format$courseformat");
|
||||
}
|
||||
$formcourseformats[$courseformat] = get_string('pluginname', "format_$courseformat");
|
||||
}
|
||||
$mform->addElement('select', 'format', get_string('format'), $formcourseformats);
|
||||
$mform->setHelpButton('format', array('courseformats', get_string('courseformats')), true);
|
||||
|
26
course/format/scorm/lang/en/format_scorm.php
Normal file
26
course/format/scorm/lang/en/format_scorm.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'format_scorm', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package format_scorm
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'SCORM format';
|
26
course/format/social/lang/en/format_social.php
Normal file
26
course/format/social/lang/en/format_social.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'format_social', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package format_social
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Social format';
|
26
course/format/topics/lang/en/format_topics.php
Normal file
26
course/format/topics/lang/en/format_topics.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'format_topics', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package format_topics
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Topics format';
|
26
course/format/weeks/lang/en/format_weeks.php
Normal file
26
course/format/weeks/lang/en/format_weeks.php
Normal file
@ -0,0 +1,26 @@
|
||||
<?php
|
||||
|
||||
// This file is part of Moodle - http://moodle.org/
|
||||
//
|
||||
// Moodle is free software: you can redistribute it and/or modify
|
||||
// it under the terms of the GNU General Public License as published by
|
||||
// the Free Software Foundation, either version 3 of the License, or
|
||||
// (at your option) any later version.
|
||||
//
|
||||
// Moodle is distributed in the hope that it will be useful,
|
||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
// GNU General Public License for more details.
|
||||
//
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
/**
|
||||
* Strings for component 'format_weeks', language 'en', branch 'MOODLE_20_STABLE'
|
||||
*
|
||||
* @package format_weeks
|
||||
* @copyright 1999 onwards Martin Dougiamas {@link http://moodle.com}
|
||||
* @license http://www.gnu.org/copyleft/gpl.html GNU GPL v3 or later
|
||||
*/
|
||||
|
||||
$string['pluginname'] = 'Weekly format';
|
@ -716,12 +716,8 @@ $string['format'] = 'Format';
|
||||
$string['formathtml'] = 'HTML format';
|
||||
$string['formatmarkdown'] = 'Markdown format';
|
||||
$string['formatplain'] = 'Plain text format';
|
||||
$string['formatscorm'] = 'SCORM format';
|
||||
$string['formatsocial'] = 'Social format';
|
||||
$string['formattext'] = 'Moodle auto-format';
|
||||
$string['formattexttype'] = 'Formatting';
|
||||
$string['formattopics'] = 'Topics format';
|
||||
$string['formatweeks'] = 'Weekly format';
|
||||
$string['formatwiki'] = 'Wiki-like format';
|
||||
$string['framesetinfo'] = 'This frameset document contains:';
|
||||
$string['from'] = 'From';
|
||||
|
@ -5905,7 +5905,7 @@ class amos_string_manager implements string_manager {
|
||||
$string = $this->load_component_strings($component, $lang);
|
||||
|
||||
if (!isset($string[$identifier])) {
|
||||
if ($identifier !== 'parentlanguage' and strpos($component, 'format_') !== 0 and $component !== 'pix') {
|
||||
if ($identifier !== 'parentlanguage' and $component !== 'pix') {
|
||||
debugging("Invalid get_string() identifier: '$identifier' or component '$component'", DEBUG_DEVELOPER);
|
||||
}
|
||||
return "[[$identifier]]";
|
||||
|
Loading…
x
Reference in New Issue
Block a user