Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

🪲 Disable autosave on the code page when viewing a program #6148

Merged
merged 2 commits into from
Feb 4, 2025

Conversation

boryanagoncharenko
Copy link
Collaborator

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.

Copy link
Contributor

mergify bot commented Feb 3, 2025

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

Copy link
Contributor

mergify bot commented Feb 4, 2025

Thank you for contributing! Your pull request is now going on the merge train (choo choo! Do not click update from main anymore, and be sure to allow changes to be pushed to your fork).

@mergify mergify bot merged commit 3f2c029 into main Feb 4, 2025
11 checks passed
@mergify mergify bot deleted the autosave_6043 branch February 4, 2025 07:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

🪲 Weird inconsistency in teacher page program overview
2 participants