Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

MDL-37558 Block course_overview/course_list use setting courselistsho…

…rtname to show shortname and fullname
  • Loading branch information...
commit 9d82f6a836d4099843ca83a7f20654f524e4d753 1 parent 7f3836d
@henesnarfel henesnarfel authored
View
6 blocks/course_list/block_course_list.php
@@ -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
@@ -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)) {
@@ -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;
View
2  blocks/course_overview/renderer.php
@@ -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 {
Please sign in to comment.
Something went wrong with that request. Please try again.