3:
4:
5: EN_SUA_REC_TYPE IGS_EN_SU_ATTEMPT_ALL%ROWTYPE;
6:
7: FUNCTION ofr_enrollment_or_waitlist ( p_uoo_id IN igs_ps_unit_ofr_opt.uoo_id%TYPE,
8: p_session_id IN igs_en_su_attempt.session_id%TYPE,
9: p_waitlist_ind IN VARCHAR2,
10: p_person_number IN igs_pe_person.person_number%TYPE,
11: p_course_cd IN igs_en_su_attempt.course_cd%TYPE,
41: -- IGS_EN_SU_ATTEMPT_PKG.UPDATE_ROW and IGS_EN_SU_ATTEMPT_PKG.INSERT_ROW
42: -- added as part of Prevent Dropping Core Units. Enh Bug# 3052432
43: -------------------------------------------------------------------
44:
45: l_cst_unconfirm CONSTANT igs_ps_unit_ofr_opt.unit_section_status%TYPE DEFAULT 'UNCONFIRM';
46: l_cst_waitlisted CONSTANT igs_ps_unit_ofr_opt.unit_section_status%TYPE DEFAULT 'WAITLISTED';
47:
48:
49: -- cursor which fetches unit offering option details based on the id passed as a parameter to it
42: -- added as part of Prevent Dropping Core Units. Enh Bug# 3052432
43: -------------------------------------------------------------------
44:
45: l_cst_unconfirm CONSTANT igs_ps_unit_ofr_opt.unit_section_status%TYPE DEFAULT 'UNCONFIRM';
46: l_cst_waitlisted CONSTANT igs_ps_unit_ofr_opt.unit_section_status%TYPE DEFAULT 'WAITLISTED';
47:
48:
49: -- cursor which fetches unit offering option details based on the id passed as a parameter to it
50: CURSOR c_igs_ps_unit_ofr_opt(cp_uoo_id IN igs_ps_unit_ofr_opt.uoo_id%TYPE) IS
46: l_cst_waitlisted CONSTANT igs_ps_unit_ofr_opt.unit_section_status%TYPE DEFAULT 'WAITLISTED';
47:
48:
49: -- cursor which fetches unit offering option details based on the id passed as a parameter to it
50: CURSOR c_igs_ps_unit_ofr_opt(cp_uoo_id IN igs_ps_unit_ofr_opt.uoo_id%TYPE) IS
51: SELECT unit_cd , version_number , uoo.cal_type ,
52: uoo.ci_sequence_number , location_cd , unit_class , start_dt ,
53: end_dt , uoo.row_id , uoo.ivrs_available_ind ,
54: uoo.call_number , uoo.unit_section_status , uoo.unit_section_start_date ,
61: uoo.ss_enrol_ind , uoo.dir_enrollment , uoo.enr_from_wlst ,
62: uoo.inq_not_wlst , uoo.anon_unit_grading_ind , uoo.anon_assess_grading_ind ,
63: uoo.rev_account_cd , uoo.non_std_usec_ind , uoo.auditable_ind ,
64: uoo.audit_permission_ind
65: FROM igs_ps_unit_ofr_opt uoo, igs_ca_inst ci
66: WHERE uoo.cal_type = ci.cal_type
67: AND uoo.ci_sequence_number = ci.sequence_number
68: AND uoo_id = cp_uoo_id ;
69:
67: AND uoo.ci_sequence_number = ci.sequence_number
68: AND uoo_id = cp_uoo_id ;
69:
70: -- local rowtype variable for above cursor
71: l_c_igs_ps_unit_ofr_opt c_igs_ps_unit_ofr_opt%ROWTYPE ;
72:
73: -- cursor which picks up person id corresponding to person number passed as parameter
74: CURSOR c_igs_pe_person(cp_person_number igs_pe_person.person_number%TYPE) IS
75: SELECT party_id
141: l_person_id := l_c_igs_pe_person.party_id ;
142: CLOSE c_igs_pe_person ;
143:
144: -- fetch the uoo id details
145: OPEN c_igs_ps_unit_ofr_opt( p_uoo_id) ;
146: FETCH c_igs_ps_unit_ofr_opt INTO l_c_igs_ps_unit_ofr_opt ;
147: IF c_igs_ps_unit_ofr_opt%NOTFOUND THEN
148: CLOSE c_igs_ps_unit_ofr_opt ;
149: p_message := 'IGS_EN_UOO_NOT_EXIST' ;
142: CLOSE c_igs_pe_person ;
143:
144: -- fetch the uoo id details
145: OPEN c_igs_ps_unit_ofr_opt( p_uoo_id) ;
146: FETCH c_igs_ps_unit_ofr_opt INTO l_c_igs_ps_unit_ofr_opt ;
147: IF c_igs_ps_unit_ofr_opt%NOTFOUND THEN
148: CLOSE c_igs_ps_unit_ofr_opt ;
149: p_message := 'IGS_EN_UOO_NOT_EXIST' ;
150: RETURN (FALSE) ;
143:
144: -- fetch the uoo id details
145: OPEN c_igs_ps_unit_ofr_opt( p_uoo_id) ;
146: FETCH c_igs_ps_unit_ofr_opt INTO l_c_igs_ps_unit_ofr_opt ;
147: IF c_igs_ps_unit_ofr_opt%NOTFOUND THEN
148: CLOSE c_igs_ps_unit_ofr_opt ;
149: p_message := 'IGS_EN_UOO_NOT_EXIST' ;
150: RETURN (FALSE) ;
151: END IF;
144: -- fetch the uoo id details
145: OPEN c_igs_ps_unit_ofr_opt( p_uoo_id) ;
146: FETCH c_igs_ps_unit_ofr_opt INTO l_c_igs_ps_unit_ofr_opt ;
147: IF c_igs_ps_unit_ofr_opt%NOTFOUND THEN
148: CLOSE c_igs_ps_unit_ofr_opt ;
149: p_message := 'IGS_EN_UOO_NOT_EXIST' ;
150: RETURN (FALSE) ;
151: END IF;
152: CLOSE c_igs_ps_unit_ofr_opt ;
148: CLOSE c_igs_ps_unit_ofr_opt ;
149: p_message := 'IGS_EN_UOO_NOT_EXIST' ;
150: RETURN (FALSE) ;
151: END IF;
152: CLOSE c_igs_ps_unit_ofr_opt ;
153:
154: OPEN cur_per_typ;
155: FETCH cur_per_typ INTO l_cur_per_typ;
156: lv_person_type := NVL(Igs_En_Gen_008.enrp_get_person_type(p_course_cd),l_cur_per_typ.person_type_code);
182: END IF;
183:
184: END IF;
185:
186: FOR l_c_igs_ps_unit_ofr_opt IN c_igs_ps_unit_ofr_opt(cp_uoo_id => p_uoo_id)
187: LOOP
188: -- creates a record in the table igs_en_su_attempt with unit_attempt_status = unconfirm
189: igs_en_su_attempt_pkg.insert_row (
190: X_ROWID => l_rowid ,
189: igs_en_su_attempt_pkg.insert_row (
190: X_ROWID => l_rowid ,
191: X_PERSON_ID => l_person_id ,
192: X_COURSE_CD => p_course_cd ,
193: X_UNIT_CD => l_c_igs_ps_unit_ofr_opt.unit_cd ,
194: X_CAL_TYPE => l_c_igs_ps_unit_ofr_opt.cal_type ,
195: X_CI_SEQUENCE_NUMBER => l_c_igs_ps_unit_ofr_opt.ci_sequence_number ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
190: X_ROWID => l_rowid ,
191: X_PERSON_ID => l_person_id ,
192: X_COURSE_CD => p_course_cd ,
193: X_UNIT_CD => l_c_igs_ps_unit_ofr_opt.unit_cd ,
194: X_CAL_TYPE => l_c_igs_ps_unit_ofr_opt.cal_type ,
195: X_CI_SEQUENCE_NUMBER => l_c_igs_ps_unit_ofr_opt.ci_sequence_number ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
198: X_UNIT_CLASS => l_c_igs_ps_unit_ofr_opt.unit_class ,
191: X_PERSON_ID => l_person_id ,
192: X_COURSE_CD => p_course_cd ,
193: X_UNIT_CD => l_c_igs_ps_unit_ofr_opt.unit_cd ,
194: X_CAL_TYPE => l_c_igs_ps_unit_ofr_opt.cal_type ,
195: X_CI_SEQUENCE_NUMBER => l_c_igs_ps_unit_ofr_opt.ci_sequence_number ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
198: X_UNIT_CLASS => l_c_igs_ps_unit_ofr_opt.unit_class ,
199: X_CI_START_DT => l_c_igs_ps_unit_ofr_opt.start_dt ,
192: X_COURSE_CD => p_course_cd ,
193: X_UNIT_CD => l_c_igs_ps_unit_ofr_opt.unit_cd ,
194: X_CAL_TYPE => l_c_igs_ps_unit_ofr_opt.cal_type ,
195: X_CI_SEQUENCE_NUMBER => l_c_igs_ps_unit_ofr_opt.ci_sequence_number ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
198: X_UNIT_CLASS => l_c_igs_ps_unit_ofr_opt.unit_class ,
199: X_CI_START_DT => l_c_igs_ps_unit_ofr_opt.start_dt ,
200: X_CI_END_DT => l_c_igs_ps_unit_ofr_opt.end_dt ,
193: X_UNIT_CD => l_c_igs_ps_unit_ofr_opt.unit_cd ,
194: X_CAL_TYPE => l_c_igs_ps_unit_ofr_opt.cal_type ,
195: X_CI_SEQUENCE_NUMBER => l_c_igs_ps_unit_ofr_opt.ci_sequence_number ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
198: X_UNIT_CLASS => l_c_igs_ps_unit_ofr_opt.unit_class ,
199: X_CI_START_DT => l_c_igs_ps_unit_ofr_opt.start_dt ,
200: X_CI_END_DT => l_c_igs_ps_unit_ofr_opt.end_dt ,
201: X_UOO_ID => p_uoo_id ,
194: X_CAL_TYPE => l_c_igs_ps_unit_ofr_opt.cal_type ,
195: X_CI_SEQUENCE_NUMBER => l_c_igs_ps_unit_ofr_opt.ci_sequence_number ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
198: X_UNIT_CLASS => l_c_igs_ps_unit_ofr_opt.unit_class ,
199: X_CI_START_DT => l_c_igs_ps_unit_ofr_opt.start_dt ,
200: X_CI_END_DT => l_c_igs_ps_unit_ofr_opt.end_dt ,
201: X_UOO_ID => p_uoo_id ,
202: X_ENROLLED_DT => NULL ,
195: X_CI_SEQUENCE_NUMBER => l_c_igs_ps_unit_ofr_opt.ci_sequence_number ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
198: X_UNIT_CLASS => l_c_igs_ps_unit_ofr_opt.unit_class ,
199: X_CI_START_DT => l_c_igs_ps_unit_ofr_opt.start_dt ,
200: X_CI_END_DT => l_c_igs_ps_unit_ofr_opt.end_dt ,
201: X_UOO_ID => p_uoo_id ,
202: X_ENROLLED_DT => NULL ,
203: X_UNIT_ATTEMPT_STATUS => l_cst_unconfirm ,
196: X_VERSION_NUMBER => l_c_igs_ps_unit_ofr_opt.version_number ,
197: X_LOCATION_CD => l_c_igs_ps_unit_ofr_opt.location_cd ,
198: X_UNIT_CLASS => l_c_igs_ps_unit_ofr_opt.unit_class ,
199: X_CI_START_DT => l_c_igs_ps_unit_ofr_opt.start_dt ,
200: X_CI_END_DT => l_c_igs_ps_unit_ofr_opt.end_dt ,
201: X_UOO_ID => p_uoo_id ,
202: X_ENROLLED_DT => NULL ,
203: X_UNIT_ATTEMPT_STATUS => l_cst_unconfirm ,
204: X_ADMINISTRATIVE_UNIT_STATUS => NULL ,
266: -- validate_combined_unit is called here
267: l_result := igs_en_enroll_wlst.validate_combined_unit
268: (
269: p_person_id => l_person_id ,
270: p_unit_cd => l_c_igs_ps_unit_ofr_opt.unit_cd ,
271: p_version_number => l_c_igs_ps_unit_ofr_opt.version_number ,
272: p_cal_type => p_cal_type , -- load calendar
273: p_ci_sequence_number => p_ci_sequence_number , -- load calendar
274: p_location_cd => l_c_igs_ps_unit_ofr_opt.location_cd ,
267: l_result := igs_en_enroll_wlst.validate_combined_unit
268: (
269: p_person_id => l_person_id ,
270: p_unit_cd => l_c_igs_ps_unit_ofr_opt.unit_cd ,
271: p_version_number => l_c_igs_ps_unit_ofr_opt.version_number ,
272: p_cal_type => p_cal_type , -- load calendar
273: p_ci_sequence_number => p_ci_sequence_number , -- load calendar
274: p_location_cd => l_c_igs_ps_unit_ofr_opt.location_cd ,
275: p_unit_class => l_c_igs_ps_unit_ofr_opt.unit_class ,
270: p_unit_cd => l_c_igs_ps_unit_ofr_opt.unit_cd ,
271: p_version_number => l_c_igs_ps_unit_ofr_opt.version_number ,
272: p_cal_type => p_cal_type , -- load calendar
273: p_ci_sequence_number => p_ci_sequence_number , -- load calendar
274: p_location_cd => l_c_igs_ps_unit_ofr_opt.location_cd ,
275: p_unit_class => l_c_igs_ps_unit_ofr_opt.unit_class ,
276: p_uoo_id => p_uoo_id ,
277: p_course_cd => p_course_cd ,
278: p_enr_method_type => p_enr_method_type ,
271: p_version_number => l_c_igs_ps_unit_ofr_opt.version_number ,
272: p_cal_type => p_cal_type , -- load calendar
273: p_ci_sequence_number => p_ci_sequence_number , -- load calendar
274: p_location_cd => l_c_igs_ps_unit_ofr_opt.location_cd ,
275: p_unit_class => l_c_igs_ps_unit_ofr_opt.unit_class ,
276: p_uoo_id => p_uoo_id ,
277: p_course_cd => p_course_cd ,
278: p_enr_method_type => p_enr_method_type ,
279: p_message_name => p_message ,