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
integration
prechecker
Commits
3edc37cb
Commit
3edc37cb
authored
Aug 15, 2012
by
Petr Škoda
Browse files
MDL-34740 add class file option to $CFG->moodlepageclass and $CFG->blockmanagerclass
parent
c92d6f41
Changes
3
Hide whitespace changes
Inline
Side-by-side
config-dist.php
View file @
3edc37cb
...
...
@@ -211,10 +211,12 @@ $CFG->admin = 'admin';
// You can specify a different class to be created for the $PAGE global, and to
// compute which blocks appear on each page. However, I cannot think of any good
// reason why you would need to change that. It just felt wrong to hard-code the
// the class name. You are stronly advised not to use these to settings unless
// the class name. You are stron
g
ly advised not to use these to settings unless
// you are absolutely sure you know what you are doing.
// $CFG->moodlepageclass = 'moodle_page';
// $CFG->moodlepageclassfile = "$CFG->dirroot/local/myplugin/mypageclass.php";
// $CFG->blockmanagerclass = 'block_manager';
// $CFG->blockmanagerclassfile = "$CFG->dirroot/local/myplugin/myblockamanagerclass.php";
//
// Seconds for files to remain in caches. Decrease this if you are worried
// about students being served outdated versions of uploaded files.
...
...
lib/pagelib.php
View file @
3edc37cb
...
...
@@ -578,6 +578,9 @@ class moodle_page {
global
$CFG
;
if
(
is_null
(
$this
->
_blocks
))
{
if
(
!
empty
(
$CFG
->
blockmanagerclass
))
{
if
(
!
empty
(
$CFG
->
blockmanagerclassfile
))
{
require_once
(
$CFG
->
blockmanagerclassfile
);
}
$classname
=
$CFG
->
blockmanagerclass
;
}
else
{
$classname
=
'block_manager'
;
...
...
lib/setup.php
View file @
3edc37cb
...
...
@@ -791,6 +791,9 @@ moodle_setlocale();
// Create the $PAGE global - this marks the PAGE and OUTPUT fully initialised, this MUST be done at the end of setup!
if
(
!
empty
(
$CFG
->
moodlepageclass
))
{
if
(
!
empty
(
$CFG
->
moodlepageclassfile
))
{
require_once
(
$CFG
->
moodlepageclassfile
);
}
$classname
=
$CFG
->
moodlepageclass
;
}
else
{
$classname
=
'moodle_page'
;
...
...
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