Index: openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml,v diff -u -N -r1.43 -r1.44 --- openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml 20 Feb 2006 09:22:08 -0000 1.43 +++ openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml 20 Feb 2006 09:40:38 -0000 1.44 @@ -2,6 +2,7 @@ UoS + Requisites View Key The varying colours convey the different requisites for the selected Unit of Study. A white Unit of Study box indicates that the Unit of Study does not affect the selected Unit of Study. Select a Graduate Attribute: Index: openacs-4/packages/curriculum-central/www/all-uos-ga-map.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-ga-map.adp,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/curriculum-central/www/all-uos-ga-map.adp 20 Feb 2006 09:21:33 -0000 1.1 +++ openacs-4/packages/curriculum-central/www/all-uos-ga-map.adp 20 Feb 2006 09:40:38 -0000 1.2 @@ -14,15 +14,12 @@ // --> -[#curriculum-central.requisites#] +[#curriculum-central.requisites_view#]
 
-
- -
#curriculum-central.ga_key_description#
    Index: openacs-4/packages/curriculum-central/www/all-uos-ga-map.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-ga-map.tcl,v diff -u -N -r1.1 -r1.2 --- openacs-4/packages/curriculum-central/www/all-uos-ga-map.tcl 20 Feb 2006 09:21:33 -0000 1.1 +++ openacs-4/packages/curriculum-central/www/all-uos-ga-map.tcl 20 Feb 2006 09:40:38 -0000 1.2 @@ -80,7 +80,6 @@ set float_class "float" if { [info exists gradattr_id] } { if { [db_0or1row ga_level {}] } { - if { $level == 5} { set float_class "float ga-very-high" } elseif { $level == 4 } { Index: openacs-4/packages/curriculum-central/www/stream-ga-map-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-ga-map-postgresql.xql,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/stream-ga-map-postgresql.xql 20 Feb 2006 09:40:38 -0000 1.1 @@ -0,0 +1,59 @@ + + + + postgresql7.4 + + + + SELECT f.faculty_id, f.faculty_name, d.department_id, d.department_name, + s.stream_name + FROM cc_faculty f, cc_department d, cc_stream s + WHERE f.faculty_id = d.faculty_id + AND d.department_id = s.department_id + AND s.stream_id = :stream_id + AND s.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, uos.uos_name_id + 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 + WHERE uos.uos_id = map.uos_id + AND map.stream_id = :stream_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) + + + + + + SELECT DISTINCT level + FROM cc_uos_gradattr_set gas, cc_uos_gradattr_map gam, + cc_uos_gradattr_name gan, cc_uos_gradattr ga + WHERE gas.parent_uos_id = :uos_id + AND gas.live_revision_id = gam.revision_id + AND gam.gradattr_id = ga.gradattr_id + AND ga.name_id = :gradattr_id + + + + + + SELECT name, name_id FROM cc_uos_gradattr_name + + + + Index: openacs-4/packages/curriculum-central/www/stream-ga-map.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-ga-map.adp,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/stream-ga-map.adp 20 Feb 2006 09:40:38 -0000 1.1 @@ -0,0 +1,81 @@ + +@page_title;noquote@ +@context;noquote@ + + + + +[#curriculum-central.requisites_view#] + +
    + +
     
    + +
    + #curriculum-central.ga_key_description# +
      +
    • #curriculum-central.very_low#
    • +
    • #curriculum-central.low#
    • +
    • #curriculum-central.moderate#
    • +
    • #curriculum-central.high#
    • +
    • #curriculum-central.very_high#
    • +
    +

    #curriculum-central.key#

    +
    + +
    +
    + #curriculum-central.select_a_graduate_attribute# + +
    +
    + + + + + +
     
    + +
    Index: openacs-4/packages/curriculum-central/www/stream-ga-map.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-ga-map.tcl,v diff -u -N --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/curriculum-central/www/stream-ga-map.tcl 20 Feb 2006 09:40:38 -0000 1.1 @@ -0,0 +1,108 @@ +ad_page_contract { + Displays the UoS map for the specified stream ID. + + @author Nick Carroll (nick.c@rroll.net) + @creation-date 2005-11-15 + @cvs-id $Id: stream-ga-map.tcl,v 1.1 2006/02/20 09:40:38 ncarroll Exp $ +} { + stream_id:integer + gradattr_id:integer,optional +} + +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 "$stream_name - [_ curriculum-central.graduate_attribute_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] + +set requisites_map_url [export_vars -url -base stream-map {stream_id}] + +template::multirow create ga_names name name_id selected_p url +db_foreach ga_name {} { + set selected_p 0 + if { [info exists gradattr_id] } { + if { $gradattr_id == $name_id } { + set selected_p 1 + } + } + + set url [export_vars -url -base stream-ga-map -override {{gradattr_id $name_id}} {stream_id gradattr_id}] + + template::multirow append ga_names $name $name_id $selected_p $url +} + +# If gradattr_id doesn't exist, then use the first Graduate Attribute +# from the drop down list as the default value. +if { ![info exists gradattr_id] } { + if { [template::multirow size ga_names] > 0 } { + set gradattr_id [template::multirow get ga_names 1 name_id] + } +} + +# 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 float_class + +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] + set uos_name_id [lindex $uos 9] + + 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 "stream-map" + set uos_details_url [export_vars -url -base uos-details {uos_id stream_id base_return_url department_id}] + + # Determine style of requisites for the selected UoS, if one was + # selected. + set float_class "float" + if { [info exists gradattr_id] } { + if { [db_0or1row ga_level {}] } { + if { $level == 5} { + set float_class "float ga-very-high" + } elseif { $level == 4 } { + set float_class "float ga-high" + } elseif { $level == 3 } { + set float_class "float ga-moderate" + } elseif { $level == 2 } { + set float_class "float ga-low" + } elseif { $level == 1 } { + set float_class "float ga-very-low" + } + } + } + + 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 $float_class + + } +} + +# Sort stream info by increasing year and session. +template::multirow sort stream -increasing year_id session_id uos_code + +ad_return_template Index: openacs-4/packages/curriculum-central/www/stream-map.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-map.adp,v diff -u -N -r1.5 -r1.6 --- openacs-4/packages/curriculum-central/www/stream-map.adp 20 Feb 2006 09:21:33 -0000 1.5 +++ openacs-4/packages/curriculum-central/www/stream-map.adp 20 Feb 2006 09:40:38 -0000 1.6 @@ -4,13 +4,15 @@ +[#curriculum-central.graduate_attributes#]
     
    + #curriculum-central.requisite_key_description#
    • #curriculum-central.selected_uos#
    • #curriculum-central.prerequisite#
    • Index: openacs-4/packages/curriculum-central/www/stream-map.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/stream-map.tcl,v diff -u -N -r1.7 -r1.8 --- openacs-4/packages/curriculum-central/www/stream-map.tcl 17 Feb 2006 12:50:05 -0000 1.7 +++ openacs-4/packages/curriculum-central/www/stream-map.tcl 20 Feb 2006 09:40:38 -0000 1.8 @@ -23,6 +23,8 @@ {department_name department_id}] $department_name] \ $page_title] +set ga_map_url [export_vars -url -base stream-ga-map {stream_id}] + # Retrieve a list of Units of Study. set units_of_study [db_list_of_lists units_of_study {}]