Commit 920fd2c6 authored by Petr Skoda's avatar Petr Skoda
Browse files

add support for page types

parent b962f030
......@@ -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';
......@@ -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;
}
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