Index: openacs-4/packages/dotlrn/www/admin/classes-chunk.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes-chunk.xql,v
diff -u -r1.7.6.1 -r1.7.6.2
--- openacs-4/packages/dotlrn/www/admin/classes-chunk.xql 6 Aug 2004 02:51:24 -0000 1.7.6.1
+++ openacs-4/packages/dotlrn/www/admin/classes-chunk.xql 30 Sep 2004 17:14:09 -0000 1.7.6.2
@@ -5,6 +5,7 @@
select dotlrn_classes_full.class_key,
+ dotlrn_classes_full.pretty_name as class_name,
dotlrn_classes_full.pretty_name,
dotlrn_classes_full.description,
dotlrn_classes_full.department_key,
@@ -17,16 +18,37 @@
from dotlrn_classes_full,
dotlrn_departments_full
where dotlrn_classes_full.department_key = dotlrn_departments_full.department_key
- order by lower(dotlrn_departments_full.pretty_name),
- lower(dotlrn_classes_full.pretty_name),
- dotlrn_classes_full.class_key
+ [template::list::page_where_clause -and -name "classes" -key "dotlrn_classes_full.class_key"]
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+ select dotlrn_classes_full.class_key,
+ dotlrn_classes_full.pretty_name as class_name,
+ dotlrn_classes_full.pretty_name,
+ dotlrn_classes_full.description,
+ dotlrn_classes_full.department_key,
+ dotlrn_departments_full.pretty_name as department_name,
+ (select count(*)
+ from dotlrn_class_instances, dotlrn_communities_all
+ where dotlrn_class_instances.class_key = dotlrn_classes_full.class_key
+ and dotlrn_class_instances.class_instance_id = dotlrn_communities_all.community_id
+ and dotlrn_communities_all.archived_p = 'f') as n_instances
+ from dotlrn_classes_full,
+ dotlrn_departments_full
+ where dotlrn_classes_full.department_key = dotlrn_departments_full.department_key
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+
+
select dotlrn_classes_full.class_key,
+ dotlrn_classes_full.pretty_name as class_name,
dotlrn_classes_full.pretty_name,
dotlrn_classes_full.description,
dotlrn_classes_full.department_key,
@@ -40,9 +62,32 @@
dotlrn_departments_full
where dotlrn_classes_full.department_key = :department_key
and dotlrn_classes_full.department_key = dotlrn_departments_full.department_key
- order by lower(dotlrn_classes_full.pretty_name), dotlrn_classes_full.class_key
+ [template::list::page_where_clause -and -name "classes" -key "dotlrn_classes_full.class_key"]
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+ select dotlrn_classes_full.class_key,
+ dotlrn_classes_full.pretty_name as class_name,
+ dotlrn_classes_full.pretty_name,
+ dotlrn_classes_full.description,
+ dotlrn_classes_full.department_key,
+ dotlrn_departments_full.pretty_name as department_name,
+ (select count(*)
+ from dotlrn_class_instances, dotlrn_communities_all
+ where dotlrn_class_instances.class_key = dotlrn_classes_full.class_key
+ and dotlrn_class_instances.class_instance_id = dotlrn_communities_all.community_id
+ and dotlrn_communities_all.archived_p = 'f') as n_instances
+ from dotlrn_classes_full,
+ dotlrn_departments_full
+ where dotlrn_classes_full.department_key = :department_key
+ and dotlrn_classes_full.department_key = dotlrn_departments_full.department_key
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+
+