36 $ilCtrl = $DIC->ctrl();
37 $lng = $DIC->language();
38 $ilToolbar = $DIC->toolbar();
43 $this->
ctrl = $ilCtrl;
50 $cmd = $this->
ctrl->getCmd(
"uploadMultipleSubtitleFileForm");
52 if (in_array($cmd, array(
"uploadMultipleSubtitleFileForm",
"uploadMultipleSubtitleFile",
"showMultiSubtitleConfirmationTable",
"cancelMultiSrt",
"saveMultiSrt"))) {
59 $this->tpl->setOnScreenMessage(
'info', $this->
lng->txt(
"cont_upload_multi_srt_howto"));
62 $this->
toolbar->setFormAction($this->
ctrl->getFormAction($this),
true);
63 $fi =
new ilFileInputGUI($this->
lng->txt(
"cont_subtitle_file") .
" (.zip)",
"subtitle_file");
65 $this->
toolbar->addInputItem($fi,
true);
67 $this->
toolbar->addFormButton($this->
lng->txt(
"upload"),
"uploadMultipleSubtitleFile");
77 $this->
ctrl->redirect($this,
"showMultiSubtitleConfirmationTable");
79 $this->tpl->setOnScreenMessage(
'failure', $e->getMessage(),
true);
80 $this->
ctrl->redirect($this,
"uploadMultipleSubtitleFileForm");
90 $this->tpl->setContent($tab->getHTML());
95 $this->multi_srt->clearMultiSrtDirectory();
96 $this->
ctrl->redirect($this,
"uploadMultipleSubtitleFileForm");
104 $cnt = $this->multi_srt->moveMultiSrtFiles();
105 $this->multi_srt->clearMultiSrtDirectory();
107 $this->tpl->setOnScreenMessage(
'success', $this->
lng->txt(
"cont_moved_srt_files") .
" (" . $cnt .
")",
true);
108 $this->
ctrl->redirect($this,
"uploadMultipleSubtitleFileForm");
showMultiSubtitleConfirmationTable()
List of srt files in zip file.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilMobMultiSrtUpload $multi_srt
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Handler class for multi srt upload.
__construct(ilMobMultiSrtInt $a_multi_srt)
ilGlobalTemplateInterface $tpl
uploadMultipleSubtitleFile()
Upload multiple subtitles.
saveMultiSrt()
Save selected srt files as new srt files.
uploadMultipleSubtitleFileForm()
static stripSlashesArray(array $a_arr, bool $a_strip_html=true, string $a_allow="")