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
10 changes: 10 additions & 0 deletions cms/djangoapps/contentstore/views/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,12 @@
from xmodule.modulestore.django import modulestore # lint-amnesty, pylint: disable=wrong-import-order
from xmodule.modulestore.exceptions import ItemNotFoundError # lint-amnesty, pylint: disable=wrong-import-order

try:
from games.toggles import is_games_xblock_enabled # pylint: disable=import-error
except ImportError:
def is_games_xblock_enabled():
return False

__all__ = [
'container_handler',
'component_handler',
Expand All @@ -63,6 +69,8 @@
'openassessment',
'drag-and-drop-v2',
]
if is_games_xblock_enabled():
COMPONENT_TYPES.append('games')

BETA_COMPONENT_TYPES = ['library_v2', 'itembank']

Expand Down Expand Up @@ -288,6 +296,8 @@ def create_support_legend_dict():
'itembank': _("Problem Bank"),
'drag-and-drop-v2': _("Drag and Drop"),
}
if is_games_xblock_enabled():
component_display_names['games'] = _("Games")

component_templates = []
categories = set()
Expand Down
10 changes: 10 additions & 0 deletions cms/static/images/large-games-icon.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions cms/static/js/views/pages/container.js
Original file line number Diff line number Diff line change
Expand Up @@ -512,6 +512,7 @@ function($, _, Backbone, gettext, BasePage,
if((useNewTextEditor === 'True' && blockType === 'html')
|| (useNewVideoEditor === 'True' && blockType === 'video')
|| (useNewProblemEditor === 'True' && blockType === 'problem')
|| (blockType === 'games')
) {
var destinationUrl = primaryHeader.attr('authoring_MFE_base_url')
+ '/' + blockType
Expand Down
6 changes: 6 additions & 0 deletions cms/static/sass/assets/_graphics.scss
Original file line number Diff line number Diff line change
Expand Up @@ -80,3 +80,9 @@
height: ($baseline*3);
background: url('#{$static-path}/images/large-itembank-icon.png') center no-repeat;
}

.large-games-icon {
display: inline-block;
width: ($baseline*3);
height: ($baseline*3);
background: url('#{$static-path}/images/large-games-icon.svg') center no-repeat; }
Loading