{{ prompt }}
+ + + + + + + + diff --git a/kolibri/plugins/qti_viewer/buildConfig.js b/kolibri/plugins/qti_viewer/buildConfig.js new file mode 100644 index 00000000000..860f9b46554 --- /dev/null +++ b/kolibri/plugins/qti_viewer/buildConfig.js @@ -0,0 +1,6 @@ +module.exports = { + bundle_id: 'main', + webpack_config: { + entry: './assets/src/module.js', + }, +}; diff --git a/kolibri/plugins/qti_viewer/kolibri_plugin.py b/kolibri/plugins/qti_viewer/kolibri_plugin.py new file mode 100644 index 00000000000..6f9f9df2983 --- /dev/null +++ b/kolibri/plugins/qti_viewer/kolibri_plugin.py @@ -0,0 +1,19 @@ +from __future__ import absolute_import +from __future__ import print_function +from __future__ import unicode_literals + +from le_utils.constants import format_presets + +from kolibri.core.content import hooks as content_hooks +from kolibri.plugins import KolibriPluginBase +from kolibri.plugins.hooks import register_hook + + +class QTIViewerPlugin(KolibriPluginBase): + pass + + +@register_hook +class QTIViewerAsset(content_hooks.ContentRendererHook): + bundle_id = "main" + presets = (format_presets.QTI_ZIP,) diff --git a/kolibri/plugins/qti_viewer/package.json b/kolibri/plugins/qti_viewer/package.json new file mode 100644 index 00000000000..5159a2c2fd7 --- /dev/null +++ b/kolibri/plugins/qti_viewer/package.json @@ -0,0 +1,9 @@ +{ + "version": "0.1.0", + "name": "qti-viewer", + "description": "A plugin for rendering QTI questions", + "private": true, + "dependencies": { + "xss": "^1.0.9" + } +} diff --git a/requirements/base.txt b/requirements/base.txt index 00695874f57..4d22b89a6ab 100644 --- a/requirements/base.txt +++ b/requirements/base.txt @@ -12,7 +12,7 @@ cheroot==8.5.2 magicbus==4.1.2 futures==3.1.1 # Temporarily pinning this until we can do a Python 2/3 compatible solution of newer versions # pyup: <=3.1.1 more-itertools==5.0.0 # Last Python 2.7 friendly release # pyup: <6.0 -le-utils==0.1.24 +le-utils==0.1.30 kolibri_exercise_perseus_plugin==1.3.5 jsonfield==2.0.2 requests-toolbelt==0.8.0 diff --git a/yarn.lock b/yarn.lock index 8e4dae4d6c7..4e9e1393f66 100644 --- a/yarn.lock +++ b/yarn.lock @@ -4114,7 +4114,7 @@ commander@2.6.0: resolved "https://registry.yarnpkg.com/commander/-/commander-2.6.0.tgz#9df7e52fb2a0cb0fb89058ee80c3104225f37e1d" integrity sha1-nfflL7Kgyw+4kFjugMMQQiXzfh0= -commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.9.0: +commander@^2.18.0, commander@^2.19.0, commander@^2.20.0, commander@^2.20.3, commander@^2.9.0: version "2.20.3" resolved "https://registry.yarnpkg.com/commander/-/commander-2.20.3.tgz#fd485e84c03eb4881c20722ba48035e8531aeb33" integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== @@ -4546,6 +4546,11 @@ cssesc@^3.0.0: resolved "https://registry.yarnpkg.com/cssesc/-/cssesc-3.0.0.tgz#37741919903b868565e1c09ea747445cd18983ee" integrity sha512-/Tb/JcjK111nNScGob5MNtsntNM1aCNUDipB/TkwZFhyDrrE47SOx/18wF2bbjgc3ZzCSKW1T5nt5EbFoAz/Vg== +cssfilter@0.0.10: + version "0.0.10" + resolved "https://registry.yarnpkg.com/cssfilter/-/cssfilter-0.0.10.tgz#c6d2672632a2e5c83e013e6864a42ce8defd20ae" + integrity sha1-xtJnJjKi5cg+AT5oZKQs6N79IK4= + csslint@0.10.0: version "0.10.0" resolved "https://registry.yarnpkg.com/csslint/-/csslint-0.10.0.tgz#3a6a04e7565c8e9d19beb49767c7ec96e8365805" @@ -15238,6 +15243,14 @@ xmldom@^0.1.27: resolved "https://registry.yarnpkg.com/xmldom/-/xmldom-0.1.31.tgz#b76c9a1bd9f0a9737e5a72dc37231cf38375e2ff" integrity sha512-yS2uJflVQs6n+CyjHoaBmVSqIDevTAWrzMmjG1Gc7h1qQ7uVozNhEPJAwZXWyGQ/Gafo3fCwrcaokezLPupVyQ== +xss@^1.0.9: + version "1.0.9" + resolved "https://registry.yarnpkg.com/xss/-/xss-1.0.9.tgz#3ffd565571ff60d2e40db7f3b80b4677bec770d2" + integrity sha512-2t7FahYnGJys6DpHLhajusId7R0Pm2yTmuL0GV9+mV0ZlaLSnb2toBmppATfg5sWIhZQGlsTLoecSzya+l4EAQ== + dependencies: + commander "^2.20.3" + cssfilter "0.0.10" + xtend@^4.0.0, xtend@^4.0.1, xtend@~4.0.1: version "4.0.2" resolved "https://registry.yarnpkg.com/xtend/-/xtend-4.0.2.tgz#bb72779f5fa465186b1f438f674fa347fdb5db54"