-
Notifications
You must be signed in to change notification settings - Fork 11
Question set inside Boardgame shares activity id and title #3
Comments
Note: I notice that questions within a questions et use a sub content id. Does this concept need to be extended to allow for 3 tiers? |
Boardgame is a content type that has received very little tlc after it's birth. However the 0bject.id seems to be different for the Question Set compared to the boardgame? And the questionset doesn't have a title? ref https://h5p.org/boardgame What seems to be missing to me is that the questionset doesn't have it's parent set. Maybe you're using Wordpress? We might have a bug in the Wordpress plugin. SubContent ids are uuids, so they should be unique for all sub content independent of how many tiers we have. To fix the problems the QuestionSet will need a getTitle function I think. See for instance https://github.com/h5p/h5p-multi-choice/blob/master/js/multichoice.js#L672 - we might also add a title field to the questionset to have the author add a title. (In boardgame the title should ideally be based on the hotspot title) And the id problem should already be ok, but it might be that we have a problem with the Wordpress plugin? |
I am using the Wordpress plugin. None of that code touches the statement object though. Or do you mean the main H5P plugin? I'm more worried about the id than I am about the title. |
Yeah, the main H5P plugin. I don't see how that one should mess it up either, but you are talking about the object.id attribute? Can you confirm that it works as expected on https://h5p.org/boardgame ? (you can do H5P.externalDispatcher.on('xAPI', function(event){console.log(event.data.statement);}); in console) |
Yes. I am getting different object ids for the question sets there as desired. Where does that id come from to end up in the statement? |
https://github.com/h5p/h5p-editor-php-library/blob/master/scripts/h5peditor-library.js#L146 I think I orignally created this feature, but I suspect that it got broken in a merge or something. How old is the boardgame you are using? Maybe it didn't have the subContentId? It seems that this new code won't give old content a sub content id, but new content should probably always get a subContentId and keep it? |
I installed the library and created the boardgame today. Interestingly, if I download the game from https://h5p.org/boardgame, that works. I can't see anything in the settings that I'm missing. |
When you download it you get the same subContentIds as used on H5P.org. seems that the generation of new ones doesn't work on your site for some reason. I'll test on our main WP test site now. |
Are you seeing the problem in console or in your reports? On labs I got an id like this one: This isn't a valid iri afaik so maybe the subContentId gets stripped away somewhere because of the extra "?" ? |
It's wrong in the console and the LRS. The double question-mark is likely to cause problems, but I'm not even getting that far. |
How are you printing to console? Since console prints by reference code run after console.log for instance will change what the console.log shows. I use console.log(JSON.parse(JSON.stringify())) I have seen that the ADL standard script massages the statements, and sometimes in bad ways, especially if not used correctly |
I was using the code above in this chain I'll take a look using |
Using |
The board game includes a question set, however the question set inside has exactly the same xAPI activity id and title as the board game. (The only way you can tell is by looking at the category context activity). The result of this is that the board game appears to send two statements about completion duplicating the data, once at the end of the question set (with the wrong category) and once after the feedback video.
Where the board game contains multiple question sets, these all share the same id.
I think the best solution here would be to use a different activity id and title for each question set. Any thoughts on how to do this?
The text was updated successfully, but these errors were encountered: