Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-theme_boost_campus
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
GitLab community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
elc
moodle-theme_boost_campus
Commits
c58d8127
Commit
c58d8127
authored
7 years ago
by
Kathrin Osswald
Browse files
Options
Downloads
Patches
Plain Diff
Improved comments, especially modification hints.
parent
2b3c625d
No related branches found
No related tags found
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
layout/columns2.php
+13
-5
13 additions, 5 deletions
layout/columns2.php
layout/includes/badgearea.php
+1
-1
1 addition, 1 deletion
layout/includes/badgearea.php
lib.php
+1
-1
1 addition, 1 deletion
lib.php
with
15 additions
and
7 deletions
layout/columns2.php
+
13
−
5
View file @
c58d8127
...
...
@@ -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.
This diff is collapsed.
Click to expand it.
layout/includes/badgearea.php
+
1
−
1
View file @
c58d8127
...
...
@@ -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
);
...
...
This diff is collapsed.
Click to expand it.
lib.php
+
1
−
1
View file @
c58d8127
...
...
@@ -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'
],
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment