From cf5197129824afad9fa2da8843af92ae5eb6f288 Mon Sep 17 00:00:00 2001 From: "Mark L. Chang" Date: Wed, 27 Mar 2013 22:36:18 -0400 Subject: [PATCH 1/2] added net promoter score tracking javascript shim from Qualaroo --- cms/templates/base.html | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/cms/templates/base.html b/cms/templates/base.html index e852b5d7fe..30c7045440 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -23,6 +23,18 @@ + + + + + + + <%block name="header_extras"> From 7a57e369d1f18baa3a9e172a2bef70144076588e Mon Sep 17 00:00:00 2001 From: "Mark L. Chang" Date: Wed, 3 Apr 2013 00:26:12 -0400 Subject: [PATCH 2/2] put survey behind MITX_FEATURES flag --- cms/envs/common.py | 1 + cms/envs/dev.py | 3 +++ cms/templates/base.html | 14 ++------------ cms/templates/widgets/qualaroo.html | 13 +++++++++++++ 4 files changed, 19 insertions(+), 12 deletions(-) create mode 100644 cms/templates/widgets/qualaroo.html diff --git a/cms/envs/common.py b/cms/envs/common.py index 12fa09947a..5ad9068636 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -34,6 +34,7 @@ MITX_FEATURES = { 'ENABLE_DISCUSSION_SERVICE': False, 'AUTH_USE_MIT_CERTIFICATES': False, 'STUB_VIDEO_FOR_TESTING': False, # do not display video when running automated acceptance tests + 'STUDIO_NPS_SURVEY': True, } ENABLE_JASMINE = False diff --git a/cms/envs/dev.py b/cms/envs/dev.py index 5612db1396..524983ed91 100644 --- a/cms/envs/dev.py +++ b/cms/envs/dev.py @@ -143,3 +143,6 @@ DEBUG_TOOLBAR_CONFIG = { # To see stacktraces for MongoDB queries, set this to True. # Stacktraces slow down page loads drastically (for pages with lots of queries). DEBUG_TOOLBAR_MONGO_STACKTRACES = False + +# disable NPS survey in dev mode +MITX_FEATURES['STUDIO_NPS_SURVEY'] = False diff --git a/cms/templates/base.html b/cms/templates/base.html index 30c7045440..d8f0747569 100644 --- a/cms/templates/base.html +++ b/cms/templates/base.html @@ -23,18 +23,6 @@ - - - - - - - <%block name="header_extras"> @@ -70,6 +58,8 @@ <%block name="jsextra"> + + <%include file="widgets/qualaroo.html" /> diff --git a/cms/templates/widgets/qualaroo.html b/cms/templates/widgets/qualaroo.html new file mode 100644 index 0000000000..04d10e08d1 --- /dev/null +++ b/cms/templates/widgets/qualaroo.html @@ -0,0 +1,13 @@ +% if settings.MITX_FEATURES.get('STUDIO_NPS_SURVEY'): + + + + + + +% endif