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

fix: use responseDeclaration cardinality to shape response #347

Draft
wants to merge 1 commit into
base: develop
Choose a base branch
from

Conversation

shaveko
Copy link

@shaveko shaveko commented Jan 6, 2023

related to https://oat-sa.atlassian.net/browse/LSI-1548

Description

Legacy MathEntry PCI have cardinality: multiple in gap mode. New mathEntry pci runtime shapes single cardinality response, this leads to error 500 on backend when such response cannot be handled by backend

Changes introduced use responseDeclaration to shape the response to fit it.

How to test

Use branch from this PR : oat-sa/tao-item-runner-qti-fe#349

  • run the script php index.php '\oat\taoQtiItem\scripts\initEventCreatorLoad'
  • create file config/taoQtiItem/debug_portable_element.conf.php with contents:
<?php
return [
       //'pciIdentifier' => 'path/to/pci/source/files',
       'mathEntryInteraction' => 'qtiItemPci/views/js/pciCreator/ims/mathEntryInteraction'
       //'textReaderInteraction' => 'pciSamples/views/js/pciCreator/dev/textReaderInteraction/'
   ];
?>
  • enter item authoring, preview and check the response submitted

@github-actions
Copy link

github-actions bot commented Jan 6, 2023

Version

Target Version 8.6.6
Last version 8.6.5

There are 0 BREAKING CHANGE, 0 feature, 1 fix

@shaveko shaveko marked this pull request as draft January 6, 2023 19:53
@codecov-commenter
Copy link

Codecov Report

Merging #347 (ce39048) into develop (fd35dcf) will not change coverage.
The diff coverage is n/a.

@@            Coverage Diff            @@
##             develop    #347   +/-   ##
=========================================
  Coverage       0.00%   0.00%           
  Complexity       176     176           
=========================================
  Files             12      12           
  Lines            473     546   +73     
=========================================
- Misses           473     546   +73     
Impacted Files Coverage Δ
model/PciModel.php 0.00% <0.00%> (ø)
model/IMSPciModel.php 0.00% <0.00%> (ø)
controller/PciLoader.php 0.00% <0.00%> (ø)
controller/PciManager.php 0.00% <0.00%> (ø)
model/ItemsScannerService.php 0.00% <0.00%> (ø)
model/portableElement/export/ImsPciExporter.php 0.00% <0.00%> (ø)
model/portableElement/export/OatPciExporter.php 0.00% <0.00%> (ø)
model/portableElement/validator/PciValidator.php 0.00% <0.00%> (ø)
...odel/portableElement/validator/IMSPciValidator.php 0.00% <0.00%> (ø)
...cordingInteractionCreatorConfigurationRegistry.php 0.00% <0.00%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@oatymart
Copy link
Contributor

This solution of passing the cardinality would have worked, but it would have been in violation of IMS standards (the cardinality would only be provided when running the PCI in TAO, but not in other LMS).

For this reason we didn't want to continue on this path. We didn't find an alternative solution yet for knowing the cardinality inside the PCI runtime, but meanwhile it seems that the issue will be solved by deploying an earlier version of the PCI (see ticket comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants