Fix: enable correct detection of student surveys types by rejecting any

headers ending with '-1' (the variants of standard questions)
This commit is contained in:
rebuilt 2023-06-07 12:25:04 -07:00
parent 896f0d9961
commit ddf9a628d5

View file

@ -128,6 +128,7 @@ class SurveyItemValues
def survey_type
survey_item_ids = headers
.filter(&:present?)
.reject { |header| header.end_with?('-1') }
.filter { |header| header.start_with?('t-', 's-') }
SurveyItem.survey_type(survey_item_ids:)