Description: Call this procedure from 'Classes List' menu item in the classes left nav bar. Load into 'classes_main' frame. List all of the courses in a table. Display the following columns:
Each class section should be hyperlinked to 'classes location', passing the section_id for the section selected.
CREATE OR REPLACE PROCEDURE classes_list AS v_fname INSTRUCTOR.first_name%TYPE DEFAULT NULL; v_lname INSTRUCTOR.last_name%TYPE DEFAULT NULL; v_instructor_id INSTRUCTOR.instructor_id%TYPE DEFAULT NULL; v_course_no COURSE.course_no%TYPE DEFAULT NULL; BEGIN NULL; ------------------------------------------------------------------------------ -- FILE : classes_list.sql -- CREATED BY : Solomon Morse -- CREATED BY DATE: January 12, 2003 -- URL : classes_list ------------------------------------------------------------------------------ htp.p(' <HTML> <HEAD> <TITLE>University Maintenance Website</TITLE> </HEAD> <BODY BGCOLOR="#99CCCC"> <P ALIGN="CENTER"> <STRONG> <EM> <FONT SIZE="+2" COLOR="BLUE">Class List </FONT></EM></STRONG></P> <FONT FACE="ARIAL"> <HR> <FORM ACTION="classes_location" METHOD="POST" NAME="classlistform"> <TABLE ALIGN="CENTER" BORDER="2" CELLPADDING="10" CELLSPACING="5" BGCOLOR="WHITE"> <TR> <TD ALIGN="CENTER" COLSPAN="3"><FONT COLOR="BLUE"><B>Course List - (click on a section to change location)</B></FONT></TD> </TR> <TR> <TD ALIGN="CENTER"><FONT COLOR="BLACK">Course No</FONT></TD> <TD ALIGN="CENTER"><FONT COLOR="BLACK">Course</FONT></TD> <TD ALIGN="CENTER"><FONT COLOR="MAROON"><B><I>Sections</I></B></FONT></TD> </TR> '); FOR c IN (SELECT course_no, description FROM course ORDER BY course_no ) LOOP htp.p(' <TR> <TD ALIGN="CENTER">'||c.course_no||'</TD>'); htp.p('<TD ALIGN="CENTER">'||c.description||'</TD>'); htp.p('<TD ALIGN="CENTER">'); FOR s IN (SELECT section_no, section_id FROM section WHERE course_no=c.course_no ORDER BY section_no ) LOOP htp.p(' <A HREF="classes_location?p_section_id='||s.section_id||'" LINK="maroon">'||s.section_no||'</A>'); END LOOP; htp.p(' </TD> </TR> '); END LOOP; htp.p(' </TABLE> </P> </FORM> </FONT> <HR> </BODY> </HTML> '); END; /