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

Don't show news by default in non-current terms

parent dcec9ff0
No related branches found
No related tags found
No related merge requests found
......@@ -182,7 +182,7 @@ class block_course_overview_uwmoodle extends block_base {
$showhidehtml = '';
if ($hasnews) {
$defaultshownews = ($termcode == $currentterm || $termcode == self::TERM_OTHER)? 1 : 0;
$shownews = get_user_preferences('block_course_overview_uwmoodle-show-coursenews-'.$course->id, 1);
$shownews = get_user_preferences('block_course_overview_uwmoodle-show-coursenews-'.$course->id, $defaultshownews);
$yuiitems[] = "coursenews-$course->id";
$showhidenewsurl = $PAGE->url->out_as_local_url(true, array('uwmcourse' => $course->id, 'uwmshow' => ($shownews)? 0 : 1));
if (!$shownews) {
......
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