#203 Don't display group select on activity view page
This commit is contained in:
parent
de2709ae54
commit
e7a7f0aef5
3 changed files with 1 additions and 32 deletions
|
@ -45,8 +45,6 @@ class mobile {
|
||||||
|
|
||||||
$args = (object) $args;
|
$args = (object) $args;
|
||||||
|
|
||||||
// Get the group variable.
|
|
||||||
$groupid = empty($args->group) ? 0 : $args->group; // By default, group 0.
|
|
||||||
$cmid = $args->cmid;
|
$cmid = $args->cmid;
|
||||||
|
|
||||||
// Capabilities check.
|
// Capabilities check.
|
||||||
|
@ -60,9 +58,6 @@ class mobile {
|
||||||
list($certificate->intro, $certificate->introformat) = external_format_text($certificate->intro,
|
list($certificate->intro, $certificate->introformat) = external_format_text($certificate->intro,
|
||||||
$certificate->introformat, $context->id, 'mod_customcert', '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.
|
// Get any issues this person may have.
|
||||||
$issues = $DB->get_records('customcert_issues', ['userid' => $USER->id, 'customcertid' => $certificate->id]);
|
$issues = $DB->get_records('customcert_issues', ['userid' => $USER->id, 'customcertid' => $certificate->id]);
|
||||||
|
|
||||||
|
@ -96,9 +91,6 @@ class mobile {
|
||||||
$data = [
|
$data = [
|
||||||
'certificate' => $certificate,
|
'certificate' => $certificate,
|
||||||
'cmid' => $cm->id,
|
'cmid' => $cm->id,
|
||||||
'groupselected' => $groupid,
|
|
||||||
'showgroups' => !empty($groups),
|
|
||||||
'groups' => array_values($groups),
|
|
||||||
'hasissues' => !empty($issues),
|
'hasissues' => !empty($issues),
|
||||||
'issues' => array_values($issues),
|
'issues' => array_values($issues),
|
||||||
'canmanage' => $canmanage,
|
'canmanage' => $canmanage,
|
||||||
|
|
|
@ -28,9 +28,6 @@
|
||||||
Context variables required for this template:
|
Context variables required for this template:
|
||||||
* certificate
|
* certificate
|
||||||
* cmid
|
* cmid
|
||||||
* groupselected
|
|
||||||
* showgroups
|
|
||||||
* groups
|
|
||||||
* hasissues
|
* hasissues
|
||||||
* issues
|
* issues
|
||||||
* candownload
|
* candownload
|
||||||
|
@ -49,15 +46,6 @@
|
||||||
"requiredtime": "60"
|
"requiredtime": "60"
|
||||||
},
|
},
|
||||||
"cmid": "25",
|
"cmid": "25",
|
||||||
"groupselected": "5",
|
|
||||||
"showgroups": "true",
|
|
||||||
"groups": [
|
|
||||||
{
|
|
||||||
"id": "2",
|
|
||||||
"selected": "false",
|
|
||||||
"name": "Group A"
|
|
||||||
}
|
|
||||||
],
|
|
||||||
"hasissues": "true",
|
"hasissues": "true",
|
||||||
"issues": [
|
"issues": [
|
||||||
{
|
{
|
||||||
|
@ -74,18 +62,8 @@
|
||||||
{{=<% %>=}}
|
{{=<% %>=}}
|
||||||
<div>
|
<div>
|
||||||
<core-course-module-description description="<% certificate.intro %>" component="mod_customcert" componentId="<% cmid %>"></core-course-module-description>
|
<core-course-module-description description="<% certificate.intro %>" component="mod_customcert" componentId="<% cmid %>"></core-course-module-description>
|
||||||
<%#showgroups%>
|
|
||||||
<ion-item>
|
|
||||||
<ion-label>{{ 'plugin.mod_customcert.selectagroup' | translate }}</ion-label>
|
|
||||||
<ion-select (ionChange)="updateContent({cmid: <% cmid %>, courseid: <% certificate.course %>, group: $event})" interface="popover">
|
|
||||||
<%#groups%>
|
|
||||||
<ion-option value="<% id %>" <%#selected%>selected<%/selected%>><% name %></ion-option>
|
|
||||||
<%/groups%>
|
|
||||||
</ion-select>
|
|
||||||
</ion-item>
|
|
||||||
<%/showgroups%>
|
|
||||||
<%#showreport%>
|
<%#showreport%>
|
||||||
<a ion-item class="text-right" core-site-plugins-new-content component="mod_customcert" method="mobile_view_report" [args]="{cmid: <% cmid %>, group: <% groupselected %>}">
|
<a ion-item class="text-right" core-site-plugins-new-content component="mod_customcert" method="mobile_view_report" [args]="{cmid: <% cmid %>}">
|
||||||
{{ 'plugin.mod_customcert.viewcustomcertissues' | translate: {$a: <% numissuesinreport %>} }}
|
{{ 'plugin.mod_customcert.viewcustomcertissues' | translate: {$a: <% numissuesinreport %>} }}
|
||||||
</a>
|
</a>
|
||||||
<%/showreport%>
|
<%/showreport%>
|
||||||
|
|
1
view.php
1
view.php
|
@ -112,7 +112,6 @@ if (empty($action)) {
|
||||||
|
|
||||||
// Output all the page data.
|
// Output all the page data.
|
||||||
echo $OUTPUT->header();
|
echo $OUTPUT->header();
|
||||||
groups_print_activity_menu($cm, $pageurl);
|
|
||||||
echo $reportlink;
|
echo $reportlink;
|
||||||
echo $intro;
|
echo $intro;
|
||||||
echo $issuelist;
|
echo $issuelist;
|
||||||
|
|
Loading…
Reference in a new issue