diff --git a/cms/envs/common.py b/cms/envs/common.py index 588bdd7a4116..7452b2c5dad0 100644 --- a/cms/envs/common.py +++ b/cms/envs/common.py @@ -34,7 +34,7 @@ from lms.lib.xblock.mixin import LmsBlockMixin from cms.lib.xblock.mixin import CmsBlockMixin from xmodule.modulestore.inheritance import InheritanceMixin -from xmodule.x_module import XModuleMixin, only_xmodules +from xmodule.x_module import XModuleMixin, prefer_xmodules from dealer.git import git ############################ FEATURE CONFIGURATION ############################# @@ -222,15 +222,10 @@ # once the responsibility of XBlock creation is moved out of modulestore - cpennington XBLOCK_MIXINS = (LmsBlockMixin, CmsBlockMixin, InheritanceMixin, XModuleMixin) -# Only allow XModules in Studio -XBLOCK_SELECT_FUNCTION = only_xmodules - -# Use the following lines to allow any xblock in Studio, -# either by uncommenting them here, or adding them to your private.py +# Allow any XBlock in Studio # You should also enable the ALLOW_ALL_ADVANCED_COMPONENTS feature flag, so that # xblocks can be added via advanced settings -# from xmodule.x_module import prefer_xmodules -# XBLOCK_SELECT_FUNCTION = prefer_xmodules +XBLOCK_SELECT_FUNCTION = prefer_xmodules ############################ SIGNAL HANDLERS ################################ # This is imported to register the exception signal handling that logs exceptions @@ -472,6 +467,9 @@ # for course creator table 'django.contrib.admin', + # XBlocks containing migrations + 'mentoring', + # for managing course modes 'course_modes', diff --git a/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee b/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee index c9e146797579..1ea4f88e0714 100644 --- a/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee +++ b/common/static/coffee/spec/discussion/view/response_comment_show_view_spec.coffee @@ -63,23 +63,30 @@ describe 'ResponseCommentShowView', -> @comment.unflagAbuse() expect(@comment.get 'abuse_flaggers').toEqual [] - describe 'comment deletion', -> + describe '_delete', -> - it 'triggers the delete event when the delete icon is clicked', -> + it 'triggers on the correct events', -> DiscussionUtil.loadRoles [] @comment.updateInfo {ability: {'can_delete': true}} + @view.render() + DiscussionViewSpecHelper.checkButtonEvents(@view, "_delete", ".action-delete") + + it 'triggers the delete event', -> triggerTarget = jasmine.createSpy() @view.bind "comment:_delete", triggerTarget - @view.render() - @view.$el.find('.action-delete').click() + @view._delete() + expect(triggerTarget).toHaveBeenCalled() - describe 'comment edit', -> + describe 'edit', -> - it 'triggers comment:edit when the edit button is clicked', -> + it 'triggers on the correct events', -> DiscussionUtil.loadRoles [] @comment.updateInfo {ability: {'can_edit': true}} + @view.render() + DiscussionViewSpecHelper.checkButtonEvents(@view, "edit", ".action-edit") + + it 'triggers comment:edit when the edit button is clicked', -> triggerTarget = jasmine.createSpy() @view.bind "comment:edit", triggerTarget - @view.render() - @view.$el.find(".action-edit").click() + @view.edit() expect(triggerTarget).toHaveBeenCalled() diff --git a/common/static/coffee/src/discussion/views/response_comment_show_view.coffee b/common/static/coffee/src/discussion/views/response_comment_show_view.coffee index e08011fef905..3ca957030034 100644 --- a/common/static/coffee/src/discussion/views/response_comment_show_view.coffee +++ b/common/static/coffee/src/discussion/views/response_comment_show_view.coffee @@ -2,8 +2,14 @@ if Backbone? class @ResponseCommentShowView extends DiscussionContentView events: - "click .action-delete": "_delete" - "click .action-edit": "edit" + "click .action-delete": + (event) -> @_delete(event) + "keydown .action-delete": + (event) -> DiscussionUtil.activateOnSpace(event, @_delete) + "click .action-edit": + (event) -> @edit(event) + "keydown .action-edit": + (event) -> DiscussionUtil.activateOnSpace(event, @edit) tagName: "li" @@ -52,7 +58,7 @@ if Backbone? else if DiscussionUtil.isTA(@model.get("user_id")) @$el.find("a.profile-link").after('' + gettext('Community TA') + '') - _delete: (event) -> + _delete: (event) => @trigger "comment:_delete", event renderFlagged: => diff --git a/lms/envs/common.py b/lms/envs/common.py index cf6107f17c21..a64f77eafd3e 100644 --- a/lms/envs/common.py +++ b/lms/envs/common.py @@ -34,7 +34,7 @@ from lms.lib.xblock.mixin import LmsBlockMixin from xmodule.modulestore.inheritance import InheritanceMixin -from xmodule.x_module import XModuleMixin, only_xmodules +from xmodule.x_module import XModuleMixin, prefer_xmodules ################################### FEATURES ################################### # The display name of the platform to be used in templates/emails/etc. @@ -435,13 +435,8 @@ # once the responsibility of XBlock creation is moved out of modulestore - cpennington XBLOCK_MIXINS = (LmsBlockMixin, InheritanceMixin, XModuleMixin) -# Only allow XModules in the LMS -XBLOCK_SELECT_FUNCTION = only_xmodules - -# Use the following lines to allow any xblock in the LMS, -# either by uncommenting them here, or adding them to your private.py -# from xmodule.x_module import prefer_xmodules -# XBLOCK_SELECT_FUNCTION = prefer_xmodules +# Allow any XBlock in the LMS +XBLOCK_SELECT_FUNCTION = prefer_xmodules #################### Python sandbox ############################################ @@ -1164,6 +1159,9 @@ 'reverification', 'embargo', + + # XBlocks containing migrations + 'mentoring', ) ######################### MARKETING SITE ############################### diff --git a/lms/static/sass/shared/_modal.scss b/lms/static/sass/shared/_modal.scss index 88a9c3121e5a..8c97b57f665b 100644 --- a/lms/static/sass/shared/_modal.scss +++ b/lms/static/sass/shared/_modal.scss @@ -234,9 +234,10 @@ input[type="submit"] { display: block; - height: 45px; + height: auto; margin: 0 auto; width: 100%; + white-space: normal; } } } diff --git a/requirements/edx/edx-private.txt b/requirements/edx/edx-private.txt index b47f56052a81..34999f38ad7e 100644 --- a/requirements/edx/edx-private.txt +++ b/requirements/edx/edx-private.txt @@ -1 +1,4 @@ --e git+ssh://git@github.com/jazkarta/edX-jsdraw.git@1e580c06061a10235fb0df6575e49a2cd9dcf126#egg=edx-jsdraw +# Requirements for edx.org that aren't necessarily needed for Open edX. + +-e git+ssh://git@github.com/jazkarta/edX-jsdraw.git@df9d048e331a642193e5aa2e03650fb84a9d715f#egg=edx-jsdraw +-e git+https://github.com/gsehub/xblock-mentoring.git@69a546eadeb4d038f6851bb54286c6c6fdbe8c87#egg=xblock-mentoring