show more detailed name info for blockly levels in LevelToken #37969
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.
Curriculum Writers commented that it is important to have good level names, since it can be hard to see what changed after dragging and dropping a level. With this in mind, I noticed that levels which are defined in levels.js files all appear as "blockly" in the Lesson editor:
This PR makes a simple fix which is to use the level "key" instead of the name. This is the same as the level name for levelbuilder-created levels, but gives more detail than just "blockly" for levels defined in levels.js files:
code-dot-org/dashboard/app/models/levels/level.rb
Lines 491 to 497 in 76a05d3
This is where the key is getting set:
code-dot-org/dashboard/app/models/script_level.rb
Line 402 in ab81d45
Testing story
This seems like a small enough change that I just did manual testing to verify. I confirmed the improvement in the screenshots above, and also checked that levelbuilder-defined levels in other lessons are still showing up as they did previously:
Reviewer Checklist: