fsi.collections.audit

Attributes

T

Classes

AuditCollection

Displays the list of attendees filtered by a course and organisation

Module Contents

fsi.collections.audit.T[source]
class fsi.collections.audit.AuditCollection(session: sqlalchemy.orm.Session, course_id: UUID | None, auth_attendee: onegov.fsi.models.CourseAttendee, organisations: list[str] | None = None, letter: str | None = None, page: int = 0, exclude_inactive: bool = True)[source]

Bases: onegov.core.collection.GenericCollection[AuditRow], onegov.core.collection.Pagination[AuditRow]

Displays the list of attendees filtered by a course and organisation for evaluation if they subscribed and completed a course event.

The organisation filter should also be exact and not fuzzy.

batch_size = 20[source]
page = 0[source]
course_id[source]
auth_attendee[source]
organisations = [][source]
letter = None[source]
exclude_inactive = True[source]
subset() Query[AuditRow][source]

Returns an SQLAlchemy query containing all records that should be considered for pagination.

property page_index: int[source]

Returns the current page index (starting at 0).

page_by_index(index: int) Self[source]

Returns the page at the given index. A page here means an instance of the class inheriting from the Pagination base class.

by_letter_and_orgs(letter: str | None = None, orgs: list[str] | None = None) Self[source]
by_letter(letter: str | None) Self[source]
__eq__(other: object) bool[source]

Returns True if the current and the other Pagination instance are equal. Used to find the current page in a list of pages.

ranked_subscription_query(past_only: bool = True) Query[RankedSubscriptionRow][source]

Ranks all subscriptions of all events of a course windowed over the attendee_id and ranked after completed, most recent Use this query to make a join with any collection of attendees.

last_subscriptions() Query[LastSubscriptionRow][source]

Retrieve the last completed subscription by attemdee for a given the course_id.

filter_attendees_by_role(query: Query[T]) Query[T][source]

Filter permissions of editor, exclude external,

query() Query[AuditRow][source]
next_subscriptions(request: onegov.fsi.request.FsiRequest) dict[uuid.UUID, tuple[str, datetime.datetime]][source]
property model_class: type[onegov.fsi.models.CourseAttendee][source]
property course: onegov.fsi.models.Course | None[source]
property used_letters: list[str][source]

Returns a list of all the distinct first letters of the peoples last names.

property relevant_courses: tuple[tuple[uuid.UUID, str], Ellipsis][source]