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

merge #7

Merged
merged 55 commits into from
Jan 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
55 commits
Select commit Hold shift + click to select a range
c33882e
Attempted to fix race condition through using locks. Added 2 test cas…
adviti-mishra Dec 5, 2023
1c8514b
Create test_pr_1150_keyerror.yml
adviti-mishra Dec 5, 2023
a8c41f8
Update test_pr_1150_keyerror.yml
adviti-mishra Dec 5, 2023
c6e2bc2
Merge branch 'release-v0.16.x' of https://github.com/adviti-mishra/ko…
adviti-mishra Dec 5, 2023
8e14f03
Merge branch 'learningequality:release-v0.16.x' into release-v0.16.x
adviti-mishra Dec 5, 2023
327877c
Merge branch 'release-v0.16.x' of https://github.com/adviti-mishra/ko…
adviti-mishra Dec 5, 2023
799e3f6
Deleted our GitHub workflow that tests our fix because existing workf…
adviti-mishra Dec 5, 2023
6d34bd5
Made formatted string compatible with Python 2.7
adviti-mishra Dec 6, 2023
44b3e0e
set localStorage key after channels are not present
ozer550 Jan 8, 2024
eb5b178
fix welcome modal appearance for first imported user in LOD
ozer550 Jan 11, 2024
4a8f4d6
fix:username-disambiguation
nick2432 Jan 11, 2024
de2566c
fix:username-disambiguation
nick2432 Jan 12, 2024
5bd813d
fix:username-disambiguation
nick2432 Jan 12, 2024
f414796
fix:username-disambiguation
nick2432 Jan 13, 2024
1684f87
fix:username-disambiguation
nick2432 Jan 13, 2024
95cd650
Merge pull request #5 from learningequality/release-v0.16.x
nick2432 Jan 13, 2024
fc48429
Swap on-my-own const for using the existing Personal const, to preven…
marcellamaki Nov 8, 2023
a14933c
Add computed prop to guard against invalid presets
marcellamaki Jan 15, 2024
d6fd8eb
Catch badly formed UUIDs passed to facility parameter
rtibbles Jan 17, 2024
ec94928
Unpin docs requirements.
rtibbles Jan 17, 2024
13db9c6
Simplify code to minimize diff.
rtibbles Jan 17, 2024
6053e07
Fix linting.
rtibbles Jan 17, 2024
adc090e
add isLearnerOnlyImport check in device page
ozer550 Jan 17, 2024
11421e0
username-validation
nick2432 Jan 17, 2024
9d9166e
Merge pull request #11591 from adviti-mishra/release-v0.16.x
rtibbles Jan 17, 2024
a01fbf0
Merge pull request #11735 from learningequality/rtibbles-patch-1
jredrejo Jan 17, 2024
826ef10
simplify advancement to next step, and remove call to non-existent SE…
marcellamaki Jan 17, 2024
8984add
replaced isEmbeddedWebView with isAppContext from a userUser composable
AllanOXDi Jan 11, 2024
bb83054
removes definitions of isAndroidWebView and isMacWebView
AllanOXDi Jan 11, 2024
426ff31
added negation to the isAppContext
AllanOXDi Jan 11, 2024
f6a0471
Update test_api.py
nick2432 Jan 18, 2024
1796e8a
username-validation
nick2432 Jan 18, 2024
68d9eed
username-validation
nick2432 Jan 18, 2024
fa335c8
Merge pull request #11736 from rtibbles/docs_fix_again
MisRob Jan 18, 2024
bd4d77c
Remove coach page specific sub nav toggling. Defer to main AppBar com…
rtibbles Jan 18, 2024
a51a1e7
Merge pull request #11514 from marcellamaki/on-my-own-consts
rtibbles Jan 18, 2024
482a3a4
Merge pull request #11708 from ozer550/fix-welcome-modal-edge-cases
rtibbles Jan 18, 2024
765a54b
Merge pull request #11716 from nick2432/username-case-error
rtibbles Jan 18, 2024
cde93f0
Merge pull request #11740 from rtibbles/no_download_buttons_in_app_co…
rtibbles Jan 18, 2024
6fbb424
Bump css-minimizer-webpack-plugin from 5.0.1 to 6.0.0
dependabot[bot] Jan 19, 2024
d7e6237
Bump the github group with 1 update
dependabot[bot] Jan 19, 2024
1f3a554
Fix to Env Var and Config persisting in options.ini in KOLIBRI_HOME (…
thesujai Jan 19, 2024
c4ff5bf
Merge pull request #11747 from learningequality/dependabot/npm_and_ya…
rtibbles Jan 19, 2024
0f182a3
Merge pull request #11748 from learningequality/dependabot/github_act…
rtibbles Jan 19, 2024
d07f9bb
username-validation
nick2432 Jan 19, 2024
9652e51
username-validation
nick2432 Jan 19, 2024
5bc2159
Removes uncleaned up reference to isAndroidWebview.
rtibbles Jan 19, 2024
a579274
Merge pull request #11744 from rtibbles/coach_app_nav_bar
rtibbles Jan 19, 2024
5e31d02
Turn on learner resource download by default for on my own setup.
rtibbles Jan 19, 2024
ce3bacd
Merge pull request #11750 from rtibbles/full_screens_for_everyone
rtibbles Jan 19, 2024
1a051d4
Merge pull request #11752 from rtibbles/on_my_own_download
rtibbles Jan 19, 2024
7a0d5da
Prevent learner only devices from being shown as an import source whe…
rtibbles Jan 19, 2024
8726d0a
Hide confusing string.
rtibbles Jan 19, 2024
e80feb9
Merge pull request #11756 from rtibbles/soud_o_facilities
rtibbles Jan 19, 2024
fc94f27
Merge pull request #11739 from nick2432/username-validation
jredrejo Jan 22, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build_pex.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/build_whl.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand All @@ -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') }}
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/c_extensions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down Expand Up @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/check_licenses.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/no_zombies.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/postgres.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/pre-commit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/tox.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand All @@ -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') }}
Expand Down Expand Up @@ -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') }}
Expand Down Expand Up @@ -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') }}
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/yarn.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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') }}
Expand Down
1 change: 0 additions & 1 deletion docs/backend_architecture/content/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ This is a core module found in ``kolibri/core/content``.
.. toctree::
:maxdepth: 1

models
concepts_and_definitions
implementation
api_methods
Expand Down
5 changes: 0 additions & 5 deletions docs/backend_architecture/content/models.rst

This file was deleted.

2 changes: 1 addition & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down
2 changes: 2 additions & 0 deletions docs/howtos/another_kolibri_instance.md
Original file line number Diff line number Diff line change
@@ -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
Expand Down
6 changes: 0 additions & 6 deletions docs/howtos/another_kolibri_instance.rst

This file was deleted.

2 changes: 2 additions & 0 deletions docs/howtos/installing_pyenv.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
## Installing pyenv

### Prerequisites

[Git](https://git-scm.com/) installed.
Expand Down
6 changes: 0 additions & 6 deletions docs/howtos/installing_pyenv.rst

This file was deleted.

2 changes: 2 additions & 0 deletions docs/howtos/nodeenv.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
6 changes: 0 additions & 6 deletions docs/howtos/nodeenv.rst

This file was deleted.

2 changes: 2 additions & 0 deletions docs/howtos/pyenv_virtualenv.md
Original file line number Diff line number Diff line change
@@ -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.
Expand Down
6 changes: 0 additions & 6 deletions docs/howtos/pyenv_virtualenv.rst

This file was deleted.

2 changes: 2 additions & 0 deletions kolibri/core/assets/src/composables/useUser.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand All @@ -18,5 +19,6 @@ export default function useUser() {
isAdmin,
isSuperuser,
canManageContent,
isAppContext,
};
}
24 changes: 0 additions & 24 deletions kolibri/core/assets/src/utils/browserInfo.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 ||
Expand Down
11 changes: 9 additions & 2 deletions kolibri/core/assets/src/views/ContentRenderer/DownloadButton.vue
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,19 @@

<script>

import { isEmbeddedWebView } from 'kolibri.utils.browserInfo';
import useUser from 'kolibri.coreVue.composables.useUser';
import { getFilePresetString } from './filePresetStrings';
import { getRenderableFiles } from './utils';

export default {
name: 'DownloadButton',
setup() {
const { isAppContext } = useUser();

return {
isAppContext,
};
},
props: {
files: {
type: Array,
Expand All @@ -41,7 +48,7 @@
return getRenderableFiles(this.files).filter(file => file.preset !== 'exercise');
},
canDownload() {
return !isEmbeddedWebView && this.downloadableFiles.length;
return !this.isAppContext && this.downloadableFiles.length;
},
fileOptions() {
const options = this.files.map(file => {
Expand Down
11 changes: 4 additions & 7 deletions kolibri/core/assets/src/views/CoreFullscreen.vue
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@
<script>

import ScreenFull from 'screenfull';
import { isAndroidWebView } from 'kolibri.utils.browserInfo';

const fullscreenApiIsSupported = ScreenFull.isEnabled && !isAndroidWebView;

const NORMALIZE_FULLSCREEN_CLASS = 'normalize-fullscreen';
const MIMIC_FULLSCREEN_CLASS = 'mimic-fullscreen';
Expand All @@ -32,7 +29,7 @@
computed: {
fullscreenClass() {
if (this.isInFullscreen) {
return fullscreenApiIsSupported ? NORMALIZE_FULLSCREEN_CLASS : MIMIC_FULLSCREEN_CLASS;
return ScreenFull.isEnabled ? NORMALIZE_FULLSCREEN_CLASS : MIMIC_FULLSCREEN_CLASS;
}
return null;
},
Expand All @@ -46,7 +43,7 @@
},
mounted() {
// Catch the use of the esc key to exit fullscreen
if (fullscreenApiIsSupported) {
if (ScreenFull.isEnabled) {
ScreenFull.onchange(() => {
this.isInFullscreen = ScreenFull.isFullscreen;
});
Expand All @@ -60,13 +57,13 @@
if (!this.toggling) {
let fullScreenPromise;
this.toggling = true;
if (fullscreenApiIsSupported) {
if (ScreenFull.isEnabled) {
fullScreenPromise = ScreenFull.toggle(this.$refs.fullscreen);
} else {
fullScreenPromise = Promise.resolve();
}
fullScreenPromise.then(() => {
this.isInFullscreen = fullscreenApiIsSupported
this.isInFullscreen = ScreenFull.isEnabled
? ScreenFull.isFullscreen
: !this.isInFullscreen;
this.toggling = false;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,9 @@
@cancel="$emit('cancel')"
>
<template>
<p v-if="filterLODAvailable">
<!-- <p v-if="filterLODAvailable">
{{ $tr('lodSubHeader') }}
</p>
</p> -->
<p v-if="hasFetched && !devices.length">
{{ $tr('noDeviceText') }}
</p>
Expand Down Expand Up @@ -387,6 +387,9 @@
context:
'Error message that displays when an admin attempts to find a device, but the device is not found.',
},
// TODO Update this string to be more specific that it is 0.15 or greater
// once this is done, reinstate the $tr('lodSubHeader') in the template
// eslint-disable-next-line kolibri/vue-no-unused-translations
lodSubHeader: {
message: 'Select a device with Kolibri version 0.15 to import learner user accounts',
context:
Expand Down
6 changes: 5 additions & 1 deletion kolibri/core/auth/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -880,7 +880,11 @@ def create(self, request):
],
status=status.HTTP_400_BAD_REQUEST,
)

except FacilityUser.MultipleObjectsReturned:
# Handle case of multiple matching usernames
unauthenticated_user = FacilityUser.objects.get(
username__exact=username, facility=facility_id
)
user = authenticate(username=username, password=password, facility=facility_id)
if user is not None and user.is_active:
# Correct password, and the user is marked "active"
Expand Down
Loading