MDL-69087 core_h5p: add renderer to let personalize styles

Existing mod_hvp pluging has a renderer to let Moodle instances
alter styles, Javascript, semantics (fields in the editor) and
content: https://github.com/h5p/moodle-mod_hvp/blob/stable/renderer.php

The approach for core_h5p is exactly the same, to let people
to reuse their existing code.
This commit is contained in:
Sara Arjona 2020-09-04 18:53:32 +02:00
parent 5486b031ee
commit c68897b7e6
6 changed files with 100 additions and 18 deletions

View file

@ -1457,8 +1457,8 @@ class framework_testcase extends \advanced_testcase {
// Get the semantics of 'Library1' from the DB.
$currentsemantics = $DB->get_field('h5p_libraries', 'semantics', array('id' => $library1->id));
// The semantics for Library1 should be successfully updated.
$this->assertEquals(json_encode($updatedsemantics), $currentsemantics);
// The semantics for Library1 shouldn't be updated.
$this->assertEquals($semantics, $currentsemantics);
}
/**