19 declare(strict_types=1);
    28     private string $import_temp_directory = 
CLIENT_DATA_DIR . DIRECTORY_SEPARATOR . 
'temp';
    46         $subdir = basename($file_to_import, 
'.zip');
    49             $this->import_temp_directory . DIRECTORY_SEPARATOR . $subdir,
    50             $this->import_temp_directory . DIRECTORY_SEPARATOR . $subdir . DIRECTORY_SEPARATOR . $subdir . 
'.xml',
    51             $this->import_temp_directory . DIRECTORY_SEPARATOR . $subdir . DIRECTORY_SEPARATOR . str_replace(
    63             $importdir . DIRECTORY_SEPARATOR . basename($importdir) . 
'.xml',
    64             $importdir . DIRECTORY_SEPARATOR . preg_replace(
'/test|tst|qpl/', 
'qti', basename($importdir)) . 
'.xml'    70         return $importdir . DIRECTORY_SEPARATOR
    71                 . str_replace(
'tst', 
'results', $subdir) . 
'.xml';
    76         return $this->import_temp_directory;
    81         $subdir = basename($file_to_import, 
'.zip');
    82         return $this->import_temp_directory . DIRECTORY_SEPARATOR . $subdir;
    95         )->withRequest($request)->getData();
    96         if (isset(
$data[
'selected_questions'])) {
    97             return $data[
'selected_questions'];
   106         string $path_to_uploaded_file_in_temp_dir = null
   108         $qtiParser = new \ilQTIParser(
   115         $qtiParser->startParsing();
   116         $founditems = &$qtiParser->getFoundItems();
   117         if ($path_to_uploaded_file_in_temp_dir !== null && $founditems === []) {
   119             $this->deleteUploadedImportFile($path_to_uploaded_file_in_temp_dir);
   120             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'qpl_import_no_items'), 
true);
   126         foreach ($founditems as $item) {
   127             if ($item[
'type'] !== 
'') {
   134         if ($complete == 0) {
   136             $this->deleteUploadedImportFile($path_to_uploaded_file_in_temp_dir);
   137             $this->tpl->setOnScreenMessage(
'failure', $this->
lng->txt(
'qpl_import_non_ilias_files'), 
true);
   143         foreach ($founditems as $item) {
   144             $options[$item[
'ident']] = 
"{$item['title']} ({$this->getLabelForQuestionType($item['type'])})";
   145             $values[] = $item[
'ident'];
   147         $select_questions = $this->ui_factory->input()->field()->multiSelect(
   148             $this->
lng->txt(
'questions'),
   152         return $this->ui_factory->input()->container()->form()->standard(
   153             $this->
ctrl->getFormActionByClass(self::class, $form_cmd),
   154             [
'selected_questions' => $select_questions]
   155         )->withSubmitLabel($this->
lng->txt(
'import'));
   160         if ($this->
lng->exists($type)) {
   161             return $this->
lng->txt($type);
   169         if (array_key_exists($type, $this->old_export_question_types)) {
   170             return $this->
lng->txt($this->old_export_question_types[$type]);
   177         foreach ($this->component_factory->getActivePluginsInSlot(
'qst') as $pl) {
   178             if ($pl->getQuestionType() === $type) {
   179                 return $pl->getQuestionTypeTranslation();
 
array $old_export_question_types
 
buildImportQuestionsSelectionForm(string $form_cmd, string $importdir, string $qtifile, string $path_to_uploaded_file_in_temp_dir=null)
 
getLabelForPluginQuestionTypes(string $type)
 
buildImportDirectoriesFromContainerImport(string $importdir)
 
buildResultsFilePath(string $importdir, string $subdir)
 
const QT_MULTIPLE_CHOICE_SR
 
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively 
 
const QT_MULTIPLE_CHOICE_MR
 
buildImportDirectoryFromImportFile(string $file_to_import)
 
retrieveSelectedQuestionsFromImportQuestionsSelectionForm(string $form_cmd, string $importdir, string $qtifile, ServerRequestInterface $request)
 
getLabelForQuestionType(string $type)
 
array buildImportDirectoriesFromImportFile(string $file_to_import)