From c00f82adab37c5b929a110cbf7a4dd96bd727081 Mon Sep 17 00:00:00 2001 From: Chris Dodge Date: Wed, 21 Oct 2015 19:14:51 -0400 Subject: [PATCH 1/3] be sure to add a all() to the ORM statement otherwise the select_subclasses() will cause a full table scan/join --- lms/djangoapps/instructor_analytics/basic.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lms/djangoapps/instructor_analytics/basic.py b/lms/djangoapps/instructor_analytics/basic.py index 10f22fff68..3e9ebfe044 100644 --- a/lms/djangoapps/instructor_analytics/basic.py +++ b/lms/djangoapps/instructor_analytics/basic.py @@ -337,7 +337,7 @@ def coupon_codes_features(features, coupons_list, course_id): seats_purchased_using_coupon = 0 total_discounted_amount = 0 for coupon_redemption in coupon_redemptions: - cart_items = coupon_redemption.order.orderitem_set.select_subclasses() + cart_items = coupon_redemption.order.orderitem_set.all().select_subclasses() found_items = [] for item in cart_items: if getattr(item, 'course_id', None): From d3c6425af21ad9c37b4f273a24087ad534562ad8 Mon Sep 17 00:00:00 2001 From: Piotr Mitros Date: Tue, 6 Oct 2015 18:47:21 -0400 Subject: [PATCH 2/3] Add RateXBlock --- cms/envs/common.py | 7 +++---- requirements/edx/github.txt | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cms/envs/common.py b/cms/envs/common.py index c753a7031d..9bd7b71ef0 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -977,15 +977,14 @@ ADVANCED_COMPONENT_TYPES = [ 'pb-dashboard', 'poll', 'survey', - # XBlocks from pmitros repos are prototypes. They should not be used - # except for edX Learning Sciences experiments on edge.edx.org without - # further work to make them robust, maintainable, finalize data formats, - # etc. + # Some of the XBlocks from pmitros repos are sometimes prototypes. + # Use with caution. 'concept', # Concept mapper. See https://github.com/pmitros/ConceptXBlock 'done', # Lets students mark things as done. See https://github.com/pmitros/DoneXBlock 'audio', # Embed an audio file. See https://github.com/pmitros/AudioXBlock 'recommender', # Crowdsourced recommender. Prototype by dli&pmitros. Intended for roll-out in one place in one course. 'profile', # Prototype user profile XBlock. Used to test XBlock parameter passing. See https://github.com/pmitros/ProfileXBlock + 'rate', # Allows up-down voting of course content. See https://github.com/pmitros/RateXBlock 'split_test', 'combinedopenended', diff --git a/requirements/edx/github.txt b/requirements/edx/github.txt index e8e722a80f..2add8c240d 100644 --- a/requirements/edx/github.txt +++ b/requirements/edx/github.txt @@ -48,6 +48,7 @@ git+https://github.com/edx/i18n-tools.git@v0.1.3#egg=i18n-tools==v0.1.3 git+https://github.com/edx/edx-oauth2-provider.git@0.5.7#egg=oauth2-provider==0.5.7 -e git+https://github.com/edx/edx-val.git@0.0.6#egg=edx-val -e git+https://github.com/pmitros/RecommenderXBlock.git@518234bc354edbfc2651b9e534ddb54f96080779#egg=recommender-xblock +-e git+https://github.com/pmitros/RateXBlock.git@367e19c0f6eac8a5f002fd0f1559555f8e74bfff#egg=rate-xblock -e git+https://github.com/edx/edx-search.git@release-2015-09-11a#egg=edx-search git+https://github.com/edx/edx-milestones.git@release-2015-10-20#egg=edx-milestones==0.1.3 git+https://github.com/edx/edx-lint.git@v0.3.0#egg=edx_lint==0.3.0 From 87f0df350141d27e5a80f06111753b848d493cd2 Mon Sep 17 00:00:00 2001 From: cahrens Date: Mon, 26 Oct 2015 11:28:40 -0400 Subject: [PATCH 3/3] Revert to version 2.4 of MathJax. TNL-3693 --- cms/static/cms/js/require-config.js | 2 +- cms/static/coffee/spec/main.coffee | 2 +- cms/static/coffee/spec/main_squire.coffee | 2 +- common/templates/mathjax_include.html | 2 +- lms/static/js/spec/main.js | 2 +- 5 files changed, 5 insertions(+), 5 deletions(-) diff --git a/cms/static/cms/js/require-config.js b/cms/static/cms/js/require-config.js index 6bcdbb88ac..4e5be98dfc 100644 --- a/cms/static/cms/js/require-config.js +++ b/cms/static/cms/js/require-config.js @@ -70,7 +70,7 @@ require.config({ // end of Annotation tool files // externally hosted files - "mathjax": "//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", + "mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", "youtube": [ // youtube URL does not end in ".js". We add "?noext" to the path so // that require.js adds the ".js" to the query component of the URL, diff --git a/cms/static/coffee/spec/main.coffee b/cms/static/coffee/spec/main.coffee index a2a5cb3083..14315b5236 100644 --- a/cms/static/coffee/spec/main.coffee +++ b/cms/static/coffee/spec/main.coffee @@ -51,7 +51,7 @@ requirejs.config({ "URI": "xmodule_js/common_static/js/vendor/URI.min", "mock-ajax": "xmodule_js/common_static/js/vendor/mock-ajax", - "mathjax": "//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", + "mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", "youtube": "//www.youtube.com/player_api?noext", "coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix", diff --git a/cms/static/coffee/spec/main_squire.coffee b/cms/static/coffee/spec/main_squire.coffee index 20cb7bc7a0..f9053e5e3b 100644 --- a/cms/static/coffee/spec/main_squire.coffee +++ b/cms/static/coffee/spec/main_squire.coffee @@ -42,7 +42,7 @@ requirejs.config({ "domReady": "xmodule_js/common_static/js/vendor/domReady", "URI": "xmodule_js/common_static/js/vendor/URI.min", - "mathjax": "//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", + "mathjax": "//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured", "youtube": "//www.youtube.com/player_api?noext", "coffee/src/ajax_prefix": "xmodule_js/common_static/coffee/src/ajax_prefix" diff --git a/common/templates/mathjax_include.html b/common/templates/mathjax_include.html index 4b20473367..f15fc0fc67 100644 --- a/common/templates/mathjax_include.html +++ b/common/templates/mathjax_include.html @@ -50,4 +50,4 @@ - + diff --git a/lms/static/js/spec/main.js b/lms/static/js/spec/main.js index 01bbb5c0c5..752bdefc75 100644 --- a/lms/static/js/spec/main.js +++ b/lms/static/js/spec/main.js @@ -49,7 +49,7 @@ 'jasmine.async': 'xmodule_js/common_static/js/vendor/jasmine.async', 'draggabilly': 'xmodule_js/common_static/js/vendor/draggabilly.pkgd', 'domReady': 'xmodule_js/common_static/js/vendor/domReady', - 'mathjax': '//cdn.mathjax.org/mathjax/2.5-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured', // jshint ignore:line + 'mathjax': '//cdn.mathjax.org/mathjax/2.4-latest/MathJax.js?config=TeX-MML-AM_HTMLorMML-full&delayStartupUntil=configured', // jshint ignore:line 'youtube': '//www.youtube.com/player_api?noext', 'coffee/src/ajax_prefix': 'xmodule_js/common_static/coffee/src/ajax_prefix', 'coffee/src/instructor_dashboard/student_admin': 'coffee/src/instructor_dashboard/student_admin',