1 |
efrain |
1 |
{{!
|
|
|
2 |
This file is part of Moodle - http://moodle.org/
|
|
|
3 |
|
|
|
4 |
Moodle is free software: you can redistribute it and/or modify
|
|
|
5 |
it under the terms of the GNU General Public License as published by
|
|
|
6 |
the Free Software Foundation, either version 3 of the License, or
|
|
|
7 |
(at your option) any later version.
|
|
|
8 |
|
|
|
9 |
Moodle is distributed in the hope that it will be useful,
|
|
|
10 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
11 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
12 |
GNU General Public License for more details.
|
|
|
13 |
|
|
|
14 |
You should have received a copy of the GNU General Public License
|
|
|
15 |
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
|
|
|
16 |
}}
|
|
|
17 |
{{!
|
|
|
18 |
@template core_h5p/h5perror
|
|
|
19 |
|
|
|
20 |
This template will render the embed code shown in the H5P content embed popup.
|
|
|
21 |
|
|
|
22 |
Note: this mustache is part of the H5P player and requires '/h5p/js/embed.js' already loaded.
|
|
|
23 |
|
|
|
24 |
Variables required for this template:
|
|
|
25 |
* h5picon - The icon
|
|
|
26 |
* message - The error messages to display.
|
|
|
27 |
|
|
|
28 |
Example context (json):
|
|
|
29 |
{
|
|
|
30 |
"embedurl": "http://example.com/h5p/embed.php?url=testurl"
|
|
|
31 |
}
|
|
|
32 |
|
|
|
33 |
}}
|
|
|
34 |
|
|
|
35 |
<div class="d-flex h-100 position-relative align-items-center bg-light h5pmessages">
|
|
|
36 |
<div class="position-absolute py-2 bg-secondary" style="top: 0px; left: 0px; right: 0px;">
|
|
|
37 |
<div class="container">
|
|
|
38 |
{{#h5picon}}
|
|
|
39 |
<img src="{{{.}}}" class="h5picon" alt="{{#str}}h5p, core_h5p{{/str}}" style="width: 50px; height: auto; opacity: 0.5">
|
|
|
40 |
{{/h5picon}}
|
|
|
41 |
</div>
|
|
|
42 |
</div>
|
|
|
43 |
<div class="container mt-5">
|
|
|
44 |
{{#exception}}
|
|
|
45 |
<div class="alert alert-block fade in alert-danger my-2" role="alert">
|
|
|
46 |
{{{ exception }}}
|
|
|
47 |
</div>
|
|
|
48 |
{{/exception}}
|
|
|
49 |
{{#info}}
|
|
|
50 |
<div class="alert alert-block fade in alert-info my-2" role="alert">
|
|
|
51 |
{{{ . }}}
|
|
|
52 |
</div>
|
|
|
53 |
{{/info}}
|
|
|
54 |
{{#error}}
|
|
|
55 |
<div class="alert alert-block fade in alert-warning my-2" role="alert">
|
|
|
56 |
{{#code}}{{{code}}} : {{/code}}{{{ message }}}
|
|
|
57 |
</div>
|
|
|
58 |
{{/error}}
|
|
|
59 |
</div>
|
|
|
60 |
</div>
|
|
|
61 |
{{#js}}
|
|
|
62 |
(function() {
|
|
|
63 |
if (typeof H5PEmbedCommunicator !== 'undefined') {
|
|
|
64 |
H5PEmbedCommunicator.send('resize', {
|
|
|
65 |
scrollHeight: document.body.scrollHeight
|
|
|
66 |
});
|
|
|
67 |
}
|
|
|
68 |
})();
|
|
|
69 |
{{/js}}
|