Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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 tool_moodlenet/import_confirmation
19
 
20
    MoodleNet import confirmation template.
21
 
22
    The purpose of this template is to present the user with a confirm/cancel dialog-like page.
23
 
24
    Classes required for JS:
25
    * none
26
 
27
    Data attributes required for JS:
28
    * none
29
 
30
    Context variables required for this template:
31
    * resourceurl The URL to the remote resource on MoodleNet.
32
    * resourcename The name of the remote resource on MoodleNet.
33
    * sesskey The CSRF token, as per sesskey()
34
 
35
    Example context (json):
36
    {
37
        "course": 33,
38
        "coursename": "Introduction to quantum physics",
39
        "section": 0,
40
        "resourceurl": "http://example.com/test.png",
41
        "resourcename": "test.png",
42
        "sesskey": "abc123"
43
    }
44
}}
45
<div class="generalbox modal modal-dialog modal-in-page show">
46
    <div class="box py-3 modal-content">
47
        <form action="#" method="post">
48
            {{#course}}
49
            <input type="hidden" name="course" value="{{course}}">
50
            {{/course}}
51
 
52
            <input type="hidden" name="section" value="{{section}}">
53
 
54
            <input type="hidden" name="resourceurl" value="{{resourceurl}}">
55
            <input type="hidden" name="sesskey" value="{{sesskey}}">
56
            <div class="box py-3 modal-header px-3">
57
                <h4>{{#str}}confirm, core{{/str}}</h4>
58
            </div>
59
            <div class="box py-3 modal-body">
60
                {{#course}}
61
                    {{#str}}importconfirm, tool_moodlenet, {"resourcename": {{#quote}}{{resourcename}}{{/quote}}, "resourcetype": {{#quote}}{{resourcetype}}{{/quote}}, "coursename": {{#quote}}{{coursename}}{{/quote}} }{{/str}}
62
                {{/course}}
63
                {{^course}}
64
                    {{#str}}importconfirmnocourse, tool_moodlenet, {"resourcename": {{#quote}}{{resourcename}}{{/quote}}, "resourcetype": {{#quote}}{{resourcetype}}{{/quote}} }{{/str}}
65
                {{/course}}
66
 
67
            </div>
68
            <div class="box py-3 modal-footer">
69
                <div class="buttons">
70
                    <input class="btn btn-secondary" type="submit" name="cancel" value="{{#str}}cancel, core{{/str}}">
71
                    <input class="btn btn-primary" type="submit" name="continue" value="{{#str}}confirm, core{{/str}}">
72
                </div>
73
            </div>
74
        </form>
75
    </div>
76
</div>