From cbe5645d03ce5b54f2bd0047f57632daf7dcd054 Mon Sep 17 00:00:00 2001 From: Dan Marsden Date: Wed, 26 Sep 2018 13:54:43 +1200 Subject: [PATCH] Fix example template. --- classes/output/mobile.php | 4 +-- templates/mobile_teacher_form.mustache | 40 ++++++++++++++------------ 2 files changed, 23 insertions(+), 21 deletions(-) diff --git a/classes/output/mobile.php b/classes/output/mobile.php index 11f9029..19c4f8a 100644 --- a/classes/output/mobile.php +++ b/classes/output/mobile.php @@ -362,7 +362,7 @@ class mobile { $data['messages'] = array(); $data['showmessage'] = false; $data['statuses'] = array(); - $data['args'] = ''; // Stores list of userid status args that should be added to form post. + $data['btnargs'] = ''; // Stores list of userid status args that should be added to form post. $statuses = $att->get_statuses(); $otherdata = array(); @@ -384,7 +384,7 @@ class mobile { foreach ($users as $user) { $data['users'][] = array('userid' => $user->id, 'fullname' => $user->fullname); // Generate args to use in submission button here. - $data['args'] .= ', status'. $user->id. ': CONTENT_OTHERDATA.status'. $user->id; + $data['btnargs'] .= ', status'. $user->id. ': CONTENT_OTHERDATA.status'. $user->id; } if (!empty($data['messages'])) { diff --git a/templates/mobile_teacher_form.mustache b/templates/mobile_teacher_form.mustache index 6dd12ef..6760cdd 100644 --- a/templates/mobile_teacher_form.mustache +++ b/templates/mobile_teacher_form.mustache @@ -40,8 +40,8 @@ }, "cmid": "25", "courseid": "4", - "sessid": "43" - "args" : ", status4: CONTENT_OTHERDATA.status4" + "sessid": "43", + "btnargs" : "" } }} {{=<% %>=}} @@ -59,25 +59,27 @@ <%/messages%> <%/showmessage%> <%#users%> - - -

<% fullname %>

-
-
- - - <%#statuses%> - - <% acronym %> - + +

<% fullname %>

+
-
- <%/statuses%> -
+ + + <%#statuses%> + + + <% acronym %> + + + + <%/statuses%> + <%/users%> - + + + \ No newline at end of file