MDL-78324 core: Convert core/tag to esm
[moodle.git] / lib / templates / infected_file_email.mustache
blobf5383865c94eec62bd52f3a7e066d60be0bf5dc6
1 {{!
2     This file is part of Moodle - http://moodle.org/
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.
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.
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/>.
17 {{!
18     @template core/infected_file_email
20     Moodle template for infected files emails.
22     Context variables required for this template:
23     * report - Hyperlink to the report page,
24     * scanner - Scanning engine that found this file,
25     * filename - Name of the infected file,
26     * filesize - Size of the file,
27     * contenthash - File content hash,
28     * contenttype - Type of uploaded file,
29     * author - User that uploaded the file,
30     * ipaddress - IP address the file was uploaded from,
31     * geoinfo - Geo information about IP address,
32     * referer - The referring page,
33     * identityproviders - List of identiy providers,
34     * date - Date of upload
35     * notice - Notice returned from the scanning engine
36     * additionalinfo - Any additional information from the scanning engine
38     Example context (json):
39     {
40         "header": "Infected file detected",
41         "report": "http://example.moodle/report/infectedfiles/index.php",
42         "scanner": "antivirus_clamav",
43         "filename": "virus.txt",
44         "filesize": 100,
45         "contenthash": "3395856ce81f2b7382dee72602f798b642f14140",
46         "contenttype": "text/plain",
47         "author": "Example User (exampleuser)",
48         "ipaddress": "192.168.0.1",
49         "geoinfo": "Brisbane, Australia",
50         "referer": "http://example.moodle/user/files.php",
51         "date": "28/05/20, 11:19",
52         "notice": "Clamav scanning has tried 1 time(s). ClamAV has failed to run.",
53         "additionalinfo": "Here is the output from ClamAV: /tmp/phpElIcr2: Not a regular file ERROR"
54     }
57 <div>
58 <b>{{header}}</b>
59     <div>
60         <p><b>{{#str}} emailreport, antivirus {{/str}}</b><a href={{report}}>{{report}}</a></p>
61         <p><b>{{#str}} emailscanner, antivirus {{/str}}</b>{{scanner}}</p>
62         <br>
63         <p><b>{{#str}} emailfilename, antivirus {{/str}}</b>{{filename}}</p>
64         <p><b>{{#str}} emailfilesize, antivirus {{/str}}</b>{{filesize}}</p>
65         <p><b>{{#str}} emailcontenthash, antivirus {{/str}}</b>{{contenthash}}</p>
66         <p><b>{{#str}} emailcontenttype, antivirus {{/str}}</b>{{contenttype}}</p>
67         <p><b>{{#str}} emaildate, antivirus {{/str}}</b>{{date}}</p>
68         <br>
69         <p><b>{{#str}} emailauthor, antivirus {{/str}}</b>{{author}}</p>
70         <p><b>{{#str}} emailipaddress, antivirus {{/str}}</b>{{ipaddress}}</p>
71         <p><b>{{#str}} emailgeoinfo, antivirus {{/str}}</b>{{geoinfo}}</p>
72         <p><b>{{#str}} emailreferer, antivirus {{/str}}</b><a href={{referer}}>{{referer}}</a></p>
73     </div>
74     <div>
75         <br>
76         <pre>{{notice}}</pre>
77         <br>
78         <p><b>{{#str}} emailadditionalinfo, antivirus {{/str}} </b></p>
79     </div>
80 </div>