diff --git a/projects/v3/src/app/components/activity/activity.component.html b/projects/v3/src/app/components/activity/activity.component.html
index 5b9f6562b..63cca5a0e 100644
--- a/projects/v3/src/app/components/activity/activity.component.html
+++ b/projects/v3/src/app/components/activity/activity.component.html
@@ -3,7 +3,7 @@
{{ activity.name }}
-
+
@@ -20,6 +20,9 @@
+
+
+
-
-
@@ -63,4 +61,8 @@
-
+
+
+
diff --git a/projects/v3/src/app/services/activity.service.ts b/projects/v3/src/app/services/activity.service.ts
index 39f112378..62e5d4cf8 100644
--- a/projects/v3/src/app/services/activity.service.ts
+++ b/projects/v3/src/app/services/activity.service.ts
@@ -126,9 +126,9 @@ export class ActivityService {
}
return this.getActivityBase(id).pipe(
map(res => this._normaliseActivity(res.data, goToNextTask, afterTask))
- ).subscribe(_res => {
+ ).subscribe(res => {
if (callback instanceof Function) {
- return callback(_res);
+ return callback(res);
}
return;
});
@@ -247,7 +247,7 @@ export class ActivityService {
}
// if there is no next task
- if (!nextTask) {
+ if (this.utils.isEmpty(nextTask)) {
if (afterTask) {
this.assessment.getAssessment(
afterTask.id,
@@ -259,7 +259,10 @@ export class ActivityService {
}
nextTask = tasks[0]; // go to the first task
}
- this.goToTask(nextTask);
+
+ if (!this.utils.isEmpty(nextTask)) {
+ return this.goToTask(nextTask);
+ }
}
// obtain latest activity to decide next task