65 public function __construct($a_usr_id, $a_exc_ref_id, $a_exc_id, $a_ass_id, $a_participant_id)
69 $this->user_id = $a_usr_id;
70 $this->exc_ref_id = $a_exc_ref_id;
71 $this->exc_id = $a_exc_id;
72 $this->ass_id = $a_ass_id;
73 $this->participant_id = $a_participant_id;
75 $this->task_factory = $DIC->backgroundTasks()->taskFactory();
76 $this->task_manager = $DIC->backgroundTasks()->taskManager();
77 $this->logger = $DIC->logger()->exc();
83 $bucket->setUserId($this->user_id);
85 $this->logger->debug(
"* Create task 'collect_data_job' using the following values:");
86 $this->logger->debug(
"job class = " . ilExerciseManagementCollectFilesJob::class);
87 $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 = " . (
int) $this->user_id);
89 $collect_data_job = $this->task_factory->createTask(
90 ilExerciseManagementCollectFilesJob::class,
93 (
int) $this->exc_ref_id,
95 (
int) $this->participant_id,
100 $this->logger->debug(
"* Create task 'zip job' using the following values:");
101 $this->logger->debug(
"job class = " . ilSubmissionsZipJob::class);
102 $this->logger->debug(
"sending as input the task called->collect_data_job");
104 $zip_job = $this->task_factory->createTask(ilSubmissionsZipJob::class, [$collect_data_job]);
106 if ($this->participant_id > 0) {
111 $bucket->setTitle($download_name);
115 $this->logger->debug(
"* Create task 'download_interaction' using the following values:");
116 $this->logger->debug(
"job class = " . ilExDownloadSubmissionsZipInteraction::class);
117 $this->logger->debug(
"download_name which is the same as bucket title = " . $download_name .
" + the zip_job task");
119 $download_interaction = $this->task_factory->createTask(ilExDownloadSubmissionsZipInteraction::class, [$zip_job, $download_name]);
122 $bucket->setTask($download_interaction);
123 $this->task_manager->run($bucket);
static _lookupName($a_user_id)
lookup user name
getParticipantBucketTitle()
__construct($a_usr_id, $a_exc_ref_id, $a_exc_id, $a_ass_id, $a_participant_id)
Constructor.
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static getDirectoryNameFromUserData($a_user_id)
Download submissions and feedback for exercises.
static lookupTitle($a_id)
Lookup title.