Repository navigation
«Tests» and «Visualisieren» store the block like ▶ (P29) - #27
Merged
Merged
Conversation
LiaScript stores a code block (a new entry in its code history, kept across a reload and, from a course's version 1.0.0 on, across closing the tab) when the block runs through its own run action. ▶ clicks LiaScript's hidden run button; «Tests» and «Visualisieren» talked to glpython directly, so a learner who only pressed «Tests» lost the change on reload. Now they click LiaScript's run button too, with the command they stand for noted in the session. LiaScript's per-run script calls session.run as before, and run then sends that command instead of a run - Python runs once, and the console shows what it showed before. LiaScript adds no version for unchanged code. A note older than 10 seconds is dropped; without LiaScript's button the command goes to glpython directly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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.
P29: until now a block was only stored after ▶. A learner who pressed only «Tests», the main button in Etappe 2, lost the change on reload.
How it works
version: 1.0.0on, across closing the tab) and runs the per-run script, which callssession.run(source).commandAfterLiaRun).run, called by the per-run script, then sends that command instead ofglpython:run. Python runs once, and the console shows what it showed before.@Notizstores its fields the same way (it clicks LiaScript's run button).-noten.py/+main.py): LiaScript stores the whole group, as with ▶.features=tests: unchanged. «Visualisieren» stores there too.Tested in LiaScript
Hosted player in Chrome. A course with
version: 1.0.0, this macro served locally, the deployed embed. Inside the embed frame I recorded every message from the macro, to count runs.noten.py+main.py["glpython:test"]; console «Programm läuft · 1 von 1 Beispielen bestanden» (output once, report once)["glpython:test"]; «Hauptprogramm · 1 von 1 …»["glpython:test"]["glpython:visualize"]["glpython:visualize"]["glpython:run"]["glpython:run"]Before (macro on
main), same test: after «Tests» and «Visualisieren» the version stays at 0, and after a reload the change is gone.check-macropasses.Your manual tests
version: 1.0.0(Etappe 2):-noten.py/+main.py): changenoten.py, «Tests», reload. The change is kept.tests(e.g.@Code.erkunden): «Visualisieren» stores it.version: 1.0.0).Follow-ups
🤖 Generated with Claude Code