Safe Haskell | None |
---|---|
Language | Haskell2010 |
WeekDaze.Data.Teacher
Description
AUTHOR
- Dr. Alistair Ward
DESCRIPTION
- Describes the attributes of a teacher.
TODO
- Some teachers work half days, or even just specific time-slots; so
getWorkingWeek
is an inadequate description.
Synopsis
- type Service synchronisationId level timeslotId = Set (Course synchronisationId level timeslotId)
- data Profile synchronisationId level timeslotId locationId teachingRatio
- maximumTeachingRatioTag :: String
- serviceTag :: String
- specialtyTopicTag :: String
- lookupCourseIn :: Eq level => Subject level -> Profile synchronisationId level timeslotId locationId teachingRatio -> Maybe (Course synchronisationId level timeslotId)
- lookupSuitableCourse :: Eq level => NStudents -> Subject level -> Profile synchronisationId level timeslotId locationId teachingRatio -> Maybe (Course synchronisationId level timeslotId)
- findSpecifiedTimes :: Ord timeslotId => Profile synchronisationId level timeslotId locationId teachingRatio -> TimeSet timeslotId
- unsubscribe :: Membership -> Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio
- mkProfile :: (Ord level, Ord timeslotId, Real teachingRatio, Show level, Show synchronisationId, Show timeslotId) => Service synchronisationId level timeslotId -> Maybe locationId -> Availability -> teachingRatio -> Membership -> Maybe Topic -> Maybe FreePeriodPreference -> Profile synchronisationId level timeslotId locationId teachingRatio
- offersSuitableCourse :: Eq level => NStudents -> Subject level -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnyIdealTimeslotRequest :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasAnySpecificTimeRequest :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
- hasSpecialtyTopic :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
- inhabits :: Eq locationId => locationId -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
- isSpecialistIn :: Topic -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
- offersAnySynchronisedCourse :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
- offersService :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool
Types
Type-synonyms
type Service synchronisationId level timeslotId = Set (Course synchronisationId level timeslotId) Source #
- A teacher offers a set of courses.
- Whilst they may perform a reserve-role in some additional subject, this isn't going to affect the timetable.
Data-types
data Profile synchronisationId level timeslotId locationId teachingRatio Source #
The service offered by a teacher.
Instances
(Eq level, Eq timeslotId, Eq synchronisationId, Eq locationId, Eq teachingRatio) => Eq (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Defined in WeekDaze.Data.Teacher Methods (==) :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool # (/=) :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool # | |
(Ord level, Ord timeslotId, Ord synchronisationId, Ord locationId, Ord teachingRatio) => Ord (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Defined in WeekDaze.Data.Teacher Methods compare :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Ordering # (<) :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool # (<=) :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool # (>) :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool # (>=) :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool # max :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio # min :: Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio # | |
(Show synchronisationId, Show level, Show timeslotId, Show locationId, Show teachingRatio) => Show (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Defined in WeekDaze.Data.Teacher | |
(NFData level, NFData locationId, NFData synchronisationId, NFData teachingRatio, NFData timeslotId) => NFData (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Defined in WeekDaze.Data.Teacher | |
(XmlPickler level, XmlPickler locationId, XmlPickler synchronisationId, XmlPickler teachingRatio, XmlPickler timeslotId, Ord level, Ord synchronisationId, Ord timeslotId, Real teachingRatio, Show level, Show synchronisationId, Show timeslotId) => XmlPickler (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Defined in WeekDaze.Data.Teacher | |
(Ord level, Ord timeslotId, Real teachingRatio, Show level, Show synchronisationId, Show timeslotId) => SelfValidator (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Resource (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Defined in WeekDaze.Data.Teacher Methods getAvailability :: Profile synchronisationId level timeslotId locationId teachingRatio -> Availability Source # isAvailableOn :: Day -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source # | |
RealFrac teachingRatio => HumanResource (Profile synchronisationId level timeslotId locationId teachingRatio) Source # | |
Defined in WeekDaze.Data.Teacher Methods getNTimeslotsPerWeekOfTeaching :: NTimeslots -> Profile synchronisationId level timeslotId locationId teachingRatio -> NTimeslots Source # getNTimeslotsPerWeekOfNonTeaching :: NTimeslots -> Profile synchronisationId level timeslotId locationId teachingRatio -> NTimeslots Source # getGroupMembership :: Profile synchronisationId level timeslotId locationId teachingRatio -> Membership Source # getMaybeFreePeriodPreference :: Profile synchronisationId level timeslotId locationId teachingRatio -> Maybe FreePeriodPreference Source # |
Constants
maximumTeachingRatioTag :: String Source #
Used to qualify SQL & XML.
serviceTag :: String Source #
Used to qualify XML.
specialtyTopicTag :: String Source #
Used to qualify XML.
Functions
lookupCourseIn :: Eq level => Subject level -> Profile synchronisationId level timeslotId locationId teachingRatio -> Maybe (Course synchronisationId level timeslotId) Source #
Extract any course from the specified profile, which matches the specified subject.
lookupSuitableCourse :: Eq level => NStudents -> Subject level -> Profile synchronisationId level timeslotId locationId teachingRatio -> Maybe (Course synchronisationId level timeslotId) Source #
Extract any course from the specified profile, which matches the specified subject & caters for the required number of students.
findSpecifiedTimes :: Ord timeslotId => Profile synchronisationId level timeslotId locationId teachingRatio -> TimeSet timeslotId Source #
Find the set of all specified times, for any of the courses offered.
unsubscribe :: Membership -> Profile synchronisationId level timeslotId locationId teachingRatio -> Profile synchronisationId level timeslotId locationId teachingRatio Source #
Unsubscribe from the specified set of groups.
Constructor
Arguments
:: (Ord level, Ord timeslotId, Real teachingRatio, Show level, Show synchronisationId, Show timeslotId) | |
=> Service synchronisationId level timeslotId | The set of courses offered. |
-> Maybe locationId | Personal classroom. |
-> Availability | The days on which the teacher is contracted to work. |
-> teachingRatio | The maximum ratio of a working-week actually devoted to teaching. |
-> Membership | The groups of which this teacher is a member. |
-> Maybe Topic | Specialty topic. |
-> Maybe FreePeriodPreference | Any preference for the position within each day, of free time-slots. |
-> Profile synchronisationId level timeslotId locationId teachingRatio |
Smart constructor.
Predicates
offersSuitableCourse :: Eq level => NStudents -> Subject level -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the teacher offers a course in the required subject & can cater for the required number of students.
hasAnyIdealTimeslotRequest :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the specified teacher makes any ideal timeslot-request amongst the courses offered in their service.
hasAnySpecificTimeRequest :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the specified teacher makes any specific time-request amongst the courses offered in their service.
hasSpecialtyTopic :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the specified teacher claims any topic as their specialty.
inhabits :: Eq locationId => locationId -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the specified teacher claims the specified location as their own.
isSpecialistIn :: Topic -> Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the teacher specializes in the specified topic.
offersAnySynchronisedCourse :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the specified teacher offers any synchronised course.
offersService :: Profile synchronisationId level timeslotId locationId teachingRatio -> Bool Source #
True if the teacher offers one or more courses in their service.