MOBILE-3523 workshop: Fix go to own assessment button
parent
cfcd321ad6
commit
159694db2f
|
@ -23,7 +23,7 @@
|
|||
[maxSubmissions]="workshop.overallfeedbackfiles" [component]="component" [componentId]="componentId" [allowOffline]="true"></core-attachments>
|
||||
<ion-item *ngIf="edit && access && access.canallocate">
|
||||
<ion-label stacked [core-mark-required]="true">{{ 'addon.mod_workshop.assessmentweight' | translate }}</ion-label>
|
||||
<ion-select [(ngModel)]="weight" interface="action-sheet">
|
||||
<ion-select [(ngModel)]="weight" interface="action-sheet" name="weight">
|
||||
<ion-option *ngFor="let w of weights" [value]="w">{{w}}</ion-option>
|
||||
</ion-select>
|
||||
</ion-item>
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
<core-loading [hideUntil]="loaded">
|
||||
<a ion-item *ngIf="summary" text-wrap [attr.detail-none]="canViewAssessment && !canSelfAssess? null : true" (click)="gotoAssessment()">
|
||||
<ion-item *ngIf="summary" text-wrap [attr.detail-none]="canViewAssessment && !canSelfAssess? null : true" (click)="gotoAssessment($event)">
|
||||
<ion-avatar core-user-avatar [user]="profile" item-start [courseId]="courseId" [userId]="profile && profile.id"></ion-avatar>
|
||||
|
||||
<h2 *ngIf="profile && profile.fullname">{{profile.fullname}}</h2>
|
||||
|
@ -16,10 +16,10 @@
|
|||
{{ 'addon.mod_workshop.weightinfo' | translate:{$a: assessment.weight } }}
|
||||
</p>
|
||||
<ion-badge *ngIf="!assessment.grade" color="danger">{{ 'addon.mod_workshop.notassessed' | translate }}</ion-badge>
|
||||
<button ion-button block *ngIf="canSelfAssess && !showGrade(assessment.grade)" (click)="gotoOwnAssessment()">{{ 'addon.mod_workshop.assess' | translate }}</button>
|
||||
<button ion-button block *ngIf="canSelfAssess && showGrade(assessment.grade)" (click)="gotoOwnAssessment()">{{ 'addon.mod_workshop.reassess' | translate }}</button>
|
||||
<button ion-button block *ngIf="canSelfAssess && !showGrade(assessment.grade)" (click)="gotoOwnAssessment($event)">{{ 'addon.mod_workshop.assess' | translate }}</button>
|
||||
<button ion-button block *ngIf="canSelfAssess && showGrade(assessment.grade)" (click)="gotoOwnAssessment($event)">{{ 'addon.mod_workshop.reassess' | translate }}</button>
|
||||
<ion-note item-end *ngIf="offline">
|
||||
<ion-icon name="time"></ion-icon>{{ 'core.notsent' | translate }}
|
||||
</ion-note>
|
||||
</a>
|
||||
</ion-item>
|
||||
</core-loading>
|
||||
|
|
|
@ -99,8 +99,11 @@ export class AddonModWorkshopAssessmentComponent implements OnInit {
|
|||
/**
|
||||
* Navigate to the assessment.
|
||||
*/
|
||||
gotoAssessment(): void {
|
||||
gotoAssessment(event: Event): void {
|
||||
if (!this.canSelfAssess && this.canViewAssessment) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const params = {
|
||||
assessment: this.assessment,
|
||||
submission: this.submission,
|
||||
|
@ -131,8 +134,11 @@ export class AddonModWorkshopAssessmentComponent implements OnInit {
|
|||
/**
|
||||
* Navigate to my own assessment.
|
||||
*/
|
||||
gotoOwnAssessment(): void {
|
||||
gotoOwnAssessment(event: Event): void {
|
||||
if (this.canSelfAssess) {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
||||
const params = {
|
||||
module: this.module,
|
||||
workshop: this.workshop,
|
||||
|
|
Loading…
Reference in New Issue