74 $lng = $DIC->language();
89 if (null === $certificateSettings) {
90 $certificateSettings = new \ilSetting(
'certificate');
104 $logger = $DIC->logger()->cert();
109 $lng->loadLanguageModule(
'cert');
123 $cmd = $this->ctrl->getCmd();
124 $next_class = $this->ctrl->getNextClass($this);
127 switch ($next_class) {
129 $ret = $this->$cmd();
152 $isMigrationAvailable = $this->migrationValidator->isMigrationAvailable(
156 if (
false === $isMigrationAvailable) {
157 $this->logger->error(
'Tried to execute user certificate migration, but the migration has already been executed');
161 $factory = $this->backgroundTasks->taskFactory();
162 $taskManager = $this->backgroundTasks->taskManager();
164 $bucket = new \ILIAS\BackgroundTasks\Implementation\Bucket\BasicBucket();
165 $bucket->setUserId($this->
user->getId());
167 $task =
$factory->createTask(\ilCertificateMigrationJob::class, [(
int) $this->
user->getId()]);
169 $interaction = \ilCertificateMigrationInteraction::class;
170 if (!$this->learningHistoryService->isActive()) {
171 $interaction = \ilCertificateMigrationReducedInteraction::class;
173 $certificates_interaction =
$factory->createTask($interaction, [
175 (
int) $this->
user->getId()
178 $bucket->setTask($certificates_interaction);
179 $bucket->setTitle(
'Certificate Migration');
180 $bucket->setDescription(
'Migrates certificates for active user');
182 $taskManager->run($bucket);
184 return $this->lng->txt(
'certificate_migration_confirm_started');
This class provides processing control methods.
Class ilCertificateMigrationGUI.
Learning history service.
Class ilCertificateMigration.
Interface ilAccessHandler.
executeCommand()
execute command
__construct(\ilCtrl $ctrl=null, \ilLanguage $lng=null, \ilAccessHandler $access=null, \ILIAS\DI\BackgroundTaskServices $backgroundTasks=null, \ilObjUser $user=null, \ilLearningHistoryService $learningHistoryService=null, \ilSetting $certificateSettings=null, \ilCertificateMigrationValidator $migrationValidator=null, \ilErrorHandling $errorHandler=null, \ilLog $logger=null)
ilCertificateMigrationGUI constructor.
startMigrationAndReturnMessage()
getCommand(string $cmd)
Retrieves the ilCtrl command.