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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: In Progress
Development

Successfully merging this pull request may close these issues.

🪲 Weird inconsistency in teacher page program overview
1 participant