MDL-34460 - remove uncessary context retrival

spotted during review
This commit is contained in:
Dan Poltawski 2012-07-30 14:26:19 +08:00
parent 957a8d48fc
commit bc8db7649b

View File

@ -451,7 +451,7 @@ function user_get_user_details($user, $course = null, array $userfields = array(
$coursecontext = context_course::instance($mycourse->id);
$enrolledcourse = array();
$enrolledcourse['id'] = $mycourse->id;
$enrolledcourse['fullname'] = format_string($mycourse->fullname, true, array('context' => context_course::instance($mycourse->id)));
$enrolledcourse['fullname'] = format_string($mycourse->fullname, true, array('context' => $coursecontext)));
$enrolledcourse['shortname'] = format_string($mycourse->shortname, true, array('context' => $coursecontext));
$enrolledcourses[] = $enrolledcourse;
}