48 $this->user_id = $a_usr_id;
49 $this->exc_ref_id = $a_exc_ref_id;
50 $this->exc_id = $a_exc_id;
51 $this->ass_id = $a_ass_id;
52 $this->participant_id = $a_participant_id;
54 $this->task_factory = $DIC->backgroundTasks()->taskFactory();
55 $this->task_manager = $DIC->backgroundTasks()->taskManager();
57 $this->
logger = $DIC->logger()->exc();
60 public function run(): bool
63 $bucket->setUserId($this->user_id);
65 $this->
logger->debug(
"* Create task 'collect_data_job' using the following values:");
66 $this->
logger->debug(
"job class = " . ilExerciseManagementCollectFilesJob::class);
67 $this->
logger->debug(
"exc_id = " . $this->exc_id .
", exc_ref_id = " . $this->exc_ref_id .
", ass_id = " . (
int) $this->ass_id .
", participant_id = " . (
int) $this->participant_id .
", user_id = " . $this->user_id);
69 $collect_data_job = $this->task_factory->createTask(
70 ilExerciseManagementCollectFilesJob::class,
75 (
int) $this->participant_id,
80 $this->
logger->debug(
"* Create task 'zip job' using the following values:");
81 $this->
logger->debug(
"job class = " . ilSubmissionsZipJob::class);
82 $this->
logger->debug(
"sending as input the task called->collect_data_job");
84 $zip_job = $this->task_factory->createTask(ilSubmissionsZipJob::class, [$collect_data_job]);
86 if ($this->participant_id > 0) {
91 $bucket->setTitle($download_name);
95 $this->
logger->debug(
"* Create task 'download_interaction' using the following values:");
96 $this->
logger->debug(
"job class = " . ilExDownloadSubmissionsZipInteraction::class);
97 $this->
logger->debug(
"download_name which is the same as bucket title = " . $download_name .
" + the zip_job task");
99 $download_interaction = $this->task_factory->createTask(ilExDownloadSubmissionsZipInteraction::class, [$zip_job, $download_name]);
102 $bucket->setTask($download_interaction);
103 $this->task_manager->run($bucket);
110 return ucfirst(
$name[
'lastname']) .
", " . ucfirst(
$name[
'firstname']);
getParticipantBucketTitle()
static lookupTitle(int $a_id)
static _lookupName(int $a_user_id)
lookup user name
TaskFactory $task_factory
static getASCIIFilename(string $a_filename)
TaskManager $task_manager
Download submissions and feedback for exercises.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getDirectoryNameFromUserData(int $a_user_id)
__construct(int $a_usr_id, int $a_exc_ref_id, int $a_exc_id, int $a_ass_id, int $a_participant_id)