mirror of
https://github.com/moodle/moodle.git
synced 2025-03-14 04:30:15 +01:00
Merge branch 'MDL-58644-master' of git://github.com/ankitagarwal/moodle
This commit is contained in:
commit
ae068eb145
@ -77,12 +77,12 @@ class courses_view implements renderable, templatable {
|
||||
$enddate = $course->enddate;
|
||||
$courseid = $course->id;
|
||||
$context = \context_course::instance($courseid);
|
||||
// Convert summary to plain text.
|
||||
$course->summary = content_to_text($course->summary, false);
|
||||
$exporter = new course_summary_exporter($course, [
|
||||
'context' => $context
|
||||
]);
|
||||
$exportedcourse = $exporter->export($output);
|
||||
// Convert summary to plain text.
|
||||
$exportedcourse->summary = content_to_text($exportedcourse->summary, $exportedcourse->summaryformat);
|
||||
|
||||
if (isset($this->coursesprogress[$courseid])) {
|
||||
$coursecompleted = $this->coursesprogress[$courseid]['completed'];
|
||||
|
@ -65,6 +65,9 @@ class course_summary_exporter extends \core\external\exporter {
|
||||
'type' => PARAM_RAW,
|
||||
'null' => NULL_ALLOWED
|
||||
),
|
||||
'summaryformat' => array(
|
||||
'type' => PARAM_INT,
|
||||
),
|
||||
'startdate' => array(
|
||||
'type' => PARAM_INT,
|
||||
),
|
||||
@ -74,6 +77,18 @@ class course_summary_exporter extends \core\external\exporter {
|
||||
);
|
||||
}
|
||||
|
||||
/**
|
||||
* Get the formatting parameters for the summary.
|
||||
*
|
||||
* @return array
|
||||
*/
|
||||
protected function get_format_parameters_for_summary() {
|
||||
return [
|
||||
'component' => 'course',
|
||||
'filearea' => 'summary',
|
||||
];
|
||||
}
|
||||
|
||||
public static function define_other_properties() {
|
||||
return array(
|
||||
'fullnamedisplay' => array(
|
||||
|
Loading…
x
Reference in New Issue
Block a user