Skip to content

Commit

Permalink
Added json-output for the questions endpoint using the annotation par…
Browse files Browse the repository at this point in the history
…tial
  • Loading branch information
thvmulle committed Oct 22, 2024
1 parent 9c5359b commit a58750b
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion app/views/courses/questions.json.jbuilder
Original file line number Diff line number Diff line change
@@ -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

0 comments on commit a58750b

Please sign in to comment.