physics_workload.app.models.unit

Classes

Unit

Academic unit, e.g. PHYS1001

Module Contents

class physics_workload.app.models.unit.Unit

Bases: app.models.common.ModelCommon

Academic unit, e.g. PHYS1001

icon = 'book'
url_root = 'module'
code
name
academic_group
students
lectures
problem_classes
coursework
synoptic_lectures
exams
credits
exam_mark_fraction
coursework_mark_fraction
has_dissertation
has_placement
description
notes
class Meta
ordering = ['name']
verbose_name = 'Module'
verbose_name_plural = 'Modules'
constraints
__str__() str
get_short_name() str
Returns:

Just returns the code. Needed for parity with the AcademicGroup model, for Task ownership.

get_instance_header_short() str
Returns:

Wraps instance header, but only uses a short nane,

get_marked_dissertation_count() int | None
Returns:

Returns the total number of dissertations marked

has_access(user: django.contrib.auth.models.AbstractUser) bool

Only users assigned to a module can see the details :param user: The user :return: True if the user is assigned to a task in this module

update_load() bool
Returns:

True if the load of any of the tasks needed updating.