Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
moodle
moodle
Commits
eb7131f0
Commit
eb7131f0
authored
Jun 30, 2022
by
Andrew Nicols
Browse files
Merge branch 'MDL-74522-master' of
https://github.com/devlionco/moodle
parents
31f23e2a
25b51251
Changes
2
Hide whitespace changes
Inline
Side-by-side
lib/classes/navigation/views/primary.php
View file @
eb7131f0
...
...
@@ -68,7 +68,7 @@ class primary extends view {
$showcoursesnode
=
empty
(
$this
->
page
->
theme
->
removedprimarynavitems
)
||
!
in_array
(
'courses'
,
$this
->
page
->
theme
->
removedprimarynavitems
);
if
(
$showcoursesnode
)
{
$this
->
add
(
get_string
(
'mycourses'
),
new
\
moodle_url
(
'/my/courses.php'
),
self
::
TYPE_ROOTNODE
,
null
,
'courses'
);
$this
->
add
(
get_string
(
'mycourses'
),
new
\
moodle_url
(
'/my/courses.php'
),
self
::
TYPE_ROOTNODE
,
null
,
'
my
courses'
);
}
}
...
...
lib/tests/navigation/views/primary_test.php
View file @
eb7131f0
...
...
@@ -62,8 +62,8 @@ class primary_test extends \advanced_testcase {
public
function
test_setting_initialise_provider
()
{
return
[
'Testing as a guest user'
=>
[
'guest'
,
[
'home'
]],
'Testing as an admin'
=>
[
'admin'
,
[
'home'
,
'myhome'
,
'courses'
,
'siteadminnode'
]],
'Testing as a regular user'
=>
[
'user'
,
[
'home'
,
'myhome'
,
'courses'
]]
'Testing as an admin'
=>
[
'admin'
,
[
'home'
,
'myhome'
,
'
my
courses'
,
'siteadminnode'
]],
'Testing as a regular user'
=>
[
'user'
,
[
'home'
,
'myhome'
,
'
my
courses'
]]
];
}
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment