Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/release-v0.12.y' into consistent…
Browse files Browse the repository at this point in the history
…-modals
  • Loading branch information
jonboiser committed May 17, 2019
2 parents 444af6e + 1d86ca4 commit 46f5354
Show file tree
Hide file tree
Showing 153 changed files with 4,816 additions and 1,779 deletions.
1 change: 1 addition & 0 deletions AUTHORS.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,4 @@ Please feel free to add your name to this list if you make a PR
* Whitney Zhu (whitzhu)
* Carol Willing (willingc)
* Yixuan Liu (yil039)
* Blaine Jester (bjester)
25 changes: 19 additions & 6 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,25 @@ List of the most important changes for each release.

### Added

- Device Settings Page - The default language can now be changed under Device > Settings. This is the language that will be used on browsers that have never opened Kolibri before (but can be changed after opening Kolibri using the language selector).

## 0.12.3

### Changed or fixed


- Improved handling of partially-download or otherwise corrupted content databases
- Fixed regression where users could not change their passwords in the Profile page
- Improved PostgreSQL support
- Added fixes related to coach tools

See a [full list](https://github.com/learningequality/kolibri/issues?q=label%3Achangelog+milestone%3A0.12.3) of changes on Github


## 0.12.2

### Added

- Coaches can edit lessons from the Coach > Reports page
- Coaches can preview and edit quiz details from the Coach > Reports and Plan pages

Expand Down Expand Up @@ -56,12 +75,6 @@ View all [0.12.2 changes on Github](https://github.com/learningequality/kolibri/
View all [0.12.1 changes on Github](https://github.com/learningequality/kolibri/issues?q=label%3Achangelog+milestone%3A0.12.1)


## 0.12.y

### Added

- Device Settings Page - The default language can now be changed under Device > Settings. This is the language that will be used on browsers that have never opened Kolibri before (but can be changed after opening Kolibri using the language selector).

## 0.12.0

### Added
Expand Down
2 changes: 1 addition & 1 deletion docs/backend_architecture/dist_build_pipeline.rst
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ Distribution build pipeline

The Kolibri Package build pipeline looks like this::

Git master branch
Git release branch
|
|
/ \
Expand Down
22 changes: 20 additions & 2 deletions docs/development_workflow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ Submissions

Be sure to follow the `instructions <https://github.com/learningequality/kolibri/blob/develop/.github/PULL_REQUEST_TEMPLATE.md>`__ shown in the Github PR template when you `create a new PR <https://github.com/learningequality/kolibri/compare>`__.

In particular, **please use the labels** "Needs review", "Work in progress", and "Needs updates" mutually exclusively to communicate the state of the PR.

Developers maintain their own clones of the Learning Equality `Kolibri repo <https://github.com/learningequality/kolibri/>`__ in their personal Github accounts, and `submit pull requests <https://help.github.com/articles/creating-a-pull-request/>`__ back to the LE repo.

Every pull request will require some combination of manual testing, code review, automated tests, gherkin stories, and UI design review. Developers must fully test their own code before requesting a review, and then closely follow the template and checklist that appears in the PR description. All automated tests must pass.
Expand Down Expand Up @@ -77,6 +79,23 @@ Finally, if you see a very trivial but important necessary change, the reviewer
This is due to a `Git LFS bug <https://github.com/git-lfs/git-lfs/issues/2291>`__. Try `disabling lock verification <https://github.com/git-lfs/git-lfs/blob/master/docs/man/git-lfs-config.5.ronn#other-settings>`__ using the ``lfs.[remote].locksverify`` setting, or simply running ``rm -rf .git/hooks/pre-push``.


.. note::
Remember to keep the "Needs review", "Work in progress", and "Needs updates" mutually exclusive and up-to-date.


Merging PRs
~~~~~~~~~~~

Who should merge PRs, and when?

First, all automated checks need to pass before merging. Then...

* If there is just one reviewer and they approve the changes, the reviewer should merge the PR immediately
* If there are multiple reviewers or stakeholders, the last one to approve can merge
* The reviewer might approve the PR, but also request minor changes such as a typo fix or variable name update. The submitter can then make the change and merge it themselves, with the understanding that the new changes will be limited in scope
* Stale reviews should be dismissed by the PR submitter when the feedback has been addressed


Development phases
------------------

Expand Down Expand Up @@ -105,12 +124,11 @@ We have the following release types:
* Experimental work is OK


Within the learning equality repository:
Within the Learning Equality Kolibri repository:

* The ``develop`` branch is our current development branch, and the default target for PRs
* Release branches named like ``release-v1.2.x`` (for example). This will track all patch releases within the 1.2.x minor release line. Distinct releases are tracked as tags like ``v1.2.3``
* We sometimes create feature branches for changes that are long-running, collaborative, and disruptive. These should be kept up-to-date with ``develop`` by merging, not rebasing.
* The ``master`` branch should be the same as the latest stable release

If a change needs to be introduced to an older release, target the oldest release branch that we want the change made in. Then that change will need to be merged into all subsequent releases, one-at-a-time, until it eventually gets back to ``develop``.

Expand Down
49 changes: 24 additions & 25 deletions docs/getting_started.rst
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,6 @@ First, clone your Kolibri fork to your local computer. In command below, replace
.. code-block:: bash
git clone git@github.com:$USERNAME/kolibri.git
cd kolibri # enter the Kolibri directory
git checkout develop
Next, initialize Git LFS:

Expand All @@ -53,8 +51,10 @@ Finally, add the Learning Equality repo as a remote. That way you can keep your

.. code-block:: bash
cd kolibri # Enter the Kolibri directory
git remote add upstream git@github.com:learningequality/kolibri.git
git fetch --all # Check if there are changes upstream
git checkout develop # Checkout the development branch
Expand Down Expand Up @@ -102,26 +102,8 @@ Now, any commands run with will target your virtual environment rather than the
.. warning::
Never install project dependencies using ``sudo pip install ...``


Install Node and Yarn
~~~~~~~~~~~~~~~~~~~~~

#. Install Node (version 10 is required)
#. Install `Yarn <https://yarnpkg.com/>`__ according the `instructions specific for your OS <https://yarnpkg.com/en/docs/install/>`__

We recommend `installing Node using NVM <https://github.com/creationix/nvm>`__ on Mac and Linux, which makes it easy to maintain multiple versions of Node on the same system.

Alternatively, you can use your system's package manager, e.g. `Homebrew <http://brew.sh/>`__ on Mac or ``apt`` on Debian. For example on Ubuntu/Debian you might do something like:

.. code-block:: bash
curl -sL https://deb.nodesource.com/setup_10.x | sudo -E bash -
sudo apt install nodejs=10.15.3-1nodesource1
sudo apt-mark hold nodejs # make sure it doesn't get upgraded later
Install project dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Install Python dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~

To install Kolibri project-specific dependencies make sure you're in the ``kolibri`` directory and your Python virtual environment is active. Then run:

Expand All @@ -131,14 +113,31 @@ To install Kolibri project-specific dependencies make sure you're in the ``kolib
pip install -r requirements.txt --upgrade
pip install -r requirements/dev.txt --upgrade
pip install -e .
yarn install --force
# optional
pip install -r requirements/build.txt --upgrade
pip install -r requirements/test.txt --upgrade
pip install -r requirements/docs.txt --upgrade
Note that the ``--upgrade`` and ``--force`` flags above can usually be omitted to speed up the process.
Note that the ``--upgrade`` flags above can usually be omitted to speed up the process.

Install Node.js, Yarn and other dependencies
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

#. Install Node.js (version 10 is required)
#. Install `Yarn <https://yarnpkg.com/>`__
#. Install non-python project-specific dependencies

The Python project-specific dependencies installed above will install ``nodeenv``, which is a useful tool for using specific versions of Node.js and other Node.js tools in Python environments. To setup Node.js and Yarn within the Kolibri project environment, ensure your Python virtual environment is active, then run:

.. code-block:: bash
# node.js, npm, and yarn
nodeenv -p --node=10.15.3
npm install -g yarn
# other required project dependencies
yarn install
Running the Kolibri server
Expand Down Expand Up @@ -202,7 +201,7 @@ If you need to make the development server available through the LAN, you need t
# first build the assets
yarn run build
# now, run the Django devserver
kolibri --debug manage devserver -- 0.0.0.0:8000
kolibri --debug manage runserver -- 0.0.0.0:8000
Now you can simply use your server's IP from another device in the local network through the port 8000, for example ``http://192.168.1.38:8000/``.

Expand Down
20 changes: 6 additions & 14 deletions docs/release_process.rst
Original file line number Diff line number Diff line change
Expand Up @@ -163,7 +163,6 @@ For example, if we were releasing version 0.3.0, we would perform these steps:
* Tag the final release as ``v0.3.0`` targetting the ``release-v0.3.x`` branch using Github's `Releases <https://github.com/learningequality/kolibri/releases>`__ functionality.
* Copy the entries from the changelog into Github's "Release notes" and ensure that the formatting and links are correct.
* Delete the most recent beta pre-lease on github.
* Merge ``release-v0.3.x`` into ``master`` (no code review necessary)
* Update ``VERSION`` in ``release-v0.3.x`` to be ``(0, 3, 1, 'beta', 0)`` (no code review necessary)

At this point, all changes to the git tree are complete for the release.
Expand Down Expand Up @@ -232,21 +231,15 @@ Publish the Medium post if necessary.
Update the demo server
----------------------

Get `kolibridemo.learningequality.org <http://kolibridemo.learningequality.org/>`__ running the latest version:
Get `kolibridemo.learningequality.org <https://kolibridemo.learningequality.org>`__ running the latest version:

* SSH into ``192.237.248.135``
* ``sudo su www-data``
* Upload the new .pex file and update ``/var/www/run_kolibri.sh`` to point at it
* SSH into the instance by running ``gcloud compute ssh --project kolibri-demo-servers --zone us-east1-d kolibridemo``. Click `here <https://cloud.google.com/compute/docs/instances/connecting-to-instance#gcetools>`__ for more information about connecting to Google Compute Engine instances. (You will need the right permissions of course.)
* ``sudo su www-data``
* Download the new .pex file from the uploaded assets on github/buildkite using ``wget``. Update /var/www/run_kolibridemo.sh to point at it
* ``./var/www/run_kolibridemo.sh restart`` to restart kolibri

Then restart all running instances:

.. code-block:: bash
killall python
run_all

Verify that `the demo server <kolibridemo.learningequality.org>`__ is running the latest version.
Verify that `the demo server <https://kolibridemo.learningequality.org>`__ is running the latest version.


Wrap-up
Expand All @@ -255,4 +248,3 @@ Wrap-up
* Publish relevant updates to the `Toolkit <https://learningequality.org/r/toolkit>`__ and `User documentation <https://kolibri.readthedocs.io/en/latest/>`__
* `Close the milestone <https://github.com/learningequality/kolibri/milestones>`__ on Github
* For issues on this milestone that have been reported by the community, try to report in appropriate forum threads that the new release addresses the issues

2 changes: 2 additions & 0 deletions integration_testing/features/coach/ORDER.txt
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ coach-assign-learners-groups.feature
coach-create-lesson.feature
coach-activate-lesson.feature
coach-edit-lesson.feature
coach-edit-lesson-from-report.feature
coach-lesson-reorder-resources.feature
coach-lesson-search-resources.feature
coach-lesson-remove-resources.feature
Expand All @@ -17,6 +18,7 @@ coach-delete-lesson.feature
coach-create-quiz.feature
coach-activate-quiz.feature
coach-edit-quiz.feature
coach-edit-quiz-from-report.feature
coach-copy-quiz.feature
coach-delete-quiz.feature
coach-class-home-with-interaction.feature
Expand Down
10 changes: 5 additions & 5 deletions integration_testing/features/coach/coach-create-quiz.feature
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@ Feature: Coach creates quizzes
When I don't input anything into the number field
And I leave the input field or attempt to continue or finish the quiz
Then an input validation error appears
# This is not working right, quiz is saved even if the number of questions is left empty
When I input a valid number
Then I don't see the validation error anymore

Expand Down Expand Up @@ -185,9 +184,10 @@ Feature: Coach creates quizzes
Given I am on *Create new quiz* page
And there are no validation errors
When I click “Continue”
Then I see a *Preview quiz* page with a question list pulled randomly from each exercise
When I click on *Randomize questions* button
Then I see the modal is refreshed with reordered randomized question list
Then I see a *Preview quiz* page
And I see the *Question order* is by default *Randomized*, with a questions displayed as a list pulled randomly from selected exercises
When I select *Fixed* radio button
Then I see the order of questions is refreshed, and questions are displayed as a numbered list.

Scenario: Check validation for the title field
When I try to enter a name with more than 100 characters
Expand All @@ -203,7 +203,7 @@ Feature: Coach creates quizzes
And I see the quiz on the list at *Coach > Plan > Quizzes* tab

Scenario: Save quiz
Given I am on *Create new quiz* page
Given I am on *Preview quiz* page
And there are no validation errors
When I click “Finish”
Then I am redirected to the *Coach > Plan > Quizzes* page
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
# START testing this scenario with a FRESH DB (make a copy of the current if you want to reuse it later), and use the `kolibri manage importusers your-csv-file.csv` command to import a set of users for this case.

Feature: Edit lesson details and manage resources from the lesson *Report* tab
Class and facility coaches need to be able to edit details and manage resources directly from the *Report* tab

Background:
Given I am signed in to Kolibri as a class or facility coach
And I have created a <lesson> lesson in a class <class>
And the <lesson> lesson contains one or more resources
And the <lesson> lesson is either inactive, or active and assigned to some learner(s)
And I am on the report page for <lesson>

Scenario: Lesson details can be edited from the Lesson report page
When I click the *Options* dropdown menu
And I select the *Edit details* option
Then I see the *Edit details dialogue for '<lesson>'*
And I see form fields for editing the title, description, status, and recipients (in that order)
And I see a *Resources* section where I can reorder, remove, and preview resources in <lesson>
When I edit one or more details of the lesson
And I click *Save changes* button
Then I am returned to the report page for <lesson>
And the changes I made are reflected in the report

Scenario: Lesson resources can be managed (added or removed) from the Lesson report page
When I click the *Options* dropdown menu
And I select the *Manage resources* option
Then I see the *Manage resources in '<lesson>'* dialogue
When I finish adding to or removing resources from the lesson
And I click the *Finish* button
Then I am returned to the report page for <lesson>
And the changes to the resources I made are reflected in the report

Examples:
| class | lesson |
| Explorers | Count 1 |
72 changes: 39 additions & 33 deletions integration_testing/features/coach/coach-edit-lesson.feature
Original file line number Diff line number Diff line change
Expand Up @@ -5,42 +5,48 @@ Feature: Coach edits lessons
Given I am signed in to Kolibri as a coach user
And I am on the *Coach > Plan > Lessons* page
And there are 2 or more learner groups
And there is a lesson <lesson> created previously
And I am on the *Edit Details* dialogue for <lesson> (arriving there from either reports or plan page)

Scenario: Edit existing lesson title
Given there is a lesson <lesson> created previously
When I click the *Options* button
And I select *Edit details*
Then I see the *Edit lesson details* modal
And the title field should be in-focused by default
When I edit the lesson title and leave the field
And I click *Save* button
Then the modal closes
And I see the title change under the *Lesson* tab
And I see the snackbar notification “Lesson changes saved”
When I edit the lesson <lesson> *Title* and leave the field
And I click the *Save Changes* button
Then I am returned to either the report or plan page for <lesson> (depending from where I arrived)
And I see the title change under the *Title* header
And I see the snackbar notification “Lesson changes saved”

Scenario: An existing Lesson cannot have its title changed to a title that is already used in the Class
Given There exists a lesson called "Second Lesson"
When I enter "Second Lesson" in the *Title* field
And I either move to a different field or click *Save Changes*
Then an error appears under the title field saying *A lesson with this name already exists*
And the Lesson is not saved (if I clicked *Save Changes*)

Scenario: Edit existing lesson description
Given there is a lesson <lesson> created previously
When I click the *Options* button
And I select *Edit details*
Then I see the *Edit lesson details* modal
When I edit the lesson description
And I click *Save* button
Then the modal closes
And I see the description change under the *Lesson* tab
And I see the snackbar notification “Lesson changes saved”

Scenario: Reassign lesson
When I click the lesson title <lesson>
Then I see the <lesson> page
When I click *Options* button
And I select *Edit details*
Then I see the *Edit lesson details* modal
When I change *Visible to* by selecting *Entire class* or one of the groups
And I click *Save* button
Then the modal closes
And the snackbar notification appears
And I see the change under *Visible to*
When I edit the lesson <lesson> *Description*
And I click the *Save Changes* button
Then I am returned to either the report or plan page for <lesson> (depending from where I arrived)
And I see the description change under the *Description* header
And I see the snackbar notification “Lesson changes saved”

Scenario: Edit existing lesson status
When I change the lesson status from *Inactive* to *Active* (or vice-versa)
And I click the *Save changes* button
Then I am returned to either the report or plan page for <lesson> (depending from where I arrived)
And I see the status change next to the *Status* header
And I see the snackbar notification “Lesson changes saved”

Scenario: Existing Lessons can be reassigned to different recipient Learner Groups
When I change *Recipients* by selecting *Entire class* or one of the groups
And I click the *Save changes* button
Then I am returned to either the report or plan page for <lesson> (depending from where I arrived)
And the *Recipients* field reflects the changes I made

Scenario: Preview lesson resource
Given <lesson> has at least one resource
When I click on the link for lesson resource title
Then I see the resource in a full screen page

Examples:
| title | description |
| First lesson | Fractions 1 |
| lesson |
| First lesson |
Loading

0 comments on commit 46f5354

Please sign in to comment.