From 962f1eb2ec0b1360d4bec36a41d1666cc76c710f Mon Sep 17 00:00:00 2001 From: ndrewh Date: Mon, 22 Nov 2021 14:54:00 -0500 Subject: [PATCH] Add points_possible to censored quiz_question API Currently the API does not return points_possible for questions from the quiz_question API when returning a "censored" response. Since currently Graders get censored responses from this API, this makes it very difficult to grade questions via the API. --- lib/api/v1/quiz_question.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/api/v1/quiz_question.rb b/lib/api/v1/quiz_question.rb index 9c9c8fa09415..22f9100b4e40 100644 --- a/lib/api/v1/quiz_question.rb +++ b/lib/api/v1/quiz_question.rb @@ -125,7 +125,7 @@ def censor(question_data) attr_whitelist = %w[ id position quiz_group_id quiz_id assessment_question_id assessment_question question_name question_type question_text answers matches - formulas variables answer_tolerance formula_decimal_places + formulas variables answer_tolerance formula_decimal_places points_possible ] question_data.keep_if { |k, _v| attr_whitelist.include?(k.to_s) }