Skip to content

Commit

Permalink
Merge branch 'main' of github.com:rage/factor-analysis-exercise-servi…
Browse files Browse the repository at this point in the history
…ce into custom-view
  • Loading branch information
anadis504 committed Mar 28, 2024
2 parents 878cd55 + cd18b19 commit 3b0e805
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/components/PdfDownload/PdfGenerator.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -292,9 +292,9 @@ const MyDoc: React.FC<React.PropsWithChildren<CustomViewIframeState>> = (props)
.flatMap((exercise) => {
return exercise.exercise_tasks.flatMap((task) => {
const grading = task.grading as CustomViewExerciseTaskGrading
const answer =
!!task.user_answer &&
((task.user_answer as CustomViewExerciseTaskSubmission[])[0].data_json as UserAnswer)
const answer = task.user_answer
? ((task.user_answer as CustomViewExerciseTaskSubmission[])[0].data_json as UserAnswer)
: null
const pubSpec = task.public_spec as PublicSpec
const gradingFeedback = grading.feedback_json
? (grading.feedback_json as ExerciseFeedback)
Expand Down

0 comments on commit 3b0e805

Please sign in to comment.