Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
1cc316b7
Commit
1cc316b7
authored
Jan 16, 2011
by
Petr Skoda
Browse files
use new frankenstyle for string components
parent
bc953600
Changes
10
Hide whitespace changes
Inline
Side-by-side
delete.php
View file @
1cc316b7
...
...
@@ -79,9 +79,9 @@ echo $OUTPUT->header();
// the operation has not been confirmed yet so ask the user to do so
if
(
$chapter
->
subchapter
)
{
$strconfirm
=
get_string
(
'confchapterdelete'
,
'book'
);
$strconfirm
=
get_string
(
'confchapterdelete'
,
'
mod_
book'
);
}
else
{
$strconfirm
=
get_string
(
'confchapterdeleteall'
,
'book'
);
$strconfirm
=
get_string
(
'confchapterdeleteall'
,
'
mod_
book'
);
}
echo
'<br />'
;
$continue
=
new
moodle_url
(
'/mod/book/delete.php'
,
array
(
'id'
=>
$cm
->
id
,
'chapterid'
=>
$chapter
->
id
,
'confirm'
=>
1
));
...
...
edit.php
View file @
1cc316b7
...
...
@@ -112,7 +112,7 @@ $PAGE->add_body_class('mod_book');
$PAGE
->
set_heading
(
format_string
(
$course
->
fullname
));
echo
$OUTPUT
->
header
();
echo
$OUTPUT
->
heading
(
get_string
(
'editingchapter'
,
'book'
));
echo
$OUTPUT
->
heading
(
get_string
(
'editingchapter'
,
'
mod_
book'
));
$mform
->
display
();
...
...
edit_form.php
View file @
1cc316b7
...
...
@@ -40,13 +40,13 @@ class book_chapter_edit_form extends moodleform {
$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
->
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
->
addRule
(
'content_editor'
,
get_string
(
'required'
),
'required'
,
null
,
'client'
);
...
...
import.php
View file @
1cc316b7
...
...
@@ -54,8 +54,8 @@ $PAGE->add_body_class('mod_book');
$PAGE
->
set_heading
(
format_string
(
$course
->
fullname
));
///prepare the page header
$strbook
=
get_string
(
'modulename'
,
'book'
);
$strbooks
=
get_string
(
'modulenameplural'
,
'book'
);
$strbook
=
get_string
(
'modulename'
,
'
mod_
book'
);
$strbooks
=
get_string
(
'modulenameplural'
,
'
mod_
book'
);
$mform
=
new
book_import_form
(
null
,
array
(
'id'
=>
$id
,
'chapterid'
=>
$chapterid
));
...
...
@@ -142,7 +142,7 @@ if ($mform->is_cancelled()) {
}
echo
$OUTPUT
->
header
();
echo
$OUTPUT
->
heading
(
get_string
(
'importingchapters'
,
'book'
));
echo
$OUTPUT
->
heading
(
get_string
(
'importingchapters'
,
'
mod_
book'
));
$mform
->
display
();
...
...
import_form.php
View file @
1cc316b7
...
...
@@ -43,7 +43,7 @@ class book_import_form extends moodleform {
$mform
->
addElement
(
'hidden'
,
'chapterid'
);
$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
);
}
...
...
index.php
View file @
1cc316b7
...
...
@@ -36,8 +36,8 @@ require_course_login($course, true);
$PAGE
->
set_pagelayout
(
'incourse'
);
/// Get all required strings
$strbooks
=
get_string
(
'modulenameplural'
,
'book'
);
$strbook
=
get_string
(
'modulename'
,
'book'
);
$strbooks
=
get_string
(
'modulenameplural'
,
'
mod_
book'
);
$strbook
=
get_string
(
'modulename'
,
'
mod_
book'
);
$strsectionname
=
get_string
(
'sectionname'
,
'format_'
.
$course
->
format
);
$strname
=
get_string
(
'name'
);
$strintro
=
get_string
(
'moduleintro'
);
...
...
lib.php
View file @
1cc316b7
...
...
@@ -91,7 +91,7 @@ function book_get_types() {
$type
=
new
stdClass
();
$type
->
modclass
=
MOD_CLASS_RESOURCE
;
$type
->
type
=
'book'
;
$type
->
typestr
=
get_string
(
'modulename'
,
'book'
);
$type
->
typestr
=
get_string
(
'modulename'
,
'
mod_
book'
);
return
array
(
$type
);
}
...
...
@@ -239,14 +239,14 @@ function book_extend_settings_navigation(settings_navigation $settingsnav, navig
if
(
has_capability
(
'mod/book:print'
,
$PAGE
->
cm
->
context
))
{
$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!!
//$action = new action_link($url, get_string('printbook', 'book'), new popup_action('onclick', $url));
//$booknode->add('', $action, navigation_node::TYPE_SETTING);
$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
))
{
...
...
print.php
View file @
1cc316b7
...
...
@@ -57,9 +57,9 @@ unset($chapterid);
// security checks END
// =========================================================================
$strbooks
=
get_string
(
'modulenameplural'
,
'book'
);
$strbook
=
get_string
(
'modulename'
,
'book'
);
$strtop
=
get_string
(
'top'
,
'book'
);
$strbooks
=
get_string
(
'modulenameplural'
,
'
mod_
book'
);
$strbook
=
get_string
(
'modulename'
,
'
mod_
book'
);
$strtop
=
get_string
(
'top'
,
'
mod_
book'
);
@
header
(
'Cache-Control: private, pre-check=0, post-check=0, max-age=0'
);
@
header
(
'Pragma: no-cache'
);
...
...
@@ -127,13 +127,13 @@ if ($chapter) {
<td>
<?php
echo
get_string
(
'course'
)
?>
:
</td>
<td>
<?php
echo
format_string
(
$course
->
fullname
,
true
,
array
(
'context'
=>
$context
))
?>
</td>
</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>
</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>
</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>
</tr>
</table></div>
...
...
settings.php
View file @
1cc316b7
...
...
@@ -28,6 +28,6 @@ defined('MOODLE_INTERNAL') || die;
if
(
$ADMIN
->
fulltree
)
{
$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
view.php
View file @
1cc316b7
...
...
@@ -116,9 +116,9 @@ add_to_log($course->id, 'book', 'view', 'view.php?id='.$cm->id.'&chapterid='
///read standard strings
$strbooks
=
get_string
(
'modulenameplural'
,
'book'
);
$strbook
=
get_string
(
'modulename'
,
'book'
);
$strtoc
=
get_string
(
'toc'
,
'book'
);
$strbooks
=
get_string
(
'modulenameplural'
,
'
mod_
book'
);
$strbook
=
get_string
(
'modulename'
,
'
mod_
book'
);
$strtoc
=
get_string
(
'toc'
,
'
mod_
book'
);
/// prepare header
$PAGE
->
set_title
(
format_string
(
$book
->
name
));
...
...
@@ -181,7 +181,7 @@ if ($edit) {
<tr>
<td
style=
"width:
<?php
echo
$tocwidth
?>
px"
valign=
"bottom"
>
<?php
print_string
(
'toc'
,
'book'
);
print_string
(
'toc'
,
'
mod_
book'
);
?>
</td>
<td>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment