Skip to content

Data structure

adavidramos edited this page Dec 28, 2012 · 10 revisions

This document does not capture the new details or new features of the site, but the broad ideas are still accurate enough to offer an introduction.

Models

We have Sessions, Events, Registrations, and Users:

Session (1)----(many) Event (1)----(many) Registration (many)----(1) User  

Session

A session is a grouping of Events (classes). Events in current sessions will appear on the front of the Classes and Events page. Sessions marked as Past or Future show on archive pages, and Hidden sessions do not appear at all.

Event

An event is a class or a special event. Usually an Event is associated with many Registrations.
We’re calling it an Event because “class” would get confusing.

Location

A place where classes are held. An event has one location. Any multi-location classes will be marked at the location of the first meeting, with details to follow in course text. One location can be associated with many events.

Location (1)----(many) Event

Teacher Bio

Teacher bios describe our instructors in detail, with a short bio profile, a name, and a web address. Teacher bios don't have to be associated with users, although we can match a user to a bio. Users are intermediate objects connecting bios to Events.

Bio (1)----(1) User (1)----(many) Event

Registration

A Registration associates a User (student) with an Event (class).

When a student signs up for an event, that creates a Registration object
linking the student and the event. If the student cancels, we record a
cancellation date but retain the object so that we know how many people
cancelled, and when. We can also make notes and mark people absent.

Implementation note: if someone cancels, then rejoins, there will still
be a Registration existing for that student. Set date_cancelled to null
and update date_registered.

Users and User Profiles

Users comes built-in to Django. We are adding additional user profile fields with Userena.

Profile (1)----(1) User

Class/calendar admin interface

Possibly frontend; possibly frontend and backend.

Organizers and facilitators can:

  • See roster and waitlist
  • Send email to roster and waitlist
  • Record student attendance (later)

Organizers can also:

  • Add and remove people to roster
  • Edit class information
  • Change class size
  • Add and remove facilitators
  • Add and remove teachers