fsi.models.course_attendee

Attributes

external_attendee_org

Classes

CourseAttendee

Comprises the user base mirrored by one-to-one relationship with

Module Contents

fsi.models.course_attendee.external_attendee_org = 'Externe Kursteilnehmer'[source]
class fsi.models.course_attendee.CourseAttendee[source]

Bases: onegov.core.orm.Base, onegov.search.ORMSearchable

Comprises the user base mirrored by one-to-one relationship with onegov.user.User which is linked to the LDAP System including external users, that are created by an admin role.

The onegov.user.User model should only contain email and role and is only used for authentication and permissions.

All other attributes should be stored in here.

Entries - external attendees: the do not have a link to a user - CourseAttendees linked to an admin role, aka Kursverantwortlicher - CourseAttendess linked to a member role, aka Kursbesucher

__tablename__ = 'fsi_attendees'[source]
es_properties[source]
es_public = False[source]
id: Column[uuid.UUID][source]
user_id: Column[uuid.UUID | None][source]
user: relationship[User | None][source]
active: Column[bool][source]
source_id: Column[str | None][source]
first_name: Column[str | None][source]
last_name: Column[str | None][source]
organisation: Column[str | None][source]
permissions: Column[list[str] | None][source]
_email: Column[str | None][source]
__str__() str[source]

Return str(self).

meta: Column[dict[str, Any] | None][source]
subscriptions: relationship[AppenderQuery[CourseSubscription]][source]
subscriptions[source]
property title: str[source]
property lead: str | None[source]
property is_external: bool[source]
property role: str[source]
property email: str[source]

Needs a switch for external users

property course_events: Query[CourseEvent][source]
Will return the query for not completed (future) courses events

the attendee has a subscription record.

property confirmed_course_events: Query[CourseEvent][source]

Registered future course events which have been confirmed

property total_done_course_events: Query[CourseSubscription][source]
property repeating_courses: Query[CourseEvent][source]

Will return query to filter for all upcoming courses the attendee has to refresh.

This is necessary to answer:
if one course, how many course events has an attendee:
  1. not registered if he had to

Or from the perspective of a course_event, was there a succeeding course event in the range of the refresh interval?

property undone_registered_courses: Query[CourseEvent][source]
possible_course_events(show_hidden: bool = True, show_locked: bool = False) Query[CourseEvent][source]

Used for the subscription form. Should exclude past courses and courses already registered