Uploaded image for project: 'Moodle'
  1. Moodle
  2. MDL-72778

Personalize H5P styles/javascript by 'local' plugin callback

    • MOODLE_310_STABLE, MOODLE_311_STABLE, MOODLE_39_STABLE
    • MDL-72778-master_hp5_styling_from_callback
    • Hide
      1. Add attached 'lib.js' to 'MOODLEPATH/blocks/course_summary'
      2. Create a new directory called 'h5p' on your 'MOODLEPATH/blocks/course_summary'
      3. Add attached 'styles.css' and 'javascript.js' to 'MOODLEPATH/blocks/course_summary/h5p'
      4. As admin go to a course and add 'Course summary' block.
      5. Add a new H5P activity using attached 'accordion-118.h5p' file.
      6. Open the Console in the inspector.
      7. Open the H5P activity.
      8. Confirm there is a 'It is working' message on the console.
      9. Confirm the Accordion has a red border.
      Show
      Add attached 'lib.js' to 'MOODLEPATH/blocks/course_summary' Create a new directory called 'h5p' on your 'MOODLEPATH/blocks/course_summary' Add attached 'styles.css' and 'javascript.js' to 'MOODLEPATH/blocks/course_summary/h5p' As admin go to a course and add 'Course summary' block. Add a new H5P activity using attached 'accordion-118.h5p' file. Open the Console in the inspector. Open the H5P activity. Confirm there is a 'It is working' message on the console. Confirm the Accordion has a red border.

      Supporting plugin callbacks to add additional h5p/hvp stylesheet and javascript.

      Callbacks - MoodleDoc

      It would be nice to add additional H5p/hvp styling/javascript without adding an extra renderer to our theme. Currently, we only can add support for this by creating a child theme.

      When look at tracker MDL-69087 this is only possible with a theme renderer override. There are no other callbacks available we can use in a plugin. 

       

       

       

        1. styles.css
          0.1 kB
        2. lib.php
          0.3 kB
        3. javascript.js
          0.0 kB
        4. accordion-118.h5p
          530 kB

            mfreak Luuk Verhoeven
            mfreak Luuk Verhoeven
            Amaia Anabitarte Amaia Anabitarte
            Votes:
            3 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated:

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 7 hours, 1 minute
                7h 1m

                  Error rendering 'clockify-timesheets-time-tracking-reports:timer-sidebar'. Please contact your Jira administrators.