Hello, Jerome.
Sorry for disappear, but i went to a 10 days-without-computer vacations, hehe.
Searching for the $params global i just see it in ./question/format/hotpot/format.php
It seems like a code to work on older versions of moodle:
49 // get import file name
50 global $params;
51 if (! empty($this->realfilename)) {
52 $filename = $this->realfilename;
53 } else if (isset($params) && !empty($params->choosefile)) {
54 // course file (Moodle >=1.6+)
55 $filename = $params->choosefile;
56 } else {
57 // uploaded file (all Moodles)
58 $filename = basename($_FILES['newfile']['tmp_name']);
59 }
I really didn't know if this is needed. This script is called by ./question/import.php, in this point:
90 // work out if this is an uploaded file
91 // or one from the filesarea.
92 if (!empty($form->choosefile)) {
93 $importfile = "{$CFG->dataroot}/{$COURSE->id}/{$form->choosefile}";
94 $realfilename = $form->choosefile;
95 if (file_exists($importfile)) {
96 $fileisgood = true;
97 } else {
98 print_error('uploadproblem', 'moodle', $form->choosefile);
99 }
100 } else {
101 // must be upload file
102 $realfilename = $import_form->get_importfile_realname();
103 if (!$importfile = $import_form->get_importfile_name()) {
104 print_error('uploadproblem', 'moodle');
105 }else {
106 $fileisgood = true;
107 }
108 }
109
110 // process if we are happy file is ok
111 if ($fileisgood) {
112
113 if (! is_readable("format/$form->format/format.php")) {
114 print_error('formatnotfound','quiz', $form->format);
115 }
116
117 require_once("format.php"); // Parent class
118 require_once("format/$form->format/format.php");
119
I don't have any hotpotatoes file here to test. What do you think? Is there oficial and active mantainers of this modules?
Hello Jerome,
need some help on this?