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

Personalize H5P styles/javascript by 'local' plugin callback

    XMLWordPrintable

Details

    • Improvement
    • Status: Development in progress
    • Minor
    • Resolution: Unresolved
    • 3.9.10, 3.10.7, 3.11.3
    • None
    • H5P
    • 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.

    Description

      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. 

       

       

       

      Attachments

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

        Activity

          People

            mfreak Luuk Verhoeven
            mfreak Luuk Verhoeven
            Amaia Anabitarte Amaia Anabitarte
            Amaia Anabitarte, Bas Brands, Carlos Escobedo, Laurent David, Raquel Ortega, Sabina Abellan, Sara Arjona (@sarjona)
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

            Dates

              Created:
              Updated:

              Time Tracking

                Estimated:
                Original Estimate - 0 minutes
                0m
                Remaining:
                Remaining Estimate - 0 minutes
                0m
                Logged:
                Time Spent - 4 hours
                4h