MDL-69050 lang: Fix the variable name in the Essay question type
authorDavid Mudrák <david@moodle.com>
Wed, 16 Sep 2020 06:43:52 +0000 (08:43 +0200)
committerDavid Mudrák <david@moodle.com>
Thu, 24 Sep 2020 17:32:40 +0000 (19:32 +0200)
question/type/essay/question.php

index 73466bf..cc9d47f 100644 (file)
@@ -111,10 +111,10 @@ class qtype_essay_question extends question_with_responses {
         if ($hasattachments) {
             // Check the filetypes.
             $filetypesutil = new \core_form\filetypes_util();
-            $whitelist = $filetypesutil->normalize_file_types($this->filetypeslist);
+            $allowlist = $filetypesutil->normalize_file_types($this->filetypeslist);
             $wrongfiles = array();
             foreach ($response['attachments']->get_files() as $file) {
-                if (!$filetypesutil->is_allowed_file_type($file->get_filename(), $whitelist)) {
+                if (!$filetypesutil->is_allowed_file_type($file->get_filename(), $allowlist)) {
                     $wrongfiles[] = $file->get_filename();
                 }
             }