Proyectos de Subversion Moodle

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
1441 ariadna 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_courseformat/local/content/cm/completion
19
 
20
    TODO describe template completion
21
 
22
    Example context (json):
23
    {
24
        "cmid": 123,
25
        "activityname": "Course announcements",
26
        "hascompletion": true,
27
        "uservisible": true,
28
        "completiondialog": {
29
            "buttoncontent": "To do",
30
            "dialogcontent": "You must view this activity to complete it.",
31
            "buttonclasses": "btn btn-sm btn-outline-secondary dropdown-toggle",
32
            "classes": "completion-dropdown"
33
        },
34
        "isautomatic": true,
35
        "showmanualcompletion": true,
36
        "completiondetails": [
37
            {
38
                "statuscomplete": 1,
39
                "description": "Viewed"
40
            },
41
            {
42
                "statusincomplete": 1,
43
                "description": "Receive a grade"
44
            }
45
        ]
46
    }
47
}}
48
{{#uservisible}}
49
<div data-region="completion-info">
50
        {{! Completion dropdown dialog }}
51
        {{#completiondialog}}
52
            <div
53
                data-region="completionrequirements"
54
                aria-label="{{#str}}completionrequirements, core_course, {{activityname}}{{/str}}"
55
            >
56
                {{> core/local/dropdown/dialog }}
57
            </div>
58
        {{/completiondialog}}
59
 
60
        {{! Manual completion button }}
61
        {{#showmanualcompletion}}
62
            {{#istrackeduser}}
63
                {{$ core_course/completion_manual }}
64
                    {{> core_course/completion_manual }}
65
                {{/ core_course/completion_manual }}
66
            {{/istrackeduser}}
67
        {{/showmanualcompletion}}
68
</div>
69
{{/uservisible}}