replaced named level with progression when serializing script dsl #41714
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Starts https://codedotorg.atlassian.net/browse/PLAT-621.
Background
What are named levels and progressions?
By default, levels appear in a lesson like this:
If a progression is applied to multiple consecutive levels, it looks like this:
code-dot-org/dashboard/config/scripts/csp5-2018.script
Lines 27 to 31 in ab3e15e
code-dot-org/dashboard/config/scripts/csp5-2018.script
Line 17 in ab3e15e
display_name
property on the level:code-dot-org/dashboard/config/scripts/dance-extras.script
Line 8 in b5c8251
code-dot-org/dashboard/config/scripts/dance_party_extras_intro.external
Line 2 in eafc78a
If a named level has no display name, the level name is shown instead.
If a named level also has a progression, the progression takes precedence:
code-dot-org/dashboard/config/scripts/csp5-2018.script
Lines 181 to 183 in ab3e15e
Why do we want to get rid of named levels?
The new script editor does not support named levels. named levels are also redundant functionality, because the same goal can be accomplished by adding a progression. adding a progression is superior because it does not require finding the level and adding a display name to it, rather the name can be added without leaving the lesson editor.
Description
The plan is as follows:
Script.all.each(&:write_script_dsl)
on levelbuilder, which will remove named syntax from all .script filesnamed
syntax when seeding scripts from script DSLTesting story
named
andprogression
settings to confirm there is no visible change to end users