From e7a7f0aef562f8b3fc4326fe92da12068f44cb2b Mon Sep 17 00:00:00 2001 From: Mark Nelson Date: Tue, 19 Jun 2018 19:21:17 +0800 Subject: [PATCH] #203 Don't display group select on activity view page --- classes/output/mobile.php | 8 ------- templates/mobile_view_activity_page.mustache | 24 +------------------- view.php | 1 - 3 files changed, 1 insertion(+), 32 deletions(-) diff --git a/classes/output/mobile.php b/classes/output/mobile.php index b33580a..fb503b6 100644 --- a/classes/output/mobile.php +++ b/classes/output/mobile.php @@ -45,8 +45,6 @@ class mobile { $args = (object) $args; - // Get the group variable. - $groupid = empty($args->group) ? 0 : $args->group; // By default, group 0. $cmid = $args->cmid; // Capabilities check. @@ -60,9 +58,6 @@ class mobile { list($certificate->intro, $certificate->introformat) = external_format_text($certificate->intro, $certificate->introformat, $context->id, 'mod_customcert', 'intro'); - // Get the groups (if any) to display - also sets active group. - $groups = self::get_groups($cm, $groupid, $USER->id); - // Get any issues this person may have. $issues = $DB->get_records('customcert_issues', ['userid' => $USER->id, 'customcertid' => $certificate->id]); @@ -96,9 +91,6 @@ class mobile { $data = [ 'certificate' => $certificate, 'cmid' => $cm->id, - 'groupselected' => $groupid, - 'showgroups' => !empty($groups), - 'groups' => array_values($groups), 'hasissues' => !empty($issues), 'issues' => array_values($issues), 'canmanage' => $canmanage, diff --git a/templates/mobile_view_activity_page.mustache b/templates/mobile_view_activity_page.mustache index b1c0fb9..34d3a5c 100644 --- a/templates/mobile_view_activity_page.mustache +++ b/templates/mobile_view_activity_page.mustache @@ -28,9 +28,6 @@ Context variables required for this template: * certificate * cmid - * groupselected - * showgroups - * groups * hasissues * issues * candownload @@ -49,15 +46,6 @@ "requiredtime": "60" }, "cmid": "25", - "groupselected": "5", - "showgroups": "true", - "groups": [ - { - "id": "2", - "selected": "false", - "name": "Group A" - } - ], "hasissues": "true", "issues": [ { @@ -74,18 +62,8 @@ {{=<% %>=}}
- <%#showgroups%> - - {{ 'plugin.mod_customcert.selectagroup' | translate }} - - <%#groups%> - selected<%/selected%>><% name %> - <%/groups%> - - - <%/showgroups%> <%#showreport%> - + {{ 'plugin.mod_customcert.viewcustomcertissues' | translate: {$a: <% numissuesinreport %>} }} <%/showreport%> diff --git a/view.php b/view.php index 7570d7d..0850e10 100644 --- a/view.php +++ b/view.php @@ -112,7 +112,6 @@ if (empty($action)) { // Output all the page data. echo $OUTPUT->header(); - groups_print_activity_menu($cm, $pageurl); echo $reportlink; echo $intro; echo $issuelist;