lms.djangoapps.support package

Contents

lms.djangoapps.support package#

Subpackages#

Submodules#

lms.djangoapps.support.decorators module#

Decorators used by the support app.

lms.djangoapps.support.decorators.require_support_permission(func)#

View decorator that requires the user to have permission to use the support UI.

lms.djangoapps.support.message_types module#

ACE message types for support-related emails.

class lms.djangoapps.support.message_types.WholeCourseReset(*args, **kwargs)#

Bases: BaseMessageType

A message to the user when whole course reset was successful.

APP_LABEL = 'support'#
Name = 'wholecoursereset'#

lms.djangoapps.support.models module#

Models used to implement support related models in such as SSO History model

class lms.djangoapps.support.models.CourseResetAudit(*args, **kwargs)#

Bases: TimeStampedModel

Model which records the course reset action’s status and metadata

class CourseResetStatus(*values)#

Bases: TextChoices

COMPLETE = 'complete'#
ENQUEUED = 'enqueued'#
FAILED = 'failed'#
IN_PROGRESS = 'in_progress'#
exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

comment#

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

completed_at#

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

course#

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.

course_enrollment#

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.

course_enrollment_id#
course_id#
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)#
get_status_display(*, field=<django.db.models.fields.CharField: status>)#
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>#
reset_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.

reset_by_id#
status#

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

status_message()#

Return a string message about the status of this audit

class lms.djangoapps.support.models.CourseResetCourseOptIn(*args, **kwargs)#

Bases: TimeStampedModel

Model that represents a course which has opted in to the course reset feature.

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

active#

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

static all_active()#
static all_active_course_ids()#
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.

courseresetaudit_set#

Accessor to the related objects manager on the reverse side of a many-to-one relation.

In the example:

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

Parent.children is a ReverseManyToOneDescriptor instance.

Most of the implementation is delegated to a dynamically defined manager class built by create_forward_many_to_many_manager() defined below.

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)#
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 lms.djangoapps.support.models.HistoricalUserSocialAuth(id, provider, uid, extra_data, created, modified, user, history_id, history_date, history_change_reason, history_type, history_user)#

Bases: HistoricalChanges, Model

exception DoesNotExist#

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned#

Bases: MultipleObjectsReturned

created#

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

extra_data#

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

static get_default_history_user(instance)#

Returns the user specified by get_user method for manually creating historical objects

get_history_type_display(*, field=<django.db.models.fields.CharField: history_type>)#
get_next_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=True, **kwargs)#
get_next_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=True, **kwargs)#
get_next_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=True, **kwargs)#
get_previous_by_created(*, field=<django.db.models.fields.DateTimeField: created>, is_next=False, **kwargs)#
get_previous_by_history_date(*, field=<django.db.models.fields.DateTimeField: history_date>, is_next=False, **kwargs)#
get_previous_by_modified(*, field=<django.db.models.fields.DateTimeField: modified>, is_next=False, **kwargs)#
history_change_reason#

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

history_date#

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

history_id#

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

history_object#
history_type#

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

history_user#

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.

history_user_id#
id#

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

property instance#
instance_type#

alias of UserSocialAuth

modified#

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

property next_record#

Get the next history record for the instance. None if last.

objects = <django.db.models.manager.Manager object>#
property prev_record#

Get the previous history record for the instance. None if first.

provider#

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

revert_url()#

URL for this change in the default admin site.

tracked_fields = [<django.db.models.fields.BigAutoField: id>, <django.db.models.fields.related.ForeignKey: user>, <django.db.models.fields.CharField: provider>, <django.db.models.fields.CharField: uid>, <django.db.models.fields.json.JSONField: extra_data>, <django.db.models.fields.DateTimeField: created>, <django.db.models.fields.DateTimeField: modified>]#
uid#

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

user#

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.

user_id#

lms.djangoapps.support.serializers module#

Serializers for use in the support app.

class lms.djangoapps.support.serializers.CourseEnrollmentSerializer(*args, **kwargs)#

Bases: Serializer

Serializers a student_courseenrollment model object

class Meta#

Bases: object

model#

alias of CourseEnrollment

class lms.djangoapps.support.serializers.ManualEnrollmentSerializer(*args, **kwargs)#

Bases: ModelSerializer

Serializes a manual enrollment audit object.

class Meta#

Bases: object

fields = ('enrolled_by', 'time_stamp', 'reason')#
model#

alias of ManualEnrollmentAudit

class lms.djangoapps.support.serializers.ProgramCourseEnrollmentSerializer(*args, **kwargs)#

Bases: Serializer

Serializes a Program Course Enrollment model object

class Meta#

Bases: object

model#

alias of ProgramCourseEnrollment

get_course_url(obj)#
class lms.djangoapps.support.serializers.ProgramEnrollmentSerializer(*args, **kwargs)#

Bases: Serializer

Serializes a Program Enrollment Model object

class Meta#

Bases: object

model#

alias of ProgramEnrollment

get_program_name(obj)#
lms.djangoapps.support.serializers.serialize_sso_history(user_social_auths_history)#

Serialize history for user social auth model object

lms.djangoapps.support.serializers.serialize_sso_records(user_social_auth, user_social_auths_history)#

Serialize user social auth model object

lms.djangoapps.support.serializers.serialize_user_info(user, user_social_auths=None)#

Helper method to serialize resulting in user_info_object based on passed in django models

lms.djangoapps.support.tasks module#

Celery Tasks for the Instructor App.

lms.djangoapps.support.tasks.get_blocks(course)#

Get a list of problem xblock for the course.

lms.djangoapps.support.tasks.update_audit_status(audit_instance, status)#

lms.djangoapps.support.urls module#

URLs for the student support app.

Module contents#