MDL-70324 Question: get_all_response_file_areas() not work correctly
authorThong Bui <Thong.BuiVoQuoc@nashtechglobal.com>
Tue, 1 Dec 2020 09:02:18 +0000 (16:02 +0700)
committerThong Bui <Thong.BuiVoQuoc@nashtechglobal.com>
Tue, 1 Dec 2020 09:11:21 +0000 (16:11 +0700)
question/engine/lib.php

index cc8ebc2..b1f21d9 100644 (file)
@@ -432,7 +432,7 @@ abstract class question_engine {
     public static function get_all_response_file_areas() {
         $variables = array();
         foreach (question_bank::get_all_qtypes() as $qtype) {
     public static function get_all_response_file_areas() {
         $variables = array();
         foreach (question_bank::get_all_qtypes() as $qtype) {
-            $variables += $qtype->response_file_areas();
+            $variables = array_merge($variables, $qtype->response_file_areas());
         }
 
         $areas = array();
         }
 
         $areas = array();