14: -- Known limitations/enhancements and/or remarks:
15: --
16: -- Change History:
17: -- Who When What
18: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
19: ------------------------------------------------------------------------------
20: IS
21: lv_location VARCHAR2(2000) ;
22: CURSOR c_igs_ps_usec_occurs(p_uoo_id IN NUMBER) IS
18: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
19: ------------------------------------------------------------------------------
20: IS
21: lv_location VARCHAR2(2000) ;
22: CURSOR c_igs_ps_usec_occurs(p_uoo_id IN NUMBER) IS
23: SELECT
24: uoo_id,
25: NVL(d.description,'-')||'
'||NVL(b.description,'-')||'
'||NVL(c.description,'-') location_description,
26: NVL(b.location_cd,'-')||'
'||NVL(b.building_cd,'-')||'
'||NVL(c.room_cd,'-') location_cd
23: SELECT
24: uoo_id,
25: NVL(d.description,'-')||'
'||NVL(b.description,'-')||'
'||NVL(c.description,'-') location_description,
26: NVL(b.location_cd,'-')||'
'||NVL(b.building_cd,'-')||'
'||NVL(c.room_cd,'-') location_cd
27: FROM igs_ps_usec_occurs a,
28: igs_ad_building b,
29: igs_ad_room c,
30: igs_ad_location d
31: WHERE
35: a.uoo_id = p_uoo_id
36: ORDER BY
37: b.location_cd,b.building_id,c.room_id;
38: BEGIN
39: FOR c_occurs_data IN c_igs_ps_usec_occurs(p_uoo_id)
40: LOOP
41: IF lv_location IS NOT NULL
42: THEN
43: lv_location := lv_location||'
'||c_occurs_data.location_description ;
59: -- Known limitations/enhancements and/or remarks:
60: --
61: -- Change History:
62: -- Who When What
63: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
64: ------------------------------------------------------------------------------
65: lv_instructor varchar2(2000);
66: CURSOR c_igs_ps_usec_occurs(p_uoo_id IN NUMBER)
67: IS
62: -- Who When What
63: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
64: ------------------------------------------------------------------------------
65: lv_instructor varchar2(2000);
66: CURSOR c_igs_ps_usec_occurs(p_uoo_id IN NUMBER)
67: IS
68: SELECT
69: uoo_id,
70: NVL(DECODE(a.monday, 'Y', 'Mon', NULL)||
75: DECODE(a.saturday, 'Y', 'Sat', NULL)||
76: DECODE(a.sunday, 'Y', 'Sun', NULL),'-')||'
'||
77: TO_CHAR(a.start_time, 'hh:miam')||'-'|| TO_CHAR(a.end_time, 'hh:miam')||'
'||
78: LTRIM(f.person_last_name||', '||f.person_first_name||' '||f.person_middle_name) instructor_name
79: FROM igs_ps_usec_occurs a,
80: igs_ad_building b,
81: hz_parties f
82: WHERE
83: a.building_code = b.building_id(+) AND
84: a.instructor_id = f.party_id(+) AND
85: a.uoo_id = p_uoo_id ORDER BY
86: location_cd,building_id ,room_code;
87: BEGIN
88: FOR c_occurs_data IN c_igs_ps_usec_occurs(p_uoo_id)
89: LOOP
90: IF lv_instructor IS NOT NULL
91: THEN
92: lv_instructor := lv_instructor||'
'||c_occurs_data.instructor_name ;
139: -- Known limitations/enhancements and/or remarks:
140: --
141: -- Change History:
142: -- Who When What
143: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
144: ------------------------------------------------------------------------------
145: is
146: lv_occurence_details varchar2(32000) ;
147: lv_location_details varchar2(32000) ;
144: ------------------------------------------------------------------------------
145: is
146: lv_occurence_details varchar2(32000) ;
147: lv_location_details varchar2(32000) ;
148: CURSOR c_igs_ps_usec_occurs(p_uoo_id in number)
149: IS
150: SELECT
151: uoo_id,
152: DECODE(a.monday, 'Y', 'Mon', NULL)||
168: NVL(d.description,'-')||'
'||
169: NVL(b.description,'-')||' '||
170: NVL(c.description,'')||'
'||
171: LTRIM(f.person_last_name||', '||f.person_first_name||' '||f.person_middle_name) location
172: FROM igs_ps_usec_occurs a,
173: igs_ad_building b,
174: igs_ad_room c,
175: igs_ad_location d,
176: hz_parties f
182: a.uoo_id = p_uoo_id
183: ORDER BY
184: class_day,class_time;
185: BEGIN
186: FOR c_occurs_data in c_igs_ps_usec_occurs(p_uoo_id)
187: LOOP
188: IF lv_location_details IS NOT NULL THEN
189: lv_location_details := lv_location_details ||'
'||c_occurs_data.location ;
190: ELSE
208: -- prgoyal 14-Oct-2001 Modifed the function to fetch the instructors from
209: -- table igs_ps_uso_instrctrs
210: -- kamohan 1/15/02 Modified for ENCR014
211: -- Added Start_date, End_date and TBA
212: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
213: ------------------------------------------------------------------------------
214: IS
215: lv_occurence_details VARCHAR2(32000) ;
216: lv_location_details VARCHAR2(32000) ;
213: ------------------------------------------------------------------------------
214: IS
215: lv_occurence_details VARCHAR2(32000) ;
216: lv_location_details VARCHAR2(32000) ;
217: CURSOR c_igs_ps_usec_occurs(p_uoo_id IN NUMBER)
218: IS SELECT
219: uoo_id,
220: unit_section_occurrence_id usec_id,
221: start_date,
236: || DECODE(a.saturday, 'Y', 'Sat', NULL)
237: || DECODE(a.sunday, 'Y', 'Sun', NULL) ||' '
238: || TO_CHAR(a.start_time,'hh:miam')||'-'||TO_CHAR(a.end_time, 'hh:miam')
239: ||'
'||NVL(b.location_cd,' ')||'
'||NVL(b.building_cd,' ') ||' '||NVL(c.room_cd,' ') location
240: FROM igs_ps_usec_occurs a,
241: igs_ad_building b,
242: igs_ad_room c
243: WHERE
244: a.building_code = b.building_id(+) AND
245: a.room_code = c.room_id(+) AND
246: a.uoo_id = p_uoo_id
247: ORDER BY class_day,class_time;
248:
249: cursor c_get_uso_instructor ( p_unit_section_occurence_id igs_ps_usec_occurs_all.unit_section_occurrence_id%TYPE)
250: IS
251: SELECT
252: person_Last_name ||', '||Person_first_name||' '|| person_middle_name instructor_name
253: FROM
262: l_announce BOOLEAN := FALSE;
263: l_display BOOLEAN := TRUE;
264: BEGIN
265:
266: FOR c_occurs_data in c_igs_ps_usec_occurs(p_uoo_id) LOOP
267: IF c_occurs_data.start_date IS NULL AND c_occurs_data.end_date IS NULL THEN
268: l_announce := TRUE;
269: l_display := FALSE;
270: END IF;
324: -- Known limitations/enhancements and/or remarks:
325: --
326: -- Change History:
327: -- Who When What
328: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
329: ------------------------------------------------------------------------------
330: lv_occurence_details varchar2(2000) ;
331: CURSOR c_igs_ps_usec_occurs(p_uoo_id IN NUMBER)
332: IS
327: -- Who When What
328: -- kkillams 15-04-2003 Modified c_igs_ps_usec_occurs cursor as part of performance bug 2749732
329: ------------------------------------------------------------------------------
330: lv_occurence_details varchar2(2000) ;
331: CURSOR c_igs_ps_usec_occurs(p_uoo_id IN NUMBER)
332: IS
333: SELECT
334: uoo_id,
335: DECODE(a.monday, 'Y', 'Mon', NULL)||
341: DECODE(a.sunday, 'Y', 'Sun', NULL)||' '||
342: TO_CHAR(a.start_time, 'hh:miam')||'-'||
343: TO_CHAR(a.end_time, 'hh:miam')||'
'||
344: LTRIM(f.person_last_name||', '||f.person_first_name||' '||f.person_middle_name) occurence
345: FROM igs_ps_usec_occurs a,
346: igs_ad_building b,
347: hz_parties f
348: WHERE
349: a.building_code = b.building_id(+) AND
350: a.instructor_id = f.party_id(+) AND
351: a.uoo_id = p_uoo_id ORDER BY
352: location_cd,building_id ,room_code;
353: BEGIN
354: FOR c_occurs_data in c_igs_ps_usec_occurs(p_uoo_id)
355: LOOP
356: IF lv_occurence_details IS NOT NULL
357: THEN
358: lv_occurence_details := lv_occurence_details ||'
'||c_occurs_data.occurence ;
3255: DECODE(uso.saturday, 'Y', 'Sa', NULL) ||
3256: DECODE(uso.sunday, 'Y', 'Su', NULL),'TBA') meetings,
3257: TO_CHAR(uso.start_time,'hh:miam') start_time,
3258: TO_CHAR(uso.end_time, 'hh:miam') end_time
3259: FROM igs_ps_usec_occurs_all USO,
3260: igs_ps_unit_ofr_opt_all US,
3261: igs_ca_inst_all CA
3262: WHERE uso.uoo_id = cp_n_uoo_id AND
3263: uso.uoo_id = us.uoo_id AND
3357:
3358: FUNCTION get_usec_instructors(p_n_uoo_id IN NUMBER) RETURN VARCHAR2 AS
3359: CURSOR c_uso (cp_n_uoo_id IN NUMBER) IS
3360: SELECT unit_section_occurrence_id
3361: FROM igs_ps_usec_occurs_all
3362: WHERE uoo_id = cp_n_uoo_id
3363: ORDER BY unit_section_occurrence_id;
3364: CURSOR c_instr (cp_n_occurs_id IN NUMBER) IS
3365: SELECT pe.last_name || ', ' || pe.first_name || ' ' || pe.middle_name name
4545: DECODE(uso.thursday, 'Y', 'Th', NULL) ||
4546: DECODE(uso.friday, 'Y', 'F', NULL) ||
4547: DECODE(uso.saturday, 'Y', 'Sa', NULL) ||
4548: DECODE(uso.sunday, 'Y', 'Su', NULL) meetings
4549: FROM igs_ps_usec_occurs_all uso
4550: WHERE uso.unit_section_occurrence_id = cp_n_uso_id;
4551: rec_uso c_uso%ROWTYPE;
4552: l_c_ret_data varchar2(80);
4553: BEGIN
4582: CURSOR c_uso(cp_n_uso_id IN NUMBER) IS
4583: SELECT uso.no_set_day_ind,
4584: to_char(uso.start_time,'hh:miam') start_time,
4585: to_char(uso.end_time,'hh:miam') end_time
4586: FROM igs_ps_usec_occurs_all uso
4587: WHERE uso.unit_section_occurrence_id = cp_n_uso_id;
4588: rec_uso c_uso%ROWTYPE;
4589:
4590: l_c_ret_data varchar2(80);
4622: SELECT TO_CHAR( NVL( NVL( USO.START_DATE, US.UNIT_SECTION_START_DATE),
4623: CA.START_DT), 'DD MON YYYY') || ' - ' ||
4624: TO_CHAR( NVL( NVL( USO.END_DATE, US.UNIT_SECTION_END_DATE),
4625: CA.END_DT), 'DD MON YYYY') effective_date
4626: FROM igs_ps_usec_occurs_all USO,
4627: igs_ps_unit_ofr_opt_all US,
4628: igs_ca_inst_all CA
4629: WHERE uso.unit_section_occurrence_id = cp_n_uso_id
4630: AND uso.uoo_id = us.uoo_id