Themes

 
 
Picture of Christos Savva
Moodle 2.5 layout for grades and reports
 

Hello to everyone, I am working on a custom theme for our Moodle 2.5, based on bootstrap but I have the following problem.

Everything works perfect except when I visit gradebook and Reports. The problem is that, when I visit these two sections my theme reverts to the parent css.

My config.php

$THEME->layouts = array(
'base' => array(
'file' => 'standard.php',
'regions' => array(),
),
'standard' => array(
'file' => 'standard.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post',
),
'course' => array(
'file' => 'standard.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post'
),
'coursecategory' => array(
'file' => 'standard.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post',
),
'incourse' => array(
'file' => 'standard.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post',
),
'frontpage' => array(
'file' => 'standard.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post',
),
'admin' => array(
'file' => 'standard.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),
'mydashboard' => array(
'file' => 'standard.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post',
'options' => array('langmenu'=>true),
),
'mypublic' => array(
'file' => 'standard.php',
'regions' => array('side-pre', 'side-post'),
'defaultregion' => 'side-post',
),
'login' => array(
'file' => 'standard.php',
'regions' => array(),
'options' => array('langmenu'=>true),
),
'popup' => array(
'file' => 'standard.php',
'regions' => array(),
'options' => array('nofooter'=>true),
),
'frametop' => array(
'file' => 'standard.php',
'regions' => array(),
'options' => array('nofooter'=>true),
),
'maintenance' => array(
'file' => 'standard.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>true),
),
'print' => array(
'file' => 'standard.php',
'regions' => array(),
'options' => array('nofooter'=>true, 'nonavbar'=>false),
),
);


So I my guess is that I need to include these two sections in my layouts and set the file to standart.php, but I have no idea what are the names for these sections.

Can anyone help me with that? Are there any more new layouts that I need to add in my config.php

Thank you in advance.

Kind regards

Christos

 
Average of ratings: -
Picture of Christos Savva
Re: Moodle 2.5 layout for grades and reports
 

Nevermind, I found it smile. For future reference, here is the layout for reports. (I should have guessed it earlier)

 

'report' => array(
'file' => 'standard.php',
'regions' => array(),
'defaultregion' => 'side-post',

)

I am still interested to learn if there are any more layouts that I didn't include in my config.php. 

 

 

 
Average of ratings: -
It's only an avatar...
Re: Moodle 2.5 layout for grades and reports
Group DevelopersGroup Documentation writersGroup Particularly helpful MoodlersGroup Testers

Hi Christos,

You seem to have missed off the regions array . It should look this...

'report' => array(
'file' => 'standard.php',
'regions' => array('side-pre'),
'defaultregion' => 'side-pre',
),

Also it should be side-pre and NOT side-post that you have.

Cheers
Mary

 
Average of ratings: -
Picture of Christos Savva
Re: Moodle 2.5 layout for grades and reports
 

Thank you for this! 

 
Average of ratings: -
Gareth J Barnard
Re: Moodle 2.5 layout for grades and reports
Group DevelopersGroup Particularly helpful Moodlers

Dear Christos,

I'm not sure how to fix the issue, but this - http://docs.moodle.org/dev/Themes_overview#Appendix_A - gives the list of all current layouts.

Cheers,

Gareth

 
Average of ratings: -
Picture of Christos Savva
Re: Moodle 2.5 layout for grades and reports
 

Awesome, thank you! big grin

 

 
Average of ratings: -