Merge pull request #3548 from alfonso-salces/MOBILE-4251
MOBILE-4251 Feedback: Avoid displaying the preview button to studentsmain
commit
2f8abd57bb
|
@ -2105,6 +2105,7 @@
|
||||||
"core.nopasswordchangeforced": "local_moodlemobileapp",
|
"core.nopasswordchangeforced": "local_moodlemobileapp",
|
||||||
"core.nopermissionerror": "local_moodlemobileapp",
|
"core.nopermissionerror": "local_moodlemobileapp",
|
||||||
"core.nopermissions": "error",
|
"core.nopermissions": "error",
|
||||||
|
"core.nopermissiontoaccesspage": "error",
|
||||||
"core.noresults": "moodle",
|
"core.noresults": "moodle",
|
||||||
"core.noselection": "form",
|
"core.noselection": "form",
|
||||||
"core.notapplicable": "local_moodlemobileapp",
|
"core.notapplicable": "local_moodlemobileapp",
|
||||||
|
|
|
@ -36,7 +36,7 @@
|
||||||
|
|
||||||
<div collapsible-footer *ngIf="!showLoading" slot="fixed">
|
<div collapsible-footer *ngIf="!showLoading" slot="fixed">
|
||||||
<div class="list-item-limited-width adaptable-buttons-row"
|
<div class="list-item-limited-width adaptable-buttons-row"
|
||||||
*ngIf="access && (access.canedititems || access.canviewreports || !access.isempty)">
|
*ngIf="access && !access.isempty && (access.canedititems || access.canviewreports)">
|
||||||
<ion-button expand="block" fill="outline" (click)="gotoAnswerQuestions(true)" class="ion-margin ion-text-wrap">
|
<ion-button expand="block" fill="outline" (click)="gotoAnswerQuestions(true)" class="ion-margin ion-text-wrap">
|
||||||
<ion-icon name="fas-search" slot="start" aria-hidden="true"></ion-icon>
|
<ion-icon name="fas-search" slot="start" aria-hidden="true"></ion-icon>
|
||||||
{{ 'addon.mod_feedback.preview' | translate }}
|
{{ 'addon.mod_feedback.preview' | translate }}
|
||||||
|
|
|
@ -109,6 +109,14 @@ export class AddonModFeedbackFormPage implements OnInit, OnDestroy, CanLeave {
|
||||||
|
|
||||||
await this.fetchData();
|
await this.fetchData();
|
||||||
|
|
||||||
|
if (!this.access || this.access.isempty || (!this.access.canedititems && !this.access.canviewreports)) {
|
||||||
|
CoreDomUtils.showErrorModal(Translate.instant('core.nopermissiontoaccesspage'));
|
||||||
|
|
||||||
|
CoreNavigator.back();
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
if (!this.feedback) {
|
if (!this.feedback) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
|
@ -214,6 +214,7 @@
|
||||||
"nopasswordchangeforced": "You cannot proceed without changing your password.",
|
"nopasswordchangeforced": "You cannot proceed without changing your password.",
|
||||||
"nopermissionerror": "Sorry, but you do not currently have permissions to do that",
|
"nopermissionerror": "Sorry, but you do not currently have permissions to do that",
|
||||||
"nopermissions": "Sorry, but you do not currently have permissions to do that ({{$a}}).",
|
"nopermissions": "Sorry, but you do not currently have permissions to do that ({{$a}}).",
|
||||||
|
"nopermissiontoaccesspage": "You don't have permission to access this page.",
|
||||||
"noresults": "No results",
|
"noresults": "No results",
|
||||||
"noselection": "No selection",
|
"noselection": "No selection",
|
||||||
"notapplicable": "n/a",
|
"notapplicable": "n/a",
|
||||||
|
|
Loading…
Reference in New Issue