From bc694b47613ef081318816ed19e5f940b0baa34d Mon Sep 17 00:00:00 2001 From: Juan Leyva Date: Wed, 31 Jan 2018 12:02:36 +0100 Subject: [PATCH] MDL-61321 mod_feedback: Return all the items responses The WS should receive all the item responses for all the attempts. --- mod/feedback/classes/responses_table.php | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/mod/feedback/classes/responses_table.php b/mod/feedback/classes/responses_table.php index 94ab2c654df..50b7d9efbff 100644 --- a/mod/feedback/classes/responses_table.php +++ b/mod/feedback/classes/responses_table.php @@ -267,7 +267,7 @@ class mod_feedback_responses_table extends table_sql { $tableheaders = $this->headers; $items = $this->feedbackstructure->get_items(true); - if (!$this->is_downloading()) { + if (!$this->is_downloading() && !$this->buildforexternal) { // In preview mode do not show all columns or the page becomes unreadable. // The information message will be displayed to the teacher that the rest of the data can be viewed when downloading. $items = array_slice($items, 0, self::PREVIEWCOLUMNSLIMIT, true); @@ -615,8 +615,8 @@ class mod_feedback_responses_table extends table_sql { */ public function export_external_structure($page = 0, $perpage = 0) { - $this->add_all_values_to_output(); $this->buildforexternal = true; + $this->add_all_values_to_output(); // Set-up. $this->setup(); // Override values, if needed.