Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
M
moodle-block_course_overview_uwmoodle
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
uw-moodle
moodle-block_course_overview_uwmoodle
Commits
c3a4f6c4
Commit
c3a4f6c4
authored
12 years ago
by
Matt Petro
Browse files
Options
Downloads
Patches
Plain Diff
Don't allow collapsing of current semester
parent
a588c7ce
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
block_course_overview_uwmoodle.php
+8
-7
8 additions, 7 deletions
block_course_overview_uwmoodle.php
with
8 additions
and
7 deletions
block_course_overview_uwmoodle.php
+
8
−
7
View file @
c3a4f6c4
...
@@ -149,9 +149,6 @@ class block_course_overview_uwmoodle extends block_base {
...
@@ -149,9 +149,6 @@ class block_course_overview_uwmoodle extends block_base {
// display courses
// display courses
echo
'<div class="courselist">'
;
echo
'<div class="courselist">'
;
echo
'<ul class="treelist">'
;
echo
'<ul class="treelist">'
;
if
(
isset
(
$terms
[
$currentterm
])
||
isset
(
$terms
[
self
::
TERM_OTHER
]))
{
echo
'<h3>Current semester</h3>'
;
}
$incurrentterms
=
true
;
$incurrentterms
=
true
;
foreach
(
$terms
as
$termcode
=>
$termcourses
)
{
foreach
(
$terms
as
$termcode
=>
$termcourses
)
{
...
@@ -184,10 +181,14 @@ class block_course_overview_uwmoodle extends block_base {
...
@@ -184,10 +181,14 @@ class block_course_overview_uwmoodle extends block_base {
$showhidetermurl
=
$PAGE
->
url
->
out_as_local_url
(
true
,
array
(
'uwmterm'
=>
$termcode
,
'uwmshow'
=>
(
$showterm
)
?
0
:
1
));
$showhidetermurl
=
$PAGE
->
url
->
out_as_local_url
(
true
,
array
(
'uwmterm'
=>
$termcode
,
'uwmshow'
=>
(
$showterm
)
?
0
:
1
));
echo
"<li class='
$class
'>"
;
echo
"<li class='
$class
'>"
;
echo
"<h3 class='
$termclass
'>"
;
if
(
$termcode
==
$currentterm
)
{
// The data-ajax attribute prevents the Moodle mobile theme from overriding the AJAX behavior
echo
"<h3 class='
$termclass
'>
$termname
</h3>"
;
echo
"<a class='showhide' data-ajax='false'
$aria
href='
$showhidetermurl
' id='uwm-
{
$this
->
instance
->
id
}
-term-
$termcode
'><span class='term treeitem'>
$termname
</span></a>"
;
}
else
{
echo
"</h3>"
;
echo
"<h3 class='
$termclass
'>"
;
// The data-ajax attribute prevents the Moodle mobile theme from overriding the AJAX behavior
echo
"<a class='showhide' data-ajax='false'
$aria
href='
$showhidetermurl
' id='uwm-
{
$this
->
instance
->
id
}
-term-
$termcode
'><span class='term treeitem'>
$termname
</span></a>"
;
echo
"</h3>"
;
}
echo
"<ul class='treelist' id='uwm-
{
$this
->
instance
->
id
}
-term-
$termcode
-list' role='region'>"
;
echo
"<ul class='treelist' id='uwm-
{
$this
->
instance
->
id
}
-term-
$termcode
-list' role='region'>"
;
foreach
(
$termcourses
as
$course
)
{
foreach
(
$termcourses
as
$course
)
{
$fullname
=
format_string
(
$course
->
fullname
,
true
,
array
(
'context'
=>
get_context_instance
(
CONTEXT_COURSE
,
$course
->
id
)));
$fullname
=
format_string
(
$course
->
fullname
,
true
,
array
(
'context'
=>
get_context_instance
(
CONTEXT_COURSE
,
$course
->
id
)));
...
...
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