diff --git a/cms/djangoapps/contentstore/management/commands/update_templates.py b/cms/djangoapps/contentstore/management/commands/update_templates.py index e94fee64b8..36348314b9 100644 --- a/cms/djangoapps/contentstore/management/commands/update_templates.py +++ b/cms/djangoapps/contentstore/management/commands/update_templates.py @@ -1,4 +1,5 @@ from xmodule.templates import update_templates +from xmodule.modulestore.django import modulestore from django.core.management.base import BaseCommand @@ -6,4 +7,4 @@ class Command(BaseCommand): help = 'Imports and updates the Studio component templates from the code pack and put in the DB' def handle(self, *args, **options): - update_templates() + update_templates(modulestore('direct')) diff --git a/cms/djangoapps/contentstore/tests/test_contentstore.py b/cms/djangoapps/contentstore/tests/test_contentstore.py index 07b7032e60..844ba87a11 100644 --- a/cms/djangoapps/contentstore/tests/test_contentstore.py +++ b/cms/djangoapps/contentstore/tests/test_contentstore.py @@ -937,7 +937,7 @@ class TemplateTestCase(ModuleStoreTestCase): self.assertIsNotNone(verify_create) # now run cleanup - update_templates() + update_templates(modulestore('direct')) # now try to find dangling template, it should not be in DB any longer asserted = False diff --git a/cms/djangoapps/contentstore/views.py b/cms/djangoapps/contentstore/views.py index 824d2119f1..5938bfe986 100644 --- a/cms/djangoapps/contentstore/views.py +++ b/cms/djangoapps/contentstore/views.py @@ -72,7 +72,7 @@ log = logging.getLogger(__name__) COMPONENT_TYPES = ['customtag', 'discussion', 'html', 'problem', 'video'] OPEN_ENDED_COMPONENT_TYPES = ["combinedopenended", "peergrading"] -ADVANCED_COMPONENT_TYPES = ['annotatable'] + OPEN_ENDED_COMPONENT_TYPES +ADVANCED_COMPONENT_TYPES = ['annotatable', 'word_cloud'] + OPEN_ENDED_COMPONENT_TYPES ADVANCED_COMPONENT_CATEGORY = 'advanced' ADVANCED_COMPONENT_POLICY_KEY = 'advanced_modules' diff --git a/cms/envs/aws.py b/cms/envs/aws.py index 59ad8b835e..05c57d8263 100644 --- a/cms/envs/aws.py +++ b/cms/envs/aws.py @@ -43,6 +43,16 @@ CACHES = ENV_TOKENS['CACHES'] SESSION_COOKIE_DOMAIN = ENV_TOKENS.get('SESSION_COOKIE_DOMAIN') +#Email overrides +DEFAULT_FROM_EMAIL = ENV_TOKENS.get('DEFAULT_FROM_EMAIL', DEFAULT_FROM_EMAIL) +DEFAULT_FEEDBACK_EMAIL = ENV_TOKENS.get('DEFAULT_FEEDBACK_EMAIL', DEFAULT_FEEDBACK_EMAIL) +ADMINS = ENV_TOKENS.get('ADMINS', ADMINS) +SERVER_EMAIL = ENV_TOKENS.get('SERVER_EMAIL', SERVER_EMAIL) + +#Timezone overrides +TIME_ZONE = ENV_TOKENS.get('TIME_ZONE', TIME_ZONE) + + for feature, value in ENV_TOKENS.get('MITX_FEATURES', {}).items(): MITX_FEATURES[feature] = value diff --git a/cms/envs/common.py b/cms/envs/common.py index 8effc773e0..a53830082b 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -152,6 +152,7 @@ IGNORABLE_404_ENDS = ('favicon.ico') EMAIL_BACKEND = 'django.core.mail.backends.console.EmailBackend' DEFAULT_FROM_EMAIL = 'registration@edx.org' DEFAULT_FEEDBACK_EMAIL = 'feedback@edx.org' +SERVER_EMAIL = 'devops@edx.org' ADMINS = ( ('edX Admins', 'admin@edx.org'), ) diff --git a/cms/static/js/base.js b/cms/static/js/base.js index ad81963b0f..c8371fcf64 100644 --- a/cms/static/js/base.js +++ b/cms/static/js/base.js @@ -895,4 +895,4 @@ function saveSetSectionScheduleDate(e) { hideModal(); }); -} \ No newline at end of file +} diff --git a/cms/static/js/hesitate.js b/cms/static/js/hesitate.js index c5848a6c0c..8609562220 100644 --- a/cms/static/js/hesitate.js +++ b/cms/static/js/hesitate.js @@ -2,13 +2,13 @@ * Create a HesitateEvent and assign it as the event to execute: * $(el).on('mouseEnter', CMS.HesitateEvent( expand, 'mouseLeave').trigger); * It calls the executeOnTimeOut function with the event.currentTarget after the configurable timeout IFF the cancelSelector event - * did not occur on the event.currentTarget. - * - * More specifically, when trigger is called (triggered by the event you bound it to), it starts a timer + * did not occur on the event.currentTarget. + * + * More specifically, when trigger is called (triggered by the event you bound it to), it starts a timer * which the cancelSelector event will cancel or if the timer finished, it executes the executeOnTimeOut function * passing it the original event (whose currentTarget s/b the specific ele). It never accumulates events; however, it doesn't hurt for your * code to minimize invocations of trigger by binding to mouseEnter v mouseOver and such. - * + * * NOTE: if something outside of this wants to cancel the event, invoke cachedhesitation.untrigger(null | anything); */ @@ -25,7 +25,7 @@ CMS.HesitateEvent.DURATION = 800; CMS.HesitateEvent.prototype.trigger = function(event) { if (event.data.timeoutEventId == null) { event.data.timeoutEventId = window.setTimeout( - function() { event.data.fireEvent(event); }, + function() { event.data.fireEvent(event); }, CMS.HesitateEvent.DURATION); event.data.originalEvent = event; $(event.data.originalEvent.delegateTarget).on(event.data.cancelSelector, event.data, event.data.untrigger); @@ -45,4 +45,4 @@ CMS.HesitateEvent.prototype.untrigger = function(event) { $(event.data.originalEvent.delegateTarget).off(event.data.cancelSelector, event.data.untrigger); } event.data.timeoutEventId = null; -}; \ No newline at end of file +}; diff --git a/cms/static/js/main.js b/cms/static/js/main.js index 4a9b5d2374..2d72edc4bf 100644 --- a/cms/static/js/main.js +++ b/cms/static/js/main.js @@ -80,6 +80,6 @@ $(document).ready(function(){ $('section.problem-edit').show(); return false; }); - + }); diff --git a/cms/static/js/models/course_info.js b/cms/static/js/models/course_info.js index 8cb5a654cb..3bd7ffa97a 100644 --- a/cms/static/js/models/course_info.js +++ b/cms/static/js/models/course_info.js @@ -1,17 +1,17 @@ -// single per course holds the updates and handouts +// single per course holds the updates and handouts CMS.Models.CourseInfo = Backbone.Model.extend({ // This model class is not suited for restful operations and is considered just a server side initialized container url: '', - + defaults: { "courseId": "", // the location url "updates" : null, // UpdateCollection "handouts": null // HandoutCollection }, - + idAttribute : "courseId" }); - + // course update -- biggest kludge here is the lack of a real id to map updates to originals CMS.Models.CourseUpdate = Backbone.Model.extend({ defaults: { @@ -26,11 +26,11 @@ CMS.Models.CourseUpdate = Backbone.Model.extend({ */ CMS.Models.CourseUpdateCollection = Backbone.Collection.extend({ url : function() {return this.urlbase + "course_info/updates/";}, - + model : CMS.Models.CourseUpdate }); - - - \ No newline at end of file + + + diff --git a/cms/static/js/models/course_relative.js b/cms/static/js/models/course_relative.js index 99bb1c6d77..6608f92a4f 100644 --- a/cms/static/js/models/course_relative.js +++ b/cms/static/js/models/course_relative.js @@ -16,7 +16,7 @@ CMS.Models.Location = Backbone.Model.extend({ }, _tagPattern : /[^:]+/g, _fieldPattern : new RegExp('[^/]+','g'), - + parse: function(payload) { if (_.isArray(payload)) { return { @@ -25,7 +25,7 @@ CMS.Models.Location = Backbone.Model.extend({ course: payload[2], category: payload[3], name: payload[4] - } + }; } else if (_.isString(payload)) { this._tagPattern.lastIndex = 0; // odd regex behavior requires this to be reset sometimes @@ -65,4 +65,4 @@ CMS.Models.CourseRelative = Backbone.Model.extend({ CMS.Models.CourseRelativeCollection = Backbone.Collection.extend({ model : CMS.Models.CourseRelative -}); \ No newline at end of file +}); diff --git a/cms/static/js/models/module_info.js b/cms/static/js/models/module_info.js index 6a593372c4..529d155aba 100644 --- a/cms/static/js/models/module_info.js +++ b/cms/static/js/models/module_info.js @@ -6,5 +6,5 @@ CMS.Models.ModuleInfo = Backbone.Model.extend({ "data": null, "metadata" : null, "children" : null - }, -}); \ No newline at end of file + } +}); diff --git a/cms/static/js/models/settings/advanced.js b/cms/static/js/models/settings/advanced.js index adc259239d..c074b12067 100644 --- a/cms/static/js/models/settings/advanced.js +++ b/cms/static/js/models/settings/advanced.js @@ -11,7 +11,7 @@ CMS.Models.Settings.Advanced = Backbone.Model.extend({ validate: function (attrs) { // Keys can no longer be edited. We are currently not validating values. }, - + save : function (attrs, options) { // wraps the save call w/ the deletion of the removed keys after we know the saved ones worked options = options ? _.clone(options) : {}; @@ -23,7 +23,7 @@ CMS.Models.Settings.Advanced = Backbone.Model.extend({ }; Backbone.Model.prototype.save.call(this, attrs, options); }, - + afterSave : function(self) { // remove deleted attrs if (!_.isEmpty(self.deleteKeys)) { diff --git a/cms/static/js/models/settings/course_details.js b/cms/static/js/models/settings/course_details.js index d41545cca9..b71b4e2ab2 100644 --- a/cms/static/js/models/settings/course_details.js +++ b/cms/static/js/models/settings/course_details.js @@ -66,7 +66,7 @@ CMS.Models.Settings.CourseDetails = Backbone.Model.extend({ save_videosource: function(newsource) { // newsource either is