Index: openacs-4/packages/curriculum-central/www/all-uos-view-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-view-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/all-uos-view-postgresql.xql 15 Feb 2006 11:07:35 -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-view.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-view.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/all-uos-view.adp 15 Feb 2006 11:07:35 -0000 1.1
@@ -0,0 +1,25 @@
+
+@page_title;noquote@
+@context;noquote@
+
+
+
+
+
+
+
+
+ - @stream.year_name@
+
+
+ - @stream.session_name@
+
+
+
+
+
+
Index: openacs-4/packages/curriculum-central/www/all-uos-view.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/all-uos-view.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/all-uos-view.tcl 15 Feb 2006 11:07:35 -0000 1.1
@@ -0,0 +1,66 @@
+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: all-uos-view.tcl,v 1.1 2006/02/15 11:07:35 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.overview]"
+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-view"
+ set uos_details_url [export_vars -url -base uos-details {uos_id stream_id base_return_url}]
+
+ set core_id [curriculum_central::stream::stream_uos_relation_name \
+ -id $core_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.4 -r1.5
--- openacs-4/packages/curriculum-central/www/dept-streams.adp 13 Feb 2006 01:30:07 -0000 1.4
+++ openacs-4/packages/curriculum-central/www/dept-streams.adp 15 Feb 2006 11:07:35 -0000 1.5
@@ -2,11 +2,11 @@
@page_title;noquote@
@context;noquote@
-#curriculum-central.view_uos_for#
+#curriculum-central.all_uos_offered_by_this_department# [#curriculum-central.overview_lc# | #curriculum-central.map_lc#]
+
+#curriculum-central.view_uos_by_degree_streams#
-
-View all Units of Study offered by @department_name@
\ No newline at end of file
Index: openacs-4/packages/curriculum-central/www/dept-streams.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/dept-streams.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/curriculum-central/www/dept-streams.tcl 13 Feb 2006 01:30:07 -0000 1.3
+++ openacs-4/packages/curriculum-central/www/dept-streams.tcl 15 Feb 2006 11:07:35 -0000 1.4
@@ -25,8 +25,13 @@
return
}
+set all_uos_view_url [export_vars -url -base all-uos-view {department_id}]
+
# Get list of streams.
-db_multirow -extend {stream_map_url stream_view_url} streams streams {} {
+db_multirow -extend {
+ stream_map_url
+ stream_view_url
+} streams streams {} {
set stream_map_url [export_vars -url -base stream-map {stream_id}]
set stream_view_url [export_vars -url -base stream-view \
Index: openacs-4/packages/curriculum-central/www/uos-details.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/uos-details.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/curriculum-central/www/uos-details.tcl 13 Feb 2006 11:46:54 -0000 1.3
+++ openacs-4/packages/curriculum-central/www/uos-details.tcl 15 Feb 2006 11:07:35 -0000 1.4
@@ -6,7 +6,7 @@
@cvs-id $Id$
} {
uos_id:integer
- stream_id
+ stream_id:optional
{base_return_url "stream-map"}
}
@@ -17,20 +17,31 @@
set return_view_type "[_ curriculum-central.overview]"
}
-# Retrieve context details.
-db_1row context_details {}
+if { [info exists stream_id] } {
+ # Retrieve context details.
+ db_1row context_details {}
-set page_title "${uos_code} ${uos_name}"
+ set page_title "${uos_code} ${uos_name}"
-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] \
- [list [export_vars -url -base $base_return_url \
- {stream_name stream_id}] "$stream_name - $return_view_type"] \
- $page_title]
+ 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] \
+ [list [export_vars -url -base $base_return_url \
+ {stream_name stream_id}] \
+ "$stream_name - $return_view_type"] \
+ $page_title]
+} else {
+ #db_1row context_details_no_stream {}
+ set page_title ""
+ set context ""
+}
+
+
# Retrieve Unit of Study details.
db_1row uos_details {}