fsi.models.course_attendee
Attributes
Classes
Comprises the user base mirrored by one-to-one relationship with |
Module Contents
- 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
- es_public = False[source]
Returns True if the model is available to be found by the public. If false, only editors/admins will see this object in the search results.
- subscriptions: sqlalchemy.orm.relationship[onegov.core.types.AppenderQuery[fsi.models.course_subscription.CourseSubscription]][source]
- property course_events: sqlalchemy.orm.Query[onegov.fsi.models.CourseEvent][source]
- Will return the query for not completed (future) courses events
the attendee has a subscription record.
- property confirmed_course_events: sqlalchemy.orm.Query[onegov.fsi.models.CourseEvent][source]
Registered future course events which have been confirmed
- property total_done_course_events: sqlalchemy.orm.Query[onegov.fsi.models.CourseSubscription][source]
- property repeating_courses: sqlalchemy.orm.Query[onegov.fsi.models.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: a) not registered if he had to or b) from the perspective of a course_event, was there a succeeding course event in the range of the refresh interval?