-
Notifications
You must be signed in to change notification settings - Fork 301
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
🪲 Disable autosave on the code page when viewing a program (#6148)
The feature for automatic saving and loading of programs is a bit too aggressive and loads a locally stored program even when we open the code page (/hedy or /tryit) to see a concrete user program. The proposed solution is to turn off the auto-loading when the code page (/hedy or /tryit) requested with a specific program id. As a summary, if the code page is opened like this /hedy/1, the auto-saving should work as expected. If the code page is opened via /hedy/1/0dc61ace147b46ecbd2c71f1c3fc6c88 (logged as teacher 1), the auto-saving will be disabled. Note that it will be disabled also when moving to other adventure tabs. It will be enabled once we move away from this URL. Fixes #6043 **How to test** - Run Hedy locally and log in as teacher 1 - Navigate to /hedy/1 and in the introduction adventure add code to the editor, e.g. `print this is autosaved`. Move to another adventure tab, so that this program is saved locally (you should be able to see a message in the console) - Go to For-Teachers and then to the overview of class 1. Then click on the eye icon of the Introduction submission of student1. When the program is opened on the program-view page, click the Edit button. - Now the code page should be loaded with the student program loaded and NOT with your local program.
- Loading branch information
1 parent
9c66bb6
commit 3f2c029
Showing
4 changed files
with
14 additions
and
8 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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
Large diffs are not rendered by default.
Oops, something went wrong.