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
19
 
20
    Displays a course module instance inside a course section.
21
 
22
    Example context (json):
23
    {
24
        "cmname": {
25
            "displayvalue" : "<a class=\"aalink\" href=\"#\"><span class=\"instancename\">Activity example</span></a>"
26
        },
27
        "hasname": "true",
28
        "afterlink": "<span class=\"badge bg-primary\">30 unread messages</span>",
29
        "hasextras": true,
30
        "extras": ["<span class=\"badge bg-secondary\">[extras]</span>"],
31
        "activityinfo": {
32
            "hasmodavailability": true,
33
            "activityname": "Activity example",
34
            "hascompletion": true,
35
            "uservisible": true,
36
            "hasdates": true,
37
            "isautomatic": true,
38
            "istrackeduser": true,
39
            "activitydates": [
40
                {
41
                    "label": "Opens:",
42
                    "datestring": "6 April 2021, 6:46 PM"
43
                }
44
            ],
45
            "completiondetails": [
46
                {
47
                    "statuscomplete": 1,
48
                    "description": "Viewed"
49
                },
50
                {
51
                    "statusincomplete": 1,
52
                    "description": "Receive a grade"
53
                }
54
            ]
55
        },
56
        "modstealth": true,
57
        "indent": 1
58
    }
59
}}
60
{{#editing}}
61
    {{< core_courseformat/local/content/divider}}
62
        {{$content}}{{> core_course/activitychooserbuttonactivity}}{{/content}}
63
    {{/ core_courseformat/local/content/divider}}
64
{{/editing}}
65
<div class="activity-item focus-control {{#modstealth}}hiddenactivity{{/modstealth}}{{!
66
        }}{{#modhiddenfromstudents}}hiddenactivity{{/modhiddenfromstudents}}{{!
67
        }}{{#modinline}}activityinline{{/modinline}}" data-activityname="{{activityname}}" data-region="activity-card">
68
    {{$ core_courseformat/local/content/cm/bulkselect }}
69
        {{> core_courseformat/local/content/cm/bulkselect }}
70
    {{/ core_courseformat/local/content/cm/bulkselect }}
71
    {{!
72
      Place the actual content of the activity-item in a separate template to make it easier for other formats to add
73
      additional content to the activity wrapper.
74
    }}
75
    {{$ core_courseformat/local/content/cm/activity }}
76
        {{> core_courseformat/local/content/cm/activity }}
77
    {{/ core_courseformat/local/content/cm/activity }}
78
</div>