[Home] [Help]
1204: DECLARE
1205: v_enrolled_credit_points IGS_PS_UNIT_VER.enrolled_credit_points%TYPE;
1206: v_enrolled_cp IGS_PS_UNIT_VER.enrolled_credit_points%TYPE;
1207: v_billing_cp IGS_PS_USEC_CPS.billing_hrs%TYPE;
1208: v_percentage IGS_ST_DFT_LOAD_APPO.percentage%TYPE;
1209: v_second_percentage IGS_ST_DFT_LOAD_APPO.second_percentage%TYPE;
1210: v_acad_cal_type IGS_CA_INST.cal_type%TYPE;
1211: v_acad_ci_sequence_number IGS_CA_INST.sequence_number%TYPE;
1212: v_acad_ci_start_dt IGS_CA_INST.start_dt%TYPE;
1205: v_enrolled_credit_points IGS_PS_UNIT_VER.enrolled_credit_points%TYPE;
1206: v_enrolled_cp IGS_PS_UNIT_VER.enrolled_credit_points%TYPE;
1207: v_billing_cp IGS_PS_USEC_CPS.billing_hrs%TYPE;
1208: v_percentage IGS_ST_DFT_LOAD_APPO.percentage%TYPE;
1209: v_second_percentage IGS_ST_DFT_LOAD_APPO.second_percentage%TYPE;
1210: v_acad_cal_type IGS_CA_INST.cal_type%TYPE;
1211: v_acad_ci_sequence_number IGS_CA_INST.sequence_number%TYPE;
1212: v_acad_ci_start_dt IGS_CA_INST.start_dt%TYPE;
1213: v_acad_ci_end_dt IGS_CA_INST.end_dt%TYPE;
1219: v_message_name VARCHAR2(30);
1220: v_audit_cp IGS_PS_USEC_CPS.billing_credit_points%TYPE;
1221:
1222: CURSOR c_dflt_load_apportion(
1223: cp_acad_cal_type IGS_ST_DFT_LOAD_APPO.cal_type%TYPE,
1224: cp_acad_ci_sequence_number IGS_ST_DFT_LOAD_APPO.ci_sequence_number%TYPE,
1225: cp_cal_type IGS_ST_DFT_LOAD_APPO.teach_cal_type%TYPE)IS
1226: SELECT DLA.percentage,
1227: DLA.second_percentage
1220: v_audit_cp IGS_PS_USEC_CPS.billing_credit_points%TYPE;
1221:
1222: CURSOR c_dflt_load_apportion(
1223: cp_acad_cal_type IGS_ST_DFT_LOAD_APPO.cal_type%TYPE,
1224: cp_acad_ci_sequence_number IGS_ST_DFT_LOAD_APPO.ci_sequence_number%TYPE,
1225: cp_cal_type IGS_ST_DFT_LOAD_APPO.teach_cal_type%TYPE)IS
1226: SELECT DLA.percentage,
1227: DLA.second_percentage
1228: FROM IGS_ST_DFT_LOAD_APPO DLA
1221:
1222: CURSOR c_dflt_load_apportion(
1223: cp_acad_cal_type IGS_ST_DFT_LOAD_APPO.cal_type%TYPE,
1224: cp_acad_ci_sequence_number IGS_ST_DFT_LOAD_APPO.ci_sequence_number%TYPE,
1225: cp_cal_type IGS_ST_DFT_LOAD_APPO.teach_cal_type%TYPE)IS
1226: SELECT DLA.percentage,
1227: DLA.second_percentage
1228: FROM IGS_ST_DFT_LOAD_APPO DLA
1229: WHERE DLA.cal_type = cp_acad_cal_type AND
1224: cp_acad_ci_sequence_number IGS_ST_DFT_LOAD_APPO.ci_sequence_number%TYPE,
1225: cp_cal_type IGS_ST_DFT_LOAD_APPO.teach_cal_type%TYPE)IS
1226: SELECT DLA.percentage,
1227: DLA.second_percentage
1228: FROM IGS_ST_DFT_LOAD_APPO DLA
1229: WHERE DLA.cal_type = cp_acad_cal_type AND
1230: DLA.ci_sequence_number = cp_acad_ci_sequence_number AND
1231: DLA.teach_cal_type = cp_cal_type;
1232: BEGIN
1235: p_enrolled_cp := NULL;
1236: -- Calculate the load (credit points) for a nominated unit attempt within
1237: -- a nominated calendar instance. The calendar instance may be either a load
1238: -- period or null. If a calendar instance is specified, a search for a matching
1239: -- IGS_ST_DFT_LOAD_APPO record will be performed; if not found the apportionment
1240: -- is assumed to be 0%. If no calendar is specified the apportionment is always
1241: -- 100%.
1242: --get the various cps, using the inheritance model of PSP
1243: igs_ps_val_uv.get_cp_values(p_uoo_id,
1431: cp_load_sequence_number IGS_CA_INST.sequence_number%TYPE,
1432: cp_cal_type IGS_CA_INST.cal_type%TYPE) IS
1433: SELECT ci.start_dt,
1434: ci.end_dt
1435: FROM IGS_ST_DFT_LOAD_APPO dla,
1436: IGS_CA_INST ci
1437: WHERE dla.cal_type = cp_load_cal_type AND
1438: dla.ci_sequence_number = cp_load_sequence_number AND
1439: dla.teach_cal_type = cp_cal_type AND
1489: -- unit status and the load calendar as at the effective date.
1490: -- For ENROLLED or COMPLETED unit attempts - the load is always incurred.
1491: -- For other statuses - load cannot be incurred.
1492: -- Check whether the teaching calendar has a load apportionment link
1493: -- th the load calendar. If no IGS_ST_DFT_LOAD_APPO detail exists then
1494: -- load is definitely not incurred. Processing concludes.
1495: -- Note: this query joints to the IGS_CA_INST tabel to get the start
1496: -- and end dates - this is to possibly save doing it later
1497: