Skip to content

Commit

Permalink
prevent loading state for start quiz button after clicking on it and …
Browse files Browse the repository at this point in the history
…navigating back
  • Loading branch information
Stephan Krusche committed Oct 15, 2019
1 parent 23833ef commit e2ffa37
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -93,13 +93,12 @@ export class ExerciseDetailsStudentActionsComponent implements OnInit {
}

startExercise() {
this.exercise.loading = true;

if (this.exercise.type === ExerciseType.QUIZ) {
// Start the quiz
return this.router.navigate(['/quiz', this.exercise.id]);
}

this.exercise.loading = true;
this.courseExerciseService
.startExercise(this.courseId, this.exercise.id)
.finally(() => (this.exercise.loading = false))
Expand Down

0 comments on commit e2ffa37

Please sign in to comment.