2 This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
18 @template core/async_backup_status.
20 Moodle Asynchronous backup status template.
22 The purpose of this template is to render status
23 updates during an asynchronous backup or restore
26 Classes required for JS:
29 Data attributes required for JS:
32 Context variables required for this template:
35 Example context (json):
37 "backupid": "f04abf8cba0319e486a3dfa7e9cb4476",
39 "courseurl": "/course/view.php?id=6",
40 "restoreurl": "/backup/restorefile.php?contextid=287",
41 "headingident": "backup",
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>
54 require(['core_backup/async_backup'], function(Async) {
55 Async.asyncBackupStatus("{{backupid}}", "{{contextid}}", "{{restoreurl}}", "{{headingident}}");