moodle/lib/templates/content/export/module_index.mustache
2020-10-15 13:45:58 +08:00

113 lines
3.7 KiB
Plaintext

{{!
This file is part of Moodle - http://moodle.org/
Moodle is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
Moodle is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with Moodle. If not, see <http://www.gnu.org/licenses/>.
}}
{{!
@template core/content/export/module_index
Renders content for a course index.
This template is not for use within moodle.
Classes required for JS:
* none
Data attributes required for JS:
* none
Context variables required for this template:
* global
Example context (json):
{
"global": {
"righttoleft": 0,
"language": "en",
"sitename": "Kevin's Emporium of fine course material",
"siteurl": "https://kevin.example.com",
"pathtotop": "./",
"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.",
"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.",
"coursename": "Marketing 101",
"courseshortname": "MKT101",
"courselink": "https://example.com/course/view.php?id=4",
"exportdate": "Tuesday, 24th February 2021, 12:21 am",
"maxfilesize": "40MB"
},
"modulename": "Data Structures - Discussion",
"modulelink": "https://kevin.example.com/mod/forum/view.php?id=53",
"intro": "<p>This forum provides a place for you to discuss the concepts of data structures.</p>",
"sections": [
{
"title": "The title set in an exportable_item",
"content": "<p>Some text area included in an exportable_item.</p>",
"files": [
{
"filename": "Example file which was not included in the text field above",
"filepath": "./sections/0/_files"
}
]
}
]
}
}}
{{<core/content/export/external_page}}
{{$pagecontent}}
<h2>
{{{modulename}}}
</h2>
<div class="alert alert-info alert-block">
{{#str}}contentexport_modulesummary, core,
{
"modulelink": "{{modulelink}}",
"modulename": {{#quote}}{{{modulename}}}{{/quote}},
"date": "{{global.exportdate}}",
"maxfilesize": "{{global.maxfilesize}}"
}
{{/str}}
</div>
{{#intro}}
<h3>{{#str}}moduleintro, core{{/str}}</h3>
<div>
{{{intro}}}
</div>
<hr>
{{/intro}}
{{#sections}}
<div>
<h3>{{{title}}}</h3>
<div>
{{#content}}
<div>
{{{content}}}
</div>
{{/content}}
{{#files.0}}
<ul>
{{#files}}
<li><a href="{{filepath}}" title="{{#str}}contentexport_viewfilename, core, {{filename}}{{/str}}">{{filename}}</a></li>
{{/files}}
</ul>
{{/files.0}}
</div>
</div>
<hr>
{{/sections}}
{{/pagecontent}}
{{/core/content/export/external_page}}