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/content/export/module_index
|
|
|
19 |
|
|
|
20 |
Renders content for a course index.
|
|
|
21 |
This template is not for use within moodle.
|
|
|
22 |
|
|
|
23 |
Classes required for JS:
|
|
|
24 |
* none
|
|
|
25 |
|
|
|
26 |
Data attributes required for JS:
|
|
|
27 |
* none
|
|
|
28 |
|
|
|
29 |
Context variables required for this template:
|
|
|
30 |
* global
|
|
|
31 |
|
|
|
32 |
Example context (json):
|
|
|
33 |
{
|
|
|
34 |
"global": {
|
|
|
35 |
"righttoleft": 0,
|
|
|
36 |
"language": "en",
|
|
|
37 |
"sitename": "Kevin's Emporium of fine course material",
|
|
|
38 |
"siteurl": "https://kevin.example.com",
|
|
|
39 |
"pathtotop": "./",
|
|
|
40 |
"contentexportfooter": "This file is part of the content downloaded from <a href='https://example.com'>Kevin's Emporium of fine course material</a> by Jennifer Collins on Tuesday, 24th February 2021, 12:21 am.",
|
|
|
41 |
"contentexportsummary": "This file is part of the content downloaded from <a href='https://example.com/course/view.php?id=4'>Kevin's Emporium of fine course material</a> on Tuesday, 24th February 2021, 12:21 am.",
|
|
|
42 |
"coursename": "Marketing 101",
|
|
|
43 |
"courseshortname": "MKT101",
|
|
|
44 |
"courselink": "https://example.com/course/view.php?id=4",
|
|
|
45 |
"exportdate": "Tuesday, 24th February 2021, 12:21 am",
|
|
|
46 |
"maxfilesize": "40MB"
|
|
|
47 |
},
|
|
|
48 |
"modulename": "Data Structures - Discussion",
|
|
|
49 |
"modulelink": "https://kevin.example.com/mod/forum/view.php?id=53",
|
|
|
50 |
"intro": "<p>This forum provides a place for you to discuss the concepts of data structures.</p>",
|
|
|
51 |
"sections": [
|
|
|
52 |
{
|
|
|
53 |
"title": "The title set in an exportable_item",
|
|
|
54 |
"content": "<p>Some text area included in an exportable_item.</p>",
|
|
|
55 |
"files": [
|
|
|
56 |
{
|
|
|
57 |
"filename": "Example file which was not included in the text field above",
|
|
|
58 |
"filepath": "./sections/0/_files"
|
|
|
59 |
}
|
|
|
60 |
]
|
|
|
61 |
}
|
|
|
62 |
]
|
|
|
63 |
}
|
|
|
64 |
}}
|
|
|
65 |
{{<core/content/export/external_page}}
|
|
|
66 |
{{$pagecontent}}
|
|
|
67 |
<h2>
|
|
|
68 |
{{{modulename}}}
|
|
|
69 |
</h2>
|
|
|
70 |
|
|
|
71 |
<div class="alert alert-info alert-block">
|
|
|
72 |
{{#str}}contentexport_modulesummary, core,
|
|
|
73 |
{
|
|
|
74 |
"modulelink": "{{modulelink}}",
|
|
|
75 |
"modulename": {{#quote}}{{{modulename}}}{{/quote}},
|
|
|
76 |
"date": "{{global.exportdate}}",
|
|
|
77 |
"maxfilesize": "{{global.maxfilesize}}"
|
|
|
78 |
}
|
|
|
79 |
{{/str}}
|
|
|
80 |
</div>
|
|
|
81 |
|
|
|
82 |
{{#intro}}
|
|
|
83 |
<h3>{{#str}}moduleintro, core{{/str}}</h3>
|
|
|
84 |
<div>
|
|
|
85 |
{{{intro}}}
|
|
|
86 |
</div>
|
|
|
87 |
<hr>
|
|
|
88 |
{{/intro}}
|
|
|
89 |
|
|
|
90 |
{{#sections}}
|
|
|
91 |
<div>
|
|
|
92 |
<h3>{{{title}}}</h3>
|
|
|
93 |
<div>
|
|
|
94 |
{{#content}}
|
|
|
95 |
<div>
|
|
|
96 |
{{{content}}}
|
|
|
97 |
</div>
|
|
|
98 |
{{/content}}
|
|
|
99 |
|
|
|
100 |
{{#files.0}}
|
|
|
101 |
<ul>
|
|
|
102 |
{{#files}}
|
|
|
103 |
<li><a href="{{filepath}}" title="{{#str}}contentexport_viewfilename, core, {{filename}}{{/str}}">{{filename}}</a></li>
|
|
|
104 |
{{/files}}
|
|
|
105 |
</ul>
|
|
|
106 |
{{/files.0}}
|
|
|
107 |
</div>
|
|
|
108 |
</div>
|
|
|
109 |
<hr>
|
|
|
110 |
{{/sections}}
|
|
|
111 |
{{/pagecontent}}
|
|
|
112 |
{{/core/content/export/external_page}}
|