Commit 1cc316b7 authored by Petr Skoda's avatar Petr Skoda
Browse files

use new frankenstyle for string components

parent bc953600
...@@ -79,9 +79,9 @@ echo $OUTPUT->header(); ...@@ -79,9 +79,9 @@ echo $OUTPUT->header();
// the operation has not been confirmed yet so ask the user to do so // the operation has not been confirmed yet so ask the user to do so
if ($chapter->subchapter) { if ($chapter->subchapter) {
$strconfirm = get_string('confchapterdelete','book'); $strconfirm = get_string('confchapterdelete','mod_book');
} else { } else {
$strconfirm = get_string('confchapterdeleteall','book'); $strconfirm = get_string('confchapterdeleteall','mod_book');
} }
echo '<br />'; echo '<br />';
$continue = new moodle_url('/mod/book/delete.php', array('id'=>$cm->id, 'chapterid'=>$chapter->id, 'confirm'=>1)); $continue = new moodle_url('/mod/book/delete.php', array('id'=>$cm->id, 'chapterid'=>$chapter->id, 'confirm'=>1));
......
...@@ -112,7 +112,7 @@ $PAGE->add_body_class('mod_book'); ...@@ -112,7 +112,7 @@ $PAGE->add_body_class('mod_book');
$PAGE->set_heading(format_string($course->fullname)); $PAGE->set_heading(format_string($course->fullname));
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('editingchapter', 'book')); echo $OUTPUT->heading(get_string('editingchapter', 'mod_book'));
$mform->display(); $mform->display();
......
...@@ -40,13 +40,13 @@ class book_chapter_edit_form extends moodleform { ...@@ -40,13 +40,13 @@ class book_chapter_edit_form extends moodleform {
$mform->addElement('header', 'general', get_string('edit')); $mform->addElement('header', 'general', get_string('edit'));
$mform->addElement('text', 'title', get_string('chaptertitle', 'book'), array('size'=>'30')); $mform->addElement('text', 'title', get_string('chaptertitle', 'mod_book'), array('size'=>'30'));
$mform->setType('title', PARAM_RAW); $mform->setType('title', PARAM_RAW);
$mform->addRule('title', null, 'required', null, 'client'); $mform->addRule('title', null, 'required', null, 'client');
$mform->addElement('advcheckbox', 'subchapter', get_string('subchapter', 'book')); $mform->addElement('advcheckbox', 'subchapter', get_string('subchapter', 'mod_book'));
$mform->addElement('editor', 'content_editor', get_string('content', 'book'), null, $options); $mform->addElement('editor', 'content_editor', get_string('content', 'mod_book'), null, $options);
$mform->setType('content_editor', PARAM_RAW); $mform->setType('content_editor', PARAM_RAW);
$mform->addRule('content_editor', get_string('required'), 'required', null, 'client'); $mform->addRule('content_editor', get_string('required'), 'required', null, 'client');
......
...@@ -54,8 +54,8 @@ $PAGE->add_body_class('mod_book'); ...@@ -54,8 +54,8 @@ $PAGE->add_body_class('mod_book');
$PAGE->set_heading(format_string($course->fullname)); $PAGE->set_heading(format_string($course->fullname));
///prepare the page header ///prepare the page header
$strbook = get_string('modulename', 'book'); $strbook = get_string('modulename', 'mod_book');
$strbooks = get_string('modulenameplural', 'book'); $strbooks = get_string('modulenameplural', 'mod_book');
$mform = new book_import_form(null, array('id'=>$id, 'chapterid'=>$chapterid)); $mform = new book_import_form(null, array('id'=>$id, 'chapterid'=>$chapterid));
...@@ -142,7 +142,7 @@ if ($mform->is_cancelled()) { ...@@ -142,7 +142,7 @@ if ($mform->is_cancelled()) {
} }
echo $OUTPUT->header(); echo $OUTPUT->header();
echo $OUTPUT->heading(get_string('importingchapters', 'book')); echo $OUTPUT->heading(get_string('importingchapters', 'mod_book'));
$mform->display(); $mform->display();
......
...@@ -43,7 +43,7 @@ class book_import_form extends moodleform { ...@@ -43,7 +43,7 @@ class book_import_form extends moodleform {
$mform->addElement('hidden', 'chapterid'); $mform->addElement('hidden', 'chapterid');
$mform->setType('chapterid', PARAM_INT); $mform->setType('chapterid', PARAM_INT);
$this->add_action_buttons(true, get_string('import', 'book')); $this->add_action_buttons(true, get_string('import', 'mod_book'));
$this->set_data($data); $this->set_data($data);
} }
......
...@@ -36,8 +36,8 @@ require_course_login($course, true); ...@@ -36,8 +36,8 @@ require_course_login($course, true);
$PAGE->set_pagelayout('incourse'); $PAGE->set_pagelayout('incourse');
/// Get all required strings /// Get all required strings
$strbooks = get_string('modulenameplural', 'book'); $strbooks = get_string('modulenameplural', 'mod_book');
$strbook = get_string('modulename', 'book'); $strbook = get_string('modulename', 'mod_book');
$strsectionname = get_string('sectionname', 'format_'.$course->format); $strsectionname = get_string('sectionname', 'format_'.$course->format);
$strname = get_string('name'); $strname = get_string('name');
$strintro = get_string('moduleintro'); $strintro = get_string('moduleintro');
......
...@@ -91,7 +91,7 @@ function book_get_types() { ...@@ -91,7 +91,7 @@ function book_get_types() {
$type = new stdClass(); $type = new stdClass();
$type->modclass = MOD_CLASS_RESOURCE; $type->modclass = MOD_CLASS_RESOURCE;
$type->type = 'book'; $type->type = 'book';
$type->typestr = get_string('modulename', 'book'); $type->typestr = get_string('modulename', 'mod_book');
return array($type); return array($type);
} }
...@@ -239,14 +239,14 @@ function book_extend_settings_navigation(settings_navigation $settingsnav, navig ...@@ -239,14 +239,14 @@ function book_extend_settings_navigation(settings_navigation $settingsnav, navig
if (has_capability('mod/book:print', $PAGE->cm->context)) { if (has_capability('mod/book:print', $PAGE->cm->context)) {
$url = new moodle_url('/mod/book/print.php', array('id'=>$params['id'])); $url = new moodle_url('/mod/book/print.php', array('id'=>$params['id']));
$booknode->add(get_string('printbook', 'book'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('print_book', '', 'mod_book', array('class'=>'icon'))); $booknode->add(get_string('printbook', 'mod_book'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('print_book', '', 'mod_book', array('class'=>'icon')));
// buggy navlib - actions not supported!! // buggy navlib - actions not supported!!
//$action = new action_link($url, get_string('printbook', 'book'), new popup_action('onclick', $url)); //$action = new action_link($url, get_string('printbook', 'book'), new popup_action('onclick', $url));
//$booknode->add('', $action, navigation_node::TYPE_SETTING); //$booknode->add('', $action, navigation_node::TYPE_SETTING);
$url = new moodle_url('/mod/book/print.php', array('id'=>$params['id'], 'chapterid'=>$params['chapterid'])); $url = new moodle_url('/mod/book/print.php', array('id'=>$params['id'], 'chapterid'=>$params['chapterid']));
$booknode->add(get_string('printchapter', 'book'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('print_chapter', '', 'mod_book', array('class'=>'icon'))); $booknode->add(get_string('printchapter', 'mod_book'), $url, navigation_node::TYPE_SETTING, null, null, new pix_icon('print_chapter', '', 'mod_book', array('class'=>'icon')));
} }
if (has_capability('mod/book:import', $PAGE->cm->context)) { if (has_capability('mod/book:import', $PAGE->cm->context)) {
......
...@@ -57,9 +57,9 @@ unset($chapterid); ...@@ -57,9 +57,9 @@ unset($chapterid);
// security checks END // security checks END
// ========================================================================= // =========================================================================
$strbooks = get_string('modulenameplural', 'book'); $strbooks = get_string('modulenameplural', 'mod_book');
$strbook = get_string('modulename', 'book'); $strbook = get_string('modulename', 'mod_book');
$strtop = get_string('top', 'book'); $strtop = get_string('top', 'mod_book');
@header('Cache-Control: private, pre-check=0, post-check=0, max-age=0'); @header('Cache-Control: private, pre-check=0, post-check=0, max-age=0');
@header('Pragma: no-cache'); @header('Pragma: no-cache');
...@@ -127,13 +127,13 @@ if ($chapter) { ...@@ -127,13 +127,13 @@ if ($chapter) {
<td><?php echo get_string('course') ?>:</td> <td><?php echo get_string('course') ?>:</td>
<td><?php echo format_string($course->fullname, true, array('context'=>$context)) ?></td> <td><?php echo format_string($course->fullname, true, array('context'=>$context)) ?></td>
</tr><tr> </tr><tr>
<td><?php echo get_string('modulename', 'book') ?>:</td> <td><?php echo get_string('modulename', 'mod_book') ?>:</td>
<td><?php echo format_string($book->name, true, array('context'=>$context)) ?></td> <td><?php echo format_string($book->name, true, array('context'=>$context)) ?></td>
</tr><tr> </tr><tr>
<td><?php echo get_string('printedby', 'book') ?>:</td> <td><?php echo get_string('printedby', 'mod_book') ?>:</td>
<td><?php echo fullname($USER, true) ?></td> <td><?php echo fullname($USER, true) ?></td>
</tr><tr> </tr><tr>
<td><?php echo get_string('printdate','book') ?>:</td> <td><?php echo get_string('printdate','mod_book') ?>:</td>
<td><?php echo userdate(time()) ?></td> <td><?php echo userdate(time()) ?></td>
</tr> </tr>
</table></div> </table></div>
......
...@@ -28,6 +28,6 @@ defined('MOODLE_INTERNAL') || die; ...@@ -28,6 +28,6 @@ defined('MOODLE_INTERNAL') || die;
if ($ADMIN->fulltree) { if ($ADMIN->fulltree) {
$choices = array('140'=>'140', '160'=>'160', '180'=>'180', '200'=>'200', '220'=>'220', '240'=>'240', '260'=>'260', '280'=>'280', '300'=>'300'); $choices = array('140'=>'140', '160'=>'160', '180'=>'180', '200'=>'200', '220'=>'220', '240'=>'240', '260'=>'260', '280'=>'280', '300'=>'300');
$settings->add(new admin_setting_configselect('book_tocwidth', get_string('book_tocwidth', 'book'), get_string('tocwidth', 'book'), '180', $choices)); $settings->add(new admin_setting_configselect('book_tocwidth', get_string('book_tocwidth', 'mod_book'), get_string('tocwidth', 'book'), '180', $choices));
} }
\ No newline at end of file
...@@ -116,9 +116,9 @@ add_to_log($course->id, 'book', 'view', 'view.php?id='.$cm->id.'&amp;chapterid=' ...@@ -116,9 +116,9 @@ add_to_log($course->id, 'book', 'view', 'view.php?id='.$cm->id.'&amp;chapterid='
///read standard strings ///read standard strings
$strbooks = get_string('modulenameplural', 'book'); $strbooks = get_string('modulenameplural', 'mod_book');
$strbook = get_string('modulename', 'book'); $strbook = get_string('modulename', 'mod_book');
$strtoc = get_string('toc', 'book'); $strtoc = get_string('toc', 'mod_book');
/// prepare header /// prepare header
$PAGE->set_title(format_string($book->name)); $PAGE->set_title(format_string($book->name));
...@@ -181,7 +181,7 @@ if ($edit) { ...@@ -181,7 +181,7 @@ if ($edit) {
<tr> <tr>
<td style="width:<?php echo $tocwidth ?>px" valign="bottom"> <td style="width:<?php echo $tocwidth ?>px" valign="bottom">
<?php <?php
print_string('toc', 'book'); print_string('toc', 'mod_book');
?> ?>
</td> </td>
<td> <td>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment