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_policy/page_nopermission
19
 
20
    Template for showing to the user the policy docs to agree.
21
 
22
    Classes required for JS:
23
    * policyactions
24
 
25
    Data attributes required for JS:
26
    -
27
 
28
    Context variables required for this template:
29
    * pluginbaseurl
30
    * haspermissionagreedocs - status of the capability of the user to accept policy documents
31
    * messagetitle - Message title to display, with the error.
32
    * messagedesc - Message description to display, with the error.
33
    * supportname - name of the support contact; displayed when the user does not have permission to accept policy documents
34
    * supportemail - email of the support contact; displayed when the user does not have permission to accept policy documents
35
    * behalfuser - If behalfid is defined and valid, full name of the behalf user with a link to his/her profile; null otherwise
36
    * policies - Array with all the links to current policies (for showing them if needed).
37
 
38
    Example context (json):
39
    {
40
        "haspermissionagreedocs": false,
41
        "messagetitle": "You don't have permission",
42
        "messagedesc": "Sorry you don't have permission to accept",
43
        "policies": [
44
            "Policy 1",
45
            "Policy 2"
46
        ],
47
        "supportname": "Admin",
48
        "supportemail": "moodlesite/user/contactsitesupport.php"
49
    }
50
}}
51
 
52
{{^haspermissionagreedocs}}
53
    <h3>{{{messagetitle}}}</h3>
54
    <p class="mt-1 mb-1">{{{messagedesc}}}</p>
55
 
56
    <div class="policies">
57
        <ul>
58
        {{# policies }}
59
            <li>{{{.}}}</li>
60
        {{/ policies }}
61
        </ul>
62
    </div>
63
 
64
    {{#supportemail}}
65
        <p>{{#str}}nopermissiontoagreedocscontact, tool_policy{{/str}}</p>
66
        <p>{{{supportemail}}}</p>
67
    {{/supportemail}}
68
{{/haspermissionagreedocs}}
69
 
70
{{#js}}
71
// Initialise the JS for the modal window which displays the policy versions.
72
require(['tool_policy/policyactions'], function(ActionsMod) {
73
    ActionsMod.init('[data-action="view"]');
74
});
75
{{/js}}