Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl,v
diff -u -r1.3 -r1.4
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl 16 Feb 2005 22:21:30 -0000 1.3
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.tcl 19 Feb 2005 02:32:07 -0000 1.4
@@ -49,7 +49,71 @@
}
set obj_n 0
+set dotlrn_class "("
+set dotlrn_com "("
+
# For dotlrn associations
db_multirow -extend { obj_n admin_p } relations relation { } {
set obj_n 1
-}
\ No newline at end of file
+ if { [string equal $type "dotlrn_catalog_class_rel" ]} {
+ append dotlrn_class "'$object_id'"
+ append dotlrn_class ","
+ } else {
+ append dotlrn_com "'$object_id'"
+ append dotlrn_com ","
+ }
+}
+append dotlrn_class "0)"
+append dotlrn_com "0)"
+
+db_multirow classes_list get_dotlrn_classes { }
+
+template::list::create \
+ -name dotlrn_classes \
+ -multirow classes_list \
+ -key object_id \
+ -row_pretty_plural "[_ dotlrn-catalog.dotlrn_classes]" \
+ -elements {
+ class {
+ label "[_ dotlrn-catalog.class_name]"
+ display_template {
+ @classes_list.pretty_name@
+ }
+ }
+ dep_name {
+ label "[_ dotlrn-catalog.dep_name]"
+ display_template {
+ @classes_list.department_name@
+ }
+ }
+ term_name {
+ label "[_ dotlrn-catalog.term_name]"
+ display_template {
+ @classes_list.term_name@
+ }
+ }
+ subject {
+ label "[_ dotlrn-catalog.subject_name]"
+ display_template {
+ @classes_list.class_name@
+ }
+ }
+ }
+
+
+db_multirow com_list get_dotlrn_communities { }
+
+
+template::list::create \
+ -name dotlrn_communities \
+ -multirow com_list \
+ -key object_id \
+ -row_pretty_plural "[_ dotlrn-catalog.dotlrn_com]" \
+ -elements {
+ community {
+ label "[_ dotlrn-catalog.com_name]"
+ display_template {
+ @com_list.pretty_name@
+ }
+ }
+ }