openedx.core.djangoapps.video_config package#

Submodules#

openedx.core.djangoapps.video_config.forms module#

Defines a form for providing validation of HLS Playback course-specific configuration.

class openedx.core.djangoapps.video_config.forms.CourseHLSPlaybackFlagAdminForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)#

Bases: CourseSpecificFlagAdminBaseForm

Form for course-specific HLS Playback configuration.

class Meta#

Bases: object

fields = '__all__'#
model#

alias of CourseHLSPlaybackEnabledFlag

base_fields = {'course_id': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>}#
declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

class openedx.core.djangoapps.video_config.forms.CourseSpecificFlagAdminBaseForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)#

Bases: ModelForm

Form for course-specific feature configuration.

class Meta#

Bases: object

abstract = True#
base_fields = {}#
clean_course_id()#

Validate the course id

declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

class openedx.core.djangoapps.video_config.forms.CourseVideoTranscriptFlagAdminForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)#

Bases: CourseSpecificFlagAdminBaseForm

Form for course-specific Video Transcript configuration.

class Meta#

Bases: object

fields = '__all__'#
model#

alias of CourseVideoTranscriptEnabledFlag

base_fields = {'course_id': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>}#
declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

class openedx.core.djangoapps.video_config.forms.CourseYoutubeBlockedFlagAdminForm(data=None, files=None, auto_id='id_%s', prefix=None, initial=None, error_class=<class 'django.forms.utils.ErrorList'>, label_suffix=None, empty_permitted=False, instance=None, use_required_attribute=None, renderer=None)#

Bases: CourseSpecificFlagAdminBaseForm

Form for course-specific youtube blocking configuration.

class Meta#

Bases: object

fields = '__all__'#
model#

alias of CourseYoutubeBlockedFlag

base_fields = {'course_id': <django.forms.fields.CharField object>, 'enabled': <django.forms.fields.BooleanField object>}#
declared_fields = {}#
property media#

Return all media required to render the widgets on this form.

openedx.core.djangoapps.video_config.models module#

Configuration models for Video XModule

class openedx.core.djangoapps.video_config.models.CourseHLSPlaybackEnabledFlag(*args, **kwargs)#

Bases: ConfigurationModel

Enables HLS Playback for a specific course. Global feature must be enabled for this to take effect.

exception DoesNotExist#

Bases: ObjectDoesNotExist

KEY_FIELDS = ('course_id',)#
exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

changed_by_id#
course_id#

DO NOT REUSE THIS CLASS. Provided for backwards compatibility only!

A placeholder class that provides a way to set the attribute on the model.

enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class openedx.core.djangoapps.video_config.models.CourseVideoTranscriptEnabledFlag(*args, **kwargs)#

Bases: ConfigurationModel

Enables Video Transcript for a specific course. Global feature must be enabled for this to take effect. When this feature is enabled, 3rd party transcript integration functionality would be available for the specific course and S3 video transcript would be served (currently as a fallback).

exception DoesNotExist#

Bases: ObjectDoesNotExist

KEY_FIELDS = ('course_id',)#
exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

changed_by_id#
course_id#

DO NOT REUSE THIS CLASS. Provided for backwards compatibility only!

A placeholder class that provides a way to set the attribute on the model.

enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class openedx.core.djangoapps.video_config.models.CourseYoutubeBlockedFlag(*args, **kwargs)#

Bases: ConfigurationModel

Disables the playback of youtube videos for a given course. If the flag is present for the course, and set to “enabled”, then youtube is disabled for that course. .. no_pii

exception DoesNotExist#

Bases: ObjectDoesNotExist

KEY_FIELDS = ('course_id',)#
exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

changed_by_id#
course_id#

DO NOT REUSE THIS CLASS. Provided for backwards compatibility only!

A placeholder class that provides a way to set the attribute on the model.

enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod feature_enabled(course_id)#

Determine if the youtube blocking feature is enabled for the specified course id. Argument:

course_id (CourseKey): course id for whom feature will be checked

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class openedx.core.djangoapps.video_config.models.HLSPlaybackEnabledFlag(*args, **kwargs)#

Bases: ConfigurationModel

Enables HLS Playback across the platform. When this feature flag is set to true, individual courses must also have HLS Playback enabled for this feature to take effect.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

changed_by_id#
enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

enabled_for_all_courses#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod feature_enabled(course_id)#

Looks at the currently active configuration model to determine whether the HLS Playback feature is available.

If the feature flag is not enabled, the feature is not available. If the flag is enabled for all the courses, feature is available. If the flag is enabled and the provided course_id is for an course

with HLS Playback enabled, the feature is available.

Parameters:

course_id (CourseKey) – course id for whom feature will be checked.

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class openedx.core.djangoapps.video_config.models.MigrationEnqueuedCourse(*args, **kwargs)#

Bases: TimeStampedModel

Temporary model to persist the course IDs who has been enqueued for transcripts migration to S3.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

command_run#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

course_id#

DO NOT REUSE THIS CLASS. Provided for backwards compatibility only!

A placeholder class that provides a way to set the attribute on the model.

created#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)#
get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)#
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)#
get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)#
modified#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
class openedx.core.djangoapps.video_config.models.TranscriptMigrationSetting(*args, **kwargs)#

Bases: ConfigurationModel

Arguments for the Transcript Migration management command

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

all_courses#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

batch_size#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

changed_by_id#
command_run#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

commit#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

course_ids#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

force_update#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

increment_run()#

Increments the run which indicates how many time the mgmt. command has run.

class openedx.core.djangoapps.video_config.models.UpdatedCourseVideos(*args, **kwargs)#

Bases: TimeStampedModel

Temporary model to persist the course videos which have been enqueued to update video thumbnails.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

command_run#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

course_id#

DO NOT REUSE THIS CLASS. Provided for backwards compatibility only!

A placeholder class that provides a way to set the attribute on the model.

created#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

edx_video_id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=True, **kwargs)#
get_next_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=True, **kwargs)#
get_previous_by_created(*, field=<model_utils.fields.AutoCreatedField: created>, is_next=False, **kwargs)#
get_previous_by_modified(*, field=<model_utils.fields.AutoLastModifiedField: modified>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

modified#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

objects = <django.db.models.manager.Manager object>#
class openedx.core.djangoapps.video_config.models.VideoThumbnailSetting(*args, **kwargs)#

Bases: ConfigurationModel

Arguments for the Video Thumbnail management command

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

all_course_videos#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

batch_size#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

changed_by_id#
command_run#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

commit#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

course_ids#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

increment_run()#

Increments the run which indicates the management command run count.

offset#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

update_offset()#
videos_per_task#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

class openedx.core.djangoapps.video_config.models.VideoTranscriptEnabledFlag(*args, **kwargs)#

Bases: ConfigurationModel

Enables Video Transcript across the platform. When this feature flag is set to true, individual courses must also have Video Transcript enabled for this feature to take effect. When this feature is enabled, 3rd party transcript integration functionality would be available accross all courses or some specific courses and S3 video transcript would be served (currently as a fallback).

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

change_date#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

changed_by#

Accessor to the related object on the forward side of a many-to-one or one-to-one (via ForwardOneToOneDescriptor subclass) relation.

In the example:

class Child(Model):
    parent = ForeignKey(Parent, related_name='children')

Child.parent is a ForwardManyToOneDescriptor instance.

changed_by_id#
enabled#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

enabled_for_all_courses#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

classmethod feature_enabled(course_id)#

Looks at the currently active configuration model to determine whether the Video Transcript feature is available.

If the feature flag is not enabled, the feature is not available. If the flag is enabled for all the courses, feature is available. If the flag is enabled and the provided course_id is for an course

with Video Transcript enabled, the feature is available.

Parameters:

course_id (CourseKey) – course id for whom feature will be checked.

get_next_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=True, **kwargs)#
get_previous_by_change_date(*, field=<django.db.models.fields.DateTimeField: change_date>, is_next=False, **kwargs)#
id#

A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.

openedx.core.djangoapps.video_config.toggles module#

Video config toggles

Module contents#