MOBILE-4251 Feedback: Avoid displaying the preview button to students
This commit is contained in:
		
							parent
							
								
									24cfb835b0
								
							
						
					
					
						commit
						87a07217fc
					
				| @ -2105,6 +2105,7 @@ | ||||
|   "core.nopasswordchangeforced": "local_moodlemobileapp", | ||||
|   "core.nopermissionerror": "local_moodlemobileapp", | ||||
|   "core.nopermissions": "error", | ||||
|   "core.nopermissiontoaccesspage": "error", | ||||
|   "core.noresults": "moodle", | ||||
|   "core.noselection": "form", | ||||
|   "core.notapplicable": "local_moodlemobileapp", | ||||
|  | ||||
| @ -36,7 +36,7 @@ | ||||
| 
 | ||||
|     <div collapsible-footer *ngIf="!showLoading" slot="fixed"> | ||||
|         <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-icon name="fas-search" slot="start" aria-hidden="true"></ion-icon> | ||||
|                 {{ 'addon.mod_feedback.preview' | translate }} | ||||
|  | ||||
| @ -109,6 +109,14 @@ export class AddonModFeedbackFormPage implements OnInit, OnDestroy, CanLeave { | ||||
| 
 | ||||
|         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) { | ||||
|             return; | ||||
|         } | ||||
|  | ||||
| @ -214,6 +214,7 @@ | ||||
|     "nopasswordchangeforced": "You cannot proceed without changing your password.", | ||||
|     "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}}).", | ||||
|     "nopermissiontoaccesspage": "You don't have permission to access this page.", | ||||
|     "noresults": "No results", | ||||
|     "noselection": "No selection", | ||||
|     "notapplicable": "n/a", | ||||
|  | ||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user