MDL-25928 course: Fixed course info on the combo list to be a popup

This commit is contained in:
Sam Hemelryk 2012-12-17 16:03:06 +13:00
parent 20751863e3
commit 6a1273cbc7

View File

@ -168,6 +168,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';
@ -188,8 +189,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');