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 -r1.15 -r1.16
--- openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml 21 Dec 2005 02:54:12 -0000 1.15
+++ openacs-4/packages/curriculum-central/catalog/curriculum-central.en_US.ISO-8859-1.xml 21 Dec 2005 05:20:14 -0000 1.16
@@ -19,6 +19,7 @@
UoS Code
UoS Name
Credit Value
+ Edit Unit of Study
Semester Offering
Online Course Content
Contact Hours
Index: openacs-4/packages/curriculum-central/tcl/uos-procs-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/tcl/uos-procs-postgresql.xql,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/curriculum-central/tcl/uos-procs-postgresql.xql 21 Dec 2005 02:54:13 -0000 1.6
+++ openacs-4/packages/curriculum-central/tcl/uos-procs-postgresql.xql 21 Dec 2005 05:20:15 -0000 1.7
@@ -90,6 +90,13 @@
+
+
+ UPDATE cc_uos SET unit_coordinator_id = :unit_coordinator_id
+ WHERE uos_id = :uos_id
+
+
+
SELECT latest_revision FROM cr_items WHERE item_id = :object_id
Index: openacs-4/packages/curriculum-central/tcl/uos-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/tcl/uos-procs.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/curriculum-central/tcl/uos-procs.tcl 21 Dec 2005 02:54:13 -0000 1.8
+++ openacs-4/packages/curriculum-central/tcl/uos-procs.tcl 21 Dec 2005 05:20:15 -0000 1.9
@@ -131,7 +131,6 @@
pretty_name "#curriculum-central.submit#"
pretty_past_tense "#curriculum-central.submitted#"
assigned_role { unit_coordinator }
- enabled_states { submitted }
assigned_states { open }
new_state submitted
privileges { write }
@@ -405,9 +404,15 @@
foreach name [array names row "${role_prefix}*"] {
set assignments([string range $name \
[string length $role_prefix] end]) $row($name)
+
+ # Get the reassigned unit_coordinator_id
+ if { $name eq "role_unit_coordinator" } {
+ set row(unit_coordinator_id) $row($name)
+ }
+
unset row($name)
}
-
+
db_transaction {
# Update the UoS info.
curriculum_central::uos::update -uos_id $uos_id \
@@ -474,8 +479,17 @@
set $name $new_row($name)
}
- set revision_id [db_exec_plsql update_uos {}]
+ db_transaction {
+ set revision_id [db_exec_plsql update_uos {}]
+ # If unit_coordinator_id exists, then update the cc_uos table
+ # that caches the coordinator for a UoS. This is required
+ # when the Unit Coordinator has been reassigned.
+ if { [info exists unit_coordinator_id] } {
+ db_dml update_unit_coordinator {}
+ }
+ }
+
return $uos_id
}