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.models module#

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

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.AutoField: id>, <django.db.models.fields.related.ForeignKey: user>, <django.db.models.fields.CharField: provider>, <django.db.models.fields.CharField: uid>, <social_django.fields.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.urls module#

URLs for the student support app.

Module contents#