Index: openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml 17 Feb 2005 22:56:10 -0000 1.6
+++ openacs-4/packages/dotlrn-catalog/catalog/dotlrn-catalog.en_US.ISO-8859-1.xml 19 Feb 2005 02:32:07 -0000 1.7
@@ -71,6 +71,7 @@
Please type a keyword
Privilege on
Privilege on dotLRN-Catalog:
+ Professor:
Revision List
Revisions
Revoke
Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp,v
diff -u -r1.6 -r1.7
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp 17 Feb 2005 22:56:10 -0000 1.6
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.adp 19 Feb 2005 02:32:07 -0000 1.7
@@ -72,7 +72,7 @@
-
+
#dotlrn-catalog.enroll#
@@ -102,26 +102,21 @@
-
- #dotlrn-catalog.dotlrn_assoc#:
+
+
+
+
+
+ #dotlrn-catalog.dotlrn_assoc#:
+ #dotlrn-catalog.no#
+ (#dotlrn-catalog.associate#)
+
+
+
-
-
-
- #dotlrn-catalog.dotlrn_assoc#:
- #dotlrn-catalog.no#
- (#dotlrn-catalog.associate#)
-
-
-
-
-
-
-
-
-
-
-
-
+@course_key@ (@name@) #dotlrn-catalog.dotlrn_classes#:
+
+@course_key@ (@name@) #dotlrn-catalog.dotlrn_com#:
+
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@
+ }
+ }
+ }
Index: openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql,v
diff -u -r1.2 -r1.3
--- openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql 16 Feb 2005 00:22:12 -0000 1.2
+++ openacs-4/packages/dotlrn-catalog/lib/course-chunk.xql 19 Feb 2005 02:32:07 -0000 1.3
@@ -16,8 +16,23 @@
select object_id_two as object_id, rel_type as type from acs_rels
- where object_id_one = :course_id order by type
+ where object_id_one = :course_id order by type
+
+
+ select class_instance_id as object_id, department_name, term_name, class_name, pretty_name, url
+ from dotlrn_class_instances_full where class_instance_id in $dotlrn_class
+ order by department_name, term_name, class_name, pretty_name
+
+
+
+
+
+ select community_id as object_id, pretty_name, url from dotlrn_clubs_full
+ where community_id in $dotlrn_com order by pretty_name
+
+
+
\ No newline at end of file
Index: openacs-4/packages/dotlrn-catalog/lib/tree-chunk.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/tree-chunk.adp,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/lib/tree-chunk.adp 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/lib/tree-chunk.adp 19 Feb 2005 02:32:07 -0000 1.2
@@ -1,11 +1,12 @@
-#dotlrn-catalog.categorized#:
-@tree_view;noquote@
-
- #dotlrn-catalog.uncategorized#:
-
-
\ No newline at end of file
+
+
Index: openacs-4/packages/dotlrn-catalog/lib/tree-chunk.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/tree-chunk.tcl,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/lib/tree-chunk.tcl 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/lib/tree-chunk.tcl 19 Feb 2005 02:32:07 -0000 1.2
@@ -5,38 +5,68 @@
@creation-date 11-02-2005
} {
-
+ category_f:optional
+ uncat_f:optional
}
-
+# Get all tree categories
set tree_list [category_tree::get_tree -all $tree_id]
-set tree_view ""
-set cat_obj_list [dotlrn_catalog::get_categories_from_tree -tree_id $tree_id]
-
-# Display all courses associated to one category
+# Create a list of values for the list filter
+set tree [list]
foreach element $tree_list {
- set level [lindex $element 3]
+ set ident [lindex $element 3]
set spacer ""
- for { set i 0 } { $i < $level } { incr i } {
- append spacer " "
+ for { set i 1 } { $i < $ident } { incr i } {
+ append spacer ". . "
}
- if { [string equal $level 1] } {
- append tree_view "${spacer}[lindex $element 1] "
- } else {
- append tree_view "${spacer}[lindex $element 1] "
- }
- foreach item $cat_obj_list {
- if { [string equal [lindex $item 0] [lindex $element 0] ]} {
- set course_id "[lindex $item 1]"
- db_0or1row get_course_info { }
- append tree_view "${spacer}   ($course_key) $course_name "
+ lappend tree [list "${spacer}[lindex "$element" 1]" [lindex $element 0]]
+}
+
+# Get all objects_ids and category_id
+set cat_obj_list [dotlrn_catalog::get_categories_from_tree -tree_id $tree_id]
+
+template::list::create \
+ -name course_list \
+ -multirow course_list \
+ -key course_id \
+ -filters {
+ category_f {
+ label "[_ dotlrn-catalog.categories]"
+ values { $tree }
+ where_clause { dc.course_id in ( select object_id from category_object_map where category_id = :category_f )}
}
+ uncat_f {
+ label "[_ dotlrn-catalog.uncat]"
+ values { "Watch" }
+ where_clause { dc.course_id not in ( select object_id from category_object_map where category_id in \
+ ( select category_id from categories where tree_id =:tree_id ))
+ }
+ }
+ } \
+ -bulk_action_method post \
+ -bulk_action_export_vars {
+ }\
+ -row_pretty_plural "[_ dotlrn-catalog.courses]" \
+ -elements {
+ course_key {
+ label "[_ dotlrn-catalog.course_key]"
+ display_template {
+
+ @course_list.course_key@
+
+ }
+ }
+ name {
+ label "[_ dotlrn-catalog.course_name]"
+ display_template {
+
+ }
+ }
}
-}
-# Display courses without category
-set uncat_p 0
-db_multirow uncat get_courses_uncat { } {
- set uncat_p 1
-}
\ No newline at end of file
+
+db_multirow course_list get_courses {}
+
Index: openacs-4/packages/dotlrn-catalog/lib/tree-chunk.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/lib/tree-chunk.xql,v
diff -u -r1.1 -r1.2
--- openacs-4/packages/dotlrn-catalog/lib/tree-chunk.xql 14 Feb 2005 22:46:11 -0000 1.1
+++ openacs-4/packages/dotlrn-catalog/lib/tree-chunk.xql 19 Feb 2005 02:32:07 -0000 1.2
@@ -1,26 +1,13 @@
-
+
- select dc.course_id, dc.course_key, dc.course_name
+ select dc.course_id, dc.course_key, dc.course_name, dc.assessment_id
from dotlrn_catalog dc, cr_items ci
- where dc.course_id = ci.live_revision and dc.course_id = :course_id
-
+ where dc.course_id = ci.live_revision
+ [template::list::filter_where_clauses -and -name course_list]
+
-
-
-
- select dc.course_id, dc.course_key, dc.course_name
- from dotlrn_catalog dc, cr_items ci
- where dc.course_id = ci.live_revision and dc.course_id not in (
- select object_id from category_object_map where category_id in (
- select category_id from categories where tree_id =:tree_id
- )
- )
-
-
-
-
Index: openacs-4/packages/dotlrn-catalog/www/dotlrn-info.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dotlrn-info.adp,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-catalog/www/dotlrn-info.adp 19 Feb 2005 02:32:47 -0000 1.1
@@ -0,0 +1,10 @@
+
+@page_title@
+@context;noquote@
+
+
+
+
+
+
+
Index: openacs-4/packages/dotlrn-catalog/www/dotlrn-info.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-catalog/www/dotlrn-info.tcl,v
diff -u
--- /dev/null 1 Jan 1970 00:00:00 -0000
+++ openacs-4/packages/dotlrn-catalog/www/dotlrn-info.tcl 19 Feb 2005 02:32:47 -0000 1.1
@@ -0,0 +1,15 @@
+ad_page_contract {
+ Displays the information of class or community
+ @author Miguel Marin (miguelmarin@viaro.net)
+ @author Viaro Networks www.viaro.net
+ @creation-date 08-01-2005
+} {
+ type:notnull
+ object_id:notnull
+ {course_id ""}
+ {course_name ""}
+ {course_key ""}
+}
+
+set page_title "[_ dotlrn-catalog.description]"
+set context "[list [list "course-info?course_id=$course_id&course_name=$course_name&course_key=$course_key" "[_ dotlrn-catalog.one_course_info]"] $page_title]"
\ No newline at end of file
|