MDL-25928 course: Fixed course info on the combo list to be a popup
authorSam Hemelryk <sam@moodle.com>
Mon, 17 Dec 2012 03:03:06 +0000 (16:03 +1300)
committerSam Hemelryk <sam@moodle.com>
Mon, 17 Dec 2012 03:03:42 +0000 (16:03 +1300)
course/renderer.php

index a980841..e6ed2b5 100644 (file)
@@ -123,6 +123,7 @@ class core_course_renderer extends plugin_renderer_base {
         if ($hascourses) {
             $content .= html_writer::start_tag('div', array('class'=>'courses'));
             $coursecount = 0;
+            $strinfo = new lang_string('info');
             foreach ($category->courses as $course) {
                 $classes = array('course');
                 $linkclass = 'course_link';
@@ -143,8 +144,9 @@ class core_course_renderer extends plugin_renderer_base {
                 }
 
                 if ($course->summary) {
+                    $url = new moodle_url('/course/info.php', array('id' => $course->id));
                     $image = html_writer::empty_tag('img', array('src'=>$this->output->pix_url('i/info'), 'alt'=>$this->strings->summary));
-                    $content .= html_writer::link(new moodle_url('/course/info.php', array('id'=>$course->id)), $image, array('title'=>$this->strings->summary));
+                    $content .= $this->action_link($url, $image, new popup_action('click', $url, 'courseinfo'), array('title' => $this->strings->summary));
                 }
                 $content .= html_writer::end_tag('div');
                 $content .= html_writer::end_tag('div');