Minor fixes for blockstore runtime

This commit is contained in:
Braden MacDonald
2019-09-05 21:57:41 -07:00
parent 3e4e027234
commit 48ee155af8
2 changed files with 5 additions and 0 deletions

View File

@@ -23,6 +23,7 @@ from operator import itemgetter
import six
from django.conf import settings
from lxml import etree
from opaque_keys.edx.keys import CourseKey
from opaque_keys.edx.locator import AssetLocator
from web_fragments.fragment import Fragment
from xblock.completable import XBlockCompletionMode
@@ -200,6 +201,8 @@ class VideoBlock(
return waffle_flags()[DEPRECATE_YOUTUBE].is_enabled(self.location.course_key)
def youtube_disabled_for_course(self):
if not isinstance(self.location.course_key, CourseKey):
return False # Only courses have this flag
if CourseYoutubeBlockedFlag.feature_enabled(self.location.course_key):
return True
else: