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
920fd2c6
Commit
920fd2c6
authored
Oct 08, 2011
by
Petr Skoda
Browse files
add support for page types
parent
b962f030
Changes
2
Hide whitespace changes
Inline
Side-by-side
lang/en/book.php
View file @
920fd2c6
...
...
@@ -97,4 +97,6 @@ $string['book:read'] = 'Read book';
$string
[
'book:edit'
]
=
'Edit book chapters'
;
$string
[
'book:viewhiddenchapters'
]
=
'View hidden book chapters'
;
$string
[
'errorchapter'
]
=
'Error reading book chapter.'
;
\ No newline at end of file
$string
[
'errorchapter'
]
=
'Error reading book chapter.'
;
$string
[
'page-mod-book-x'
]
=
'Any book module page'
;
lib.php
View file @
920fd2c6
...
...
@@ -390,4 +390,17 @@ function book_pluginfile($course, $cm, $context, $filearea, $args, $forcedownloa
// finally send the file
send_stored_file
(
$file
,
360
,
0
,
false
);
}
\ No newline at end of file
}
/**
* Return a list of page types
*
* @param string $pagetype current page type
* @param stdClass $parentcontext Block's parent context
* @param stdClass $currentcontext Current context of block
* @return array
*/
function
book_page_type_list
(
$pagetype
,
$parentcontext
,
$currentcontext
)
{
$module_pagetype
=
array
(
'mod-book-*'
=>
get_string
(
'page-mod-book-x'
,
'mod_book'
));
return
$module_pagetype
;
}
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