File tree Expand file tree Collapse file tree 1 file changed +15
-1
lines changed
Expand file tree Collapse file tree 1 file changed +15
-1
lines changed Original file line number Diff line number Diff line change 44
55json . schema 'https://github.com/RDA-DMP-Common/RDA-DMP-Common-Standard/tree/master/examples/JSON/JSON-schema/1.0'
66
7- presenter = Api ::V2 ::PlanPresenter . new ( plan : plan )
7+ presenter = Api ::V2 ::PlanPresenter . new ( plan : plan , complete : @complete )
88
99# Note the symbol of the dmproadmap json object
1010# nested in extensions which is the container for the json template object, etc.
@@ -68,5 +68,19 @@ unless @minimal
6868 json . title template . title
6969 end
7070 end
71+
72+ if @complete
73+ json . complete_plan do
74+ q_and_a = presenter . complete_plan_data
75+ next if q_and_a . blank?
76+
77+ json . array! q_and_a do |item |
78+ json . title item [ :title ]
79+ json . section item [ :section ]
80+ json . question item [ :question ]
81+ json . answer item [ :answer ]
82+ end
83+ end
84+ end
7185 end
7286end
You can’t perform that action at this time.
0 commit comments