Skip to main content

Create Set of School Terms

Purpose

For every academic year, there needs to be a user-specified number of term records, so when a new academic year record is added, the program should automatically create the associated term records for that year.  The program knows how many term records to make, and how they should be configured from the records in the term label table.  

Term Labels

The user adds one “term label” record to represent each term in a general school year.  The number of records in the term label table equals the number of terms in a year. There are start days and start months fields in the term label records, but there are no actual years since the term label is general in nature and applies to any year. The Terms records are created using the infromation in the term label records.

Term labels records can not be associated with a year since, so there can not be a date field in the term label records.

Terms (or School Terms)

Terms are a list of actual terms the school is/was/will be in operation.  They have a start date and an end date, and are associated with an Academic Year and a term label.  


Create (School) Terms

Based on the information in the Term Label table, Terms are automatically made for each academic year added to the school.  The term label records contain the sequence of terms, the names of terms, and the number of records indicated the total number terms.

For every new academic year record, PEMS makes a number of term records equal to the number of Term Label records and updates the ordinate of the terms to match the sequence of the term label records.

Make a new set of term records when an academic year is created

Key trigger is the creation of a new academic year record.

Create a term record and associate it to the academic year and one term label record, continue until one new term record is made for each active term label record in the database.

Calculate the term record's start date from the  term label record “start day” and term label record “start month” and the academic year record.

Calculate the term record's end date from the  term label record “end day” and term label record “end month” and the academic year record.

Term Name = concatenate Term Label name and Start Year.

Set the Term Fag = Term Label Flag .

Set the term status = future as the default value.  If the academic year status = past, then update the

term 

Algorithms - How to identify the correct calendar year:

Because the academic year record may or may  not span two calendar year, finding the start year and end year of each term is more complicated. Use the following logic.

  • If the Term Label “Start Month” is less than the Term Label “End Month” then the term starts and ends in the same calendar year.
  • If the Term Label “End Month”  is less than the Term Label “Start Month” then the term crosses over the new year.
  • Term Label records are sequenced  by the Term Label “Sequence” field. If the previous term label record (the earlier term) has an start month greater than the start month of the next term label, then both terms begin in the same calendar year.