-
Notifications
You must be signed in to change notification settings - Fork 33
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
Feature TR-6169 set Interaction metadata to ResponseValidityConstraint #397
Conversation
src/qtism/data/content/interactions/ExtendedTextInteraction.php
Outdated
Show resolved
Hide resolved
860023c
to
d89c1ab
Compare
src/qtism/data/content/interactions/ExtendedTextInteraction.php
Outdated
Show resolved
Hide resolved
[ | ||
'qtiClassName' => $this->getQtiClassName(), | ||
'options' => [ | ||
'format' => $this->getFormat(), | ||
], | ||
] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What if instead of loosely-typed extraData
we provisioned a reference to the whole instance of the current Interaction
here?
[ | |
'qtiClassName' => $this->getQtiClassName(), | |
'options' => [ | |
'format' => $this->getFormat(), | |
], | |
] | |
$this |
Instead of extraData
property on the constraint level, you can then have private ?Interaction = null
.
Do you foresee any problems with that? If so, or if you don't think it makes any sense, ignore this comment.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes, it was my first idea, but we have several problems with it on serialized and unserialized actions for the final session. It is not super practice, but it is better to keep here simple data.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a tiny nitpick, and we're good-to-go!
@@ -473,7 +475,7 @@ public function hasExpectedLines(): bool | |||
/** | |||
* Set the format of the text entered by the candidate. | |||
* | |||
* @param int $format A value from the TextFormat enumeration. | |||
* @param int $format A value from the TextFormat enumeration. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we need to align the docblock elements like that.
I'd rather have all of them consistent and with a single space as a delimiter.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM nicely done. Approving it as doc block changes are requested to be rolled back.
…guments and properties
*/ | ||
private $associationValidityConstraints; | ||
|
||
/** | ||
* Provide additional information about the ResponseValidityConstraint. | ||
* Metadata defined by @see \qtism\data\content\interactions\Interaction instantiating this ResponseValidityConstraint |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🫡
set Interaction metadata to ResponseValidityConstraint TR-6169
https://oat-sa.atlassian.net/browse/TR-6169
Description
Adds extraData to ResponseValidityConstraint that is optionally provided by Interaction upon ResponseValidityConstraint instantiation
Related PRs