Functions called from package i41pkg.sql


This package contains functions that are used to calculate Marks and Results.


Only mark types defined on {SCODE-10}  with the 'Use Mark Type" indacator = 'Y' will be used in the calculation.

No results will be calculated for subjects that has already a result that leads to "Recalc" is 'N' on {SCODE-23}, error message: "Main Subject: XXXXXXX For Student: NNNNNNNNN For Year: NNNN Exam Month: NN Result already entered and cannot be recalculated."

Function/Procedure Name Function Description Comments
i41_ass_calc_result Calculates the assessment results - No calculation must be done for mark obtained by the Professional Judgement or Competence based method of evaluation  
i41_calc_HFyearMark Calculate the half period mark - No calculation must be done for mark obtained by the Professional Judgement or Competence based method of evaluation  
i41_calc_MainSubjMark Calculate the mark of a Main subject as defined in {SACAD-10}, include Curriculum Modules that are not competency based.

If the Main Subject has been manually entered and the input parameter "Change Manually Entered Marks?" is 'N', give error message: "Main Subject: XXXXXXX For Student: NNNNNNNNN For Year: NNNN Exam Month: NN has a manually entered mark NNN"

Use validation 'CD' as set up on {SMNT-1}

Check if all Curriculum Modules have final marks, if not give error message: "No final mark entered for Student: NNNNNNNNN Year: NNNN Subject: XXXXXXX

If input parameter "Use The (B)est Result Or [L]ast Result Of Curriculum Modules" is 'B' then get the maximum final mark of Curriculum Module for any year.
If input parameter "Use The (B)est Result Or [L]ast Result Of Curriculum Modules" is  'L' then get the final mark of Curriculum Module for the latest year and month that is smaller or equal to the input year and month.

1) Multiply the final mark with the weight for the Curriculum modules and add them together.
2) Add all the weights for the Curriculum modules together
Divide 1) by 2) to get the Main Subject Final Mark
 Used in {SSTUD4-23}
i41_calc_MainSubjResult Calculate the result of a Main subject

Competent based subject result calculation
If all Curriculum Modules are competent based and the Main Subject is not competent based then treat Main Subject as Competent based or Main Subject is competent based.

Default results on {SSTUD3-1} will be allocated as follow:
"Result for Compulsory Assessment not Submitted" will be allocated when:
1) the sum of Curriculum Modules that has (a result of "Result for Competence" or "Result for not yet Competent" or Curriculum Modules has been exempted) is less than the "Rule value" of Rule = 'M'
2)  no rule exist or rule is not equal to 'M' and the sum of Curriculum Modules that has a result of "Result for Compulsory Assessment not Submitted"

"Result for not yet Competent" will be allocated when:
1) the sum of Curriculum Modules that has (a result of "Result for Competence" or "Result for not yet Competent" or Curriculum Modules has been exempted) is greater than  "Rule value" of Rule = 'M' and there exist any Curriculum Modules with a result of "Result for not yet Competent" and there exist any Curriculum Modules with a result of "Result for Compulsory Assessment not Submitted"
2) the sum of Curriculum Modules that has (a result of "Result for Competence" or "Result for not yet Competent" or Curriculum Modules has been exempted) is less than  "Rule value" of Rule = 'M' and there is no Curriculum Modules with a result of "Result for Compulsory Assessment not Submitted"
3)  no rule exist or rule is not equal to 'M' and the sum of Curriculum Modules that has a result of "Result for not yet Competent"

"Result for Competence" will be allocated when:
1) the sum of Curriculum Modules that has (a result of "Result for Competence" or Curriculum Modules has been exempted) is greater or equal to "Rule value" of Rule = 'M'
2) All the remaining subjects will be Competent.

Not Competent based subject result calculation
If some or all Curriculum Modules are not competent based and the Main Subject is not competent based then treat Main Subject as NOT Competent based.
Get corresponding result from {SSTUDE-5} if nothing found on {SSTUDE-4}
 Used in {SSTUD4-23}
i41_calc_MainSubjResult_nyc To update main subject with not yet competent, even if it is not a competency based subject.  Used in {SSTUD4-23}
i41_chk_cycle_E Check that the system cycle 'E' is open - used in the calculation of a Main subject's marks and results  on {SMNT-2}  Used in {SSTUD4-23}
i41_chk_cycle_M Check that the system cycle 'M' is open - used in the calculation of Assessment and Mark Type marks and results on  {SMNT-2}  
i41_chk_restriction The function checks and implement user data restrictions (SREC) as set up in {SMNT-5}.  
i41_get_icqcrt This function gets the defaults result codes for Assessment-, Mark Type- and the Main subject results calculation  
i41_mtm_calc_mark Calculate the Mark Type mark - No calculation must be done for mark obtained by the Professional Judgement or Competence based method of evaluation  
i41_mtm_calc_result Calculate the Mark Type result - No calculation must be done for mark obtained by the Professional Judgement or Competence based method of evaluation
  • If the student has an assessment result on {SSTUD1-2} that leads to a fail, as defined on {SCODE-23}, the result 'Result for compulsory assessment not submitted'  in {SSTUD3-1}, is allocated to the mark type result.
  • If the student does not have a mark in {SSTUD1-2}  and the student is exempted for the assessment, the record is ignored.
  • If exemption = 'N' , and the student has a result  the record is ignored.
  • If the student has a record for the year, subject, block code, group type, group value, mark type and assessment number in {TASKS1-2} the {SSTUD1-2} record is ignored,  Else, the result in {SSTUD3-1} 'Failed compulsary assessment'  is allocated to the mark type record.
 



History Of Changes

Date System Version By Whom Job Description
16-OCT-2007 v01.0.0.0 Melanie Zeelie t137011 New manual format.
12-SEP-2008 v01.0.0.2 Bea Swart t152378 Add some processing rules
31-Aug-2010 v02.0.0.0 Bea Swart T164727 i41_ass_calc_result, i41_calc_HFyearMark - change to exclude Competence and Professional Judgement Method of Evaluations.
23-Aug-2018
v04.1.0.0
Sarah Seeletse
t226071
Replace SSTUD3-2 with SSTUDE-4 and SSTUDE-5