-
Notifications
You must be signed in to change notification settings - Fork 10
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
Allow user to select location of the old content folder during upgrade installation on windows #442
Conversation
Add input field to set the KA Lite content data path.
Hi @radinamatic can you verify the fix using this windows installer |
Ping @radinamatic :) |
Ping @radinamatic again :) |
Ok, tried the Windows installer linked above, and the implementation of the feature seems to work correctly:
However, I'm not sure if this feature only copies the
|
@radinamatic that doesn't sound perfect? Copying contents can be very expensive - I thought the point was to either change the |
I think changing the CONTENT_ROOT setting is probably preferable. |
@benjaoming Loosing the previously installed locales is definitely not the end of the world, as contentpacks can be re-downloaded, but I bet nobody would look favorably at loosing the database... I agree that copying the content may not be the most efficient solution, and if changing the |
I'm confused now. Are we talking about allowing the user to select the |
I am not sure which exact scenario inspired the original issue that prompted the work on this fix, it was long time ago... My guess is that we envisioned the possibility that the previous version stored content in some "non recommended" location, and the decision was to use the The point is that my original suggestion and this implementation of just copying the |
Closing this because of branch clean-up. Please reopen for |
@mrpau-richard do you have an answer to @radinamatic 's question above?
|
Hi @radinamatic I agree that setting the CONTENT_ROOT environment variable is more efficient than copying it to ./kalite folder. About the old database I think we can create an option to allow the user to import or not the existing database from the CONTENT_ROOT path. |
@mrpau-richard I agree, let's go with offering the user the option to import the old database during the upgrade! 👍 |
…-of-the-old-content-folder-during-upgrade-installation-on-windows
…of-the-old-content-folder-during-upgrade-installation-on-windows
@radinamatic here's the windows installer that allow's the user to import an existing database from the selected content folder. |
Ok, so to test this I moved the The new installer correctly detected the previous installation and reported that no content folder could be found. When prompted I selected the whole However, once the installation finished and I started the server, it required me to create the admin user again, which was the first sign something has gone awry. So I opened the The original db did have one learner user: @mrpau-richard Not sure which part has gone wrong, but the original database was not preserved during the upgrade process. |
@radinamatic the database isn't part of the content folder, this feature would only allow using videos stored in a specific location. Can you confirm that this is the intention @mrpau-richard ? |
@mrpau-richard Any reason we are not copying the
|
@radinamatic sorry, I wasn't aware how you test this. When the installer prompted you to select content folder it most be pointed at |
@radinamatic @mrpau-richard I think we should only aim for having the content folder imported. This is a far more common use case - we can see about the database folder another time. |
@mrpau-richard My bad, I'll retest and point to @benjaoming What if the facility had setup several classes/groups with many users? If the database is not imported during the upgrade, coach/admin will have to create them from the scratch, all the data for coach tools will be lost, and all the learners will loose their previously earned points. Am I missing something? Don't we want to preserve that...? |
You are right about this, but I think it's already preserved? Actually, I thought the change would also affect fresh installations, in which case I thought it was nice because users may have |
…of-the-old-content-folder-during-upgrade-installation-on-windows
@radinamatic here's the installer to test this PR again. @benjaoming I agree, That we allow the user to import their 'content' during fresh installation. Are we going to implement it on this PR? |
Maybe it's better to say "select" than "import" (as in the title of this PR) because it denotes that files are moved or copied. If you think it's easy to move this logic so it triggers both on fresh installs and upgrades, that'd be great! 👍 |
In update/upgrade scenarios from the more recent versions (where everything is already in
All completely true and I support us thinking of these scenarios, I'm just saying we should check if the user database is also sitting somewhere else than the default folder. I see @mrpau-richard already opened another issue to deal with that 👍 👏 , so I'll finish drilling about it here... 😛 |
@radinamatic here's the windows installer that's allow the user to select content folder during fresh and upgrade installation. |
I tested this and it seems to work OK, that is it ask the user to select the However, I'm worried if this option results confusing for the new and less savvy users... 🤔
|
Suggestion as an alternative to Radina's text:
The dialogue has the following potential purposes:
|
@radinamatic & @benjaoming I updated the alert message. you can grab the new installer here |
if Not DirExists(userKaliteContent) then | ||
begin | ||
if Not DirExists(contentPath) then | ||
begin |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
begin | ||
if MsgBox('You can also download contents after the installation. If you don`t have a folder with downloaded contents, press Cancel.', mbInformation, MB_YESNO or MB_DEFBUTTON1) = IDYES then | ||
begin | ||
if BrowseForFolder('Please select the .kalite/content/ folder', userPath, False) then |
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
This comment was marked as spam.
This comment was marked as spam.
Sorry, something went wrong.
@mrpau-richard I was commenting in the context of @radinamatic 's comment, so not thinking that my suggestion should stand by itself :)
My suggestion in full would be to replace this text:
With:
|
@benjaoming & @radinamatic I updated the dialog message as you guys suggested. You can grab the installer here for testing. |
I have been re-reading our conversation on this for a while now, have a grim impression that we've lost focus on what we are trying to achieve (probably good part is my fault too 😞), and I think that we need to pause and rewind. Not sure if it is the formatting issue for the text inside installer dialogs, or there might be some copy/paste errors between various versions of the message here, but I find this wording to be very unclear and potentially confusing to the user, especially if it is their first encounter with KA Lite. TL;DR versionAfter spending quite some time on writing all that below, I realized it will be much clearer if I made a drawing... 😛 Yeah, I want to read
This dialog should have two buttons at the bottom:
This dialog should have three buttons at the bottom:
If the user chooses This should take care of all three proposed purposes:
|
@radinamatic Just sharing my 2 cents here: Changing the content folder (to another drive for instance) after the installation is quite annoying as it requires:
I'm speaking as a user of the Python/Debian stuff... it doesn't matter if you have a helpful wizard or not. Actually, not having it is quite unhelpful, as it will unpack the existing pre-seeded content pack automatically and then you have to stop KA Lite and possibly create a new location for the content folder, symlink stuff (or change settings), copying over all the files of the older content folder.. But I like that we try to ask users the right questions during installation, and I think either way - the current simple dialogue (not sure if the displayed default path is correct) or a more intelligent flow that you suggests - will be a great improvement. |
@benjaoming I misunderstood the last option you were proposing initially - In that case that step (letting the user select the new location where the videos will be) should come before choosing where to search the content to import from, correct? This means that the above workflow needs some adjustments - I'll get right to that! |
Yes, this is true - thanks for observing this, as I was perhaps a bit in a hurry :) But yes, I'm trying to cater for users that are BOTH 1) installing for the first time and 2) upgrading and 3) re-installing to make another choice for the content folder (as this is a dialogue you do not find in KA Lite itself after installing) |
Note: The goal of closing this issue is to make something that's reusable in Kolibri |
Closing as wontfix |
Summary
Issues addressed
Fixes #341
/cc @cpauya @radinamatic