diff --git a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee index 063ef108d3..ee318ecdb7 100644 --- a/common/lib/xmodule/xmodule/js/src/problem/edit.coffee +++ b/common/lib/xmodule/xmodule/js/src/problem/edit.coffee @@ -48,7 +48,8 @@ class @MarkdownEditingDescriptor extends XModule.Descriptor ### onShowXMLButton: (e) => e.preventDefault(); - @addRemoveCheatsheetCSS() + if @cheatsheet != undefined + @addRemoveCheatsheetCSS() if @confirmConversionToXml() @createXMLEditor(MarkdownEditingDescriptor.markdownToXml(@markdown_editor.getValue())) # Need to refresh to get line numbers to display properly (and put cursor position to 0) diff --git a/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py b/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py index ae1e553e69..afd81f08d0 100644 --- a/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py +++ b/lms/djangoapps/linkedin/management/commands/linkedin_mailusers.py @@ -205,7 +205,11 @@ class Command(BaseCommand): 'linkedin_add_url': self.certificate_url(cert), }) - context = {'courses_list': courses_list, 'num_courses': len(courses_list)} + context = { + 'courses_list': courses_list, + 'num_courses': len(courses_list), + 'google_analytics': settings.GOOGLE_ANALYTICS_LINKEDIN, + } body = render_to_string('linkedin/linkedin_email.html', context) subject = u'{}, Add your Achievements to your LinkedIn Profile'.format(user.profile.name) if mock_run: diff --git a/lms/envs/aws.py b/lms/envs/aws.py index 4e6c527fa4..c85b308af0 100644 --- a/lms/envs/aws.py +++ b/lms/envs/aws.py @@ -398,3 +398,7 @@ THIRD_PARTY_AUTH = AUTH_TOKENS.get('THIRD_PARTY_AUTH', THIRD_PARTY_AUTH) ##### ADVANCED_SECURITY_CONFIG ##### ADVANCED_SECURITY_CONFIG = ENV_TOKENS.get('ADVANCED_SECURITY_CONFIG', {}) + +##### GOOGLE ANALYTICS IDS ##### +GOOGLE_ANALYTICS_ACCOUNT = AUTH_TOKENS.get('GOOGLE_ANALYTICS_ACCOUNT') +GOOGLE_ANALYTICS_LINKEDIN = AUTH_TOKENS.get('GOOGLE_ANALYTICS_LINKEDIN') diff --git a/lms/envs/common.py b/lms/envs/common.py index 6d8862568c..0368522654 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -421,6 +421,10 @@ if FEATURES.get('ENABLE_SQL_TRACKING_LOGS'): TRACKING_IGNORE_URL_PATTERNS = [r'^/event', r'^/login', r'^/heartbeat'] TRACKING_ENABLED = True +######################## GOOGLE ANALYTICS ########################### +GOOGLE_ANALYTICS_ACCOUNT = 'GOOGLE_ANALYTICS_ACCOUNT_DUMMY' +GOOGLE_ANALYTICS_LINKEDIN = 'GOOGLE_ANALYTICS_LINKEDIN_DUMMY' + ######################## subdomain specific settings ########################### COURSE_LISTINGS = {} SUBDOMAIN_BRANDING = {} diff --git a/lms/templates/google_analytics.html b/lms/templates/google_analytics.html index 273fbac970..a19cfcdffb 100644 --- a/lms/templates/google_analytics.html +++ b/lms/templates/google_analytics.html @@ -1,6 +1,6 @@