mirror of
https://github.com/edcommonwealth/sqm-dashboards.git
synced 2026-03-13 09:20:38 -07:00
feat: add seasonal academic years
This commit is contained in:
parent
0a27538747
commit
cf5c4f2d13
4 changed files with 26 additions and 14 deletions
|
|
@ -193,12 +193,12 @@ class SurveyItemValues
|
|||
|
||||
def value_from(pattern:)
|
||||
output = nil
|
||||
matches = headers.select do |header|
|
||||
pattern.match(header)
|
||||
end.map { |item| item.delete("\n") }
|
||||
matches = headers
|
||||
.select { |header| pattern.match(header) }
|
||||
.map { |item| item.delete("\n") }
|
||||
|
||||
matches.each do |match|
|
||||
output ||= row[match]&.strip
|
||||
output = matches.find do |match|
|
||||
row[match]&.strip == nil?
|
||||
end
|
||||
|
||||
return nil if output&.match?(%r{^#*N/*A$}i) || output.blank?
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue