message: Make isAnswerCorrect static
diff: @@ -18,6 +18,10 @@ export class TaskUnitComponent implements OnInit {
  validationMode = false;
  courseId: string;
  + static isAnswerCorrect(answer) {
  + return ((typeof answer.value === 'undefined' || !answer.value) && !answer.userAnswer) || (answer.value && answer.userAnswer);
  + }
  +
  constructor(private route: ActivatedRoute,
  private progressService: ProgressService,
  private snackBar: MatSnackBar) {
  @@ -47,10 +51,6 @@ export class TaskUnitComponent implements OnInit {
  this.shuffleAnswers();
  }
  - isAnswerCorrect(answer) {
  - return ((typeof answer.value === 'undefined' || !answer.value) && !answer.userAnswer) || (answer.value && answer.userAnswer);
  - }
  -
  validate() {
  this.validationMode = true;
  @@ -59,7 +59,7 @@ export class TaskUnitComponent implements OnInit {
  this.taskUnit.tasks.forEach((task) => {
  task.answers.forEach((answer) => {
  // One wrong answer will mark the TaskUnit as failed
  - if (!this.isAnswerCorrect(answer)) {
  + if (!TaskUnitComponent.isAnswerCorrect(answer)) {
  done = false;
  }
  });
  