quiz package¶
Submodules¶
quiz.admin module¶
quiz.apps module¶
quiz.forms module¶
-
class
quiz.forms.
UploadFileForm
(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, field_order=None, use_required_attribute=None, renderer=None)[source]¶ Bases:
django.forms.forms.Form
-
base_fields
= {'file': <django.forms.fields.FileField object>}¶
-
declared_fields
= {'file': <django.forms.fields.FileField object>}¶
-
property
media
¶ Return all media required to render the widgets on this form.
-
quiz.models module¶
-
class
quiz.models.
Permission
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This class is used to create the userspermission table in database.Defines the permission of the user default permission is Student the admin can provide staff permission
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ 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>¶
-
role
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
userId
¶ 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 aForwardManyToOneDescriptor
instance.
-
userId_id
¶
-
exception
-
class
quiz.models.
Questions
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This class is used to create the Questions table in database.Contains info about the questions within a particular quiz and its attributes like socre and negative marks and correct answer
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
answer
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
cribs_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
explainations
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
marks
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
negative
¶ 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>¶
-
option1
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
option2
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
option3
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
option4
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
question
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
questionId
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quizCode
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quizId
¶ 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 aForwardManyToOneDescriptor
instance.
-
quizId_id
¶
-
submission_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
type
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
exception
-
class
quiz.models.
cribs
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This class is used to create the cribs table in database.Contains cribs raised by students
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
cribs
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
id
¶ 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>¶
-
questionId
¶ 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 aForwardManyToOneDescriptor
instance.
-
questionId_id
¶
-
quizId
¶ 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 aForwardManyToOneDescriptor
instance.
-
quizId_id
¶
-
studentId
¶ 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 aForwardManyToOneDescriptor
instance.
-
studentId_id
¶
-
exception
-
class
quiz.models.
log
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This class is used to create the log table in database.stores the student activity information for monitoring the students
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
fullscreen
¶ 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_logtime
(*, field=<django.db.models.fields.DateTimeField: logtime>, is_next=True, **kwargs)¶
-
get_previous_by_logtime
(*, field=<django.db.models.fields.DateTimeField: logtime>, 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.
-
logtime
¶ 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>¶
-
questions
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quizId
¶ 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 aForwardManyToOneDescriptor
instance.
-
quizId_id
¶
-
studentId
¶ 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 aForwardManyToOneDescriptor
instance.
-
studentId_id
¶
-
exception
-
class
quiz.models.
quiz
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This class is used to create the quiz table in database.Contains information about the quiz time,length,code and instructor who has created it
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
cribs_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
date
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
property
end_datetime
¶
-
get_next_by_date
(*, field=<django.db.models.fields.DateField: date>, is_next=True, **kwargs)¶
-
get_previous_by_date
(*, field=<django.db.models.fields.DateField: date>, is_next=False, **kwargs)¶
-
length
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
log_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
objects
= <django.db.models.manager.Manager object>¶
-
questions_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
quizCode
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quizDone
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quizId
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quizInfo
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
quizInstructor
¶ 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 aForwardManyToOneDescriptor
instance.
-
quizInstructor_id
¶
-
result_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
startTime
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
submission_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 aReverseManyToOneDescriptor
instance.Most of the implementation is delegated to a dynamically defined manager class built by
create_forward_many_to_many_manager()
defined below.
-
exception
-
class
quiz.models.
result
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This class is used to create the result table in database.Stores cumulative score by each student in each quiz
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
marks
¶ 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>¶
-
quizId
¶ 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 aForwardManyToOneDescriptor
instance.
-
quizId_id
¶
-
studentId
¶ 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 aForwardManyToOneDescriptor
instance.
-
studentId_id
¶
-
exception
-
class
quiz.models.
submission
(*args, **kwargs)[source]¶ Bases:
django.db.models.base.Model
This class is used to create the Submission table in database.Contains info about each questions answer submitted by each student
-
exception
DoesNotExist
¶ Bases:
django.core.exceptions.ObjectDoesNotExist
-
exception
MultipleObjectsReturned
¶ Bases:
django.core.exceptions.MultipleObjectsReturned
-
id
¶ 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>¶
-
option
¶ A wrapper for a deferred-loading field. When the value is read from this object the first time, the query is executed.
-
questionId
¶ 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 aForwardManyToOneDescriptor
instance.
-
questionId_id
¶
-
quizId
¶ 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 aForwardManyToOneDescriptor
instance.
-
quizId_id
¶
-
studentId
¶ 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 aForwardManyToOneDescriptor
instance.
-
studentId_id
¶
-
exception
quiz.tests module¶
quiz.views module¶
-
quiz.views.
add_quiz
(request)[source]¶ This function makes insert into database for all the manually entered quiz questions
-
quiz.views.
getbeat
(request)[source]¶ This function track the student activity for displaying the same on the instructor monitor page
-
quiz.views.
handle_uploaded_file
(f, q1)[source]¶ This function reads the csv file uploaded by the instructor and makes insert into the database
-
quiz.views.
heartbeat
(request)[source]¶ This function keeps track of student whether he exited full screen and which question he is currently on
-
quiz.views.
index
(request)[source]¶ This function is responsible for for rendering the quiz page to the student for the selected quiz by the student
-
quiz.views.
instructor
(request)[source]¶ This function is used to display the instructor with graphs(bell curve and histogram) , cribs raised by the students of the quiz selected
-
quiz.views.
monitor
(request)[source]¶ Thid function renders the monitor page for the instructor to view ongoing quiz , and monitor the student activity
-
quiz.views.
ongoing_quiz
(request)[source]¶ Displays all ongoing quiz to the professor who has hosted the quiz
-
quiz.views.
quizTable
(request)[source]¶ This function helps in rendering all the quiz hosted by the instructor
-
quiz.views.
result
(request)[source]¶ This function is called on submission of quiz to calculate the marks og the student the marks are added to total score for every correct answer and for every wronf answer the negative marks set by instructor are deducted
-
quiz.views.
save_ans
(request)[source]¶ this function keeps saving the response of the quiz while the student is attempting in order to ensure if due to network failure student quiz stops then he can continue later from the point where he was interrupted
-
quiz.views.
student
(request)[source]¶ This function depending on the role of the logged in user load the professor dasboard or student dashboard
-
quiz.views.
submissions
(request)[source]¶ This function helps in rendering the submission page showing the student all the previous attempted quizzes
-
quiz.views.
upload
(request)[source]¶ This function Renders the upload page for instructor to upload quiz through csv