Skip to content
Browse files

Library function which returns the page types used for a specific dir…


in the Moodle distro structure. As generic as it gets.
  • Loading branch information...
defacer committed Feb 28, 2005
1 parent f16bbfd commit 3f6aba0c42903ffa81855ab915bac5823b3b38f7
Showing with 15 additions and 0 deletions.
  1. +15 −0 lib/pagelib.php
@@ -19,6 +19,21 @@
// End of dirty compatibility hack -- remove this before 1.5 goes gold
function page_import_types($path) {
global $CFG;
$path = clean_param($path, PARAM_PATH);
$file = $CFG->dirroot.'/'.$path.'pagelib.php';
if(is_file($file)) {
if(!isset($DEFINEDPAGES)) {
error('Imported '.$file.' but found no page classes');
return false;
* Factory function page_create_object(). Called with a numeric ID for a page, it autodetects
* the page type, constructs the correct object and returns it.

0 comments on commit 3f6aba0

Please sign in to comment.
You can’t perform that action at this time.