Allow creation of presets from existing install via Content Menu UI#634
Allow creation of presets from existing install via Content Menu UI#634misaochan wants to merge 7 commits intoiiab:wip-01from
Conversation
|
@tim-moody Ready for review. :) |
| def get_kolibri_lang(): | ||
| kolibri_db = '/library/kolibri/db.sqlite3' | ||
| conn = sqlite3.connect(kolibri_db) | ||
| cur = conn.execute('SELECT language_id FROM device_devicesettings LIMIT 1') |
There was a problem hiding this comment.
This is per device and not per channel?
| map_cmd_info = cmd_info | ||
| map_list = content['maps'] | ||
| for map in map_list: | ||
| map_cmd_info = cmd_info |
There was a problem hiding this comment.
Fixes a pre-existing bug where the maps loop crashes if pseudo_cmd_handler returns None for any map entry. Noticed it because fr-school had multiple maps and I ran a re-installation.
|
zim_list = content['zims'] So is this problem there for all content types and removing kalite {} was a mistake? |
|
So kalite_vars doesn't actually do anything now, which is why I removed it. The problem does exist for all content types though. It can be fixed by: Happy to add those to this PR as well if you want. |
|
go ahead and make those changes |
|
@tim-moody All done. Tested by installing en-school, which has quite a few ZIMs, all jobs scheduled successfully. |
|
merged against master |
|
yes. I think I messed up and did not merge wip-01. In any event I
outsmarted myself, so let's just work on master. I believe master is up to
date
…On Thu, Mar 26, 2026 at 2:27 PM Josephine Lim ***@***.***> wrote:
*misaochan* left a comment (iiab/iiab-admin-console#634)
<#634?email_source=notifications&email_token=ABLKNCZ632C3RIZS2NR2IML4SVZCRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJTG4ZDOMZTGE22M4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4137273315>
Thanks for merge! Can we close the related issues? #623
<#623> #624
<#624> #626
<#626> The automatic
closure via PR doesn't work as the master merge was done directly from my
branch instead of from the PR.
—
Reply to this email directly, view it on GitHub
<#634?email_source=notifications&email_token=ABLKNCZ632C3RIZS2NR2IML4SVZCRA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJTG4ZDOMZTGE22M4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4137273315>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLKNC33KMDW2DXQT6W3U234SVZCRAVCNFSM6AAAAACWX3FMFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCMZXGI3TGMZRGU>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
|
Haha all good! Yeah, I'll submit my future PRs to master. :) |
|
Keep an eye out for anything I didn't merge.
…On Thu, Mar 26, 2026 at 2:36 PM Josephine Lim ***@***.***> wrote:
*misaochan* left a comment (iiab/iiab-admin-console#634)
<#634?email_source=notifications&email_token=ABLKNC45RAM2B3PR6A6GOPD4SV2EPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJTG4ZTENZTGM3KM4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4137327336>
Haha all good! Yeah, I'll submit my future PRs to master. :)
—
Reply to this email directly, view it on GitHub
<#634?email_source=notifications&email_token=ABLKNC45RAM2B3PR6A6GOPD4SV2EPA5CNFSNUABFM5UWIORPF5TWS5BNNB2WEL2JONZXKZKDN5WW2ZLOOQXTIMJTG4ZTENZTGM3KM4TFMFZW63VMON2GC5DFL5RWQYLOM5S2KZLWMVXHJNLQOJPWG33NNVSW45C7N5YGK3S7MNWGSY3L#issuecomment-4137327336>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/ABLKNC4C6DA75HLO6GEDSN34SV2EPAVCNFSM6AAAAACWX3FMFWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHM2DCMZXGMZDOMZTGY>
.
You are receiving this because you modified the open/close state.Message
ID: ***@***.***>
|
|
You should have everything, I think - I can see that my whole branch was merged in. I'll let you know if I find any issues. |
|
Oh, I don't have permissions to close the issues btw. |

Part 2 (final part), closes #623 . Also resolves #624 and #626 . Tested multiple scenarios as seen below, running on VirtualBox with Ubuntu 24.04.4.
The Content Menu now has a "Create a Content Collection" panel that allows users to create a preset from their existing install, including Kolibri channels. All the fields in preset.json can be filled in, except for size_in_gb and last_modified, which are computed automatically.
Test scenario with successful creation and import
Clicking "Create" triggers mk-preset.py. For instance, in this test case I am creating a preset after downloading the PointB Kolibri channel.
In Install Content > Quick Pick, the user will then see their new preset in the list.
And when they import that preset, the PointB Kolibri channel
"channel_id": "254f1b384c2551ed80ada423449212a1"is automatically downloaded.Test scenario where the preset name filled in by the user is the same as a supplied preset name.
Creation of the preset is blocked.
Test scenario where the preset name filled in by the user is the same as an existing preset name, but NOT a supplied preset name.
A warning is shown and the user can choose to overwrite if desired.