restrict move action

This commit is contained in:
Mushtaq Ali
2017-02-02 21:11:11 +05:00
parent e9b8e17fc8
commit 485ffb1b68
14 changed files with 478 additions and 85 deletions

View File

@@ -338,6 +338,7 @@ class LibraryContentModule(LibraryContentFields, XModule, StudioEditableModule):
'display_name': self.display_name or self.url_name,
}))
context['can_edit_visibility'] = False
context['can_move'] = False
self.render_children(context, fragment, can_reorder=False, can_add=False)
# else: When shown on a unit page, don't show any sort of preview -
# just the status of this block in the validation area.

View File

@@ -80,6 +80,7 @@ class LibraryRoot(XBlock):
children_to_show = self.children[item_start:item_end] # pylint: disable=no-member
force_render = context.get('force_render', None)
context['can_move'] = False
for child_key in children_to_show:
# Children must have a separate context from the library itself. Make a copy.