diff --git a/classes/create_repo.php b/classes/create_repo.php index 7ea9642..c8feae5 100644 --- a/classes/create_repo.php +++ b/classes/create_repo.php @@ -313,7 +313,7 @@ public function call_repo_creation(string $rootdirectory, string $moodleinstance chdir($scriptdirectory); return shell_exec('php createrepo.php -u ' . $this->usegit . ' -w -r "' . $rootdirectory . '" -i "' . $moodleinstance . - '" -l "module" -n ' . $instanceid . ' -t "' . $token . '" -x ' . $ignorecat); + '" -l "module" -n ' . $instanceid . ' -t ' . $token . $ignorecat); } /** diff --git a/classes/export_repo.php b/classes/export_repo.php index 763f3fd..fc0eaea 100644 --- a/classes/export_repo.php +++ b/classes/export_repo.php @@ -347,7 +347,7 @@ public function update_quiz_directories($clihelper, $scriptdirectory) { $quizmanifestname = cli_helper::get_manifest_path($moodleinstance, 'module', null, $contextinfo->contextinfo->coursename, $quiz->name, ''); $output = $this->call_export_repo($rootdirectory, $moodleinstance, $token, - $quizmanifestname, $scriptdirectory); + $quizmanifestname, $ignorecat, $scriptdirectory); } echo $output; $quizmanifestpath = cli_helper::get_manifest_path($moodleinstance, 'module', null, @@ -372,7 +372,7 @@ public function call_repo_creation(string $rootdirectory, string $moodleinstance ): ?string { chdir($scriptdirectory); return shell_exec('php createrepo.php -u ' . $this->usegit . ' -w -r "' . $rootdirectory . '" -i "' . $moodleinstance . - '" -l "module" -n ' . $instanceid . ' -t ' . $token . ' -x ' . $ignorecat); + '" -l "module" -n ' . $instanceid . ' -t ' . $token . $ignorecat); } /** @@ -397,13 +397,14 @@ public function call_export_quiz(string $moodleinstance, string $token, * @param string $moodleinstance * @param string $token * @param string $quizmanifestname + * @param string $ignorecat * @param string $scriptdirectory * @return string|null */ public function call_export_repo(string $rootdirectory, string $moodleinstance, string $token, - string $quizmanifestname, string $scriptdirectory): ?string { + string $quizmanifestname, string $ignorecat, string $scriptdirectory): ?string { chdir($scriptdirectory); return shell_exec('php exportrepofrommoodle.php -u ' . $this->usegit . ' -w -r "' . $rootdirectory . '" -i "' . - $moodleinstance . '" -f "' . $quizmanifestname . '" -t ' . $token); + $moodleinstance . '" -f "' . $quizmanifestname . '" -t ' . $token . $ignorecat); } } diff --git a/classes/import_repo.php b/classes/import_repo.php index 64ce4f2..97177fe 100644 --- a/classes/import_repo.php +++ b/classes/import_repo.php @@ -921,7 +921,7 @@ public function update_quizzes($clihelper, $scriptdirectory) { echo "\nImporting quiz context: {$structurecontents->quiz->name}\n"; if (is_file($quizmanifestpath)) { $output = $this->call_import_repo($rootdirectory, $moodleinstance, $token, - $quizmanifestname, null, $scriptdirectory); + $quizmanifestname, null, $ignorecat, $scriptdirectory); echo $output; } else { // No quiz manifest. We need to import questions into context of created quiz. @@ -941,7 +941,7 @@ public function update_quizzes($clihelper, $scriptdirectory) { $this->manifestcontents->quizzes = []; } $output = $this->call_import_repo($rootdirectory, $moodleinstance, $token, - null, $quizcmid, $scriptdirectory); + null, $quizcmid, $ignorecat, $scriptdirectory); echo $output; } if ($instanceid === false) { @@ -992,18 +992,20 @@ public function update_quizzes($clihelper, $scriptdirectory) { * @param string $token * @param string|null $quizmanifestname * @param string|null $cmid + * @param string $ignorecat * @param string $scriptdirectory * @return string|null */ public function call_import_repo(string $rootdirectory, string $moodleinstance, string $token, - ?string $quizmanifestname, ?string $quizcmid, string $scriptdirectory): string { + ?string $quizmanifestname, ?string $quizcmid, + string $ignorecat, string $scriptdirectory): string { chdir($scriptdirectory); if ($quizmanifestname) { return shell_exec('php importrepotomoodle.php -u ' . $this->usegit . ' -w -r "' . $rootdirectory . - '" -i "' . $moodleinstance . '" -f "' . $quizmanifestname . '" -t ' . $token); + '" -i "' . $moodleinstance . '" -f "' . $quizmanifestname . '" -t ' . $token . $ignorecat); } else { return shell_exec('php importrepotomoodle.php -u ' . $this->usegit . ' -w -r "' . $rootdirectory . - '" -i "' . $moodleinstance . '" -l "module" -n ' . $quizcmid . ' -t ' . $token); + '" -i "' . $moodleinstance . '" -l "module" -n ' . $quizcmid . ' -t ' . $token . $ignorecat); } }