physics_workload.app.utility¶
Functions¶
|
Output function for producing tidy dates. |
|
Updates the load of all assignments, staff, e.t.c. |
Module Contents¶
- physics_workload.app.utility.year_to_academic_year(date: datetime.datetime) str ¶
Output function for producing tidy dates.
- Parameters:
date – A datetime for the last year of an academic year (e.g. 2024/06/15)
- Returns:
The academic year that datetime belongs to (e.g. 23/24)
- physics_workload.app.utility.update_all_loads(request: django.http.HttpRequest | None = None) int ¶
Updates the load of all assignments, staff, e.t.c.
A very expensive function but required given the weirdly self-referential definition.
- Parameters:
request – The web request, required to provide an output message.
- Returns:
The number of cycles taken to update the full-time equivalent loads.