Index: openacs-4/packages/dotlrn/www/admin/term.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/term.xql,v
diff -u -r1.7 -r1.7.10.1
--- openacs-4/packages/dotlrn/www/admin/term.xql 22 May 2002 18:41:23 -0000 1.7
+++ openacs-4/packages/dotlrn/www/admin/term.xql 30 Sep 2004 17:14:09 -0000 1.7.10.1
@@ -21,15 +21,23 @@
where dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id) as n_members
from dotlrn_class_instances_full
where dotlrn_class_instances_full.term_id = :term_id
- order by dotlrn_class_instances_full.department_name,
- dotlrn_class_instances_full.department_key,
- dotlrn_class_instances_full.class_name,
- dotlrn_class_instances_full.class_key,
- dotlrn_class_instances_full.pretty_name,
- dotlrn_class_instances_full.community_key
+ [template::list::page_where_clause -and -name "classes" -key "dotlrn_class_instances_full.class_instance_id"]
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+ select dotlrn_class_instances_full.*,
+ (select count(*)
+ from dotlrn_member_rels_approved
+ where dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id) as n_members
+ from dotlrn_class_instances_full
+ where dotlrn_class_instances_full.term_id = :term_id
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+
select dotlrn_class_instances_full.*,
@@ -39,31 +47,48 @@
from dotlrn_class_instances_full
where dotlrn_class_instances_full.term_id = :term_id
and dotlrn_class_instances_full.department_key = :department_key
- order by dotlrn_class_instances_full.department_name,
- dotlrn_class_instances_full.department_key,
- dotlrn_class_instances_full.class_name,
- dotlrn_class_instances_full.class_key,
- dotlrn_class_instances_full.pretty_name,
- dotlrn_class_instances_full.community_key
+ [template::list::page_where_clause -and -name "classes" -key "dotlrn_class_instances_full.class_instance_id"]
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+ select dotlrn_class_instances_full.*,
+ (select count(*)
+ from dotlrn_member_rels_approved
+ where dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id) as n_members
+ from dotlrn_class_instances_full
+ where dotlrn_class_instances_full.term_id = :term_id
+ and dotlrn_class_instances_full.department_key = :department_key
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+
select dotlrn_class_instances_full.*,
(select count(*)
from dotlrn_member_rels_approved
where dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id) as n_members
from dotlrn_class_instances_full
- order by dotlrn_class_instances_full.department_name,
- dotlrn_class_instances_full.department_key,
- dotlrn_class_instances_full.class_name,
- dotlrn_class_instances_full.class_key,
- dotlrn_class_instances_full.pretty_name,
- dotlrn_class_instances_full.community_key
+ where 1 = 1
+ [template::list::page_where_clause -and -name "classes" -key "dotlrn_class_instances_full.class_instance_id"]
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+ select dotlrn_class_instances_full.*,
+ (select count(*)
+ from dotlrn_member_rels_approved
+ where dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id) as n_members
+ from dotlrn_class_instances_full
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+
select dotlrn_class_instances_full.*,
@@ -72,13 +97,21 @@
where dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id) as n_members
from dotlrn_class_instances_full
where dotlrn_class_instances_full.department_key = :department_key
- order by dotlrn_class_instances_full.department_name,
- dotlrn_class_instances_full.department_key,
- dotlrn_class_instances_full.class_name,
- dotlrn_class_instances_full.class_key,
- dotlrn_class_instances_full.pretty_name,
- dotlrn_class_instances_full.community_key
+ [template::list::page_where_clause -and -name "classes" -key "dotlrn_class_instances_full.class_instance_id"]
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+ select dotlrn_class_instances_full.*,
+ (select count(*)
+ from dotlrn_member_rels_approved
+ where dotlrn_member_rels_approved.community_id = dotlrn_class_instances_full.class_instance_id) as n_members
+ from dotlrn_class_instances_full
+ where dotlrn_class_instances_full.department_key = :department_key
+ [template::list::orderby_clause -orderby -name "classes"]
+
+
+