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
c33f5306
Commit
c33f5306
authored
5 years ago
by
Kathrin Osswald
Browse files
Options
Downloads
Patches
Plain Diff
Making Travis happy again.
parent
ee18f257
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
CHANGES.md
+4
-0
4 additions, 0 deletions
CHANGES.md
classes/output/core_renderer.php
+14
-15
14 additions, 15 deletions
classes/output/core_renderer.php
locallib.php
+1
-1
1 addition, 1 deletion
locallib.php
with
19 additions
and
16 deletions
CHANGES.md
+
4
−
0
View file @
c33f5306
...
@@ -4,6 +4,10 @@ moodle-theme_boost_campus
...
@@ -4,6 +4,10 @@ moodle-theme_boost_campus
Changes
Changes
-------
-------
### Unreleased
*
2020-06-04 - Making Travis happy again.
### Release v3.8-r1
### Release v3.8-r1
*
2020-03-24 - Changed setting imageareaitemslink to imageareaitemsattributes to be able to add alt text to the images.
*
2020-03-24 - Changed setting imageareaitemslink to imageareaitemsattributes to be able to add alt text to the images.
...
...
This diff is collapsed.
Click to expand it.
classes/output/core_renderer.php
+
14
−
15
View file @
c33f5306
...
@@ -93,7 +93,7 @@ class core_renderer extends \core_renderer {
...
@@ -93,7 +93,7 @@ class core_renderer extends \core_renderer {
* @return string
* @return string
*/
*/
public
function
body_attributes
(
$additionalclasses
=
array
())
{
public
function
body_attributes
(
$additionalclasses
=
array
())
{
global
$PAGE
,
$CFG
;
global
$CFG
;
require_once
(
$CFG
->
dirroot
.
'/theme/boost_campus/locallib.php'
);
require_once
(
$CFG
->
dirroot
.
'/theme/boost_campus/locallib.php'
);
if
(
!
is_array
(
$additionalclasses
))
{
if
(
!
is_array
(
$additionalclasses
))
{
...
@@ -102,7 +102,7 @@ class core_renderer extends \core_renderer {
...
@@ -102,7 +102,7 @@ class core_renderer extends \core_renderer {
// MODIFICATION START.
// MODIFICATION START.
// Only add classes for the login page.
// Only add classes for the login page.
if
(
$
PAGE
->
bodyid
==
'page-login-index'
)
{
if
(
$
this
->
page
->
bodyid
==
'page-login-index'
)
{
$additionalclasses
[]
=
'loginbackgroundimage'
;
$additionalclasses
[]
=
'loginbackgroundimage'
;
// Generating a random class for displaying a random image for the login page.
// Generating a random class for displaying a random image for the login page.
$additionalclasses
[]
=
theme_boost_campus_get_random_loginbackgroundimage_class
();
$additionalclasses
[]
=
theme_boost_campus_get_random_loginbackgroundimage_class
();
...
@@ -123,10 +123,9 @@ class core_renderer extends \core_renderer {
...
@@ -123,10 +123,9 @@ class core_renderer extends \core_renderer {
* @return moodle_url The moodle_url for the favicon
* @return moodle_url The moodle_url for the favicon
*/
*/
public
function
favicon
()
{
public
function
favicon
()
{
global
$PAGE
;
// MODIFICATION START.
// MODIFICATION START.
if
(
!
empty
(
$
PAGE
->
theme
->
settings
->
favicon
))
{
if
(
!
empty
(
$
this
->
page
->
theme
->
settings
->
favicon
))
{
return
$
PAGE
->
theme
->
setting_file_url
(
'favicon'
,
'favicon'
);
return
$
this
->
page
->
theme
->
setting_file_url
(
'favicon'
,
'favicon'
);
}
else
{
}
else
{
return
$this
->
image_url
(
'favicon'
,
'theme'
);
return
$this
->
image_url
(
'favicon'
,
'theme'
);
}
}
...
@@ -149,14 +148,14 @@ class core_renderer extends \core_renderer {
...
@@ -149,14 +148,14 @@ class core_renderer extends \core_renderer {
*/
*/
public
function
full_header
()
{
public
function
full_header
()
{
// MODIFICATION START.
// MODIFICATION START.
global
$PAGE
,
$USER
,
$COURSE
,
$CFG
;
global
$USER
,
$COURSE
,
$CFG
;
// MODIFICATION END.
// MODIFICATION END.
if
(
$
PAGE
->
include_region_main_settings_in_header_actions
()
&&
!
$
PAGE
->
blocks
->
is_block_present
(
'settings'
))
{
if
(
$
this
->
page
->
include_region_main_settings_in_header_actions
()
&&
!
$
this
->
page
->
blocks
->
is_block_present
(
'settings'
))
{
// Only include the region main settings if the page has requested it and it doesn't already have
// Only include the region main settings if the page has requested it and it doesn't already have
// the settings block on it. The region main settings are included in the settings block and
// the settings block on it. The region main settings are included in the settings block and
// duplicating the content causes behat failures.
// duplicating the content causes behat failures.
$
PAGE
->
add_header_action
(
html_writer
::
div
(
$
this
->
page
->
add_header_action
(
html_writer
::
div
(
$this
->
region_main_settings_menu
(),
$this
->
region_main_settings_menu
(),
'd-print-none'
,
'd-print-none'
,
[
'id'
=>
'region-main-settings-menu'
]
[
'id'
=>
'region-main-settings-menu'
]
...
@@ -167,7 +166,7 @@ class core_renderer extends \core_renderer {
...
@@ -167,7 +166,7 @@ class core_renderer extends \core_renderer {
// MODIFICATION START.
// MODIFICATION START.
// Show the context header settings menu on all pages except for the profile page as we replace
// Show the context header settings menu on all pages except for the profile page as we replace
// it with an edit button there.
// it with an edit button there.
if
(
$
PAGE
->
pagelayout
!=
'mypublic'
)
{
if
(
$
this
->
page
->
pagelayout
!=
'mypublic'
)
{
$header
->
settingsmenu
=
$this
->
context_header_settings_menu
();
$header
->
settingsmenu
=
$this
->
context_header_settings_menu
();
}
}
// MODIFICATION END.
// MODIFICATION END.
...
@@ -175,12 +174,12 @@ class core_renderer extends \core_renderer {
...
@@ -175,12 +174,12 @@ class core_renderer extends \core_renderer {
$header->settingsmenu = $this->context_header_settings_menu();
$header->settingsmenu = $this->context_header_settings_menu();
ORIGINAL END. */
ORIGINAL END. */
$header
->
contextheader
=
$this
->
context_header
();
$header
->
contextheader
=
$this
->
context_header
();
$header
->
hasnavbar
=
empty
(
$
PAGE
->
layout_options
[
'nonavbar'
]);
$header
->
hasnavbar
=
empty
(
$
this
->
page
->
layout_options
[
'nonavbar'
]);
$header
->
navbar
=
$this
->
navbar
();
$header
->
navbar
=
$this
->
navbar
();
// MODIFICATION START.
// MODIFICATION START.
// Show the page heading button on all pages except for the profile page.
// Show the page heading button on all pages except for the profile page.
// There we replace it with an edit profile button.
// There we replace it with an edit profile button.
if
(
$
PAGE
->
pagelayout
!=
'mypublic'
)
{
if
(
$
this
->
page
->
pagelayout
!=
'mypublic'
)
{
$header
->
pageheadingbutton
=
$this
->
page_heading_button
();
$header
->
pageheadingbutton
=
$this
->
page_heading_button
();
}
else
{
}
else
{
// Get the id of the user for whom the profile page is shown.
// Get the id of the user for whom the profile page is shown.
...
@@ -205,7 +204,7 @@ class core_renderer extends \core_renderer {
...
@@ -205,7 +204,7 @@ class core_renderer extends \core_renderer {
$header->pageheadingbutton = $this->page_heading_button();
$header->pageheadingbutton = $this->page_heading_button();
ORIGINAL END. */
ORIGINAL END. */
$header
->
courseheader
=
$this
->
course_header
();
$header
->
courseheader
=
$this
->
course_header
();
$header
->
headeractions
=
$
PAGE
->
get_header_actions
();
$header
->
headeractions
=
$
this
->
page
->
get_header_actions
();
// MODIFICATION START:
// MODIFICATION START:
// Change this to add the result in the html variable to be able to add further features below the header.
// Change this to add the result in the html variable to be able to add further features below the header.
// Render from the own header template.
// Render from the own header template.
...
@@ -219,7 +218,7 @@ class core_renderer extends \core_renderer {
...
@@ -219,7 +218,7 @@ class core_renderer extends \core_renderer {
// If the setting showhintcoursehidden is set, the visibility of the course is hidden and
// If the setting showhintcoursehidden is set, the visibility of the course is hidden and
// a hint for the visibility will be shown.
// a hint for the visibility will be shown.
if
(
get_config
(
'theme_boost_campus'
,
'showhintcoursehidden'
)
==
'yes'
&&
$COURSE
->
visible
==
false
&&
if
(
get_config
(
'theme_boost_campus'
,
'showhintcoursehidden'
)
==
'yes'
&&
$COURSE
->
visible
==
false
&&
$PAGE
->
has_set_url
()
&&
$
PAGE
->
url
->
compare
(
new
moodle_url
(
'/course/view.php'
),
URL_MATCH_BASE
))
{
$this
->
page
->
has_set_url
()
&&
$
this
->
page
->
url
->
compare
(
new
moodle_url
(
'/course/view.php'
),
URL_MATCH_BASE
))
{
$html
.
=
html_writer
::
start_tag
(
'div'
,
array
(
'class'
=>
'course-hidden-infobox alert alert-warning'
));
$html
.
=
html_writer
::
start_tag
(
'div'
,
array
(
'class'
=>
'course-hidden-infobox alert alert-warning'
));
$html
.
=
html_writer
::
tag
(
'i'
,
null
,
array
(
'class'
=>
'fa fa-exclamation-circle fa-3x fa-pull-left'
));
$html
.
=
html_writer
::
tag
(
'i'
,
null
,
array
(
'class'
=>
'fa fa-exclamation-circle fa-3x fa-pull-left'
));
$html
.
=
get_string
(
'showhintcoursehiddengeneral'
,
'theme_boost_campus'
,
$COURSE
->
id
);
$html
.
=
get_string
(
'showhintcoursehiddengeneral'
,
'theme_boost_campus'
,
$COURSE
->
id
);
...
@@ -239,8 +238,8 @@ class core_renderer extends \core_renderer {
...
@@ -239,8 +238,8 @@ class core_renderer extends \core_renderer {
// intended.
// intended.
if
(
get_config
(
'theme_boost_campus'
,
'showhintcourseguestaccess'
)
==
'yes'
if
(
get_config
(
'theme_boost_campus'
,
'showhintcourseguestaccess'
)
==
'yes'
&&
is_guest
(
\context_course
::
instance
(
$COURSE
->
id
),
$USER
->
id
)
&&
is_guest
(
\context_course
::
instance
(
$COURSE
->
id
),
$USER
->
id
)
&&
$
PAGE
->
has_set_url
()
&&
$
this
->
page
->
has_set_url
()
&&
$
PAGE
->
url
->
compare
(
new
moodle_url
(
'/course/view.php'
),
URL_MATCH_BASE
)
&&
$
this
->
page
->
url
->
compare
(
new
moodle_url
(
'/course/view.php'
),
URL_MATCH_BASE
)
&&
!
is_role_switched
(
$COURSE
->
id
))
{
&&
!
is_role_switched
(
$COURSE
->
id
))
{
$html
.
=
html_writer
::
start_tag
(
'div'
,
array
(
'class'
=>
'course-guestaccess-infobox alert alert-warning'
));
$html
.
=
html_writer
::
start_tag
(
'div'
,
array
(
'class'
=>
'course-guestaccess-infobox alert alert-warning'
));
$html
.
=
html_writer
::
tag
(
'i'
,
null
,
array
(
'class'
=>
'fa fa-exclamation-circle fa-3x fa-pull-left'
));
$html
.
=
html_writer
::
tag
(
'i'
,
null
,
array
(
'class'
=>
'fa fa-exclamation-circle fa-3x fa-pull-left'
));
...
...
This diff is collapsed.
Click to expand it.
locallib.php
+
1
−
1
View file @
c33f5306
...
@@ -243,7 +243,7 @@ function theme_boost_campus_get_imageareacontent() {
...
@@ -243,7 +243,7 @@ function theme_boost_campus_get_imageareacontent() {
}
else
{
}
else
{
$alttext
=
""
;
$alttext
=
""
;
}
}
// Add the file
// Add the file
.
$imageareacache
[]
=
array
(
'filepath'
=>
$filepath
,
'linkpath'
=>
$linkpath
,
'alttext'
=>
$alttext
);
$imageareacache
[]
=
array
(
'filepath'
=>
$filepath
,
'linkpath'
=>
$linkpath
,
'alttext'
=>
$alttext
);
}
}
// Sort array alphabetically ascending to the key "filepath".
// Sort array alphabetically ascending to the key "filepath".
...
...
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