diff --git a/question/format/hotpot/format.php b/question/format/hotpot/format.php index e2b4c18b893..5af7c20f441 100644 --- a/question/format/hotpot/format.php +++ b/question/format/hotpot/format.php @@ -47,7 +47,9 @@ class qformat_hotpot extends qformat_default { // get import file name global $params; - if (isset($params) && !empty($params->choosefile)) { + if (! empty($this->realfilename)) { + $filename = $this->realfilename; + } else if (isset($params) && !empty($params->choosefile)) { // course file (Moodle >=1.6+) $filename = $params->choosefile; } else {