Skip to content

Conversation

@bencodeorg
Copy link
Contributor

@bencodeorg bencodeorg commented Aug 1, 2025

Adds the option to mark a Web Lab 2 level as as submittable.

As a bit of cleanup, I made the submittable checkbox 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 ailab and panels. 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 submittable set 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 hasRun flag was reset appropriately.

@bencodeorg bencodeorg requested a review from a team August 4, 2025 20:52
#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)
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice!

@bencodeorg bencodeorg merged commit d0b0ffc into staging Aug 4, 2025
6 checks passed
@bencodeorg bencodeorg deleted the ben/weblab2-submittable branch August 4, 2025 22:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants