Skip to content

Commit

Permalink
Merge branch 'MDL-58600-master' of git://github.com/ankitagarwal/moodle
Browse files Browse the repository at this point in the history
  • Loading branch information
junpataleta committed Apr 24, 2017
2 parents a84e03e + 266d033 commit e5eef6c
Showing 1 changed file with 13 additions and 2 deletions.
15 changes: 13 additions & 2 deletions course/classes/external/course_module_summary_exporter.php
Original file line number Diff line number Diff line change
Expand Up @@ -40,11 +40,10 @@ protected static function define_related() {

protected function get_other_values(renderer_base $output) {
$cm = $this->related['cm'];
$context = $cm->context;

$values = array(
'id' => $cm->id,
'name' => external_format_string($cm->name, $context->id),
'name' => $cm->name,
'iconurl' => $cm->get_icon_url()->out()
);
if ($cm->url) {
Expand All @@ -53,6 +52,18 @@ protected function get_other_values(renderer_base $output) {
return $values;
}

/**
* Get the format parameters for name.
*
* @return array
*/
protected function get_format_parameters_for_name() {
$cm = $this->related['cm'];
$context = $cm->context;
return [
'context' => $context,
];
}

public static function define_other_properties() {
return array(
Expand Down

0 comments on commit e5eef6c

Please sign in to comment.