248: RETURN plsql_table_1 IS
249:
250: CURSOR c_cal_type(p_ts_stup_id NUMBER) IS
251: SELECT ets.cal_type, ets.sequence_number
252: FROM igs_en_timeslot_stup ets
253: WHERE igs_en_timeslot_stup_id = p_ts_stup_id;
254: l_cal_type igs_en_timeslot_stup.cal_type%TYPE;
255: l_seq_num igs_en_timeslot_stup.sequence_number%TYPE;
256:
249:
250: CURSOR c_cal_type(p_ts_stup_id NUMBER) IS
251: SELECT ets.cal_type, ets.sequence_number
252: FROM igs_en_timeslot_stup ets
253: WHERE igs_en_timeslot_stup_id = p_ts_stup_id;
254: l_cal_type igs_en_timeslot_stup.cal_type%TYPE;
255: l_seq_num igs_en_timeslot_stup.sequence_number%TYPE;
256:
257: CURSOR cur_prog_type(p_person_id NUMBER , p_course_type VARCHAR2 ) IS
250: CURSOR c_cal_type(p_ts_stup_id NUMBER) IS
251: SELECT ets.cal_type, ets.sequence_number
252: FROM igs_en_timeslot_stup ets
253: WHERE igs_en_timeslot_stup_id = p_ts_stup_id;
254: l_cal_type igs_en_timeslot_stup.cal_type%TYPE;
255: l_seq_num igs_en_timeslot_stup.sequence_number%TYPE;
256:
257: CURSOR cur_prog_type(p_person_id NUMBER , p_course_type VARCHAR2 ) IS
258: SELECT sca.person_id
251: SELECT ets.cal_type, ets.sequence_number
252: FROM igs_en_timeslot_stup ets
253: WHERE igs_en_timeslot_stup_id = p_ts_stup_id;
254: l_cal_type igs_en_timeslot_stup.cal_type%TYPE;
255: l_seq_num igs_en_timeslot_stup.sequence_number%TYPE;
256:
257: CURSOR cur_prog_type(p_person_id NUMBER , p_course_type VARCHAR2 ) IS
258: SELECT sca.person_id
259: FROM igs_en_stdnt_ps_att sca,
1459:
1460: CURSOR cur_max_prty_ord IS
1461: SELECT MAX(priority_order)
1462: FROM igs_en_timeslot_prty prt
1463: WHERE prt.igs_en_timeslot_stup_id = p_ts_stup_id; -- Added the where condition by Nishikant - 23JUL2002 - bug#2443771
1464:
1465: CURSOR cur_prty_pref(p_IGS_EN_TIMESLOT_STUP_ID NUMBER,p_order NUMBER) IS
1466: SELECT prt.priority_value,prf.preference_code,prf.preference_version,prf.sequence_number
1467: FROM igs_en_timeslot_prty prt,
1461: SELECT MAX(priority_order)
1462: FROM igs_en_timeslot_prty prt
1463: WHERE prt.igs_en_timeslot_stup_id = p_ts_stup_id; -- Added the where condition by Nishikant - 23JUL2002 - bug#2443771
1464:
1465: CURSOR cur_prty_pref(p_IGS_EN_TIMESLOT_STUP_ID NUMBER,p_order NUMBER) IS
1466: SELECT prt.priority_value,prf.preference_code,prf.preference_version,prf.sequence_number
1467: FROM igs_en_timeslot_prty prt,
1468: igs_en_timeslot_pref prf
1469: WHERE prt.IGS_EN_TIMESLOT_STUP_ID = p_IGS_EN_TIMESLOT_STUP_ID AND
1465: CURSOR cur_prty_pref(p_IGS_EN_TIMESLOT_STUP_ID NUMBER,p_order NUMBER) IS
1466: SELECT prt.priority_value,prf.preference_code,prf.preference_version,prf.sequence_number
1467: FROM igs_en_timeslot_prty prt,
1468: igs_en_timeslot_pref prf
1469: WHERE prt.IGS_EN_TIMESLOT_STUP_ID = p_IGS_EN_TIMESLOT_STUP_ID AND
1470: prt.priority_order = p_order AND
1471: prt.igs_en_timeslot_prty_id = prf.igs_en_timeslot_prty_id
1472: order by prt.priority_order, prf.preference_order;
1473:
1474: CURSOR cur_prty(p_order NUMBER) IS
1475: SELECT priority_value
1476: FROM igs_en_timeslot_prty prt
1477: WHERE priority_order = p_order
1478: AND prt.igs_en_timeslot_stup_id = p_ts_stup_id; -- Added the AND condition by Nishikant - 23JUL2002 - bug#2443771
1479:
1480: plsql_3 plsql_table_1;
1481: cnt NUMBER := 0;
1482: prty_value igs_en_timeslot_prty.priority_value%TYPE;
1650: p_mode IN VARCHAR2,
1651: p_orgid IN NUMBER
1652: ) AS
1653:
1654: CURSOR cur_max_prty_ord(p_igs_en_timeslot_stup_id NUMBER) IS -- Added the parameters of the cursor by Nishikant - 23JUL2002 - bug#2443771
1655: SELECT MAX(priority_order)
1656: FROM igs_en_timeslot_prty prt
1657: WHERE prt.igs_en_timeslot_stup_id = p_igs_en_timeslot_stup_id; -- Added the where condition by Nishikant - 23JUL2002 - bug#2443771
1658:
1653:
1654: CURSOR cur_max_prty_ord(p_igs_en_timeslot_stup_id NUMBER) IS -- Added the parameters of the cursor by Nishikant - 23JUL2002 - bug#2443771
1655: SELECT MAX(priority_order)
1656: FROM igs_en_timeslot_prty prt
1657: WHERE prt.igs_en_timeslot_stup_id = p_igs_en_timeslot_stup_id; -- Added the where condition by Nishikant - 23JUL2002 - bug#2443771
1658:
1659: CURSOR cur_ts_stup_id(p_prg_type_gr_cd VARCHAR2, p_cal_type VARCHAR2, p_seq_num NUMBER, p_stud_type VARCHAR2) IS
1660: SELECT ets.IGS_EN_TIMESLOT_STUP_ID
1661: FROM igs_en_timeslot_stup ets
1656: FROM igs_en_timeslot_prty prt
1657: WHERE prt.igs_en_timeslot_stup_id = p_igs_en_timeslot_stup_id; -- Added the where condition by Nishikant - 23JUL2002 - bug#2443771
1658:
1659: CURSOR cur_ts_stup_id(p_prg_type_gr_cd VARCHAR2, p_cal_type VARCHAR2, p_seq_num NUMBER, p_stud_type VARCHAR2) IS
1660: SELECT ets.IGS_EN_TIMESLOT_STUP_ID
1661: FROM igs_en_timeslot_stup ets
1662: WHERE ets.PROGRAM_TYPE_GROUP_CD = p_prg_type_gr_cd AND
1663: ets.CAL_TYPE = p_cal_type AND
1664: ets.SEQUENCE_NUMBER = p_seq_num AND
1657: WHERE prt.igs_en_timeslot_stup_id = p_igs_en_timeslot_stup_id; -- Added the where condition by Nishikant - 23JUL2002 - bug#2443771
1658:
1659: CURSOR cur_ts_stup_id(p_prg_type_gr_cd VARCHAR2, p_cal_type VARCHAR2, p_seq_num NUMBER, p_stud_type VARCHAR2) IS
1660: SELECT ets.IGS_EN_TIMESLOT_STUP_ID
1661: FROM igs_en_timeslot_stup ets
1662: WHERE ets.PROGRAM_TYPE_GROUP_CD = p_prg_type_gr_cd AND
1663: ets.CAL_TYPE = p_cal_type AND
1664: ets.SEQUENCE_NUMBER = p_seq_num AND
1665: ets.STUDENT_TYPE = p_stud_type;
1663: ets.CAL_TYPE = p_cal_type AND
1664: ets.SEQUENCE_NUMBER = p_seq_num AND
1665: ets.STUDENT_TYPE = p_stud_type;
1666:
1667: CURSOR cur_prty_pref(p_IGS_EN_TIMESLOT_STUP_ID NUMBER,p_order NUMBER) IS
1668: SELECT prt.priority_value,prf.preference_code,prf.preference_version,prf.sequence_number
1669: FROM igs_en_timeslot_prty prt,
1670: igs_en_timeslot_pref prf
1671: WHERE prt.IGS_EN_TIMESLOT_STUP_ID = p_IGS_EN_TIMESLOT_STUP_ID AND
1667: CURSOR cur_prty_pref(p_IGS_EN_TIMESLOT_STUP_ID NUMBER,p_order NUMBER) IS
1668: SELECT prt.priority_value,prf.preference_code,prf.preference_version,prf.sequence_number
1669: FROM igs_en_timeslot_prty prt,
1670: igs_en_timeslot_pref prf
1671: WHERE prt.IGS_EN_TIMESLOT_STUP_ID = p_IGS_EN_TIMESLOT_STUP_ID AND
1672: prt.priority_order = p_order AND
1673: prt.igs_en_timeslot_prty_id = prf.igs_en_timeslot_prty_id
1674: order by prf.preference_order;
1675:
1674: order by prf.preference_order;
1675:
1676: CURSOR cur_assign_ran_alpha IS
1677: SELECT ets.ASSIGN_RANDOMLY, ets.SURNAME_ALPHABET
1678: FROM igs_en_timeslot_stup ets
1679: WHERE ets.PROGRAM_TYPE_GROUP_CD = p_prg_type_gr_cd AND
1680: ets.CAL_TYPE = p_cal_type AND
1681: ets.SEQUENCE_NUMBER = p_seq_num AND
1682: ets.STUDENT_TYPE = p_stud_type;
1697:
1698: p_start_time DATE ;
1699: p_end_time DATE ;
1700: l_ts_para_id igs_en_timeslot_para.igs_en_timeslot_para_id%TYPE;
1701: l_ts_stup_id igs_en_timeslot_stup.IGS_EN_TIMESLOT_STUP_ID%TYPE;
1702: surname_alpha igs_en_timeslot_stup.SURNAME_ALPHABET%TYPE;
1703: assign_random igs_en_timeslot_stup.ASSIGN_RANDOMLY%TYPE;
1704: max_prty_ord igs_en_timeslot_prty.priority_order%TYPE;
1705:
1698: p_start_time DATE ;
1699: p_end_time DATE ;
1700: l_ts_para_id igs_en_timeslot_para.igs_en_timeslot_para_id%TYPE;
1701: l_ts_stup_id igs_en_timeslot_stup.IGS_EN_TIMESLOT_STUP_ID%TYPE;
1702: surname_alpha igs_en_timeslot_stup.SURNAME_ALPHABET%TYPE;
1703: assign_random igs_en_timeslot_stup.ASSIGN_RANDOMLY%TYPE;
1704: max_prty_ord igs_en_timeslot_prty.priority_order%TYPE;
1705:
1706: plsql_1 plsql_table_1 ;
1699: p_end_time DATE ;
1700: l_ts_para_id igs_en_timeslot_para.igs_en_timeslot_para_id%TYPE;
1701: l_ts_stup_id igs_en_timeslot_stup.IGS_EN_TIMESLOT_STUP_ID%TYPE;
1702: surname_alpha igs_en_timeslot_stup.SURNAME_ALPHABET%TYPE;
1703: assign_random igs_en_timeslot_stup.ASSIGN_RANDOMLY%TYPE;
1704: max_prty_ord igs_en_timeslot_prty.priority_order%TYPE;
1705:
1706: plsql_1 plsql_table_1 ;
1707: plsql_2 plsql_table_1;