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_courseformat/local/content/cm/activity_info
19
 
20
    Container to display activity information on the course page such as:
21
      - Activity completion requirements (automatic completion)
22
      - Manual completion button
23
 
24
    Example context (json):
25
    {
26
        "cmid": 123,
27
        "activityname": "Course announcements",
28
        "hascompletion": true,
29
        "uservisible": true,
30
        "completiondialog": {
31
            "buttoncontent": "To do",
32
            "dialogcontent": "You must view this activity to complete it.",
33
            "buttonclasses": "btn btn-sm btn-outline-secondary dropdown-toggle",
34
            "classes": "completion-dropdown"
35
        },
36
        "isautomatic": true,
37
        "showmanualcompletion": true,
38
        "completiondetails": [
39
             {
40
                "statuscomplete": 1,
41
                "description": "Viewed"
42
            },
43
            {
44
                "statusincomplete": 1,
45
                "description": "Receive a grade"
46
            }
47
        ]
48
    }
49
}}
50
<div data-region="activity-information" data-activityname="{{activityname}}" class="activity-information">
51
    {{#uservisible}}
52
        <div data-region="completion-info">
53
            {{! Completion dropdown dialog }}
54
            {{#completiondialog}}
55
                <div data-region="completionrequirements" aria-label="{{#str}}completionrequirements, core_course, {{activityname}}{{/str}}">
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}}
70
</div>