Skip to content

Commit

Permalink
38976: Failed test: XML QTI importieren - Anzahl Zeilen ändern
Browse files Browse the repository at this point in the history
  • Loading branch information
mbecker-databay committed Nov 24, 2023
1 parent b3cbe78 commit 4ee10f1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ public function download_paragraphObject(): void
public function uploadQplObject($questions_only = false)
{
$this->ctrl->setParameter($this, 'new_type', $this->qplrequest->raw('new_type'));
if ($_FILES["xmldoc"]["error"] > UPLOAD_ERR_OK) {
if (!isset($_FILES['xmldoc']) || !isset($_FILES['xmldoc']['error']) || $_FILES['xmldoc']['error'] > UPLOAD_ERR_OK) {
$this->tpl->setOnScreenMessage('failure', $this->lng->txt("error_upload"), true);
if (!$questions_only) {
$this->ctrl->redirect($this, 'create');
Expand Down Expand Up @@ -655,7 +655,7 @@ public function uploadQplObject($questions_only = false)
ilSession::set("qpl_import_subdir", $subdir);

$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.qpl_import_verification.html", "Modules/TestQuestionPool");
$table = new ilQuestionPoolImportVerificationTableGUI($this, 'uploadQplObject');
$table = new ilQuestionPoolImportVerificationTableGUI($this, 'uploadQpl');
$rows = array();

foreach ($founditems as $item) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ public function __construct($a_parent_obj, $a_parent_cmd = "", $a_template_conte
$this->setRowTemplate('tpl.qpl_import_verification_row.html', 'Modules/TestQuestionPool');
$this->addMultiCommand('importVerifiedFile', $this->lng->txt("import"));
$this->addCommandButton('cancelImport', $this->lng->txt("cancel"));

$this->setShowRowsSelector(false); // Removed due to #38976 - losing upload file on roundtrip
$this->initColumns();
}

Expand Down

0 comments on commit 4ee10f1

Please sign in to comment.