Skip to content
Snippets Groups Projects
Commit c58d8127 authored by Kathrin Osswald's avatar Kathrin Osswald
Browse files

Improved comments, especially modification hints.

parent 2b3c625d
No related branches found
No related tags found
No related merge requests found
......@@ -30,7 +30,9 @@ global $PAGE;
user_preference_allow_ajax_update('drawer-open-nav', PARAM_ALPHA);
require_once($CFG->libdir . '/behat/lib.php');
// MODIFICATION Start: Require own locallib.php.
require_once($CFG->dirroot . '/theme/boost_campus/locallib.php');
// MODIFICATION END.
if (isloggedin()) {
$navdraweropen = (get_user_preferences('drawer-open-nav', 'true') == 'true');
......@@ -45,20 +47,26 @@ $bodyattributes = $OUTPUT->body_attributes($extraclasses);
$blockshtml = $OUTPUT->blocks('side-pre');
$hasblocks = strpos($blockshtml, 'data-block=') !== false;
$regionmainsettingsmenu = $OUTPUT->region_main_settings_menu();
// MODIFICATION START: Setting 'catchshortcuts'.
// Initialize array.
$catchshortcuts = array();
// If setting is enabled then add the parameter to the array.
$catchendkey = get_config('theme_boost_campus', 'catchendkey');
if (isset($catchendkey) && $catchendkey == true) {
$catchshortcuts[] = 'end';
}
// If setting is enabled then add the parameter to the array.
$catchcmdarrowdown = get_config('theme_boost_campus', 'catchcmdarrowdown');
if (isset($catchcmdarrowdown) && $catchcmdarrowdown == true) {
$catchshortcuts[] = 'cmdarrowdown';
}
// If setting is enabled then add the parameter to the array.
$catchctrlarrowdown = get_config('theme_boost_campus', 'catchctrlarrowdown');
if (isset($catchctrlarrowdown) && $catchctrlarrowdown == true) {
$catchshortcuts[] = 'ctrlarrowdown';
}
// MODIFICATION START.
// MODIFICATION END.
// MODIFICATION START: Setting 'showsettingsincourse'.
// Initialize node variable.
$node = false;
// If the setting 'showsettingsincourse' is enabled.
......@@ -80,7 +88,7 @@ $templatecontext = [
'navdraweropen' => $navdraweropen,
'regionmainsettingsmenu' => $regionmainsettingsmenu,
'hasregionmainsettingsmenu' => !empty($regionmainsettingsmenu),
// MODIFICATION START.
// MODIFICATION START: Add Boost Campus realated values to the template context.
'catchshortcuts' => json_encode($catchshortcuts),
'node' => $node
// MODIFICATION END.
......@@ -96,11 +104,11 @@ echo $OUTPUT->render_from_template('theme_boost_campus/columns2', $templateconte
echo $OUTPUT->render_from_template('theme_boost/columns2', $templatecontext);
ORIGINAL END. */
// MODIFICATION START.
// MODIFICATION START: Require additional layout files.
// Add footer blocks and standard footer.
require_once(dirname(__FILE__).'/includes/footer.php');
// Add badgearea.
// Add badgearea layout file.
require_once(dirname(__FILE__).'/includes/badgearea.php');
// Add footnote.
// Add footnote layout file.
require_once(dirname(__FILE__).'/includes/footnote.php');
// MODIFICATION END.
......@@ -28,7 +28,7 @@ require_once($CFG->dirroot . '/theme/boost_campus/locallib.php');
$badgeareafiles = theme_boost_campus_get_badgeareacontent();
// Only proceed with sorting if received array is not empty.
// Only proceed if received array is not empty.
if (!empty($badgeareafiles)) {
$templatecontext['badgeareafiles'] = $badgeareafiles;
echo $OUTPUT->render_from_template('theme_boost_campus/badgearea', $templatecontext);
......
......@@ -80,7 +80,7 @@ function theme_boost_campus_get_pre_scss($theme) {
$configurable = [
// Config key => [variableName, ...].
'brandcolor' => ['brand-primary'],
// MODIFICATION START.
// MODIFICATION START: Add own variables.
'section0title' => ['section0title'],
'showswitchedroleincourse' => ['showswitchedroleincourse'],
'loginform' => ['loginform'],
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment