Skip to content

Commit

Permalink
Merge pull request #8248 from learningequality/release-v0.15.x
Browse files Browse the repository at this point in the history
Cascade merge
  • Loading branch information
rtibbles authored Jul 31, 2021
2 parents dd91d82 + 5c88490 commit 02a3ffa
Show file tree
Hide file tree
Showing 632 changed files with 8,924 additions and 10,000 deletions.
8 changes: 3 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# List most target names as 'PHONY' to prevent Make from thinking it will be creating a file of the same name
.PHONY: help clean clean-assets clean-build clean-pyc clean-docs lint test test-all assets coverage docs release test-namespaced-packages staticdeps staticdeps-cext writeversion setrequirements buildconfig pex i18n-extract-frontend i18n-extract-backend i18n-transfer-context i18n-extract i18n-django-compilemessages i18n-upload i18n-pretranslate i18n-pretranslate-approve-all i18n-download i18n-regenerate-fonts i18n-stats i18n-install-font i18n-download-translations i18n-download-glossary i18n-upload-glossary docker-whl docker-demoserver docker-devserver docker-envlist


help:
@echo "Usage:"
@echo ""
Expand Down Expand Up @@ -208,15 +209,12 @@ i18n-pretranslate:
i18n-pretranslate-approve-all:
python packages/kolibri-tools/lib/i18n/crowdin.py pretranslate ${branch} --approve-all

i18n-convert:
python packages/kolibri-tools/lib/i18n/crowdin.py convert-files

i18n-download-translations:
python packages/kolibri-tools/lib/i18n/crowdin.py rebuild-translations ${branch}
python packages/kolibri-tools/lib/i18n/crowdin.py download-translations ${branch}
node packages/kolibri-tools/lib/i18n/intl_code_gen.js
yarn exec kolibri-tools i18n-code-gen -- --output-dir ./kolibri/core/assets/src/utils
$(MAKE) i18n-django-compilemessages
python packages/kolibri-tools/lib/i18n/crowdin.py convert-files
yarn exec kolibri-tools i18n-create-message-files -- --pluginFile ./build_tools/build_plugins.txt

i18n-download-source-fonts:
python packages/kolibri-tools/lib/i18n/fonts.py download-source-fonts
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
Feature: Coaches can see helpful information explaining sync statuses

Scenario: Coaches can see more information regarding sync statuses
Given I see all learner device sync statuses
When I press the *Information about sync statuses* hyperlink
Then I see a modal giving me information on each individual sync status
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Feature: Coaches can see sync statuses for connected devices via a quiz coach report

Scenario: Coaches can see sync statuses
Given I am on a quiz report
When I press the *View learner devices* hyperlink
Then I see a table with all devices connected to the classroom server
And I see the sync statuses of every connected device
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
Feature: Coaches can see sync statuses for the devices connected to their classroom server via the coach dashboard

Given that I am on the *Coach* tab
And I am on the *Coach dashboard* page
And there are learners registered to the class
And there are devices connected to the classroom server

Scenario: Coaches see all connected learner devices and their sync statuses
When I press the *View learners* button
Then I see a table with all devices connected to the classroom server
And I see the sync statuses of every connected device
And I can sort the devices by username or full name
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
Feature: Devices can be provisioned to be in Learn-mode only so that coach and admin features are unavailable

Scenario: Learners can see special messaging that their device is in a special mode
When I open the user menu in the top appbar or open the navigation drawer
Then I see special text messaging showing my device is in Learn-only mode
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
Feature: Learners can see different device syncing statuses

Given that the learner device is able to be synced to the classroom server
And I am under the *Learn* tab
And there is information available to sync

Scenario: Learners can see device syncing statuses
When the learner device is attempting to sync to the classroom server
And I open the user menu in the top appbar
Then I see a *device status* indicator showing the device is syncing
When the learner device has successfully synced
And I open the user menu in the top appbar
Then I see a *device status* indicator showing the device has synced a number of minutes ago

Scenario: Learners can see errors associated with device syncing
When the learner device is unable to sync with the classroom server
And I open the user menu in the top appbar
Then I see a *device status* red error indicator showing the device is not recently synced
When the learner device has successfully synced in the past but is unable to currently sync
And I open the user menu in the top appbar
Then I see a *device status* red error indicator showing the device has synced a number of minutes ago

Scenario: Learners can see that the device is not connected to the classroom server
When the learner device is not connected to the classroom server
And I open the user menu in the top appbar
Then I see a *device status* indicator showing the device is not connected
Original file line number Diff line number Diff line change
@@ -0,0 +1,152 @@
Feature: Import individual users

Background:
Given Kolibri is not installed on my device
And the Kolibri installer is downloaded to my device
And Kolibri version 0.15 is installed on another device in my network
And I have a local wi-fi connection
When I install Kolibri
And I open Kolibri in my browser
Then I see *Please select the default language for Kolibri*
When I click *Continue*
Then I see *Getting started*
When I select *Advanced Setup*
And I click *Continue*
Then I see *Device name*
And I see <My device's name>
When I click *Continue*
Then I see *Select a facility setup for this device*

Scenario: See available *Select a facility setup for this device* page features
Given I see *Select a facility setup for this device*
Then I see the *Full device* section
And I see the radio options *Create a new facility* and *Import all data from an existing facility*
And I see the *Learn-only device* section
And I see the radio option *Import one or more user accounts from an existing facility*
And I see the caption *This device supports auto-syncing with a full device that has the same facility*
When I hover my mouse over the tooltip next to *Full device*
Then I see *Features for learners, coaches, and admins will be available*
When I hover my mouse over the tooltip next to *Learn-only device*
Then I see *Only features for learners will be available. Features for coaches and admins will not be available.*

Scenario: Import one user when there is only one facility in the network
Given I see *Select a facility setup for this device*
When I select *Import one or more user accounts from an existing facility*
And I click *Continue*
Then I see *Select network address*
And I see *Devices must be installed with Kolibri version 0.15.0* in the modal description
And I see radio options for devices in my network
And I see <Kolibri version> in the caption of each radio option
When I select <device>
And I click *Continue*
Then I see *Import individual user accounts*
And I see *Import individual user accounts - 1 of 2* in the app bar
When I enter the <username> and <password> of <user> in <facility>
And I click *Import*
Then I see *Loading user*
And I see *Import individual user accounts - 2 of 2* in the app bar
And I see a loading bar
When the user finishes importing
Then I see *Finished*
And I see *<Full name> from <facility> successfully loaded to this device*
And I see the buttons *Finish* and *Import another user*
When I click *Finish*
Then I see the *Welcome to Kolibri!* modal on the *Channels* page
And I see that I am signed in as <username>

Scenario: Import a second user
Given I have finished importing the user <Full name 1> to my *Learn-only device*
And I am viewing the *Loading user* page
When I click *Import another user*
Then I see the *Import individual user accounts* page
And I see a *Skip* button next to the *Import* button
When I enter <username> and <password> of <user 2>
Then I see the *Loading user* page
When the user finishes importing to the device
Then I see *Finished*
And I see <Full name 2> from <facility> successfully loaded to this device
And I see *On this device*
And I see a list with <Full name 1> and <Full name 2>
When I click *Finish*
Then I see the *Welcome to Kolibri* modal
And I see that I am signed in as the first user I imported

Scenario: Change mind while importing a second user
Given I have finished importing the user <Full name 1> to my *Learn-only device*
And I am viewing the *Loading user* page
When I click *Import another user*
Then I see the *Import individual user accounts* page
And I see a *Skip* button next to the *Import* button
When I click *Skip*
Then I see the *Welcome to Kolibri!* modal on the *Channels* page

Scenario: Import coach or admin
Given I am on the *Import individual user accounts* page
When I enter <username> and <password> of a coach or admin user
And I click *Import*
Then I see the *Device limitations* modal
When I click *Import*
Then I see the *Loading user* page

Scenario: Use an admin account
Given I am on the *Import individual user accounts* page
When I click *Use an admin account*
Then I see *Select a user*
And I see a user text box filter
And I see a user table
And I see the columns *Full name* and *Username*
And I see *Import* buttons on each row
And I see pagination at the bottom of the table
When I click *Import* on <user 1>
Then I see the *Loading user* page
When <user 1> finishes importing to the device
Then I see *Finished*
And I see <Full name 1> from <facility> successfully loaded to this device
When I click *Import another user*
Then I see *Select a user*
And I see the user table
And I see that the row for <user 1> is grayed out
And I see *Imported* instead of the *Import* button for <user 1>
And I see a bottom bar with a secondary *Skip* button
When I click *Import* for <user 2>
Then I see *Loading user*
When <user 2> finishes importing to the device
Then I see *Finished*
And I see <Full name 2> from <facility> successfully loaded to this device
And I see *On this device*
And I see a list with <Full name 1> and <Full name 2>

Scenario: Change mind while importing a second user while using an admin account
Given I have finished importing the user <Full name 1> to my *Learn-only device*
And I imported them using an admin account
When I click *Import another user*
Then I see *Select a user*
And I see a bottom bar with a secondary *Skip* button
When I click *Skip*
Then I see the *Welcome to Kolibri* modal on the *Channels* page

Scenario: Import coach or admin while *Require password for learners* facility setting is disabled
Given I am viewing *Import individual user accounts*
And <facility> has disabled the facility setting *Require password for learners*
Then I see the *Username* text field
And I do not see the *Password* text field
When I enter the username <username> of a coach or admin from <facility>
When I click *Import*
Then I see the modal *Enter password*
And I see *Please enter the password for <username>
And I see *<Full name> (<username>) is a <coach or admin> on <peer device>. This device is limited to features for learners only. Features for coaches and admins will not be available.*
And I see a *Password* text field
When I enter <password> for <username>
When I click *Import*
Then I see the *Loading user* page
And I see the user import is in progress

Scenario: Import coach or admin after using an admin account
Given I am on the *Import individual user accounts* page
When I click *Use an admin account*
Then I see the *Select a user* page
When I click *Import* for <user>
And <user> is a coach or admin
Then I see the *Device limitations* modal
When I click *Import*
Then I see the *Loading user* page
1 change: 1 addition & 0 deletions kolibri/core/assets/src/api-resources/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ export { default as ExamLogResource } from './examLog';
export { default as ExamAttemptLogResource } from './examAttemptLog';
export { default as FacilityDatasetResource } from './facilityDataset';
export { default as UserProgressResource } from './userProgress';
export { default as UserSyncStatusResource } from './userSyncStatus';
export { default as ContentNodeProgressResource } from './contentNodeProgress';
export { default as DevicePermissionsResource } from './devicePermissions';
export { default as RemoteChannelResource } from './remoteChannel';
Expand Down
5 changes: 5 additions & 0 deletions kolibri/core/assets/src/api-resources/userSyncStatus.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
import { Resource } from 'kolibri.lib.apiResource';

export default new Resource({
name: 'usersyncstatus',
});
10 changes: 10 additions & 0 deletions kolibri/core/assets/src/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,16 @@ export const NavComponentSections = {
ACCOUNT: 'account',
};

export const SyncStatus = {
RECENTLY_SYNCED: 'RECENTLY_SYNCED',
SYNCING: 'SYNCING',
QUEUED: 'QUEUED',
UNABLE_TO_SYNC: 'UNABLE_TO_SYNC',
NOT_RECENTLY_SYNCED: 'NOT_RECENTLY_SYNCED',
UNABLE_OR_NOT_SYNCED: 'UNABLE_OR_NOT_SYNCED',
NOT_CONNECTED: 'NOT_CONNECTED',
};

export const ERROR_CONSTANTS = {
// These are an exact copy of the python module kolibri.core.error_constants
// and should be kept in sync.
Expand Down
23 changes: 19 additions & 4 deletions kolibri/core/assets/src/disconnection.js
Original file line number Diff line number Diff line change
@@ -1,10 +1,25 @@
import { createTranslator } from 'kolibri.utils.i18n';

export const trs = createTranslator('DisconnectionSnackbars', {
disconnected: 'Disconnected from server. Will try to reconnect in { remainingTime }',
tryNow: 'Try now',
tryingToReconnect: 'Trying to reconnect…',
successfullyReconnected: 'Successfully reconnected!',
disconnected: {
message: 'Disconnected from server. Will try to reconnect in { remainingTime }',
context:
'Message that indicates when Kolibri is disconnected from a server. It also displays the time in countdown format that it will waiting until attempting to connect again.',
},
tryNow: {
message: 'Try now',
context:
'Prompt indicating to the user that they should try again to reconnect Kolibri with the server.',
},
tryingToReconnect: {
message: 'Trying to reconnect…',
context:
'Message which displays while Kolibri is trying to reconnect with the server following a disconnection.',
},
successfullyReconnected: {
message: 'Successfully reconnected!',
context: 'Message indicating that Kolibri has been able to connect with the server again.',
},
});

export function createTryingToReconnectSnackbar(store) {
Expand Down
Loading

0 comments on commit 02a3ffa

Please sign in to comment.