Functions called from package i21pkg.sql - No Menu Option


Several functions are defined in this package that are called from several programs in the ITS system. This manual gives a high level description of the functionality embedded in these functions


The package i21pkg.sql Contains Student Contract Validation Functions/Procedures. These functions and procedures validate contract attributes for both qualification and subject applications as well as qualification and subject registrations.

Function Name Function Description Comments
APPLICREDIT Internal Credits - Applications: This function calculates the total internal subject credits, as defined in {SACAD-1:Subject Information} for all admitted planned subjects.  Admission statuses are defined in {SCODE-26}
APPLNCREDIT  National Credits - Applications: This function calculates the total national subject credits, as defined in {SACAD-1:Subject Information} for all admitted planned subjects.  
APPROVAL Approval from contractee: The function checks if an applicant must have approval from the contractee to register for this  qualification that he/she is applying for. Admission for the qualification application will not be allowed as long as the 'Approval Received' is not equal to 'Y' and the contract requires approval. See the application program manual in {SNAPPA-1/3}
BADDEBTORC    Bad debtor (Contractee): The function will be used to determine if a debtor is a bad debtor and if the contract allows services to bad debtors. A debtor is indicated as a bad debtor in {FARO-21 See {FSAC-10} for the contracts manual and possible attributes of contracts.
BADDEBTORE  Bad debtor (Employer): The function will be used to determine if a debtor is a bad debtor and if the contract allows services to bad debtors.   
CONTRACT_INFO     
CONTRACTMAIN Main procedure: This is the main procedure in the package to check contract attribute values such as student head counts and number of enrollments.  * See the footnote below.
isCntrQualRestr Contract Qualification restricted: The function will check if the contract is only limited to certain qualifications and if the application is for one of the qualifications allowed by the contract linked to the application. Applied in {SNAPPA-1/3}
isCntrQualSubjOK Contract/qualification/subject validation: This function will check that the subject is valid for the contract and qualification combination as defined for the contract in {FSAC-10}    
isCntrQualSubjRestr Contract/Qualification/subject restricted: The function will check if the contract is only limited to certain qualifications and subject combinations and if the application is for one of the qualifications/subject combinations allowed by the contract linked to the application. Applied in {SNAPPA-11}
MAXAMT Maximum amount per contract: It may be that a contract is defined to have a limitation on the amount of money that is available to pay for studies of students.
This function calculates the sum of the amounts 
  • in quotes linked to applications for a particular contract where the applicants are NOT YET registered for the qualification
  • in student accounts where the registration record is linked to the contract
As soon as the combined amounts of applications and registrations will exceed the amount available on the contract, this function will disallow new
  • Application admissions
  • Quote generations
  • Registrations
 
MAXENROLM Maximum enrollments per contract: This function will validate the number of admissions/enrollments for the contract if a limit is defined for the contract. The function compute the sum of:
  • the number of students admitted for a qualification OR the applicant is not admitted but a quote exists with this contract and not yet registered.
  • the number of enrollments with this contract where the cancellation date is null. 
    • A student number is counted for every enrollment i.e. 
  • if a student was registered in 2004 for study period 1 and in 2005 for study period 2, that student number will be counted twice
  • if a student was registered in 2004 and is admitted in 2005 but not yet registered, the student number will be counted twice.
As soon as the combined number of enrollments exceeds the number of enrollments specified by the contract, this function will disallow new
  • Application admissions
  • Quote generations
  • Registrations
 
MAXHEADS Maximum heads per contract: This function will determine if the maximum number of students (heads) for the contract has been reached. It will count HEADS i.e. count distinct application number or distinct student number.  This function calculates the sum of
  • the number of (distinct) applicants admitted for a qualification with this contract OR the applicant is not admitted but a quote exists and not yet registered.
  • the number of (distinct) enrollments with this contract where the cancellation date is null
    • Count a student number once only i.e.
  • if a student was registered in 2004 for study period 1 and in 2005 for study period 2, that student number will be counted once only
  • if a student was registered in 2004 and is admitted in 2005 (IERAAD), the student number will be counted once only.
 
MAXQUALENROLM Maximum qualification enrollments per contract: This function will validate that the number of admissions/enrollments for the contract and qualification combination is less than the limit defined for the contract and qualification combination.
  • As for the function MAXENROLM described above, a student/applicant will be counted twice for each occurrence of a registration/admission/quote for the contract.
 
MAXQUALSUBJENROLM  This function will validate that the number of planned subject admissions/subject enrollments per contract, specific qualification and specific subject combination is not exceeded. The function calculates the sum of
  • the number of students admitted for a planned subject OR the applicant is not admitted but a quote exists with this contract, qualification code and subject code (IERCONTRC) and not yet registered.
  • the number of subject enrollments for student that has this contract code on the corresponding qualification enrollment record and where the subject qualification is equal to the contract qualification and the student's subject is equal to the subject linked to the contract and qualification combination and the cancellation date is null.
    • Count a student number for every enrollment i.e. if a student was admitted to or is registered more than once for the qualification and subject combination, he/she is counted for each record
 
MAXSUBJ    This function will validate the number of planned subjects admitted/subject enrolments for
 the contract. This function calculates the sum of
  • the number of students admitted for a planned subject OR the applicant is not admitted but a quote exists with this contract and not yet registered.
  • the number of subject enrolments for a student that has this contract code on the corresponding qualification enrollment record where the cancellation date is null.
    • Count a student number for every enrolment i.e. if a student was or is registered for more than one subject, he/she is counted for each subject
 
MINMAXMODULES  This functions checks if the applicant has the required number of modules per ‘main/composite’ subject as per the definition of the subject in the academic structure. This is done in the curriculum in the fields 'Max Mod' and 'Min Mod'. The call to these functions is implemented in {SNAPPA-11} and {SDREGA-1 The academic structure is defined in {SACAD-1}
PREVYRICREDIT Compute the total internal credits of a specific student registration and previous academic year i.e. the registration year = application year - 1   
PREVYRNCREDIT Compute the total national credits of a specific student registration and previous academic year  i.e. the registration year = application year - 1    
QUALS This function will validate that the qualification applied for or being registered is one of the qualifications that is valid for the contract (in {FSAC-10})  
TESTDTTREMPL  This function will validate that the Contractee(s) or Contributing Employer(s) on a contract are defined.  
THISYRICREDIT Computes the total internal credits of a specific student registration and the academic year equal to the application year.  
THISYRNCREDIT Computes the total national credits of a specific student registration and the academic year equal to the application year.  
VALIDREG This function will validate that the student can be admitted to, or register for, a qualification under the contract linked to the application or registration because the start date of the block code is between the start- and end date of the contract.  
CHECK NOTIFICATION  This function checks if a contract threshold or contract limit has been reached and starts a notification route. Routes with the following route type  will be started depending on the threshold or contract limit reached.  
CON1- Early Warning Notification.  
CON2- Maximum Threshold Notification   
CONTRACT INFO The function is used to get the contract detail i.e threshold, limits, values etc from the contract definition and is used to generate the e-mail sent to the contract academic and marketing managers.  

 * Footnote

 
If multiple users are processing qualification- and subject applications and qualification- and subject registrations for the same contract, a mechanism is employed to ensure that only one user can complete any of the counts or other checks that involve the attributes of a specific contract. All checks for a specific contract for different users will be processed in sequence based on a first-come-first-served basis.

If two users are processing these application or registration actions for different contracts, all counts and checks will be processed in parallel.

See Also:



History of Changes

Date System Version By Whom Job Description
17-May-2007 v01.0.0.0 Charlene van der Schyff t137175 New manual format.
27-Jul-2007 v01.0.0.0 Melanie Zeelie t137175 Proofread system Owner and make corrections
11-Dec-2007 v01.0.0.0 Melanie Zeelie t131049 Proofread system Owner and make corrections