2018-05-23 06:35:23 +00:00
|
|
|
{{!
|
|
|
|
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/>.
|
|
|
|
}}
|
|
|
|
{{!
|
2021-11-24 07:29:43 +00:00
|
|
|
@template mod_htmlcert/mobile_view_activity_page
|
2018-05-23 06:35:23 +00:00
|
|
|
|
|
|
|
The main page to view the custom certificate activity
|
|
|
|
|
|
|
|
Classes required for JS:
|
|
|
|
* None
|
|
|
|
|
|
|
|
Data attibutes required for JS:
|
|
|
|
* All data attributes are required
|
2018-06-07 11:29:34 +00:00
|
|
|
|
|
|
|
Context variables required for this template:
|
|
|
|
* certificate
|
|
|
|
* cmid
|
|
|
|
* hasissues
|
|
|
|
* issues
|
2018-07-01 12:18:09 +00:00
|
|
|
* showgroups
|
|
|
|
* groups
|
|
|
|
* canmanage
|
2018-07-10 06:23:27 +00:00
|
|
|
* requiredtimemet
|
2018-07-01 12:18:09 +00:00
|
|
|
* hasrecipients
|
|
|
|
* recipients
|
2018-06-07 11:29:34 +00:00
|
|
|
* fileurl
|
|
|
|
* showreport
|
|
|
|
* currenttimestamp
|
|
|
|
|
|
|
|
Example context (json):
|
|
|
|
{
|
|
|
|
"certificate": {
|
|
|
|
"id": "1",
|
|
|
|
"course": "2",
|
|
|
|
"name": "A rad certificate name!",
|
|
|
|
"intro": "A certificate",
|
|
|
|
"requiredtime": "60"
|
|
|
|
},
|
|
|
|
"cmid": "25",
|
2018-07-09 15:45:19 +00:00
|
|
|
"issue": {
|
|
|
|
"timecreated": "1528370177"
|
|
|
|
},
|
2018-07-01 12:18:09 +00:00
|
|
|
"showgroups": "true",
|
|
|
|
"groups": [
|
|
|
|
{
|
|
|
|
"id": "2",
|
|
|
|
"selected": "false",
|
|
|
|
"name": "Group A"
|
|
|
|
}
|
|
|
|
],
|
|
|
|
"canmanage": "true",
|
2018-07-10 06:23:27 +00:00
|
|
|
"requiredtimemet": "true",
|
2021-11-24 07:29:43 +00:00
|
|
|
"fileurl": "http://yoursite.com/mod/htmlcert/mobile/pluginfile.php?id=4",
|
2018-06-07 11:29:34 +00:00
|
|
|
"showreport": "true",
|
2018-07-01 12:18:09 +00:00
|
|
|
"hasrecipients": "true",
|
|
|
|
"recipients": [
|
|
|
|
{
|
|
|
|
"id": "2",
|
|
|
|
"issueid": "3",
|
|
|
|
"displayname": "Michaelangelo (Mickey)",
|
2021-11-24 07:29:43 +00:00
|
|
|
"fileurl": "http://yoursite.com/mod/htmlcert/mobile/pluginfile.php?id=4",
|
2018-07-01 12:18:09 +00:00
|
|
|
"timecreated": "1528370177"
|
|
|
|
}
|
|
|
|
],
|
2018-06-07 11:29:34 +00:00
|
|
|
"currenttimestamp": "1528370177"
|
|
|
|
}
|
2018-05-23 06:35:23 +00:00
|
|
|
}}
|
|
|
|
{{=<% %>=}}
|
|
|
|
<div>
|
2021-11-24 07:29:43 +00:00
|
|
|
<core-course-module-description description="<% certificate.intro %>" component="mod_htmlcert" componentId="<% cmid %>"></core-course-module-description>
|
2018-07-10 06:23:27 +00:00
|
|
|
<%^canmanage%>
|
|
|
|
<%#requiredtimemet%>
|
2018-07-09 15:45:19 +00:00
|
|
|
<ion-item>
|
2018-07-10 06:23:27 +00:00
|
|
|
<ion-grid>
|
|
|
|
<ion-row>
|
|
|
|
<ion-col col-6 class="text-left">
|
2021-11-24 07:29:43 +00:00
|
|
|
{{ 'plugin.mod_htmlcert.receiveddate' | translate }}
|
2018-07-10 06:23:27 +00:00
|
|
|
<br />
|
|
|
|
<div class="timerewarded">
|
|
|
|
<%#issue%>
|
|
|
|
{{ <% timecreated %> | coreToLocaleString }}
|
|
|
|
<%/issue%>
|
|
|
|
<%^issue%>
|
2021-11-24 07:29:43 +00:00
|
|
|
{{ 'plugin.mod_htmlcert.notissued' | translate }}
|
2018-07-10 06:23:27 +00:00
|
|
|
<%/issue%>
|
|
|
|
</div>
|
|
|
|
</ion-col>
|
|
|
|
<ion-col col-6 class="text-right">
|
2021-11-24 07:29:43 +00:00
|
|
|
<button ion-button icon-only clear [core-download-file]="{fileurl: '<% fileurl %>', timemodified: '<% currenttimestamp %>'}" moduleId="<% cmid %>" courseId="<% certificate.course %>" component="mod_htmlcert">
|
2018-07-10 06:23:27 +00:00
|
|
|
<ion-icon name="download"></ion-icon>
|
|
|
|
</button>
|
|
|
|
</ion-col>
|
|
|
|
</ion-row>
|
|
|
|
</ion-grid>
|
2018-07-09 15:45:19 +00:00
|
|
|
</ion-item>
|
2018-07-10 06:23:27 +00:00
|
|
|
<%/requiredtimemet%>
|
|
|
|
<%^requiredtimemet%>
|
|
|
|
<ion-item>
|
2021-11-24 07:29:43 +00:00
|
|
|
<p>{{ 'plugin.mod_htmlcert.requiredtimenotmet' | translate: {$a: { requiredtime: <% certificate.requiredtime %>} } }}</p>
|
2018-07-10 06:23:27 +00:00
|
|
|
</ion-item>
|
|
|
|
<%/requiredtimemet%>
|
|
|
|
<%/canmanage%>
|
|
|
|
<%#canmanage%>
|
2018-05-23 06:35:23 +00:00
|
|
|
<ion-item>
|
2021-11-24 07:29:43 +00:00
|
|
|
<button ion-button block core-course-download-module-main-file moduleId="<% cmid %>" courseId="<% certificate.course %>" component="mod_htmlcert" [files]="[{fileurl: '<% fileurl %>', timemodified: '<% currenttimestamp %>'}]">
|
2018-05-23 06:35:23 +00:00
|
|
|
<ion-icon name="download" item-start></ion-icon>
|
2021-11-24 07:29:43 +00:00
|
|
|
{{ 'plugin.mod_htmlcert.gethtmlcert' | translate }}
|
2018-05-23 06:35:23 +00:00
|
|
|
</button>
|
|
|
|
</ion-item>
|
2018-07-10 06:23:27 +00:00
|
|
|
<%/canmanage%>
|
2018-07-01 12:18:09 +00:00
|
|
|
<%#showreport%>
|
|
|
|
<ion-item>
|
2021-11-24 07:29:43 +00:00
|
|
|
{{ 'plugin.mod_htmlcert.listofissues' | translate }}
|
2018-07-01 12:18:09 +00:00
|
|
|
</ion-item>
|
|
|
|
<%#showgroups%>
|
|
|
|
<ion-item>
|
2021-11-24 07:29:43 +00:00
|
|
|
<ion-label>{{ 'plugin.mod_htmlcert.selectagroup' | translate }}</ion-label>
|
2018-07-01 12:18:09 +00:00
|
|
|
<ion-select (ionChange)="updateContent({cmid: <% cmid %>, courseid: <% certificate.course %>, group: $event})" interface="popover">
|
|
|
|
<%#groups%>
|
2018-07-09 14:48:49 +00:00
|
|
|
<ion-option value="<% id %>" <%#selected%>selected<%/selected%>><% name %></ion-option>
|
2018-07-01 12:18:09 +00:00
|
|
|
<%/groups%>
|
|
|
|
</ion-select>
|
|
|
|
</ion-item>
|
|
|
|
<%/showgroups%>
|
|
|
|
<%#hasrecipients%>
|
|
|
|
<ion-list>
|
|
|
|
<%#recipients%>
|
|
|
|
<ion-item>
|
|
|
|
<ion-grid>
|
|
|
|
<ion-row>
|
|
|
|
<ion-col col-6 class="text-left">
|
|
|
|
<% displayname %>
|
|
|
|
<br />
|
2018-07-09 14:48:49 +00:00
|
|
|
<div class="timerewarded">{{ <% timecreated %> | coreToLocaleString }}</div>
|
2018-07-01 12:18:09 +00:00
|
|
|
</ion-col>
|
|
|
|
<ion-col col-6 class="text-right">
|
2021-11-24 07:29:43 +00:00
|
|
|
<button ion-button icon-only clear [core-download-file]="{fileurl: '<% fileurl %>', timemodified: '<% currenttimestamp %>'}" moduleId="<% cmid %>" courseId="<% certificate.course %>" component="mod_htmlcert">
|
2018-07-01 12:18:09 +00:00
|
|
|
<ion-icon name="download"></ion-icon>
|
|
|
|
</button>
|
|
|
|
<%#canmanage%>
|
2021-11-24 07:29:43 +00:00
|
|
|
<button ion-button icon-only clear core-site-plugins-call-ws name="mod_htmlcert_delete_issue"
|
2018-07-09 14:48:49 +00:00
|
|
|
[params]="{certificateid: <% certificate.id %>, issueid: <% issueid %>}"
|
|
|
|
[preSets]="{getFromCache: 0, saveToCache: 0, typeExpected: 'boolean'}"
|
2021-11-24 07:29:43 +00:00
|
|
|
confirmMessage="{{ 'plugin.mod_htmlcert.deleteissueconfirm' | translate }}"
|
2018-07-09 14:48:49 +00:00
|
|
|
refreshOnSuccess="true">
|
|
|
|
<ion-icon name="trash"></ion-icon>
|
|
|
|
</button>
|
2018-07-01 12:18:09 +00:00
|
|
|
<%/canmanage%>
|
|
|
|
</ion-col>
|
|
|
|
</ion-row>
|
|
|
|
</ion-grid>
|
|
|
|
</ion-item>
|
|
|
|
<%/recipients%>
|
|
|
|
</ion-list>
|
|
|
|
<%/hasrecipients%>
|
|
|
|
<%^hasrecipients%>
|
|
|
|
<ion-item>
|
2021-11-24 07:29:43 +00:00
|
|
|
{{ 'plugin.mod_htmlcert.nothingtodisplay' | translate }}
|
2018-07-01 12:18:09 +00:00
|
|
|
</ion-item>
|
|
|
|
<%/hasrecipients%>
|
|
|
|
<%/showreport%>
|
2018-05-23 06:35:23 +00:00
|
|
|
</div>
|