1441 |
ariadna |
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_enrol/enrol_page
|
|
|
19 |
|
|
|
20 |
Recommended template for displaying the enrolment plugin call-to-action on the enrol/index.php page
|
|
|
21 |
|
|
|
22 |
Usually to be used with the \core_enrol\output\enrol_page and returned from the enrol_plugin::enrol_page_hook()
|
|
|
23 |
|
|
|
24 |
Example context (json):
|
|
|
25 |
{
|
|
|
26 |
"enrol": "self",
|
|
|
27 |
"instanceid": 1,
|
|
|
28 |
"header": "Self-enrolment",
|
|
|
29 |
"body": "You can enrol yourself in this course.",
|
|
|
30 |
"hasbuttons": true,
|
|
|
31 |
"buttons": [{
|
|
|
32 |
"method" : "get",
|
|
|
33 |
"id": "buttonid-123",
|
|
|
34 |
"type": "primary",
|
|
|
35 |
"url" : "#",
|
|
|
36 |
"label" : "Enrol me"
|
|
|
37 |
}]
|
|
|
38 |
}
|
|
|
39 |
}}
|
|
|
40 |
<div class="box generalbox mb-3 enrol-instance" data-enrol="{{enrol}}" data-instanceid="{{instanceid}}">
|
|
|
41 |
<div class="card">
|
|
|
42 |
{{#header}}<div class="card-header"><h3 class="mb-0">{{{header}}}</h3></div>{{/header}}
|
|
|
43 |
<div class="card-body">{{{body}}}</div>
|
|
|
44 |
{{#hasbuttons}}
|
|
|
45 |
<div class="card-footer">
|
|
|
46 |
{{#buttons}}
|
|
|
47 |
{{> core/single_button }}
|
|
|
48 |
{{/buttons}}
|
|
|
49 |
</div>
|
|
|
50 |
{{/hasbuttons}}
|
|
|
51 |
</div>
|
|
|
52 |
</div>
|