74         $this->
lng = $DIC->language();
    75         $this->tpl = $DIC->ui()->mainTemplate();
    76         $this->glyph_factory = $DIC->ui()->factory()->symbol()->glyph();
    77         $this->renderer = $DIC->ui()->renderer();
    78         $this->upload_limit = $DIC[
'ui.upload_limit_resolver'];
    82         $this->validationRegexp = 
"";
    88         $this->dodging_files = 
new stdClass();
   109         $this->suffixes = $a_suffixes;
   201         $submittedElements = $this->
getInput();
   203         if ($F && ((array) $this->dodging_files) !== []) {
   204             $F = array_merge([self::FILE_DATA_INDEX_DODGING_FILE => (array) $this->dodging_files], $F);
   207         if ($this->
getRequired() && !is_array($F[
'error'])) {
   208             $this->
setAlert($this->
lng->txt(
"form_msg_file_no_upload"));
   211             foreach ($F[
'error'] as $index => $error) {
   215                         case UPLOAD_ERR_FORM_SIZE:
   216                         case UPLOAD_ERR_INI_SIZE:
   217                             $this->
setAlert($this->
lng->txt(
"form_msg_file_size_exceeds"));
   221                         case UPLOAD_ERR_PARTIAL:
   222                             $this->
setAlert($this->
lng->txt(
"form_msg_file_partially_uploaded"));
   226                         case UPLOAD_ERR_NO_FILE:
   229                             } elseif (isset($F[self::FILE_DATA_INDEX_DODGING_FILE][$index]) && $F[self::FILE_DATA_INDEX_DODGING_FILE][$index] !== 
'') {
   232                             $this->
setAlert($this->
lng->txt(
"form_msg_file_no_upload"));
   236                         case UPLOAD_ERR_NO_TMP_DIR:
   237                             $this->
setAlert($this->
lng->txt(
"form_msg_file_missing_tmp_dir"));
   241                         case UPLOAD_ERR_CANT_WRITE:
   242                             $this->
setAlert($this->
lng->txt(
"form_msg_file_cannot_write_to_disk"));
   246                         case UPLOAD_ERR_EXTENSION:
   247                             $this->
setAlert($this->
lng->txt(
"form_msg_file_upload_stopped_ext"));
   255         if (is_array($F[
'tmp_name'])) {
   256             foreach ($F[
'tmp_name'] as $index => $tmpname) {
   260                     $tmpname = array_shift($tmpname);
   263                 $suffix = $filename_arr[
"extension"] ?? 
'';
   264                 $mimetype = $F[
'type'][$index];
   265                 $size_bytes = $F[
'size'][$index];
   267                 if (strlen($tmpname) && is_array($this->
getSuffixes())) {
   269                         $this->
setAlert($this->
lng->txt(
"form_msg_file_wrong_file_type"));
   276         foreach ($F[
'tmp_name'] as $index => $tmpname) {
   280                 $tmpname = array_shift($tmpname);
   283             $suffix = $filename_arr[
"extension"] ?? 
'';
   284             $mimetype = $F[
'type'][$index];
   285             $size_bytes = $F[
'size'][$index];
   287             if (strlen($tmpname)) {
   289                 if ($vir[0] == 
false) {
   290                     $this->
setAlert($this->
lng->txt(
"form_msg_file_virus_found") . 
"<br />" . $vir[1]);
   303     public function render(
string $a_mode = 
""): string
   323                 $tpl->
setVariable(
"TXT_DELETE_EXISTING", $lng->
txt(
"delete_existing_file"));
   333             $tpl->
setVariable(
'MAX_SIZE_WARNING', $this->
lng->txt(
'form_msg_file_size_exceeds'));
   334             $tpl->
setVariable(
'MAX_SIZE', $this->upload_limit->getPhpUploadLimitInBytes());
   344                 $tpl->
setVariable(
"UP_BUTTON", $this->renderer->render(
   345                     $this->glyph_factory->up()->withAction(
'#')
   347                 $tpl->
setVariable(
"DOWN_BUTTON", $this->renderer->render(
   348                     $this->glyph_factory->down()->withAction(
'#')
   357                 $tpl->
setVariable(
"ADD_BUTTON", $this->renderer->render(
   358                     $this->glyph_factory->add()->withAction(
'#')
   360                 $tpl->
setVariable(
"REMOVE_BUTTON", $this->renderer->render(
   361                     $this->glyph_factory->remove()->withAction(
'#')
   370             $suff_str = $delim = 
"";
   372                 $suff_str .= $delim . 
"." . 
$suffix;
   376             $tpl->
setVariable(
"TXT_ALLOWED_SUFFIXES", $lng->
txt(
"file_allowed_suffixes") . 
" " . $suff_str);
   384         $tpl->
setVariable(
"DELETE_IMAGE_HEADER", $lng->
txt(
'delete_image_header'));
   385         $tpl->
setVariable(
"DELETE_IMAGE_QUESTION", $lng->
txt(
'delete_image_question'));
   390             $iterator_subfield_name = self::ITERATOR_SUBFIELD_NAME;
   391             $image_upload_subfield_name = self::IMAGE_UPLOAD_SUBFIELD_NAME;
   394 $.extend({}, AnswerWizardInput, IdentifiedWizardInput).
init(
   396         'fieldContainerSelector': 
'.ilWzdContainerImage',
   397         'reindexingRequiredElementsSelectors': [
   398             'input:hidden[name*="[{$iterator_subfield_name}]"]',
   399             'input:file[id*="__{$image_upload_subfield_name}__"]',
   400             'input:submit[name*="[{$this->getImageUploadCommand()}]"]',
   401             'input:submit[name*="[{$this->getImageRemovalCommand()}]"]',
   404         'handleRowCleanUpCallback': 
function(rowElem) {
   405             $(rowElem).find(
'div.imagepresentation').remove();
   406             $(rowElem).find(
'input[type=text]').val(
'');
   412             $this->tpl->addJavascript(
"./Modules/TestQuestionPool/templates/default/answerwizardinput.js");
   413             $this->tpl->addJavascript(
"./Modules/TestQuestionPool/templates/default/identifiedwizardinput.js");
   414             $this->tpl->addOnLoadCode($init_code);
   427             && array_key_exists(
'src', 
$value)
   450         return isset(
$value[
'title']) && strlen(
$value[
'title']);
   467         return new ilTemplate(self::RENDERING_TEMPLATE, 
true, 
true, 
"Modules/TestQuestionPool");
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
An entity that renders components to a string output. 
 
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
 
static virusHandling(string $a_file, string $a_orig_name='', bool $a_clean=true)
 
This is how a factory for glyphs looks like. 
 
get(string $part=self::DEFAULT_BLOCK)
Renders the given block and returns the html string. 
 
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
 
setVariable(string $variable, $value='')
Sets the given variable to the given value. 
 
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...
 
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block. 
 
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.