You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

140 lines
4.6 KiB

{{!
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 mod_attendance/mobile_view_page
The main page to view the attendance activity
Classes required for JS:
* None
Data attibutes required for JS:
* All data attributes are required
Context variables required for this template:
* attendance
* summary
* cmid
Example context (json):
{
"attendance": {
"id": "1",
"course": "2",
"name": "Class Attendance",
"intro": "Intro"
},
"summary": {
"numtakensessions": "1",
"pointssessionscompleted": "2",
"percentagesessionscompleted": "2"
},
"cmid": "25"
}
}}
{{=<% %>=}}
<div>
<core-course-module-description description="<% attendance.intro %>" component="mod_attendance" componentId="<% cmid %>"></core-course-module-description>
<%#showmessage%>
<%#messages%>
<ion-item>
{{ 'plugin.mod_attendance.<% string %>' | translate }}
</ion-item>
<%/messages%>
<%/showmessage%>
<%#sessions%>
<ion-item>
<h2><% time %></h2>
<h3><% currentstatus %></h3>
<%#sessid%>
<button ion-button core-site-plugins-new-content component="mod_attendance" method="<% attendancefunction %>" [args]="{cmid: <% cmid %>, courseid: <% courseid %>, sessid: <% sessid %>}">
{{ 'plugin.mod_attendance.submitattendance' | translate }}
</button>
<%/sessid%>
</ion-item>
<%/sessions%>
<ion-item>
<ion-grid>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.sessionscompleted' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.numtakensessions %>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.pointssessionscompleted' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.pointssessionscompleted %>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.percentagesessionscompleted' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.percentagesessionscompleted %>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.sessionstotal' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.numallsessions %>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.pointsallsessions' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.percentagesessionscompleted %>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.percentageallsessions' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.allsessionspercentage %>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.maxpossiblepoints' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.maxpossiblepoints %>
</ion-col>
</ion-row>
<ion-row>
<ion-col col-9 class="text-left">
{{ 'plugin.mod_attendance.maxpossiblepercentage' | translate }}
</ion-col>
<ion-col col-2 class="text-left">
<% summary.maxpossiblepercentage %>
</ion-col>
</ion-row>
</ion-grid>
</ion-item>
</div>