Files in the .solution directory are overwriting the workspace directory

.Solution Directory is overwriting the files in the workspace directory

I have noticed several times now that labs have had their workspace directory files overwritten with the files in the .solution directory.

I believe this occurs while switching between the Starter and Solution files in Preview (without selecting “Save Files”). Has there been an update recently that would cause this behavior? I noticed it only this week after closing out a few tickets that were subsequently returned by QAI.The good news is it is only limited to a few labs and it is easily fixed, as long as one dobule checks the correct files are loading.

Hi Troy,

Thanks for letting us know about this potential issue. There haven’t been any recent changes that should have affected this functionality. I just did a quick test where I loaded the starter/solution files in the Creator while previewing the content and it worked fine in that test. Please let us know if you can confirm a case of this happening without ‘Save’ being pressed and we’ll investigate it further.

Hey, @andrew

I have had a hard time reproducing this as it seems really inconsistent.

I first noticed something was off when I fixed the same lab 3 times over the course of the day. By the 3rd time, I tripled checked to make sure that the process was correct. I noticed that Cengage’s QAI team sent back an unusual amount of tickets regarding the starter file all labs that were fixed last week.

I just now updated a lab’s starter and solution code (clicked “Save Files”) and when I returned to the lab only the file in the .solution directory was present. Unfortunately, I needed to fix this immediately and cannot provide you with a URL since the lab is live, but the best I was able to do was create a .gif of the italicized solution file in the tab bar appearing while the lab loaded and then disappearing a half-second later.

Also, no .solution directory is appearing in the sidebar or when using the terminal.
In the .gif below there is no action being taken by the user (i.e. mouse clicks)

Additional observations:

When entering the “Preview” mode, and loading the “Solution” option, the solution files will load.
When returning to “Edit” mode, both files, starter, and solution appear in the tab bar (one not italicized and one italicized); however, both files are the same, in this case, the solution file. Previously, the lab would return to the state in which it loaded. This appears to no longer be the expected behavior. It makes something like this possible:

I will look into it more this week to see if I can find/fix the issue. I haven’t been able to reproduce it yet, but it definitely sounds like like there is a bug here. As a temporary workaround you may want to download the files before loading/saving the solution files so that you can upload the starter files if they are no longer present. The files can be downloaded by clicking ‘Preview’, then using the same download button that is used outside of the Creator.

I believe the gif shows the correct behavior. Solution files are shown with the filename italicized in the tab bar. Solution files are also not displayed to users, so if the lab is saved with a solution file tab open and a user opens that lab, the solution file tab may be shown briefly before being closed, as is shown in the gif. To avoid the solution file tab being displayed at all, the solution file tab should be closed before the files are saved in the creator.

Hey @andrew
Thanks! Just so you know and for your schedule this is not an immediate priority.

FYI - the attached .gif file is the filetree when launching the lab as a creator, not as a student and not in preview mode. The environment (using ls -a) only listed the 1 file in the Filetree, as shown, so that second italicized file should not be showing up in the tab bar at all. It is a fresh editing instance with no interface interaction.

1 Like

Hi @TroyDundas,

Sorry for the delay getting back to you. We’ve found a bug with the file download logic in the Creator that can cause the downloaded files to overwrite the currently saved starter files. We’re working on a fix for this.

Did you download the project files from the Creator when you observed this issue?