Importing from old course causes generalexceptionmessage.
Raveneye1 opened this issue · 1 comments
Recently upgraded our moodle to 4.1.3 from 3.9.20 and with it also kickstarter to newest version.
Importing from a template works fine. But importing from an existing course causes the following error:
Default exception handler: Exception - Too few arguments to function format_kickstart\course_importer::import(), 2 passed in [dirroot]/local/kickstart_pro/import.php on line 148 and exactly 3 expected Debug:
Error code: generalexceptionmessage
* line 115 of /course/format/kickstart/classes/course_importer.php: ArgumentCountError thrown
* line 148 of /local/kickstart_pro/import.php: call to format_kickstart\course_importer::import()
Line 148 in import.php in kickstarter pro contains the following:
\format_kickstart\course_importer::import($backupid, $course->id);
The line is the same also in the old version we used.
Line 115 in course_importer.php in kickstarter format contains the following:
public static function import($backuptempdir, $courseid, $templateid)
I checked in our old version and that line did not contain $templateid. I removed templateid from the line and the plugin started working. Don't know if I caused anything else to brake, but the functions we need are working.
Haven't seen anyone report the same error, so have no idea if this is a bigger issue, or only something that is an issue in our installation.
I would like to see this fixed @stefanscholz