Skip to content

Commit

Permalink
Model changes to add start/end dates to courses
Browse files Browse the repository at this point in the history
  • Loading branch information
marcospri committed Jan 8, 2025
1 parent 145f4b2 commit f9b5d61
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions lms/models/lms_course.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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."""
Expand Down

0 comments on commit f9b5d61

Please sign in to comment.