MDL-37968 course_overview: add dim class to hidden courses for teachers.
authorDan Marsden <dan@danmarsden.com>
Wed, 5 Jun 2013 23:57:22 +0000 (11:57 +1200)
committerDan Marsden <dan@danmarsden.com>
Fri, 7 Jun 2013 02:38:13 +0000 (14:38 +1200)
blocks/course_overview/renderer.php

index 1ac4e90..bb29569 100644 (file)
@@ -103,6 +103,9 @@ class block_course_overview_renderer extends plugin_renderer_base {
 
             // No need to pass title through s() here as it will be done automatically by html_writer.
             $attributes = array('title' => $course->fullname);
+            if (empty($course->visible)) {
+                $attributes['class'] = 'dimmed';
+            }
             if ($course->id > 0) {
                 $courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
                 $coursefullname = format_string($course->fullname, true, $course->id);