From a58750b138994fd2b5ffe379ed2c0ecda372219b Mon Sep 17 00:00:00 2001 From: thvmulle Date: Tue, 22 Oct 2024 16:21:46 +0200 Subject: [PATCH] Added json-output for the questions endpoint using the annotation partial --- app/views/courses/questions.json.jbuilder | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/app/views/courses/questions.json.jbuilder b/app/views/courses/questions.json.jbuilder index b1d4a2de66..56efbedf11 100644 --- a/app/views/courses/questions.json.jbuilder +++ b/app/views/courses/questions.json.jbuilder @@ -1 +1,11 @@ -json.array! @questions +json.unanswered do + json.array! @unanswered, partial: 'annotations/annotation', as: :annotation +end + +json.in_progress do + json.array! @in_progress, partial: 'annotations/annotation', as: :annotation +end + +json.answered do + json.array! @answered, partial: 'annotations/annotation', as: :annotation +end