Coder Social home page Coder Social logo

Comments (14)

garemoko avatar garemoko commented on August 23, 2024

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?

from h5p-boardgame.

falcon-git avatar falcon-git commented on August 23, 2024

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?

from h5p-boardgame.

garemoko avatar garemoko commented on August 23, 2024

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.

from h5p-boardgame.

falcon-git avatar falcon-git commented on August 23, 2024

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)

from h5p-boardgame.

garemoko avatar garemoko commented on August 23, 2024

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?

from h5p-boardgame.

falcon-git avatar falcon-git commented on August 23, 2024

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?

from h5p-boardgame.

garemoko avatar garemoko commented on August 23, 2024

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.

from h5p-boardgame.

falcon-git avatar falcon-git commented on August 23, 2024

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.

from h5p-boardgame.

falcon-git avatar falcon-git commented on August 23, 2024

Are you seeing the problem in console or in your reports? On labs I got an id like this one:

http://labs.h5p.org/wp-admin/admin-ajax.php?action=h5p_embed&id=15?subContentId=f9fa5b70-d5d8-4d58-bbd1-f6e5eeb89a1d

This isn't a valid iri afaik so maybe the subContentId gets stripped away somewhere because of the extra "?" ?

from h5p-boardgame.

garemoko avatar garemoko commented on August 23, 2024

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.

from h5p-boardgame.

garemoko avatar garemoko commented on August 23, 2024

image

from h5p-boardgame.

falcon-git avatar falcon-git commented on August 23, 2024

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

from h5p-boardgame.

garemoko avatar garemoko commented on August 23, 2024

I was using the code above in this chain H5P.externalDispatcher.on('xAPI', function(event){console.log(event.data.statement);});

I'll take a look using H5P.externalDispatcher.on('xAPI', function(event){console.log(JSON.parse(JSON.stringify(event.data.statement)));});

from h5p-boardgame.

garemoko avatar garemoko commented on August 23, 2024

Using H5P.externalDispatcher.on('xAPI', function(event){console.log(JSON.parse(JSON.stringify(event.data.statement)));}); the issue remains.

from h5p-boardgame.

Related Issues (3)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.