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
97619edd
Commit
97619edd
authored
Jan 16, 2011
by
Petr Skoda
Browse files
add numbering default setting
parent
c5832d6b
Changes
2
Hide whitespace changes
Inline
Side-by-side
mod_form.php
View file @
97619edd
...
...
@@ -67,6 +67,7 @@ class mod_book_mod_form extends moodleform_mod {
}
$mform
->
addElement
(
'select'
,
'numbering'
,
get_string
(
'numbering'
,
'book'
),
$options
);
$mform
->
addHelpButton
(
'numbering'
,
'numbering'
,
'mod_book'
);
$mform
->
setDefault
(
'numbering'
,
$config
->
numbering
);
$mform
->
addElement
(
'checkbox'
,
'customtitles'
,
get_string
(
'customtitles'
,
'book'
));
$mform
->
addHelpButton
(
'customtitles'
,
'customtitles'
,
'mod_book'
);
...
...
settings.php
View file @
97619edd
...
...
@@ -28,6 +28,8 @@ defined('MOODLE_INTERNAL') || die;
if
(
$ADMIN
->
fulltree
)
{
require_once
(
"
$CFG->dirroot
/mod/book/lib.php"
);
//--- general settings -----------------------------------------------------------------------------------
$settings
->
add
(
new
admin_setting_configcheckbox
(
'book/requiremodintro'
,
get_string
(
'requiremodintro'
,
'admin'
),
get_string
(
'configrequiremodintro'
,
'admin'
),
1
));
...
...
@@ -37,4 +39,11 @@ if ($ADMIN->fulltree) {
get_string
(
'numberingoptions'
,
'mod_book'
),
get_string
(
'numberingoptions_help'
,
'mod_book'
),
array_keys
(
$options
),
$options
));
//--- modedit defaults -----------------------------------------------------------------------------------
$settings
->
add
(
new
admin_setting_heading
(
'bookmodeditdefaults'
,
get_string
(
'modeditdefaults'
,
'admin'
),
get_string
(
'condifmodeditdefaults'
,
'admin'
)));
$settings
->
add
(
new
admin_setting_configselect
(
'book/numbering'
,
get_string
(
'numbering'
,
'mod_book'
),
''
,
BOOK_NUM_NUMBERS
,
$options
));
}
\ No newline at end of file
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