Welcome to CodeMarker’s documentation!

Feel free to explore each component at your discertion. You can also search the docs using the input field in the sidebar.

Please note that the Django-generated files haven’t been documented. Please refer to Django’s documentation for their overview.

Contact Team Alpha in case of any issues:

models.py

Models information for all entities used in the system

@TeamAlpha 2018 CodeMarker models.py

class app.models.Assessment(id, name, description, additional_help, deadline, static_input, dynamic_input, num_of_static, languages, resource, course, input_generator, created_at, updated_at)[source]

Bases: django.db.models.base.Model

class app.models.Course(id, name, description, created_at, updated_at, professor)[source]

Bases: django.db.models.base.Model

class app.models.InputGenerator(id, filename, language, assessment, created_at, updated_at)[source]

Bases: django.db.models.base.Model

class app.models.Resource(id, filename, status, language, assessment, created_at, updated_at)[source]

Bases: django.db.models.base.Model

class app.models.Submission(id, filename, info, timeTaken, late, status, result, language, marks, user, assessment, created_at, updated_at)[source]

Bases: django.db.models.base.Model

views.py

submission_processor.py

factory.py

Module containing creators for subsequent elements, such as assessments or submissions. Adheres to ‘factory’ architectural pattern.

Factories to create new resources with lengthy methods.

@TeamAlpha 2018 CodeMarker factory.py

app.factory.assessment_creator(self, serializer)[source]

Method responsible for creating new assessments

Raises:
MultiValueDictKeyError – Raised when not enough arguments have been passed
Returns:
HttpResponse – Whether resource has been successfully created or not
app.factory.course_creator(self, serializer)[source]

Dummy method for course creation, for future reference

app.factory.import_users(request)[source]

Given an uploaded CSV file containing list of users, import them into DB

Arguments:
request - request containing the uploaded CSV file
Returns:
request – Whether the import was successful or not
app.factory.submission_creator(self, serializer)[source]

Method for creating new submissions

Arguments:
serializer - passed from the views class, contains POST information
Returns:
HttpResponse - whether creation was successful or not

docker_processor.py

serializers.py

Autogenerated module by Django used to serialize Data used by the application

@TeamAlpha 2018 CodeMarker serializers.py

backup_service.py

Module containing methods for creating and restoring backups of the system

@TeamAlpha 2018 CodeMarker backup_service.py

app.backup_service.create_backup()[source]

Create backup zip and store it in the backups/ folder

Returns:
response – description whether backup was successful
app.backup_service.restore_backup(request)[source]

Provided a backup file, restore the file system from it

Returns:
request – whether backup was successful or not.

test_assessments.py

test_backup.py

test_courses_users.py

test_courses.py

test_submissions.py

test_users.py

Indices and tables