From f9b5d619874c0f6a52107f2b6c6ab70b3802b178 Mon Sep 17 00:00:00 2001 From: Marcos Prieto Date: Tue, 7 Jan 2025 10:21:30 +0100 Subject: [PATCH] Model changes to add start/end dates to courses --- lms/models/lms_course.py | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lms/models/lms_course.py b/lms/models/lms_course.py index 558be24957..7cc5022a3e 100644 --- a/lms/models/lms_course.py +++ b/lms/models/lms_course.py @@ -7,6 +7,7 @@ - LMSCourse membership stores role information, GroupingMembership doesn't. """ +from datetime import datetime from typing import TYPE_CHECKING import sqlalchemy as sa @@ -46,6 +47,12 @@ class LMSCourse(CreatedUpdatedMixin, Base): lti_context_memberships_url: Mapped[str | None] = mapped_column() """URL for the Names and Roles endpoint, stored during launch to use it outside the launch context.""" + starts_at: Mapped[datetime | None] = mapped_column() + """The start date of the course. Only for when we get this information directly from the LMS""" + + ends_at: Mapped[datetime | None] = mapped_column() + """The end date of the course. Only for when we get this information direclty from the LMS""" + class LMSCourseApplicationInstance(CreatedUpdatedMixin, Base): """Record of on which installs (application instances) we have seen one course."""