Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Q
quby-compiler
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
This is an archived project. Repository and other project resources are read-only.
Show more breadcrumbs
RoQua
quby-compiler
Merge requests
!20
Serialize outcome tables from dsl calls into roqua.json
Code
Review changes
Check out branch
Download
Patches
Plain diff
Merged
Serialize outcome tables from dsl calls into roqua.json
jb_serialize_outcome_table_dsl
into
main
Overview
9
Commits
4
Pipelines
4
Changes
5
All threads resolved!
Show all comments
Merged
Jorn van de Beek
requested to merge
jb_serialize_outcome_table_dsl
into
main
3 years ago
Overview
9
Commits
4
Pipelines
4
Changes
5
All threads resolved!
Show all comments
Expand
#4 (closed)
0
0
Merge request reports
Compare
main
version 3
3f2199bf
3 years ago
version 2
d1475b47
3 years ago
version 1
3b40411e
3 years ago
main (base)
and
latest version
latest version
dd06274d
4 commits,
3 years ago
version 3
3f2199bf
3 commits,
3 years ago
version 2
d1475b47
2 commits,
3 years ago
version 1
3b40411e
1 commit,
3 years ago
5 files
+
125
−
17
Inline
Compare changes
Side-by-side
Inline
Show whitespace changes
Show one file at a time
Files
5
Search (e.g. *.vue) (Ctrl+P)
lib/quby/compiler/entities/outcome_table.rb
+
12
−
0
Options
@@ -15,6 +15,7 @@ module Quby
validates
:score_keys
,
:subscore_keys
,
:questionnaire
,
:key
,
presence:
true
validates
:name
,
presence:
true
,
if:
proc
{
|
table
|
table
.
default_collapsed
}
validate
:references_existing_score_keys
validate
:no_outcome_tables_defined_in_score_schemas
def
references_existing_score_keys
(
score_keys
-
questionnaire
.
score_schemas
.
values
.
map
(
&
:key
)).
each
do
|
missing_key
|
@@ -25,6 +26,17 @@ module Quby
errors
.
add
:subscore_keys
,
"
#{
missing_key
.
inspect
}
not found in subscore schemas"
end
end
def
no_outcome_tables_defined_in_score_schemas
if
questionnaire
.
score_schemas
.
values
.
any?
do
|
schema
|
schema
.
subscore_schemas
.
any?
do
|
subscore
|
subscore
.
outcome_table
!=
:main
end
end
errors
.
add
:score_schemas
,
"Outcome table associations defined in score schemas should not be combined with explicit outcome tables"
end
end
end
end
end
Loading