Skip to content

Commit

Permalink
Merge branch 'release-30.14.1'
Browse files Browse the repository at this point in the history
  • Loading branch information
github-actions committed Jul 10, 2024
2 parents ea20294 + 10a85d4 commit 44ce377
Showing 1 changed file with 5 additions and 14 deletions.
19 changes: 5 additions & 14 deletions model/import/QtiPackageImportForm.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,20 +106,11 @@ public function initElements()
$rollbackElt->setOptions(['error' => __('error'), 'warning' => __('warning')]);
$rollbackElt->setDescription(__('Rollback on...'));
$this->form->addElement($rollbackElt);

//Check if value is set in array
if (
!in_array(
QtiPackageImport::METADATA_IMPORT_ELEMENT_NAME,
$this->options[QtiPackageImport::DISABLED_ELEMENTS]
)
) {
$metadataImport = tao_helpers_form_FormFactory::getElement(self::METADATA_FORM_ELEMENT_NAME, 'Checkbox');
$metadataImport->setOptions(['metadata' => __('QTI metadata as properties')]);
$metadataImport->setDescription(__('Import'));
$metadataImport->setLevel(1);
$this->form->addElement($metadataImport);
}
$metadataImport = tao_helpers_form_FormFactory::getElement(self::METADATA_FORM_ELEMENT_NAME, 'Checkbox');
$metadataImport->setOptions(['metadata' => __('QTI metadata as properties')]);
$metadataImport->setDescription(__('Import'));
$metadataImport->setLevel(1);
$this->form->addElement($metadataImport);

$this->form->createGroup(
'file',
Expand Down

0 comments on commit 44ce377

Please sign in to comment.