You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There is a "bug" or better "not covered case" in the rendering routine in the qtism-sdk.
The problem occurs when the outcomeDeclaration of the feedback has cardinality=multiple (i.e. feedback_adaptive.xml).
The affected file is qtism/qtism/src/qtism/common/collections/Container.php -> public function equals($obj).
In the feedback example above the $obj type is "string" and the workaround is to add an elseif at the line 150:
elseif (gettype($obj) === 'string') {
foreach (array_keys($this->getDataPlaceHolder()) as $key) {
if ($obj === $this[$key]->getValue()) {
return true;
}
}
return false;
}
Would you please so kind to check it and let me know if I misunderstood something.
Kindest regards
The text was updated successfully, but these errors were encountered:
dailez
changed the title
Rendering of feedback
Issue when rendering feedback
Jul 7, 2015
Thanks @dailez for your report. Actually, your identification of the issue seems good. However, the fix should not go in the equals() method of the Container class but rather in the rendering engine itself which should also try to check whether or not the Container->contains() the identifier.
Indeed, changing the implementation of Container->contains() could have impact on much code of the SDK.
I will make a patch to this. Thanks a lot for your feedback. It is much appreciated!
Question for you:
Which version of QTI-SDK do you use? Are you dependent on the master branch or on a particular release?
There is a "bug" or better "not covered case" in the rendering routine in the qtism-sdk.
The problem occurs when the outcomeDeclaration of the feedback has cardinality=multiple (i.e. feedback_adaptive.xml).
The affected file is qtism/qtism/src/qtism/common/collections/Container.php -> public function equals($obj).
In the feedback example above the $obj type is "string" and the workaround is to add an elseif at the line 150:
elseif (gettype($obj) === 'string') {
foreach (array_keys($this->getDataPlaceHolder()) as $key) {
if ($obj === $this[$key]->getValue()) {
return true;
}
}
return false;
}
Would you please so kind to check it and let me know if I misunderstood something.
Kindest regards
The text was updated successfully, but these errors were encountered: