Skip to content

Commit

Permalink
fix: qti-order-interaction response value correct format
Browse files Browse the repository at this point in the history
  • Loading branch information
Patrick de Klein committed Feb 20, 2025
1 parent b33b1ed commit 2458565
Showing 1 changed file with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -559,7 +559,13 @@ export const DragDropInteractionMixin = <T extends Constructor<Interaction>>(
}

public saveResponse(): void {
const response = this.collectResponseData();
let response: string | string[];
if (typeof (this as any).getResponse === 'function') {
// only for the qti-order-interaction, abstracted this away in a method
response = (this as any).getResponse(); // Call the method from the implementing class
} else {
response = this.collectResponseData();
}
this.dispatchEvent(
new CustomEvent('qti-interaction-response', {
bubbles: true,
Expand Down

0 comments on commit 2458565

Please sign in to comment.