From 159694db2f5a130091dbe9a737c4209c49c384fe Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Pau=20Ferrer=20Oca=C3=B1a?=
Date: Mon, 23 Nov 2020 16:23:04 +0100
Subject: [PATCH] MOBILE-3523 workshop: Fix go to own assessment button
---
.../addon-mod-workshop-assessment-strategy.html | 2 +-
.../assessment/addon-mod-workshop-assessment.html | 8 ++++----
.../mod/workshop/components/assessment/assessment.ts | 10 ++++++++--
3 files changed, 13 insertions(+), 7 deletions(-)
diff --git a/src/addon/mod/workshop/components/assessment-strategy/addon-mod-workshop-assessment-strategy.html b/src/addon/mod/workshop/components/assessment-strategy/addon-mod-workshop-assessment-strategy.html
index c3bb1fd41..1f71f1a4a 100644
--- a/src/addon/mod/workshop/components/assessment-strategy/addon-mod-workshop-assessment-strategy.html
+++ b/src/addon/mod/workshop/components/assessment-strategy/addon-mod-workshop-assessment-strategy.html
@@ -23,7 +23,7 @@
[maxSubmissions]="workshop.overallfeedbackfiles" [component]="component" [componentId]="componentId" [allowOffline]="true">
{{ 'addon.mod_workshop.assessmentweight' | translate }}
-
+
{{w}}
diff --git a/src/addon/mod/workshop/components/assessment/addon-mod-workshop-assessment.html b/src/addon/mod/workshop/components/assessment/addon-mod-workshop-assessment.html
index 8c876cfd1..897088a8e 100644
--- a/src/addon/mod/workshop/components/assessment/addon-mod-workshop-assessment.html
+++ b/src/addon/mod/workshop/components/assessment/addon-mod-workshop-assessment.html
@@ -1,5 +1,5 @@
-
+
{{profile.fullname}}
@@ -16,10 +16,10 @@
{{ 'addon.mod_workshop.weightinfo' | translate:{$a: assessment.weight } }}
{{ 'addon.mod_workshop.notassessed' | translate }}
-
-
+
+
{{ 'core.notsent' | translate }}
-
+
diff --git a/src/addon/mod/workshop/components/assessment/assessment.ts b/src/addon/mod/workshop/components/assessment/assessment.ts
index c80eed725..4aafdd625 100644
--- a/src/addon/mod/workshop/components/assessment/assessment.ts
+++ b/src/addon/mod/workshop/components/assessment/assessment.ts
@@ -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,