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
dbfa5e33
Commit
dbfa5e33
authored
7 years ago
by
Kathrin Osswald
Browse files
Options
Downloads
Patches
Plain Diff
Improvements to feature 'Show hint in hidden courses'.
parent
be29ed79
Branches
Branches containing commit
Tags
Tags containing commit
No related merge requests found
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
CHANGES.md
+1
-0
1 addition, 0 deletions
CHANGES.md
classes/output/core_renderer.php
+4
-3
4 additions, 3 deletions
classes/output/core_renderer.php
lang/en/theme_boost_campus.php
+1
-1
1 addition, 1 deletion
lang/en/theme_boost_campus.php
with
6 additions
and
4 deletions
CHANGES.md
+
1
−
0
View file @
dbfa5e33
...
...
@@ -6,6 +6,7 @@ Changes
### Unreleased
*
2018-02-05 - Improvements to feature 'Show hint in hidden courses'.
*
2018-02-05 - Improvement site name color in dark navbar style with uploaded logo.
### Release v3.3-r2
...
...
This diff is collapsed.
Click to expand it.
classes/output/core_renderer.php
+
4
−
3
View file @
dbfa5e33
...
...
@@ -140,7 +140,7 @@ class core_renderer extends \theme_boost\output\core_renderer {
*/
public
function
full_header
()
{
// MODIFICATION START.
global
$PAGE
,
$USER
,
$COURSE
;
global
$PAGE
,
$USER
,
$COURSE
,
$CFG
;
// MODIFICATION END.
/* ORIGINAL START.
global $PAGE;
...
...
@@ -220,14 +220,15 @@ class core_renderer extends \theme_boost\output\core_renderer {
// MODIFICATION START:
// If the setting showhintcoursehidden is set, the visibility of the course is hidden and
// 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
))
{
$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
.
=
get_string
(
'showhintcoursehiddengeneral'
,
'theme_boost_campus'
,
$COURSE
->
id
);
// If the user has the capability to change the course settings, an additional link to the course settings is shown.
if
(
has_capability
(
'moodle/course:update'
,
context_course
::
instance
(
$COURSE
->
id
)))
{
$html
.
=
html_writer
::
tag
(
'div'
,
get_string
(
'showhintcoursehiddensettingslink'
,
'theme_boost_campus'
,
$COURSE
->
id
));
'theme_boost_campus'
,
array
(
'url'
=>
$CFG
->
wwwroot
.
'/course/edit.php?id='
.
$COURSE
->
id
))
)
;
}
$html
.
=
html_writer
::
end_tag
(
'div'
);
}
...
...
This diff is collapsed.
Click to expand it.
lang/en/theme_boost_campus.php
+
1
−
1
View file @
dbfa5e33
...
...
@@ -171,5 +171,5 @@ $string['darknavbarsetting_desc'] = 'By checking this setting you can invert the
// ADDITIONAL STRINGS (IN ALPHABETICAL ORDER).
$string
[
'cachedef_imagearea'
]
=
'Cache for imagearea items'
;
$string
[
'showhintcoursehiddengeneral'
]
=
'This course is currently <strong>hidden</strong>. Only enrolled teachers can access this course when hidden.'
;
$string
[
'showhintcoursehiddensettingslink'
]
=
'You can change the visibility in the <a href="
/course/edit.php?id={$a
}">course settings</a>.'
;
$string
[
'showhintcoursehiddensettingslink'
]
=
'You can change the visibility in the <a href="
{$a->url
}">course settings</a>.'
;
$string
[
'switchroleto'
]
=
'Switch role to'
;
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