Index: openacs-4/packages/curriculum-central/www/admin/index.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/admin/index.adp,v
diff -u -r1.9 -r1.10
--- openacs-4/packages/curriculum-central/www/admin/index.adp 16 Feb 2006 10:44:17 -0000 1.9
+++ openacs-4/packages/curriculum-central/www/admin/index.adp 1 Jun 2006 05:28:34 -0000 1.10
@@ -50,6 +50,12 @@
#curriculum-central.add_a_grade_descriptor#
+#curriculum-central.tl_names#
+
+
#curriculum-central.graduate_attributes#
- #curriculum-central.view_graduate_attributes#
Index: openacs-4/packages/curriculum-central/www/admin/tl-name-ae-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/admin/tl-name-ae-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/admin/tl-name-ae-postgresql.xql 1 Jun 2006 05:28:34 -0000 1.1
@@ -0,0 +1,25 @@
+
+
+
+ postgresql7.4
+
+
+
+ UPDATE cc_uos_tl_name
+ SET name = :name,
+ general_description = :general_description
+ WHERE name_id = :name_id
+
+
+
+
+
+ UPDATE acs_objects
+ SET modifying_user = :modifying_user,
+ modifying_ip = :modifying_ip,
+ package_id = :package_id
+ WHERE object_id = :name_id
+
+
+
+
Index: openacs-4/packages/curriculum-central/www/admin/tl-name-ae.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/admin/tl-name-ae.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/admin/tl-name-ae.adp 1 Jun 2006 05:28:34 -0000 1.1
@@ -0,0 +1,6 @@
+
+@page_title;noquote@
+@context;noquote@
+name.name
+
+
Index: openacs-4/packages/curriculum-central/www/admin/tl-name-ae.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/admin/tl-name-ae.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/admin/tl-name-ae.tcl 1 Jun 2006 05:28:34 -0000 1.1
@@ -0,0 +1,59 @@
+ad_page_contract {
+ Add/Edit a teaching & learning approach name.
+
+ @author Nick Carroll (nick.c@rroll.net)
+ @creation-date 2006-01-04
+ @cvs-id $Id: tl-name-ae.tcl,v 1.1 2006/06/01 05:28:34 ncarroll Exp $
+} {
+ name_id:integer,optional
+ {return_url "tl-names"}
+}
+
+auth::require_login
+
+if { [info exists name_id] } {
+ set page_title [_ curriculum-central.edit_tl_name]
+} else {
+ set page_title [_ curriculum-central.add_tl_name]
+}
+
+set context [list $page_title]
+set package_id [ad_conn package_id]
+set user_id [ad_conn user_id]
+
+ad_form -name name -cancel_url $return_url -form {
+ {name_id:key(acs_object_id_seq)}
+ {return_url:text(hidden) {value $return_url}}
+ {name:text
+ {html {size 25}}
+ {label "[_ curriculum-central.name]" }
+ {help_text "[_ curriculum-central.help_enter_tl_name]"}
+ }
+ {general_description:richtext(richtext),optional
+ {label "[_ curriculum-central.general_description]"}
+ {html {cols 50 rows 4}}
+ {htmlarea_p 0}
+ {nospell}
+ {help_text "[_ curriculum-central.help_enter_ga_general_description]"}
+ }
+} -select_query {
+ SELECT name, general_description
+ FROM cc_uos_tl_name WHERE name_id = :name_id
+} -new_data {
+ package_instantiate_object \
+ -var_list [list [list package_id $package_id] \
+ [list object_type cc_uos_tl_name] \
+ [list name $name] \
+ [list general_description $general_description]] \
+ -form_id name cc_uos_tl_name
+
+} -edit_data {
+ set modifying_user [ad_conn user_id]
+ set modifying_ip [ad_conn peeraddr]
+
+ db_dml tl_name_update {}
+ db_dml object_update {}
+} -after_submit {
+ ad_returnredirect $return_url
+ ad_script_abort
+}
Index: openacs-4/packages/curriculum-central/www/admin/tl-names-postgresql.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/admin/tl-names-postgresql.xql,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/admin/tl-names-postgresql.xql 1 Jun 2006 05:28:34 -0000 1.1
@@ -0,0 +1,15 @@
+
+
+
+ postgresql7.4
+
+
+
+ SELECT n.name_id, n.name, n.general_description
+ FROM cc_uos_tl_name n
+ WHERE n.package_id = :package_id
+ [template::list::orderby_clause -orderby -name "names"]
+
+
+
+
Index: openacs-4/packages/curriculum-central/www/admin/tl-names.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/admin/tl-names.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/admin/tl-names.adp 1 Jun 2006 05:28:34 -0000 1.1
@@ -0,0 +1,5 @@
+
+@page_title;noquote@
+@context;noquote@
+
+
Index: openacs-4/packages/curriculum-central/www/admin/tl-names.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/curriculum-central/www/admin/tl-names.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/curriculum-central/www/admin/tl-names.tcl 1 Jun 2006 05:28:34 -0000 1.1
@@ -0,0 +1,51 @@
+ad_page_contract {
+ Page for listing names of teaching and learning approaches. Names
+ include tutorial, lab, lecture, etc..
+
+ @author Nick Carroll (nick.c@rroll.net)
+ @creation-date 2006-1-4
+ @cvs-id $Id: tl-names.tcl,v 1.1 2006/06/01 05:28:34 ncarroll Exp $
+} {
+ {orderby "name,asc"}
+}
+
+auth::require_login
+
+set page_title "[_ curriculum-central.tl_names]"
+set context [list $page_title]
+set package_id [ad_conn package_id]
+set user_id [ad_conn user_id]
+
+set elements {
+ edit {
+ sub_class narrow
+ display_template {
+
+ }
+ link_url_eval {[export_vars -base tl-name-ae { name_id }]}
+ link_html {title "#curriculum-central.edit_tl_name#"}
+ }
+ name {
+ label "#curriculum-central.name#"
+ }
+ general_description {
+ label "#curriculum-central.general_description#"
+ }
+}
+
+template::list::create \
+ -name names \
+ -actions [list "#curriculum-central.add_tl_name#" [export_vars -base tl-name-ae {}] "#curriculum-central.add_tl_name_to_list#"] \
+ -multirow names \
+ -no_data "#curriculum-central.no_tl_names_created#" \
+ -elements $elements \
+ -orderby {
+ name {orderby {lower(name)}}
+ }
+
+db_multirow names get_tl_names {} {
+ set general_description [template::util::richtext::get_property \
+ contents $general_description]
+}
+
+ad_return_template