Skip to content

Update h5p-column.js#65

Open
pjotrsavitski wants to merge 1 commit intoh5p:masterfrom
pjotrsavitski:master
Open

Update h5p-column.js#65
pjotrsavitski wants to merge 1 commit intoh5p:masterfrom
pjotrsavitski:master

Conversation

@pjotrsavitski
Copy link

If Single Choice Set is the only content in the Column or it is the last one that has not been answered yet, then answering each of the questions will make that Column send a completed event with incorrect score. This is because the check only makes sure that event has score and thus answered xAPI event is considered suitable.

The change checks for a specific library and ignores answered events.

Added a check to ignore "answered" events for Single Choice Set library.
@otacke
Copy link
Contributor

otacke commented Nov 3, 2023

@pjotrsavitski Good catch! Something similar would need to be implemented in other compound content types with similar behavior that use SingleChoice set. So I wonder if it would make more sense to change SingleChoice Set and either make it use a real SingleChoice subcontent or to check whether the xAPI "answered" event could be "forged" to make it look like it belongs to a subcontent. Would be more effort, but cleaner I think. Either way, nicely done - and it's not up to me to decide about the pull request.

@pjotrsavitski
Copy link
Author

pjotrsavitski commented Nov 3, 2023

@otacke The answered event already has the correct subContentId present and the check on the Column side is very simple and generic. Maybe event could be somehow modified to have a special key that marks the statement as more or less final for the content type. This will probably be a better solution than to do those kinds of checks in code, yet it will require going through all the content types that are considered to be tasks and making changes. More or less what you said yourself.

@otacke
Copy link
Contributor

otacke commented Nov 3, 2023

@pjotrsavitski It's not about what's inside the event, but what instance sends it. Normally, a subcontent (SingleChoice, if that existed) would send its own statements and Column would not care. I'd have to check the content of SingleChoiceSet, but I think it bakes in some "fake" subcontent, but all xAPI statements are in fact send by SingleChoiceSet and Column cares. That can potentially be fixed. But again, that were my 2 cents only. Not more.

@pjotrsavitski
Copy link
Author

@otacke You are correct, all the events originate from within the Single Choice Set code and Column does use a direct event listener on the instance.

@otacke
Copy link
Contributor

otacke commented Nov 3, 2023

@pjotrsavitski Then my original comment applies :-)

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.

2 participants