Download submissions and feedback for exercises.
More...
|
| __construct ($a_usr_id, $a_exc_ref_id, $a_exc_id, $a_ass_id, $a_participant_id) |
| Constructor. More...
|
|
| run () |
|
Download submissions and feedback for exercises.
- Author
- Jesús López lopez.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Definition at line 10 of file class.ilDownloadSubmissionsBackgroundTask.php.
◆ __construct()
ilDownloadSubmissionsBackgroundTask::__construct |
( |
|
$a_usr_id, |
|
|
|
$a_exc_ref_id, |
|
|
|
$a_exc_id, |
|
|
|
$a_ass_id, |
|
|
|
$a_participant_id |
|
) |
| |
Constructor.
- Parameters
-
integer | $a_usr_id | |
integer | $a_exc_ref_id | |
integer | $a_exc_id | |
integer | $a_ass_id | |
integer | $a_participant_id | |
Definition at line 65 of file class.ilDownloadSubmissionsBackgroundTask.php.
References $DIC.
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();
◆ getParticipantBucketTitle()
ilDownloadSubmissionsBackgroundTask::getParticipantBucketTitle |
( |
| ) |
|
|
protected |
◆ run()
ilDownloadSubmissionsBackgroundTask::run |
( |
| ) |
|
Definition at line 80 of file class.ilDownloadSubmissionsBackgroundTask.php.
References ilUtil\getASCIIFilename(), ilExSubmission\getDirectoryNameFromUserData(), getParticipantBucketTitle(), and ilExAssignment\lookupTitle().
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);
getParticipantBucketTitle()
static getASCIIFilename($a_filename)
convert utf8 to ascii filename
static getDirectoryNameFromUserData($a_user_id)
static lookupTitle($a_id)
Lookup title.
◆ $ass_id
ilDownloadSubmissionsBackgroundTask::$ass_id |
|
protected |
◆ $exc_id
ilDownloadSubmissionsBackgroundTask::$exc_id |
|
protected |
◆ $exc_ref_id
ilDownloadSubmissionsBackgroundTask::$exc_ref_id |
|
protected |
◆ $lng
ilDownloadSubmissionsBackgroundTask::$lng |
|
protected |
◆ $logger
ilDownloadSubmissionsBackgroundTask::$logger = null |
|
private |
◆ $participant_id
ilDownloadSubmissionsBackgroundTask::$participant_id |
|
protected |
◆ $task_factory
ilDownloadSubmissionsBackgroundTask::$task_factory = null |
|
protected |
◆ $task_manager
ilDownloadSubmissionsBackgroundTask::$task_manager = null |
|
protected |
◆ $user_id
ilDownloadSubmissionsBackgroundTask::$user_id |
|
protected |
The documentation for this class was generated from the following file: