Skip to content

Commit b93dddd

Browse files
author
Aron Fyodor Asor
committed
Merge branch '0.16.x'
2 parents c972f3f + 13adf62 commit b93dddd

File tree

9 files changed

+76
-46
lines changed

9 files changed

+76
-46
lines changed

data/version.yml

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,16 @@
1+
0.16.1:
2+
release_date: "2016/04/04"
3+
git_commit: ""
4+
new_features: []
5+
bugs_fixed:
6+
all:
7+
- Tweaks to our documentation (#5067)
8+
- Refactor assessment item asking logic in the setup command (#5065)
9+
- Properly copy over docs pages while preserving content pack assets (#5074)
10+
students: []
11+
coaches: []
12+
admins: []
13+
114
0.16.0:
215
release_date: "2016/04/01"
316
git_commit: ""

docs/faq.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,9 @@ Use the language code indicated below:
8484
Zulu zul
8585
================ ======
8686

87-
An example invocation for Windows would be::
87+
An example invocation for installing the French `contentpack` on Windows would be::
8888

89-
C:\Program Files\KA Lite\ka-lite\bin\windows\kalite.bat kalite manage retrievecontentpack local en en.zip
89+
C:\Python27\Scripts\kalite manage retrievecontentpack local fr fr.zip
9090

9191

9292
After starting up your server, you should now see your new language in the Manage > Language page.

docs/installguide/advanced.rst

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,19 @@ the rest of your environment, you can run::
6969
Portable tarballs / zip files with setup.py
7070
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
7171

72-
Adequate to the online source, you can fetch a zip/tarball directly from
73-
`PyPi <https://pypi.python.org/pypi/ka-lite-static>`.
74-
Do this for the sake of carrying KA Lite on an offline media for use on systems
75-
that are not capable of installing the .exe/.dmg/.deb formats.
72+
If you can't install KA Lite on systems with the standard Windows/Mac/Linux installers,
73+
you can fetch the KA Lite python package from `PyPi <https://pypi.python.org/pypi/ka-lite-static>`_.
7674

77-
A .tar.gz or .zip is unpacked and from command line inside the unpacked
78-
directory, run::
75+
To unpack the package for installation, run::
76+
77+
$> tar -xf ka-lite-static-0.16.0.tar.gz
78+
79+
Once it's unpacked, install it by entering the extracted directory and running::
7980

8081
$> sudo python setup.py install.
8182

82-
Beware that the PyPi sources do not contain assessment items, you need to
83-
`download khan_assessment.zip manually <http://learningequality.org/downloads/ka-lite/0.15/content/khan_assessment.zip>`_ (~350 MB).
83+
Beware that the PyPi sources do not contain assessment items, so you need to
84+
`download the contentpack en.zip manually <http://pantry.learningequality.org/downloads/ka-lite/0.16/content/contentpacks/en.zip>`_ (~650 MB).
8485

8586

8687
Specific system setups

docs/installguide/install_all.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,9 +82,7 @@ Linux
8282
Main method: Ubuntu/Debian .deb
8383
_______________________________
8484

85-
Download the latest .deb manually from
86-
`our server <https://learningequality.org/r/deb-bundle-installer-0-16>`_.
87-
After that, you can install the .deb file like this::
85+
Download the `latest .deb <https://learningequality.org/r/deb-bundle-installer-0-16>`_ installer, and run this command::
8886

8987
sudo dpkg -i FILENAME.deb
9088

@@ -105,9 +103,11 @@ Debian, Raspberry Pi, Linux Mint etc.
105103
You will be prompted to enter some configuration information.
106104
You should read the on-screen instructions carefully, but some explanation is included here:
107105

108-
1. You will be asked to choose to run KA Lite on boot or not. We recommend choosing yes, as it simplifies data management.
109-
If you choose no, you must manually start KA lite every time. Note that running KA Lite as different users creates
110-
different sets of data files, so it's recommended that you run KA Lite as the same user every time.
106+
1. Choose weather you want to run KA Lite on boot or not. We recommend choosing yes, as it simplifies data management.
107+
If you choose not to, you must manually start KA lite every time.
108+
109+
.. note::
110+
Running KA Lite as different users creates different sets of data files, so it's recommended that you run KA Lite as the same user every time.
111111

112112
.. image:: linux-install-startup.png
113113
:class: screenshot
Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
11
System requirements
22
===================
33

4-
.. note::
5-
The latest OSX version (EL Capitan) is not yet supported.
6-
74
Supported Browsers
85
------------------
96
KA Lite is currently *not* supported on Internet Explorer version 8 or lower. You must use IE9 or later.
10-
You can also use KA Lite on browsers like Firefox, Chrome, and Safari! There are no known issues with current versions of these browsers.
7+
8+
You can also use KA Lite on browsers like Firefox, Chrome, and Safari!
9+
10+
The only known issue regards viewing videos on Windows XP, where you must use the Chrome browser.
11+
12+
On Ubuntu/Debian systems, install the `Ubuntu restricted extras package <https://apps.ubuntu.com/cat/applications/ubuntu-restricted-extras/>`_.

kalite/coachreports/features/coachreports.feature

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ Feature: Coach reports
3838
| learner | progress verbs | progress text | progress colour | exercise |
3939
| some | attempted | 50% | light blue | relate-addition-and-subtraction |
4040
| all | completed | None | dark green | subtraction_1 |
41-
| struggle| struggling | 30% | red | addition-and-subtraction-within-10 |
41+
| struggle| struggling | 30% | red | addition_2 |
4242

4343
Scenario: I want to know more about an exercise
4444
Given I am on the tabular report

kalite/contentload/management/commands/unpack_assessment_zip.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,7 @@ def unpack():
8282
logging.info("Done, assessment items installed and everything updated. Refresh your browser!")
8383

8484

85+
# TODO(jamalex): move this to somewhere outside of this management command file, as we're importing it elsewhere
8586
def should_upgrade_assessment_items():
8687
# if assessmentitems.version doesn't exist, then we assume
8788
# that they haven't got assessment items EVER

kalite/distributed/management/commands/setup.py

Lines changed: 37 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,10 @@
3131
from kalite.contentload.settings import KHAN_ASSESSMENT_ITEM_ROOT, OLD_ASSESSMENT_ITEMS_LOCATION
3232

3333
from fle_utils.config.models import Settings
34-
from fle_utils.general import get_host_name
34+
from fle_utils.general import get_host_name, ensure_dir
3535
from fle_utils.platforms import is_windows
36-
from kalite.i18n.base import CONTENT_PACK_URL_TEMPLATE
36+
from kalite.i18n.base import CONTENT_PACK_URL_TEMPLATE, outdated_langpacks
37+
from kalite.contentload.management.commands.unpack_assessment_zip import should_upgrade_assessment_items
3738
from kalite.facility.models import Facility
3839
from kalite.version import VERSION, SHORTVERSION
3940
from securesync.models import Device
@@ -84,6 +85,9 @@ def clean_pyc(path):
8485
full_path = os.path.join(root, excess_pyc_file)
8586
os.remove(full_path)
8687

88+
def english_content_pack_and_assessment_resources_are_current():
89+
return not should_upgrade_assessment_items() and ("en" not in [lp["code"] for lp in outdated_langpacks()])
90+
8791

8892
def validate_username(username):
8993
return bool(username and (not re.match(r'^[^a-zA-Z]', username) and not re.match(r'^.*[^a-zA-Z0-9_]+.*$', username)))
@@ -417,26 +421,32 @@ def handle(self, *args, **options):
417421
logging.info("Deleting old assessment items")
418422
shutil.rmtree(OLD_ASSESSMENT_ITEMS_LOCATION)
419423

420-
if writable_assessment_items and options['force-assessment-item-dl']:
421-
call_command(
422-
"retrievecontentpack", "download", "en")
423-
elif options['force-assessment-item-dl']:
424-
raise RuntimeError(
425-
"Got force-assessment-item-dl but directory not writable")
426-
elif not settings.RUNNING_IN_TRAVIS and options['interactive']:
424+
if options['force-assessment-item-dl']: # user wants to force a new download; do it if we can, else error
425+
if writable_assessment_items:
426+
call_command("retrievecontentpack", "download", "en")
427+
else:
428+
raise RuntimeError("Got force-assessment-item-dl but directory not writable")
429+
elif english_content_pack_and_assessment_resources_are_current():
430+
logging.warning("English content pack is already up-to-date; skipping download and configuration.")
431+
elif not writable_assessment_items: # skip if we're not going to be able to unpack it anyway
432+
logging.warning("Assessment item directory not writable; skipping content pack download.")
433+
elif settings.RUNNING_IN_TRAVIS: # skip if we're running on Travis
434+
logging.warning("Running in Travis; skipping content pack download.")
435+
elif not options['interactive']: # skip if we're not running in interactive mode (and it wasn't forced)
436+
logging.warning("Not running in interactive mode; skipping content pack download.")
437+
else: # if we get this far, then we need to ask the user whether/how they want to get the content pack
427438
print(
428-
"\nStarting in version 0.13, you will need an assessment items package in order to access many of the available exercises.")
439+
"\nIn order to access many of the available exercises, you need to load a content pack for the latest version.")
429440
print(
430-
"If you have an internet connection, you can download the needed package. Warning: this may take a long time!")
441+
"If you have an Internet connection, you can download the needed package. Warning: this may take a long time!")
431442
print(
432-
"If you have already downloaded the assessment items package, you can specify the file in the next step.")
433-
print("Otherwise, we will download it from {url}.".format(
434-
url=CONTENTPACK_URL))
443+
"If you have already downloaded the content pack, you can specify the location of the file in the next step.")
444+
print("Otherwise, we will download it from {url}.".format(url=CONTENTPACK_URL))
435445

436-
if raw_input_yn("Do you wish to download the content pack now?"):
446+
if raw_input_yn("Do you wish to download and install the content pack now?"):
437447
ass_item_filename = CONTENTPACK_URL
438448
retrieval_method = "download"
439-
elif raw_input_yn("Have you already downloaded the content pack?"):
449+
elif raw_input_yn("Do you have a local copy of the content pack already downloaded that you want to install?"):
440450
ass_item_filename = get_assessment_items_filename()
441451
retrieval_method = "local"
442452
else:
@@ -445,16 +455,10 @@ def handle(self, *args, **options):
445455

446456
if not ass_item_filename:
447457
logging.warning(
448-
"No content pack given. You will need to download and unpack it later.")
458+
"No content pack given. You will need to download and install it later.")
449459
else:
450460
call_command("retrievecontentpack", retrieval_method, "en", ass_item_filename, foreground=True)
451461

452-
elif options['interactive']:
453-
logging.warning(
454-
"Assessment item directory not writable, skipping download.")
455-
else:
456-
print("Found bundled assessment items")
457-
458462
# Individually generate any prerequisite models/state that is missing
459463
if not Settings.get("private_key"):
460464
call_command("generatekeys", verbosity=options.get("verbosity"))
@@ -477,7 +481,16 @@ def handle(self, *args, **options):
477481

478482
# Now deploy the static files
479483
logging.info("Copying static media...")
480-
call_command("collectstatic", interactive=False, verbosity=0, ignore_patterns=['vtt', 'html', 'srt'],
484+
ensure_dir(settings.STATIC_ROOT)
485+
486+
# The following file ignores have to be preserved from a
487+
# collectstatic(clear=True), due to being bundled with content packs,
488+
# and we thus have now way of getting them back.
489+
collectstatic_ignores = [
490+
"*.vtt", "*.srt", # subtitle files come with language packs -- don't delete
491+
"*/perseus/ke/exercises/*", # exercises come with language packs, and we have no way to replicate
492+
]
493+
call_command("collectstatic", interactive=False, verbosity=0, ignore_patterns=collectstatic_ignores,
481494
clear=True)
482495
call_command("collectstatic_js_reverse", interactive=False)
483496

kalite/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
# Must also be of the form N.N.N for internal use, where N is a non-negative integer
88
MAJOR_VERSION = "0"
99
MINOR_VERSION = "16"
10-
PATCH_VERSION = "0"
10+
PATCH_VERSION = "1"
1111
VERSION = "%s.%s.%s" % (MAJOR_VERSION, MINOR_VERSION, PATCH_VERSION)
1212
SHORTVERSION = "%s.%s" % (MAJOR_VERSION, MINOR_VERSION)
1313

0 commit comments

Comments
 (0)