Skip to content

Instantly share code, notes, and snippets.

@uris77
Created February 13, 2012 16:51
Show Gist options
  • Save uris77/1818144 to your computer and use it in GitHub Desktop.
Save uris77/1818144 to your computer and use it in GitHub Desktop.
Design Notes for Session & Subject Domains
A Department can be though of as the highest authority in a school when it comes to developing, maintaining and implementing curriculums for a specific academic field. Ther can be departments of math, science, literature, business, etc. Each department must have a teacher in charge that is the overall responsible.
class Department {
String name
String code
String description
Teacher headOfDepartment
}
A subject is a specific subject matter that is offered by a school.
class Subject {
String name
String code
Department department
}
A building is a physical building in a school.
class Building {
String name
String code
String description
}
A classroom is a specific physical location in a school where classes are imparted:
class Classroom{
String name
String code
String description
Building building
}
Days of the week:
class Day{
String name
String code
}
A TimePeriod is the days of the week and the times when a class is imparted.
class TimePeriod{
String timeOfDay
static hasMany = [days: Day]
}
A SessionStatus identifies the status a session is currently in. These can be:
1.Active
2.Closed
3.Discontinued
4.Full
class SessionStatus{
String name
String code
}
A Session identifies the time & place when a subject is imparted.
class Session{
String name
String code //Not so sure about code & name
Subject subject
TimePeriod timePeriod
Classroom classroom
Teache teacher
SessionStatus status
int maximumNumberOfStudents
Date startDate
Date endDate
//Dont know if the following 2 are necessary.
Date dateDiscontinued
Date dateClosed
}
A group of session is used mainly for high schools. These identify the 'homerooms'.
class SessionGroup{
Teacher homeroomTeacher
static hasMany = [sessions: Session]
}
A school year identifies the start date and end date of a school year. Since the date already includes a year field, I do not find it necessary to include a separate field for year (e.g. 2011-2012).
class SchoolYear{
Date startDate
Date endDate
//The string respresentation of the school year in yyyy - yyyy format
String toString(){
"${1900 + startDate} - ${1900 + endDate}"
}
}
The school years are all divided into academic terms:
class AcademicTerm{
SchoolYear schoolYear
int term //1, 2, 3, etc.
Enum termType // An enum with values: Semester, Trimester, etc.
}
Absentisms captures the students who were absent on a specific day for a session.
class Absentee{
Student student
Session session
Date dateAbsent
}
It is also important to record when a student arrives late for a session:
class LateIncidents{
Student student
Session session
Date dateLate
String timeArrivedForClass
}
Assessments are categorized to make it easier to assign weights to each type of assessment:
class AssessmentCategory{
String name
String code
}
Assessments hold different weights based on what category of assessment they are. These can be configured per session :
class SessionAssessmentWeight{
Session session
AssessmentCategory assessmentCategory
int weight
}
class AssessmentWeightTemplate{
Teacher teacher
AssessmentCategory assessmentCategory
int weight
}
class AssessmentWeightGroupTemplate{
Teacher teacher
static hasMany = [assessmentWeightTemplates : AssessmentWeightTemplate]
}
Assessments contain information about a student's grade for assessments on a session:
class Assessment{
AssessmentCategory assessmentCategory
Session session
Date assessmentDate
Grade grade
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment