assistants.models¶
Contains all database models.
Module Contents¶
-
class
assistants.models.Assistant¶ Bases:
django.db.models.ModelDefines an assistant.
-
save(self, *args, **kwargs)¶ Create or update the statement forwarder when assistant is created or updated.
-
create_statement_forwarder(self, query)¶ Create the statement forwarder in Learning Locker and save the id into the database.
- Parameters
query (str) – Query of the statement forwarder.
-
delete(self, *args, **kwargs)¶ Delete the statement forwarder when Action is deleted.
-
-
class
assistants.models.NewActivityCreated¶ Bases:
assistants.models.AssistantDefines the actions of sending a notification when new activities are added.
-
class
assistants.models.QuizCompletedFeedback¶ Bases:
assistants.models.AssistantDefines the actions of sending feedback when a student has completed a quiz.
-
save(self, *args, **kwargs)¶ Use the save function inherited from Assistant but alter two variables.
-
-
assistants.models.build_new_activity_notification(course_name, activity_name, activity_type)¶ Build the notification message with the variables from the JSON response.
- Parameters
activity_type (str) – The type of the activity. Either quiz or assignment.
course_name (str) – The name of the course the activity is added to.
activity_name (str) – The name of the new activity.
- Returns
The message that will be send.
- Return type
str