Browse Source

Move group onto new line in Mobile app.

MOODLE_35_STABLE
Dan Marsden 6 years ago
parent
commit
d6aedc26b0
  1. 6
      classes/output/mobile.php
  2. 1
      templates/mobile_view_page.mustache

6
classes/output/mobile.php

@ -157,11 +157,11 @@ class mobile {
} }
if ($isteacher || $canmark) { if ($isteacher || $canmark) {
$html = array('time' => strip_tags(construct_session_full_date_time($sess->sessdate, $sess->duration))); $html = array('time' => strip_tags(construct_session_full_date_time($sess->sessdate, $sess->duration)),
'groupname' => '');
if (!empty($sess->groupid)) { if (!empty($sess->groupid)) {
// TODO In-efficient way to get group name - we should get all groups in one query. // TODO In-efficient way to get group name - we should get all groups in one query.
$groupname = $DB->get_field('groups', 'name', array('id' => $sess->groupid)); $html['groupname'] = $DB->get_field('groups', 'name', array('id' => $sess->groupid));
$html['time'] .= ' ('.$groupname.')';
} }
// Check if Status already recorded. // Check if Status already recorded.

1
templates/mobile_view_page.mustache

@ -62,6 +62,7 @@
<%#sessions%> <%#sessions%>
<ion-item> <ion-item>
<h2><% time %></h2> <h2><% time %></h2>
<h3><% groupname %></h3>
<h3><% currentstatus %></h3> <h3><% currentstatus %></h3>
<%#sessid%> <%#sessid%>
<button ion-button core-site-plugins-new-content component="mod_attendance" method="<% attendancefunction %>" [args]="{cmid: <% cmid %>, courseid: <% courseid %>, sessid: <% sessid %>, timestamp: <% timestamp %>}"> <button ion-button core-site-plugins-new-content component="mod_attendance" method="<% attendancefunction %>" [args]="{cmid: <% cmid %>, courseid: <% courseid %>, sessid: <% sessid %>, timestamp: <% timestamp %>}">

Loading…
Cancel
Save