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 core_course/activityinstance
19
 
20
    Activity completion selector.
21
 
22
    Example context (json):
23
    {
24
        "activities": [{
25
            "cmid": "4",
26
            "modname": "Test activity",
27
            "icon": "https://raw.githubusercontent.com/moodle/moodle/master/mod/feedback/pix/icon.png",
28
            "completionstatus": {
29
                "string": "Manual",
30
                "icon": "https://raw.githubusercontent.com/moodle/moodle/master/pix/i/completion-manual-enabled.png"
31
            }
32
        }]
33
    }
34
}}
35
{{#activities}}
36
<div class="row my-1 py-2 no-gutters border-bottom">
37
    <div class="activityinstance col-6">
38
        <div class="mod-indent-outer"></div>
39
        <div>
40
            {{#canmanage}}
41
            <label class="accesshide" for="selectactivity_{{cmid}}">{{#str}}select, completion{{/str}} {{modname}}</label>
42
 
43
            <label class="custom-control ios-switch my-0">
44
                <input type="checkbox" id="selectactivity_{{cmid}}" class="ios-switch-control-input form-check-input" name="cmid[]" data-section="{{sectionnumber}}" value="{{cmid}}" aria-label="{{#str}}checkactivity, completion, {{{modname}}}{{/str}}">
45
                <span class="ios-switch-control-indicator"></span>
46
            </label>
47
            {{/canmanage}}
48
            <a href="{{url}}" class="activityinstance-title">
49
                <img src="{{icon}}" class="activityicon" alt=" " role="presentation" />
50
                <span class="activity-name ml-2">{{{modname}}}</span>
51
            </a>
52
        </div>
53
    </div>
54
    <div class="activity-completionstatus col-6" id="completionstatus_{{cmid}}">
55
        <div class="d-inline-flex align-items-center">
56
            {{#completionstatus.icon}}
57
                {{{completionstatus.icon}}}
58
            {{/completionstatus.icon}}
59
            {{^completionstatus.icon}}
60
                <span class="ml-3"></span>
61
            {{/completionstatus.icon}}
62
            <span class="text-muted muted ml-2">{{{completionstatus.string}}}</span>
63
        </div>
64
    </div>
65
</div>
66
{{/activities}}
67