Skip to content
Snippets Groups Projects
Commit f5c9742b authored by Per 29 mei 2024 gedeeld account, daarvoor marten's avatar Per 29 mei 2024 gedeeld account, daarvoor marten
Browse files

Fix QubyProxy for nil titles

parent 6d961c14
Branches master
Tags v0.4.4
No related merge requests found
Pipeline #81456 passed
# 0.3.2
* Fix slashes-after-numbers removal when question does not have a title
# 0.3.1
* Slashes after numbers are now removed from question titles when making RoQua seeds (quests attribute).
......
PATH
remote: .
specs:
quby-compiler (0.3.1)
quby-compiler (0.3.2)
actionview (>= 5.0)
activemodel (>= 5.0)
activesupport (>= 5.0)
......@@ -74,10 +74,10 @@ GEM
mini_portile2 (2.5.0)
minitest (5.14.4)
naught (1.1.0)
nokogiri (1.11.1)
nokogiri (1.11.2)
mini_portile2 (~> 2.5.0)
racc (~> 1.4)
nokogumbo (2.0.4)
nokogumbo (2.0.5)
nokogiri (~> 1.8, >= 1.8.4)
pry (0.13.1)
coderay (~> 1.1)
......
......@@ -292,19 +292,19 @@ module Quby
def strip_question_number_slashes(quests)
quests.transform_values! do |value|
value.gsub /^(\s*\d+)\\/, '\1'
value&.gsub /^(\s*\d+)\\/, '\1'
end
end
def process_scores
scores_from_schemas
end
def scores_from_schemas
score_headers = [] # headers outcome (humanized name for subscores)
score_keys = [] # headers data-export (not all of it, just the score_subscore part, shortened)
score_labels = [] # score names outcome (humanized name for score as a whole)
questionnaire.score_schemas.values.each do |score_schema|
score_labels << score_schema.label
score_keys << score_schema.subscore_schemas.map do |subschema|
......@@ -318,18 +318,18 @@ module Quby
hash
end
end
headers = score_schema.subscore_schemas.map(&:label)
score_headers += headers - score_headers
end
{
headers: score_headers,
keys: score_keys,
labels: score_labels
}
end
class ShortenKeysUniq
def initialize
@seen_results = []
......
module Quby
module Compiler
VERSION = "0.3.1"
VERSION = "0.3.2"
end
end
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment