Code Monkey home page Code Monkey logo

Comments (8)

icc avatar icc commented on August 18, 2024

Could you provide an example of what you'll be using it for?

At the top of my head, it sounds like triggering a custom start event on the question set it self might be a better idea but it really depends on the use-case.

from h5p-question-set.

cornelles avatar cornelles commented on August 18, 2024

Not the event is my problem, the problem its actually object definition, the QuestionSet, I want to add semantics to the object, lets say a checkbox, and my logic, where I process the event, will be dependent on that checkbox value.

from h5p-question-set.

icc avatar icc commented on August 18, 2024

Which platform are you on? All platforms should offer a hook or action that allows you to modify the semantics (recipe of the editor form).

Check out the Hiding/disabling fields from the authoring tool section for an example: https://h5p.org/documentation/for-developers/authoring-tool-customization

from h5p-question-set.

cornelles avatar cornelles commented on August 18, 2024

I'm using drupal 7 and I can add the semantic, the problem is in the scope of the callback I get access to H5P.QuestionSet which doesn't expose the "options" where my semantic value is, or maybe I'm handling this wrong.
https://h5p.org/events - I've played a little with resize event

Another example its like in drag-question
https://github.com/h5p/h5p-drag-question/blob/master/src/drag-question.js#L26
where they expose "options", I was expecting to have something like this in question-set too

from h5p-question-set.

icc avatar icc commented on August 18, 2024

Ah, I'm not sure why this is hidden for Drag and Drop. You only need the custom value you've added and not to change it?

We're hoping to be able to provide a plugin API soon that will make it easier to override stuff.

from h5p-question-set.

cornelles avatar cornelles commented on August 18, 2024

Answering your question; Yes!
Having the plugin api; it would be lovely :)

from h5p-question-set.

icc avatar icc commented on August 18, 2024

A bit of an ugly hack, but to get it working right away you could try accessing the H5PIntegration.contents object. The parameters should be stored there as JSON.

from h5p-question-set.

cornelles avatar cornelles commented on August 18, 2024

Thanks for your reply @icc
I have already made a workaround for this, I opened this issue just for a nice to have thingy

from h5p-question-set.

Related Issues (15)

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.