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
bafe2728
Commit
bafe2728
authored
2 years ago
by
Alexander Bias
Browse files
Options
Downloads
Patches
Plain Diff
Bugfix: Return Boost Campus favicon as moodle_url instead of string, solves #120
parent
1143a534
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
CHANGES.md
+1
-0
1 addition, 0 deletions
CHANGES.md
classes/output/core_renderer.php
+11
-3
11 additions, 3 deletions
classes/output/core_renderer.php
with
12 additions
and
3 deletions
CHANGES.md
+
1
−
0
View file @
bafe2728
...
@@ -6,6 +6,7 @@ Changes
...
@@ -6,6 +6,7 @@ Changes
### Unreleased
### Unreleased
*
2022-11-03 - Bugfix: Return Boost Campus favicon as moodle_url instead of string, solves #120.
*
2022-07-10 - Add Capabilities section to README.md
*
2022-07-10 - Add Capabilities section to README.md
### v3.11-r3
### v3.11-r3
...
...
This diff is collapsed.
Click to expand it.
classes/output/core_renderer.php
+
11
−
3
View file @
bafe2728
...
@@ -46,6 +46,7 @@ use paging_bar;
...
@@ -46,6 +46,7 @@ use paging_bar;
use
url_select
;
use
url_select
;
use
context_course
;
use
context_course
;
use
pix_icon
;
use
pix_icon
;
use
context_system
;
/**
/**
* Extending the core_renderer interface.
* Extending the core_renderer interface.
...
@@ -97,14 +98,21 @@ class core_renderer extends \core_renderer {
...
@@ -97,14 +98,21 @@ class core_renderer extends \core_renderer {
*
*
* @since Moodle 2.5.1 2.6
* @since Moodle 2.5.1 2.6
* @return moodle_url The moodle_url for the favicon
* @return moodle_url The moodle_url for the favicon
* @throws \moodle_exception
*/
*/
public
function
favicon
()
{
public
function
favicon
()
{
// MODIFICATION START.
// MODIFICATION START.
if
(
!
empty
(
$this
->
page
->
theme
->
settings
->
favicon
))
{
$logo
=
null
;
return
$this
->
page
->
theme
->
setting_file_url
(
'favicon'
,
'favicon'
);
if
(
!
during_initial_install
())
{
}
else
{
$logo
=
get_config
(
'theme_boost_campus'
,
'favicon'
);
}
if
(
empty
(
$logo
))
{
return
$this
->
image_url
(
'favicon'
,
'theme'
);
return
$this
->
image_url
(
'favicon'
,
'theme'
);
}
}
// Use $CFG->themerev to prevent browser caching when the file changes.
return
moodle_url
::
make_pluginfile_url
(
context_system
::
instance
()
->
id
,
'theme_boost_campus'
,
'favicon'
,
''
,
theme_get_revision
(),
$logo
);
// MODIFICATION END.
// MODIFICATION END.
// @codingStandardsIgnoreStart
// @codingStandardsIgnoreStart
/* ORIGINAL START.
/* ORIGINAL START.
...
...
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