Skip to content

Commit

Permalink
MDL-37558 Block course_overview/course_list use setting courselistsho…
Browse files Browse the repository at this point in the history
…rtname to show shortname and fullname
  • Loading branch information
henesnarfel committed Sep 24, 2013
1 parent 7f3836d commit 9d82f6a
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions blocks/course_list/block_course_list.php
Expand Up @@ -40,7 +40,7 @@ function get_content() {
$coursecontext = context_course::instance($course->id);
$linkcss = $course->visible ? "" : " class=\"dimmed\" ";
$this->content->items[]="<a $linkcss title=\"" . format_string($course->shortname, true, array('context' => $coursecontext)) . "\" ".
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">".$icon.format_string($course->fullname). "</a>";
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">".$icon.format_string(get_course_display_name_for_list($course)). "</a>";
}
$this->title = get_string('mycourses');
/// If we can update any course of the view all isn't hidden, show the view all courses link
Expand Down Expand Up @@ -79,7 +79,7 @@ function get_content() {
$this->content->items[]="<a $linkcss title=\""
. format_string($course->shortname, true, array('context' => $coursecontext))."\" ".
"href=\"$CFG->wwwroot/course/view.php?id=$course->id\">"
.$icon. format_string($course->fullname, true, array('context' => context_course::instance($course->id))) . "</a>";
.$icon. format_string(get_course_display_name_for_list($course), true, array('context' => context_course::instance($course->id))) . "</a>";
}
/// If we can update any course of the view all isn't hidden, show the view all courses link
if (has_capability('moodle/course:update', context_system::instance()) || empty($CFG->block_course_list_hideallcourseslink)) {
Expand Down Expand Up @@ -124,7 +124,7 @@ function get_remote_courses() {
$coursecontext = context_course::instance($course->id);
$this->content->items[]="<a title=\"" . format_string($course->shortname, true, array('context' => $coursecontext)) . "\" ".
"href=\"{$CFG->wwwroot}/auth/mnet/jump.php?hostid={$course->hostid}&amp;wantsurl=/course/view.php?id={$course->remoteid}\">"
.$icon. format_string($course->fullname) . "</a>";
.$icon. format_string(get_course_display_name_for_list($course)) . "</a>";
}
// if we listed courses, we are done
return true;
Expand Down
2 changes: 1 addition & 1 deletion blocks/course_overview/renderer.php
Expand Up @@ -108,7 +108,7 @@ public function course_overview($courses, $overviews) {
$attributes['class'] = 'dimmed';
}
$courseurl = new moodle_url('/course/view.php', array('id' => $course->id));
$coursefullname = format_string($course->fullname, true, $course->id);
$coursefullname = format_string(get_course_display_name_for_list($course), true, $course->id);
$link = html_writer::link($courseurl, $coursefullname, $attributes);
$html .= $this->output->heading($link, 2, 'title');
} else {
Expand Down

0 comments on commit 9d82f6a

Please sign in to comment.