diff --git a/src/main/webapp/app/exercises/quiz/manage/quiz-exercise-manage-buttons.component.ts b/src/main/webapp/app/exercises/quiz/manage/quiz-exercise-manage-buttons.component.ts index 91d75e542018..95d7ce3deb73 100644 --- a/src/main/webapp/app/exercises/quiz/manage/quiz-exercise-manage-buttons.component.ts +++ b/src/main/webapp/app/exercises/quiz/manage/quiz-exercise-manage-buttons.component.ts @@ -1,5 +1,5 @@ import { Component, EventEmitter, Input, OnInit, Output } from '@angular/core'; -import { HttpErrorResponse } from '@angular/common/http'; +import { HttpErrorResponse, HttpResponse } from '@angular/common/http'; import { QuizExercise } from 'app/entities/quiz/quiz-exercise.model'; import { QuizExerciseService } from './quiz-exercise.service'; import { ActivatedRoute, Router } from '@angular/router'; @@ -72,7 +72,10 @@ export class QuizExerciseManageButtonsComponent implements OnInit { * @param exportAll If true exports all questions, else exports only those whose export flag is true */ exportQuizExercise(exportAll: boolean) { - this.quizExerciseService.exportQuiz(this.quizExercise.quizQuestions, exportAll, this.quizExercise.title); + this.quizExerciseService.find(this.quizExercise.id!).subscribe((response: HttpResponse) => { + const exercise = response.body!; + this.quizExerciseService.exportQuiz(exercise.quizQuestions, exportAll, exercise.title); + }); } /**