Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Importing from old course causes generalexceptionmessage. #47

Open
Raveneye1 opened this issue Jun 22, 2023 · 1 comment
Open

Importing from old course causes generalexceptionmessage. #47

Raveneye1 opened this issue Jun 22, 2023 · 1 comment

Comments

@Raveneye1
Copy link

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.

@Urpokarhu1
Copy link

I would like to see this fixed @stefanscholz

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants