From a9ca1853bdef9d9f0ecf27260b9d547d56335cee Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Fri, 19 Oct 2018 12:20:29 +1300 Subject: [PATCH] Move group onto new line in Mobile app. --- classes/output/mobile.php | 6 +++--- templates/mobile_view_page.mustache | 1 + 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/classes/output/mobile.php b/classes/output/mobile.php index d242eb3..2ac6d2e 100644 --- a/classes/output/mobile.php +++ b/classes/output/mobile.php @@ -157,11 +157,11 @@ class mobile { } 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)) { // 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['time'] .= ' ('.$groupname.')'; + $html['groupname'] = $DB->get_field('groups', 'name', array('id' => $sess->groupid)); } // Check if Status already recorded. diff --git a/templates/mobile_view_page.mustache b/templates/mobile_view_page.mustache index ed0777e..39b9d87 100644 --- a/templates/mobile_view_page.mustache +++ b/templates/mobile_view_page.mustache @@ -62,6 +62,7 @@ <%#sessions%>

<% time %>

+

<% groupname %>

<% currentstatus %>

<%#sessid%>