Index: openacs-4/packages/curriculum-central/www/all-uos-map-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-map-postgresql.xql,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/all-uos-map-postgresql.xql 16 Feb 2006 05:42:32 -0000 1.1 @@ -0,0 +1,42 @@ + + + + postgresql7.4 + + + + SELECT f.faculty_id, f.faculty_name, d.department_id, d.department_name + FROM cc_faculty f, cc_department d + WHERE f.faculty_id = d.faculty_id + AND d.department_id = :department_id + AND d.package_id = :package_id + + + + + + SELECT map.map_id, n.uos_code, n.uos_name, uos.uos_id, + rev.year_id, y.name, rev.core_id, + map.live_revision_id, uosr.session_ids + FROM cc_uos uos, cc_uos_revisions uosr, cc_stream_uos_map map, + cc_stream_uos_map_rev rev, cc_year y, cc_uos_name n, + cc_department d + WHERE uos.uos_id = map.uos_id + AND d.department_id = :department_id + AND d.department_id = uosr.department_id + AND d.package_id = :package_id + AND map.live_revision_id = rev.map_rev_id + AND rev.year_id = y.year_id + AND rev.year_id != 0 + AND uos.live_revision_id = uosr.uos_revision_id + AND n.name_id = uos.uos_name_id + + + + + + SELECT cc_session__name(:session_id) + + + + Index: openacs-4/packages/curriculum-central/www/all-uos-map.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-map.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/all-uos-map.adp 16 Feb 2006 05:42:32 -0000 1.1 @@ -0,0 +1,40 @@ + +@page_title;noquote@ +@context;noquote@ + + + + +
+ +
 
+ + + + + +
 
+ +
Index: openacs-4/packages/curriculum-central/www/all-uos-map.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-map.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/all-uos-map.tcl 16 Feb 2006 05:42:32 -0000 1.1 @@ -0,0 +1,63 @@ +ad_page_contract { + Displays the UoS map for the specified department ID. + + @author Nick Carroll (nick.c@rroll.net) + @creation-date 2005-11-15 + @cvs-id $Id: all-uos-map.tcl,v 1.1 2006/02/16 05:42:32 ncarroll Exp $ +} { + department_id:integer +} + +set package_id [ad_conn package_id] +set user_id [ad_conn user_id] + +# Retrieve info about the faculty, department and stream. +db_1row context {} + +set page_title "[_ curriculum-central.all_uos] - [_ curriculum-central.map_view]" +set context [list \ + [list [export_vars -url -base faculty-depts {faculty_name faculty_id}] \ + $faculty_name] \ + [list [export_vars -url -base dept-streams \ + {department_name department_id}] $department_name] \ + $page_title] + +# Retrieve a list of Units of Study. +set units_of_study [db_list_of_lists units_of_study {}] + +template::multirow create stream map_id year_id year_name \ + session_id session_name core_or_not uos_id uos_code uos_name \ + year_session_group uos_details_url + +foreach uos $units_of_study { + set map_id [lindex $uos 0] + set uos_code [lindex $uos 1] + set uos_name [lindex $uos 2] + set uos_id [lindex $uos 3] + set year_id [lindex $uos 4] + set year_name [lindex $uos 5] + set core_id [lindex $uos 6] + set live_revision_id [lindex $uos 7] + set session_ids [lindex $uos 8] + + foreach session_id $session_ids { + + # Get name of session_id + set session_name [db_string session_name {} -default ""] + + set year_session_group "${year_id}${session_id}" + + set base_return_url "all-uos-map" + set uos_details_url [export_vars -url -base uos-details {uos_id stream_id base_return_url department_id}] + + template::multirow append stream $map_id $year_id $year_name \ + $session_id $session_name $core_id $uos_id $uos_code $uos_name \ + $year_session_group $uos_details_url + + } +} + +# Sort stream info by increasing year and session. +template::multirow sort stream -increasing year_id session_id + +ad_return_template Index: openacs-4/packages/curriculum-central/www/dept-streams.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/dept-streams.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/curriculum-central/www/dept-streams.adp 15 Feb 2006 11:07:35 -0000 1.5 +++ openacs-4/packages/curriculum-central/www/dept-streams.adp 16 Feb 2006 05:42:32 -0000 1.6 @@ -2,7 +2,7 @@ @page_title;noquote@ @context;noquote@ -#curriculum-central.all_uos_offered_by_this_department# [#curriculum-central.overview_lc# | #curriculum-central.map_lc#] +#curriculum-central.all_uos_offered_by_this_department# [#curriculum-central.overview_lc# | #curriculum-central.map_lc#]

#curriculum-central.view_uos_by_degree_streams#