Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cms/djangoapps/contentstore/views/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -69,11 +69,13 @@ def is_games_xblock_enabled():
'openassessment',
'drag-and-drop-v2',
]
if is_games_xblock_enabled():
COMPONENT_TYPES.append('games')

BETA_COMPONENT_TYPES = ['library_v2', 'itembank']

if is_games_xblock_enabled():
COMPONENT_TYPES.append('games')
BETA_COMPONENT_TYPES.append('games')

ADVANCED_COMPONENT_TYPES = sorted({name for name, class_ in XBlock.load_classes()} - set(COMPONENT_TYPES))

ADVANCED_PROBLEM_TYPES = settings.ADVANCED_PROBLEM_TYPES
Expand Down
6 changes: 6 additions & 0 deletions cms/static/js/views/pages/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -301,6 +301,12 @@ function($, _, Backbone, gettext, BasePage,
this.xblockView.refresh(xblockView, block_added, is_duplicate);
// Update publish and last modified information from the server.
this.model.fetch();

// Auto-open editor for games blocks when first added
if (block_added && !is_duplicate && xblockView && xblockView.$el &&
xblockView.$el.find('.xblock-header-primary').attr('data-block-type') === 'games') {
setTimeout(function() { xblockView.$el.find('.edit-button').first().trigger('click'); }, 500);
}
},

renderAddXBlockComponents: function() {
Expand Down
Loading