diff --git a/mod/feedback/classes/output/summary.php b/mod/feedback/classes/output/summary.php index de3315cb056..5beda91033e 100644 --- a/mod/feedback/classes/output/summary.php +++ b/mod/feedback/classes/output/summary.php @@ -46,20 +46,20 @@ class summary implements renderable, templatable { /** @var int */ protected $mygroupid; - /** @var bool */ - protected $extradetails; - /** * Constructor. * + * @todo MDL-71494 Final deprecation of the $extradetails parameter in Moodle 4.3 * @param mod_feedback_structure $feedbackstructure * @param int $mygroupid currently selected group - * @param bool $extradetails display additional details (time open, time closed) + * @param bool|null $extradetails Deprecated */ - public function __construct($feedbackstructure, $mygroupid = false, $extradetails = false) { + public function __construct($feedbackstructure, $mygroupid = false, $extradetails = null) { + if (isset($extradetails)) { + debugging('The $extradetails parameter is deprecated.', DEBUG_DEVELOPER); + } $this->feedbackstructure = $feedbackstructure; $this->mygroupid = $mygroupid; - $this->extradetails = $extradetails; } /** @@ -72,12 +72,6 @@ class summary implements renderable, templatable { $r = new stdClass(); $r->completedcount = $this->feedbackstructure->count_completed_responses($this->mygroupid); $r->itemscount = count($this->feedbackstructure->get_items(true)); - if ($this->extradetails && ($timeopen = $this->feedbackstructure->get_feedback()->timeopen)) { - $r->timeopen = userdate($timeopen); - } - if ($this->extradetails && ($timeclose = $this->feedbackstructure->get_feedback()->timeclose)) { - $r->timeclose = userdate($timeclose); - } return $r; } diff --git a/mod/feedback/templates/summary.mustache b/mod/feedback/templates/summary.mustache index b0e46f6bb7a..4c4f0f9970b 100644 --- a/mod/feedback/templates/summary.mustache +++ b/mod/feedback/templates/summary.mustache @@ -31,8 +31,7 @@ Example context (json): { "completedcount" : 15, - "itemscount" : 5, - "timeopen" : "May 15, 2016" + "itemscount" : 5 } }} @@ -48,20 +47,3 @@ class="feedback_info">{{#str}}questions, mod_feedback{{/str}}: {{itemscount}} - -{{#timeopen}} -
- {{#str}}feedbackopen, mod_feedback{{/str}}: {{timeopen}} -
-{{/timeopen}} - -{{#timeclose}} -
- {{#str}}feedbackclose, mod_feedback{{/str}}: {{timeclose}} -
-{{/timeclose}} - diff --git a/mod/feedback/upgrade.txt b/mod/feedback/upgrade.txt index c9a0ef6877f..2e443379ee8 100644 --- a/mod/feedback/upgrade.txt +++ b/mod/feedback/upgrade.txt @@ -1,3 +1,6 @@ +=== 3.11 === +The $extradetails parameter in the constructor of the mod_feedback\output\summary class has been deprecated and is not used anymore. + === 3.8 === * The following functions have been finally deprecated and can not be used anymore: diff --git a/mod/feedback/view.php b/mod/feedback/view.php index a8e10192c18..42d41d08ed7 100644 --- a/mod/feedback/view.php +++ b/mod/feedback/view.php @@ -102,7 +102,7 @@ if (has_capability('mod/feedback:edititems', $context)) { $mygroupid = groups_get_activity_group($cm); echo $groupselect.'
 
'; - $summary = new mod_feedback\output\summary($feedbackcompletion, $mygroupid, true); + $summary = new mod_feedback\output\summary($feedbackcompletion, $mygroupid); echo $OUTPUT->render_from_template('mod_feedback/summary', $summary->export_for_template($OUTPUT)); if ($pageaftersubmit = $feedbackcompletion->page_after_submit()) {