diff --git a/.github/workflows/build_pex.yml b/.github/workflows/build_pex.yml index 25b052d671..38ce2b232f 100644 --- a/.github/workflows/build_pex.yml +++ b/.github/workflows/build_pex.yml @@ -21,7 +21,7 @@ jobs: pex-file-name: ${{ steps.get-pex-filename.outputs.pex-file-name }} steps: - uses: actions/checkout@v4 - - uses: actions/cache@v3 + - uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }} diff --git a/.github/workflows/build_whl.yml b/.github/workflows/build_whl.yml index a692b37913..958161f2f1 100644 --- a/.github/workflows/build_whl.yml +++ b/.github/workflows/build_whl.yml @@ -42,7 +42,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Cache Node.js modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} @@ -53,14 +53,14 @@ jobs: yarn --frozen-lockfile npm rebuild node-sass - name: Cache Python dependencies - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-${{ hashFiles('requirements/*.txt') }} restore-keys: | ${{ runner.os }}-pip- - name: Cache C extensions - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: cext_cache key: ${{ runner.os }}-cext-${{ hashFiles('requirements/cext*.txt') }} diff --git a/.github/workflows/c_extensions.yml b/.github/workflows/c_extensions.yml index 3becb0dbd7..cbf0583aed 100644 --- a/.github/workflows/c_extensions.yml +++ b/.github/workflows/c_extensions.yml @@ -36,7 +36,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-ext-${{ hashFiles('requirements/*.txt') }} @@ -76,7 +76,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-no-ext-${{ hashFiles('requirements/*.txt') }} diff --git a/.github/workflows/check_docs.yml b/.github/workflows/check_docs.yml index 2237298374..592c2673ca 100644 --- a/.github/workflows/check_docs.yml +++ b/.github/workflows/check_docs.yml @@ -35,7 +35,7 @@ jobs: with: python-version: 3.9 - name: pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-docs-${{ hashFiles('requirements/docs.txt') }} diff --git a/.github/workflows/check_licenses.yml b/.github/workflows/check_licenses.yml index 54c0dde3bd..71f26a7505 100644 --- a/.github/workflows/check_licenses.yml +++ b/.github/workflows/check_licenses.yml @@ -35,7 +35,7 @@ jobs: with: node-version: '18.x' - name: Cache Node.js modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: '**/node_modules' key: ${{ runner.OS }}-node-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/no_zombies.yml b/.github/workflows/no_zombies.yml index 78b1787b41..ba260032fe 100644 --- a/.github/workflows/no_zombies.yml +++ b/.github/workflows/no_zombies.yml @@ -34,7 +34,7 @@ jobs: with: python-version: '3.11' - name: pip cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ~/.cache/pip key: ${{ runner.os }}-pip-base-${{ hashFiles('requirements/base.txt') }} diff --git a/.github/workflows/postgres.yml b/.github/workflows/postgres.yml index 846c455ec1..c0f7aa4eed 100644 --- a/.github/workflows/postgres.yml +++ b/.github/workflows/postgres.yml @@ -42,7 +42,7 @@ jobs: python -m pip install --upgrade pip pip install tox - name: tox env cache - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ github.workspace }}/.tox/py3.9 key: ${{ runner.os }}-tox-py3.9-${{ hashFiles('requirements/*.txt') }} diff --git a/.github/workflows/pre-commit.yml b/.github/workflows/pre-commit.yml index e8d87375d1..aa76529ba2 100644 --- a/.github/workflows/pre-commit.yml +++ b/.github/workflows/pre-commit.yml @@ -41,7 +41,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Cache Node.js modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/.github/workflows/tox.yml b/.github/workflows/tox.yml index e502bd5d68..332997bfe6 100644 --- a/.github/workflows/tox.yml +++ b/.github/workflows/tox.yml @@ -46,7 +46,7 @@ jobs: pip install "tox<4" - name: tox env cache if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }} key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }} @@ -68,7 +68,7 @@ jobs: pip install "tox<4" - name: tox env cache if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ github.workspace }}/.tox/py2.7 key: ${{ runner.os }}-tox-py2.7-${{ hashFiles('requirements/*.txt') }} @@ -112,7 +112,7 @@ jobs: pip install "tox<4" - name: tox env cache if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ github.workspace }}/.tox/py3.9 key: ${{ runner.os }}-tox-py3.9-${{ hashFiles('requirements/*.txt') }} @@ -142,7 +142,7 @@ jobs: pip install "tox<4" - name: tox env cache if: ${{ needs.pre_job.outputs.should_skip != 'true' }} - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ github.workspace }}/.tox/py${{ matrix.python-version }} key: ${{ runner.os }}-tox-py${{ matrix.python-version }}-${{ hashFiles('requirements/*.txt') }} diff --git a/.github/workflows/yarn.yml b/.github/workflows/yarn.yml index 3041860e73..8ffcf7d55f 100644 --- a/.github/workflows/yarn.yml +++ b/.github/workflows/yarn.yml @@ -38,7 +38,7 @@ jobs: id: yarn-cache-dir-path run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT - name: Cache Node.js modules - uses: actions/cache@v3 + uses: actions/cache@v4 with: path: ${{ steps.yarn-cache-dir-path.outputs.dir }} key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} diff --git a/docs/backend_architecture/content/index.rst b/docs/backend_architecture/content/index.rst index 8eb702455a..dd21aae554 100644 --- a/docs/backend_architecture/content/index.rst +++ b/docs/backend_architecture/content/index.rst @@ -6,7 +6,6 @@ This is a core module found in ``kolibri/core/content``. .. toctree:: :maxdepth: 1 - models concepts_and_definitions implementation api_methods diff --git a/docs/backend_architecture/content/models.rst b/docs/backend_architecture/content/models.rst deleted file mode 100644 index f3e260b918..0000000000 --- a/docs/backend_architecture/content/models.rst +++ /dev/null @@ -1,5 +0,0 @@ -Models -====== - -.. automodule:: kolibri.core.content.models - :members: diff --git a/docs/conf.py b/docs/conf.py index 488a87e8d4..59259452e9 100644 --- a/docs/conf.py +++ b/docs/conf.py @@ -189,7 +189,7 @@ def setup(app): # Register the docstring processor with sphinx app.connect("autodoc-process-docstring", process_docstring) # Add our custom CSS overrides - app.add_stylesheet("theme_overrides.css") + app.add_css_file("theme_overrides.css") # If not '', a 'Last updated on:' timestamp is inserted at every page bottom, diff --git a/docs/howtos/another_kolibri_instance.md b/docs/howtos/another_kolibri_instance.md index ec703a0fda..33d55019b2 100644 --- a/docs/howtos/another_kolibri_instance.md +++ b/docs/howtos/another_kolibri_instance.md @@ -1,3 +1,5 @@ +# Running another Kolibri instance alongside the development server + This guide will walk you through the process of setting up and running another instance of Kolibri alongside your development server using the `pex` executable. ## Introduction diff --git a/docs/howtos/another_kolibri_instance.rst b/docs/howtos/another_kolibri_instance.rst deleted file mode 100644 index b011f4d6b8..0000000000 --- a/docs/howtos/another_kolibri_instance.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _another_kolibri_instance: - -Running another Kolibri instance alongside the development server -================================================================= - -.. mdinclude:: ./another_kolibri_instance.md diff --git a/docs/howtos/installing_pyenv.md b/docs/howtos/installing_pyenv.md index 7319c02113..c10292031e 100644 --- a/docs/howtos/installing_pyenv.md +++ b/docs/howtos/installing_pyenv.md @@ -1,3 +1,5 @@ +## Installing pyenv + ### Prerequisites [Git](https://git-scm.com/) installed. diff --git a/docs/howtos/installing_pyenv.rst b/docs/howtos/installing_pyenv.rst deleted file mode 100644 index 98cfb59c10..0000000000 --- a/docs/howtos/installing_pyenv.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _installing_pyenv: - -Installing pyenv -================ - -.. mdinclude:: ./installing_pyenv.md diff --git a/docs/howtos/nodeenv.md b/docs/howtos/nodeenv.md index 6b2f7c5f98..d33a48b173 100644 --- a/docs/howtos/nodeenv.md +++ b/docs/howtos/nodeenv.md @@ -1,3 +1,5 @@ +# Using nodeenv + ## Instructions Once you've created a python virtual environment, you can use `nodeenv` to install particular versions of node.js within the environment. This allows you to use a different node.js version in the virtual environment than what's available on your host, keep multiple virtual enviroments with different versions of node.js, and to install node.js "global" modules that are only available within the virtual environment. diff --git a/docs/howtos/nodeenv.rst b/docs/howtos/nodeenv.rst deleted file mode 100644 index 67cc908dc2..0000000000 --- a/docs/howtos/nodeenv.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _nodeenv: - -Using nodeenv -============= - -.. mdinclude:: ./nodeenv.md diff --git a/docs/howtos/pyenv_virtualenv.md b/docs/howtos/pyenv_virtualenv.md index acbbb94f26..918087b535 100644 --- a/docs/howtos/pyenv_virtualenv.md +++ b/docs/howtos/pyenv_virtualenv.md @@ -1,3 +1,5 @@ +## Using pyenv-virtualenv + ### Virtual Environments Virtual environments allow a developer to have an encapsulated Python environment, using a specific version of Python, and with dependencies installed in a way that only affect the virtual environment. This is important as different projects or even different versions of the same project may have different dependencies, and virtual environments allow you to switch between them seamlessly and explicitly. diff --git a/docs/howtos/pyenv_virtualenv.rst b/docs/howtos/pyenv_virtualenv.rst deleted file mode 100644 index c98277a1af..0000000000 --- a/docs/howtos/pyenv_virtualenv.rst +++ /dev/null @@ -1,6 +0,0 @@ -.. _pyenv_virtualenv: - -Using pyenv-virtualenv -====================== - -.. mdinclude:: ./pyenv_virtualenv.md diff --git a/kolibri/core/assets/src/composables/useUser.js b/kolibri/core/assets/src/composables/useUser.js index 479f2ae81d..a61c4841b4 100644 --- a/kolibri/core/assets/src/composables/useUser.js +++ b/kolibri/core/assets/src/composables/useUser.js @@ -9,6 +9,7 @@ export default function useUser() { const isAdmin = computed(() => store.getters.isAdmin); const isSuperuser = computed(() => store.getters.isSuperuser); const canManageContent = computed(() => store.getters.canManageContent); + const isAppContext = computed(() => store.getters.isAppContext); return { isLearnerOnlyImport, @@ -18,5 +19,6 @@ export default function useUser() { isAdmin, isSuperuser, canManageContent, + isAppContext, }; } diff --git a/kolibri/core/assets/src/utils/browserInfo.js b/kolibri/core/assets/src/utils/browserInfo.js index 412b0d9249..f78e728bc7 100644 --- a/kolibri/core/assets/src/utils/browserInfo.js +++ b/kolibri/core/assets/src/utils/browserInfo.js @@ -64,30 +64,6 @@ export const os = { patch: osVersion[2], }; -/** - * Detection of whether an Android device is using WebView based on - * https://developer.chrome.com/multidevice/user-agent#webview_user_agent - * First checks for 'wv' (Lolipop+), then for 'Version/x.x' - */ -const isAndroid = os.name === 'Android'; -export const isAndroidWebView = - isAndroid && - (browser.name === 'Chrome Webview' || - (browser.name === 'Chrome' && /Version\/\d+\.\d+/.test(userAgent))); - -/** - * Embedded WebViews on Mac have no app identifier, while all the major browsers do, so check - * for browser app strings and mark as embedded if none are found. - */ -const isMac = os.name === 'Mac OS'; -export const isMacWebView = - isMac && !(/Safari/.test(userAgent) || /Chrome/.test(userAgent) || /Firefox/.test(userAgent)); - -/** - * All web views - */ -export const isEmbeddedWebView = isAndroidWebView || isMacWebView; - // Check for presence of the touch event in DOM or multi-touch capabilities export const isTouchDevice = 'ontouchstart' in window || diff --git a/kolibri/core/assets/src/views/ContentRenderer/DownloadButton.vue b/kolibri/core/assets/src/views/ContentRenderer/DownloadButton.vue index 7429efb3e5..7a7283e83e 100644 --- a/kolibri/core/assets/src/views/ContentRenderer/DownloadButton.vue +++ b/kolibri/core/assets/src/views/ContentRenderer/DownloadButton.vue @@ -20,12 +20,19 @@