Web Lab 2: allow submittable levels#67515
Merged
Merged
Conversation
… on submit button" This reverts commit 76d845e.
molly-moen
approved these changes
Aug 4, 2025
| #special-levels.in.collapse | ||
| -# Dance and Spritelab are special types of Gamelab levels | ||
| - if @level.is_a?(Gamelab) || @level.is_a?(Applab) || @level.is_a?(Weblab) || @level.is_a?(FreeResponse) || @level.is_a?(Javalab) || @level.is_a?(Pythonlab) || @level.is_a?(Music) || @level.is_a?(Aichat) | ||
| - if @level.respond_to?(:submittable) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Adds the option to mark a Web Lab 2 level as as submittable.
As a bit of cleanup, I made the
submittablecheckbox visible for level types that are configured to be submittable.The only two level types that list submittable as a serialized property but weren't in the list of levels where this UI is shown are
ailabandpanels. I looked in the level directories for those two level types and saw no mention of submittable being set, so I think it is safe to remove.Links
Testing story
Tested manually that on a Web Lab 2 level with
submittableset to true that the Submit button a) started disabled, b) became enabled once edited, and c) I got a popup to submit it on click. On page reload, the "Unsubmit" button appeared.I also tested that switching between a Web Lab 2 and another Lab2 level (eg, Python Lab) in the same lesson that the
hasRunflag was reset appropriately.