Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feat/hkd 6/integration #2575

Merged
merged 98 commits into from
Nov 11, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
98 commits
Select commit Hold shift + click to select a range
16dda70
chore: add form modifiers
shpran Sep 9, 2024
1c72ed8
chore: rename modifier, extend abstract class
shpran Sep 10, 2024
9567f22
chore: do not replace unique ID
shpran Sep 10, 2024
7d2c22b
chore: use proxies instead of manager
shpran Sep 10, 2024
f641023
chore: fix ci
shpran Sep 10, 2024
f83f2c6
chore: add unit tests for modifier
shpran Sep 11, 2024
5d05800
chore: add dev-dependencies
shpran Sep 11, 2024
7e8439d
chore: add event listener to set unique identifier
shpran Sep 11, 2024
a729df0
chore: register listener
shpran Sep 11, 2024
c6f864e
chore: use direct event class, add unit test
shpran Sep 12, 2024
730b32d
chore: update unit tests in accordance with latest changes, add new u…
shpran Sep 12, 2024
012223a
chore: throw an exception during retrieving, update unit test
shpran Sep 12, 2024
b4b1c95
Merge pull request #2571 from oat-sa/feature/ADF-1780/create-necessar…
gabrielfs7 Sep 13, 2024
ed4871a
chore: convert literal to string, check if there is no identifier
shpran Sep 13, 2024
e7c98c4
chore: update dependencies
gabrielfs7 Sep 16, 2024
7ff7ce9
chore: use standard feature flag name
gabrielfs7 Sep 16, 2024
3bc0d73
chore: extract unique id modifier as a separate feature
shpran Sep 19, 2024
b26ed7b
Merge pull request #2576 from oat-sa/feature/ADF-1787/translatable-test
gabrielfs7 Sep 19, 2024
c09df71
chore: fix unit tests
shpran Sep 19, 2024
2dc9ec5
chore: fix events
shpran Sep 19, 2024
82a08fb
fix: synchronize the authoring view with the component version
jsconan Sep 24, 2024
a75efda
refactor: convert to ES6
jsconan Sep 24, 2024
d6d248a
chore: introduce resource language retriever to get item QTI lang
shpran Sep 25, 2024
5d2f9ab
Merge branch 'feat/HKD-6/integration' into feature/ADF-1784/side-by-s…
jsconan Sep 25, 2024
a9e7a4a
feat: forward the translation parameters through the config
jsconan Sep 25, 2024
88a9ec1
feat: manage dynamically the placeholders for the authoring panels
jsconan Sep 25, 2024
4f16c38
feat: do not show up the list of interactions if the translation mode…
jsconan Sep 25, 2024
2cb0ae7
feat: handle the translation mode in the item's properties panel
jsconan Sep 25, 2024
5c55de5
refactor: also apply the dynamic templates to the authoring component…
jsconan Sep 26, 2024
73f127c
feat: add the placeholder for the item viewer and style the frame
jsconan Sep 26, 2024
5025638
chore: bundle assets
jsconan Sep 26, 2024
3f1fbf4
fix: remove duplicate creating toolbar misplacement in side-by-side mode
jsconan Sep 27, 2024
7ab1b21
feat: minimal size for the item
jsconan Sep 27, 2024
fe1289f
chore: bundle assets
jsconan Sep 27, 2024
3ee7fa4
fix: decrease z-index for the item-viewer separator handle
jsconan Sep 27, 2024
e1bd345
feat: move the item-viewer to a plugin
jsconan Sep 27, 2024
0dac8c2
fix: use class instead of id in the item viewer, reserve space for th…
jsconan Sep 27, 2024
ee921b1
feat: display the title of the original item, add context suffix
jsconan Sep 27, 2024
283ce5d
fix: add the missing aread to the component as well
jsconan Sep 27, 2024
7f16aaf
chore: bundle assets
jsconan Sep 27, 2024
94e8e97
feat: handle the resize of the item viewer
jsconan Sep 30, 2024
2c1507e
fix: wrong name for the itemViewer plugin
jsconan Sep 30, 2024
8759500
fix: always set the value for the translation properties
jsconan Oct 8, 2024
ac14b50
feat: add the viewer to the side-by-side authoring
jsconan Oct 9, 2024
9a2beb9
feat: also manage the translation progress
jsconan Oct 10, 2024
20c280e
feat: add the translation language to the item's title
jsconan Oct 10, 2024
f1b9fa7
refactor: use a more consistent naming for the origin URI
jsconan Oct 14, 2024
daf0748
Merge pull request #2585 from oat-sa/feature/ADF-1784/side-by-side-au…
jsconan Oct 14, 2024
9f5b58d
chore: add tmp fix
gabrielfs7 Oct 14, 2024
d077faa
Merge branch 'feat/HKD-6/integration' of https://github.com/oat-sa/ex…
gabrielfs7 Oct 14, 2024
40891a1
chore: bundle the assets
jsconan Oct 15, 2024
e33bf60
feat: preview button for item translation
shaveko Oct 15, 2024
66049c6
chore: revert fix and proper one was applied
gabrielfs7 Oct 15, 2024
c034cc2
Merge branch 'feat/HKD-6/integration' of https://github.com/oat-sa/ex…
gabrielfs7 Oct 15, 2024
569eeea
chore: prettify the code
shaveko Oct 15, 2024
f58204d
Merge pull request #2588 from oat-sa/feature/ADF-1785/preview-button-…
shaveko Oct 15, 2024
c310584
fix: UI glitch with the resize handle still visible above overlays
jsconan Oct 25, 2024
3e55252
fix: set translation language for QTI
shpran Oct 28, 2024
c39098d
chore: add unit tests
shpran Oct 28, 2024
3bb609e
Merge pull request #2599 from oat-sa/fix/HKD-6/set-qti-lang-to-transl…
shpran Oct 28, 2024
8d2b4e4
fix: UI glitch with the loading image shown in the background when re…
jsconan Oct 28, 2024
44ba0e2
fix: restore the editor context once the item view is shown in the si…
jsconan Oct 28, 2024
fe16013
chore: bundle the assets
jsconan Oct 29, 2024
139f1d7
Merge branch 'feat/HKD-6/integration' into fix/ADF-1784/blocker-issues
jsconan Oct 29, 2024
30de3f6
Merge pull request #2602 from oat-sa/fix/ADF-1784/blocker-issues
jsconan Oct 29, 2024
1455fa0
Merge branch 'develop' into feat/HKD-6/integration
jsconan Oct 30, 2024
1eccb9d
feat: use backend generated item identifier if provided
shaveko Oct 30, 2024
dc17e6d
fix: add rtl on creating translation
gabrielfs7 Oct 30, 2024
4e10862
Merge pull request #2604 from oat-sa/fix/HKD-6/add-rtl-on-create-tran…
gabrielfs7 Oct 30, 2024
421a75d
Merge branch 'feat/HKD-6/integration' of https://github.com/oat-sa/ex…
shpran Oct 31, 2024
74b0d2c
feat: better handling of unique IDs
shpran Oct 31, 2024
23a3893
chore: remove frontend id creation logic
shaveko Oct 31, 2024
8c7ee04
Merge branch 'feat/ADF-1801/backend-supplied-identifier' of https://g…
shaveko Oct 31, 2024
df12f08
chore: add bundles
shaveko Nov 1, 2024
5a58a27
chore: fix method name
Nov 3, 2024
cbf79d0
chore: prettify
shaveko Nov 4, 2024
6989a5b
Merge branch 'feat/ADF-1801/backend-supplied-identifier' of https://g…
shaveko Nov 4, 2024
9cd6b4b
Merge branch 'develop' into feat/HKD-6/integration
jsconan Nov 4, 2024
62b614c
feat: better handling of unique IDs
shpran Nov 4, 2024
22e0cfb
chore: add missing event, cover duplicated event for translations
shpran Nov 5, 2024
9df8692
chore: removed unused class
gabrielfs7 Nov 5, 2024
cefaa98
Merge branch 'feat/HKD-6/integration' of https://github.com/oat-sa/ex…
gabrielfs7 Nov 5, 2024
12e061e
chore: update bundles
gabrielfs7 Nov 5, 2024
796e40b
Merge pull request #2603 from oat-sa/feat/ADF-1801/backend-supplied-i…
gabrielfs7 Nov 5, 2024
bd753b6
fix: unique identifiers
shpran Nov 6, 2024
455a3e8
chore: refactor
shpran Nov 6, 2024
459efe0
chore: move service provider to root QTI level
shpran Nov 6, 2024
7532c53
Merge pull request #2607 from oat-sa/fix/hkd-6/unique-identifiers
shpran Nov 6, 2024
673d2d4
chore: add and fix unit tests
shpran Nov 7, 2024
6006328
Merge branch 'develop' of https://github.com/oat-sa/extension-tao-ite…
gabrielfs7 Nov 7, 2024
c186631
Merge branch 'feat/HKD-6/integration' of https://github.com/oat-sa/ex…
gabrielfs7 Nov 7, 2024
3b09b90
chore: updte bundle
gabrielfs7 Nov 7, 2024
9e78712
chore: fix cs
shpran Nov 11, 2024
f50ae42
chore: use dev branch
shpran Nov 11, 2024
5bfc0dd
chore: fix unit test
shpran Nov 11, 2024
a867cac
test: fix a broken unit test as now the item identifier needs to be p…
jsconan Nov 11, 2024
bc5a35e
Merge pull request #2614 from oat-sa/fix/ADF-1801/broken-unit-test
jsconan Nov 11, 2024
3b1b170
chore: update composer with releases
shpran Nov 11, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@
"oat-sa/lib-tao-qti": "^7.8.1",
"oat-sa/oatbox-extension-installer": "~1.1||dev-master",
"naneau/semver": "~0.0.7",
"oat-sa/generis": ">=15.36.4",
"oat-sa/tao-core": ">=54.22.0",
"oat-sa/extension-tao-item": ">=12.0.0",
"oat-sa/extension-tao-test": ">=16.0.0"
"oat-sa/generis": ">=15.39.0",
"oat-sa/tao-core": ">=54.23.0",
"oat-sa/extension-tao-item": ">=12.4.0",
"oat-sa/extension-tao-test": ">=16.3.0"
},
"autoload": {
"psr-4": {
Expand Down
39 changes: 34 additions & 5 deletions controller/QtiCreator.php
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,12 @@
use oat\generis\model\data\event\ResourceUpdated;
use oat\generis\model\OntologyAwareTrait;
use oat\oatbox\event\EventManager;
use oat\tao\model\featureFlag\FeatureFlagChecker;
use oat\tao\model\featureFlag\FeatureFlagCheckerInterface;
use oat\tao\model\featureFlag\FeatureFlagConfigSwitcher;
use oat\tao\model\http\HttpJsonResponseTrait;
use oat\tao\model\IdentifierGenerator\Generator\IdentifierGeneratorInterface;
use oat\tao\model\IdentifierGenerator\Generator\IdentifierGeneratorProxy;
use oat\tao\model\media\MediaService;
use oat\tao\model\TaoOntology;
use oat\taoItems\model\event\ItemCreatedEvent;
Expand All @@ -41,7 +45,6 @@
use oat\taoQtiItem\model\ItemModel;
use oat\taoQtiItem\model\qti\event\UpdatedItemEventDispatcher;
use oat\taoQtiItem\model\qti\exception\QtiModelException;
use oat\taoQtiItem\model\qti\Item;
use oat\taoQtiItem\model\qti\parser\XmlToItemParser;
use oat\taoQtiItem\model\qti\Service;
use oat\taoQtiItem\model\qti\validator\ItemIdentifierValidator;
Expand Down Expand Up @@ -161,7 +164,6 @@ public function getMediaSources()

public function getItemData()
{

$returnValue = [
'itemData' => null
];
Expand All @@ -174,9 +176,9 @@ public function getItemData()
// do not resolve xinclude here, leave it to the client side
$item = Service::singleton()->getDataItemByRdfItem($itemResource, $lang, false);

if (!is_null($item)) {
$returnValue['itemData'] = $item->toArray();
}
$returnValue['itemData'] = $item
? $item->toArray()
: ['identifier' => $this->getItemIdentifier($itemResource)];

$availableLangs = \tao_helpers_I18n::getAvailableLangsByUsage(
new core_kernel_classes_Resource(TaoOntology::PROPERTY_STANCE_LANGUAGE_USAGE_DATA)
Expand Down Expand Up @@ -291,6 +293,10 @@ protected function getCreatorConfig(core_kernel_classes_Resource $item)
$lang = \common_session_SessionManager::getSession()->getDataLanguage();
$config->setProperty('lang', $lang);

// Add support for translation and side-by-side view
$config->setProperty('translation', $this->getRequestParameter('translation'));
$config->setProperty('originResourceUri', $this->getRequestParameter('originResourceUri'));

//base url:
$url = tao_helpers_Uri::url('getFile', 'QtiCreator', 'taoQtiItem', [
'uri' => $item->getUri(),
Expand Down Expand Up @@ -365,4 +371,27 @@ private function validateXmlInput(string $xml)
}
\tao_helpers_Xml::getSimpleXml($xml);
}

private function getItemIdentifier(core_kernel_classes_Resource $item): ?string
{
if ($this->getFeatureFlagChecker()->isEnabled('FEATURE_FLAG_UNIQUE_NUMERIC_QTI_IDENTIFIER')) {
$uniqueId = $item->getOnePropertyValue($this->getProperty(TaoOntology::PROPERTY_UNIQUE_IDENTIFIER));

if (!empty($uniqueId)) {
return $uniqueId;
}
}

return $this->getIdentifierGenerator()->generate([IdentifierGeneratorInterface::OPTION_RESOURCE => $item]);
}

private function getIdentifierGenerator(): IdentifierGeneratorInterface
{
return $this->getServiceLocator()->getContainer()->get(IdentifierGeneratorProxy::class);
}

private function getFeatureFlagChecker(): FeatureFlagCheckerInterface
{
return $this->getServiceLocator()->getContainer()->get(FeatureFlagChecker::class);
}
}
15 changes: 10 additions & 5 deletions manifest.php
Original file line number Diff line number Diff line change
Expand Up @@ -17,25 +17,29 @@
*
* Copyright (c) 2013-2020 (original work) Open Assessment Technologies SA (under the project TAO-PRODUCT);
*
* phpcs:disable Generic.Files.LineLength
*/

use oat\tao\model\accessControl\func\AccessRule;
use oat\tao\model\user\TaoRoles;
use oat\taoItems\model\user\TaoItemsRoles;
use oat\taoQtiItem\controller\QtiCreator;
use oat\taoQtiItem\controller\QtiCssAuthoring;
use oat\taoQtiItem\controller\QtiPreview;
use oat\taoQtiItem\install\scripts\addValidationSettings;
use oat\taoQtiItem\install\scripts\ExtendConfigurationRegistry;
use oat\taoQtiItem\install\scripts\SetDragAndDropConfig;
use oat\taoQtiItem\install\scripts\setXMLParserConfig;
use oat\taoQtiItem\model\qti\CustomInteractionAsset\ServiceProvider\{
CustomInteractionAssetExtractorAllocatorServiceProvider
};
use oat\taoQtiItem\model\FeatureFlag\ServiceProvider\FeatureFlagFlaServiceProvider;
use oat\taoQtiItem\model\FeatureFlag\ServiceProvider\FeatureFlagQtiIdentifierServiceProvider;
use oat\taoQtiItem\model\qti\CustomInteractionAsset\ServiceProvider\CustomInteractionAssetExtractorAllocatorServiceProvider;
use oat\taoQtiItem\model\qti\metadata\importer\MetaMetadataServiceProvider;
use oat\taoQtiItem\model\qti\ServiceProvider\IdentifierGenerationStrategyServiceProvider;
use oat\taoQtiItem\model\qti\ServiceProvider\ItemIdentifierValidatorServiceProvider;
use oat\taoQtiItem\model\qti\ServiceProvider\MetadataServiceProvider;
use oat\taoQtiItem\model\qti\ServiceProvider\QtiServiceProvider;
use oat\taoQtiItem\model\Translation\ServiceProvider\TranslationServiceProvider;
use oat\taoQtiItem\model\UniqueId\ServiceProvider\UniqueIdServiceProvider;
use oat\taoQtiItem\scripts\install\AddLabelInjectorForExport;
use oat\taoQtiItem\scripts\install\InitMetadataService;
use oat\taoQtiItem\scripts\install\ItemEventRegister;
Expand All @@ -47,8 +51,6 @@
use oat\taoQtiItem\scripts\install\SetupQtiMetadataImportExportService;
use oat\taoQtiItem\scripts\install\SetUpQueueTasks;
use oat\taoQtiItem\scripts\update\Updater;
use oat\taoItems\model\user\TaoItemsRoles;
use oat\tao\model\accessControl\func\AccessRule;

$extpath = __DIR__ . DIRECTORY_SEPARATOR;
$taopath = dirname(__FILE__, 2) . DIRECTORY_SEPARATOR . 'tao' . DIRECTORY_SEPARATOR;
Expand Down Expand Up @@ -209,5 +211,8 @@
MetaMetadataServiceProvider::class,
IdentifierGenerationStrategyServiceProvider::class,
FeatureFlagQtiIdentifierServiceProvider::class,
UniqueIdServiceProvider::class,
TranslationServiceProvider::class,
QtiServiceProvider::class,
],
];
75 changes: 75 additions & 0 deletions migrations/Version202410311205211101_taoQtiItem.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<?php

declare(strict_types=1);

namespace oat\taoQtiItem\migrations;

use Doctrine\DBAL\Schema\Schema;
use oat\oatbox\event\EventManager;
use oat\tao\model\resources\Event\InstanceCopiedEvent;
use oat\tao\scripts\tools\migrations\AbstractMigration;
use oat\taoItems\model\event\ItemCreatedEvent;
use oat\taoItems\model\event\ItemDuplicatedEvent;
use oat\taoQtiItem\model\event\ItemImported;
use oat\taoQtiItem\model\UniqueId\Listener\ItemCreationListener;

/**
* phpcs:disable Squiz.Classes.ValidClassName
*/
final class Version202410311205211101_taoQtiItem extends AbstractMigration
{
public function getDescription(): string
{
return '';
}

public function up(Schema $schema): void
{
/** @var EventManager $eventManager */
$eventManager = $this->getServiceManager()->get(EventManager::SERVICE_ID);

$eventManager->attach(
ItemCreatedEvent::class,
[ItemCreationListener::class, 'populateUniqueId']
);
$eventManager->attach(
ItemImported::class,
[ItemCreationListener::class, 'populateUniqueId']
);
$eventManager->attach(
ItemDuplicatedEvent::class,
[ItemCreationListener::class, 'populateUniqueId']
);
$eventManager->attach(
InstanceCopiedEvent::class,
[ItemCreationListener::class, 'populateUniqueId']
);

$this->getServiceManager()->register(EventManager::SERVICE_ID, $eventManager);
}

public function down(Schema $schema): void
{
/** @var EventManager $eventManager */
$eventManager = $this->getServiceManager()->get(EventManager::SERVICE_ID);

$eventManager->detach(
ItemCreatedEvent::class,
[ItemCreationListener::class, 'populateUniqueId']
);
$eventManager->detach(
ItemImported::class,
[ItemCreationListener::class, 'populateUniqueId']
);
$eventManager->detach(
ItemDuplicatedEvent::class,
[ItemCreationListener::class, 'populateUniqueId']
);
$eventManager->detach(
InstanceCopiedEvent::class,
[ItemCreationListener::class, 'populateUniqueId']
);

$this->getServiceManager()->register(EventManager::SERVICE_ID, $eventManager);
}
}
61 changes: 61 additions & 0 deletions model/Translation/Service/QtiLanguageRetriever.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
<?php

/**
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; under version 2
* of the License (non-upgradable).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2024 (original work) Open Assessment Technologies SA.
*/

declare(strict_types=1);

namespace oat\taoQtiItem\model\Translation\Service;

use core_kernel_classes_Resource;
use oat\taoQtiItem\model\qti\Service;
use Psr\Log\LoggerInterface;
use Throwable;

class QtiLanguageRetriever
{
private Service $qtiItemService;
private LoggerInterface $logger;

public function __construct(Service $qtiItemService, LoggerInterface $logger)
{
$this->qtiItemService = $qtiItemService;
$this->logger = $logger;
}

public function __invoke(core_kernel_classes_Resource $item): ?string
{
try {
$itemData = $this->qtiItemService->getDataItemByRdfItem($item);
} catch (Throwable $exception) {
$this->logger->error(
sprintf(
'An error occurred while retrieving item data: %s. Trace: %s',
$exception->getMessage(),
$exception->getTraceAsString()
)
);

throw $exception;
}

return $itemData && $itemData->hasAttribute('xml:lang')
? $itemData->getAttributeValue('xml:lang')
: null;
}
}
95 changes: 95 additions & 0 deletions model/Translation/Service/QtiLanguageSetter.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,95 @@
<?php

/**
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; under version 2
* of the License (non-upgradable).
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*
* Copyright (c) 2024 (original work) Open Assessment Technologies SA.
*/

declare(strict_types=1);

namespace oat\taoQtiItem\model\Translation\Service;

use core_kernel_classes_Resource;
use oat\generis\model\data\Ontology;
use oat\tao\model\TaoOntology;
use oat\taoQtiItem\model\qti\Service;
use Psr\Log\LoggerInterface;
use tao_models_classes_LanguageService;
use Throwable;

class QtiLanguageSetter
{
private Service $qtiItemService;
private LoggerInterface $logger;
private Ontology $ontology;
private tao_models_classes_LanguageService $languageService;

public function __construct(
Service $qtiItemService,
LoggerInterface $logger,
Ontology $ontology,
tao_models_classes_LanguageService $languageService
) {
$this->qtiItemService = $qtiItemService;
$this->logger = $logger;
$this->ontology = $ontology;
$this->languageService = $languageService;
}

public function __invoke(core_kernel_classes_Resource $item): core_kernel_classes_Resource
{
try {
$itemData = $this->qtiItemService->getDataItemByRdfItem($item);
} catch (Throwable $exception) {
$this->logger->error(
sprintf(
'An error occurred while retrieving item data: %s. Trace: %s',
$exception->getMessage(),
$exception->getTraceAsString()
)
);

throw $exception;
}

if (!$itemData) {
$this->logger->info(sprintf('There is no item data for item %s.', $item->getUri()));

return $item;
}

$languageProperty = $this->ontology->getProperty(TaoOntology::PROPERTY_LANGUAGE);
$language = $item->getOnePropertyValue($languageProperty);

if (empty($language)) {
$this->logger->info(sprintf('There is no language for item %s.', $item->getUri()));

return $item;
}

$localeCode = str_replace(TaoOntology::LANGUAGE_PREFIX, '', $language->getUri());

if ($this->languageService->isRtlLanguage($localeCode)) {
$itemData->getBody()->setAttribute('dir', 'rtl');
}

$itemData->setAttribute('xml:lang', $localeCode);

$this->qtiItemService->saveDataItemToRdfItem($itemData, $item);

return $item;
}
}
Loading
Loading