Skip to content

Commit

Permalink
🔥(xblock) remove duplicate xblock select function and setting
Browse files Browse the repository at this point in the history
This setting was overriden further down in the file so it should now
be removed.
  • Loading branch information
sampaccoud committed Dec 26, 2019
1 parent 12c566e commit ae58223
Showing 1 changed file with 0 additions and 25 deletions.
25 changes: 0 additions & 25 deletions releases/dogwood/3/fun/config/lms/fun.py
Original file line number Diff line number Diff line change
Expand Up @@ -256,31 +256,6 @@
# This force Edx Studio to use our own video provider Xblock on default button
FUN_DEFAULT_VIDEO_PLAYER = "libcast_xblock"


def prefer_fun_xmodules(identifier, entry_points):
"""
Make sure that we use the correct FUN xmodule for video in the studio
"""
from django.conf import settings
from xmodule.modulestore import prefer_xmodules

if identifier == "video" and settings.FUN_DEFAULT_VIDEO_PLAYER is not None:
import pkg_resources
from xblock.core import XBlock

# These entry points are listed in the setup.py of the libcast module
# Inspired by the XBlock.load_class method
entry_points = list(
pkg_resources.iter_entry_points(
XBlock.entry_point, name=settings.FUN_DEFAULT_VIDEO_PLAYER
)
)
return prefer_xmodules(identifier, entry_points)


XBLOCK_SELECT_FUNCTION = prefer_fun_xmodules


MIDDLEWARE_CLASSES += (
"fun.middleware.LegalAcceptance",
"backoffice.middleware.PathLimitedMasqueradeMiddleware",
Expand Down

0 comments on commit ae58223

Please sign in to comment.