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/async_backup_status.
|
|
|
19 |
|
|
|
20 |
Moodle Asynchronous backup status template.
|
|
|
21 |
|
|
|
22 |
The purpose of this template is to render status
|
|
|
23 |
updates during an asynchronous backup or restore
|
|
|
24 |
process..
|
|
|
25 |
|
|
|
26 |
Classes required for JS:
|
|
|
27 |
* none
|
|
|
28 |
|
|
|
29 |
Data attributes required for JS:
|
|
|
30 |
* none
|
|
|
31 |
|
|
|
32 |
Context variables required for this template:
|
|
|
33 |
*
|
|
|
34 |
|
|
|
35 |
Example context (json):
|
|
|
36 |
{
|
|
|
37 |
"backupid": "f04abf8cba0319e486a3dfa7e9cb4476",
|
|
|
38 |
"contextid": "4",
|
|
|
39 |
"courseurl": "/course/view.php?id=6",
|
|
|
40 |
"restoreurl": "/backup/restorefile.php?contextid=287",
|
|
|
41 |
"headingident": "backup",
|
|
|
42 |
"width": "500"
|
|
|
43 |
}
|
|
|
44 |
}}
|
|
|
45 |
<div class="progressbar_container" id="{{backupid}}">
|
|
|
46 |
{{#headingident}}<h3 id="{{backupid}}_status">{{# str }} asyncbackuppending, backup {{/ str }}</h3>{{/headingident}}
|
|
|
47 |
{{^headingident}}<h3 id="{{backupid}}_status">{{# str }} asyncrestorepending, backup {{/ str }}</h3>{{/headingident}}
|
|
|
48 |
{{> core/async_backup_progress }}
|
|
|
49 |
<p id="{{backupid}}_detail">{{# str }} asyncnowait, backup {{/ str }}<br/>{{# str }} asynccheckprogress, backup, {{restoreurl}} {{/ str }}</p>
|
|
|
50 |
<a id="{{backupid}}_button" href="{{courseurl}}" class="btn btn-primary">{{# str }} asyncreturn, backup {{/ str }}</a>
|
|
|
51 |
</div>
|
|
|
52 |
|
|
|
53 |
{{#js}}
|
|
|
54 |
require(['core_backup/async_backup'], function(Async) {
|
|
|
55 |
Async.asyncBackupStatus("{{backupid}}", "{{contextid}}", "{{restoreurl}}", "{{headingident}}");
|
|
|
56 |
});
|
|
|
57 |
{{/js}}
|