function list_prof_past_courses_form() { $courses = all_course_data(); $instructors = all_teachers_data(); $since_year = array(); for ($i = 1; $i < 30; $i++) { $since_year[$i] = $i; } /* * currently selected values */ $current_instructor = get($_SESSION, 'instructor'); $current_n = get($_SESSION, 'n'); dom::h3('section-title', 'View Instructor\'s Teaching History'); dom::push_div('section'); dom::push_form(); dom::label('Instructor:'); dom::dropdown('instructor', $instructors, $current_instructor, true); dom::label('Past Year:'); dom::dropdown('n', $since_year, $current_n, true); dom::hidden('action', 'instructor_history'); dom::pop(); if (isset($_SESSION['instructor'])) { $teaching_history = list_teaching_history($_SESSION['instructor'], CURRENT_YEAR - $_SESSION['n']); while ($row = mysql_fetch_assoc($teaching_history)) { dom::label($row['year']); } } dom::pop(); }
function add_teacher_to_section() { $teachers = all_teachers_data(); $sections = all_sections_data(); dom::h3('section-title', 'Link Instructor and Section:'); dom::push_div('section'); dom::push_form(); dom::label('Instructor:'); dom::dropdown('instructor_id', $teachers); dom::label('section:'); dom::dropdown('section_id', $sections); dom::hidden('action', 'link_inst_sect'); dom::submit(); dom::pop(); dom::pop(); }