Skip to content
Snippets Groups Projects
Commit c3a4f6c4 authored by Matt Petro's avatar Matt Petro
Browse files

Don't allow collapsing of current semester

parent a588c7ce
No related branches found
No related tags found
No related merge requests found
...@@ -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)));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment