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.8 --- 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 13 Jan 2005 13:57:21 -0000 1.8 @@ -20,65 +20,116 @@ 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 - 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 + $keyword_clause + and dotlrn_class_instances_full.term_id = :term_id + [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 + $keyword_clause + and dotlrn_class_instances_full.term_id = :term_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 + $keyword_clause + and 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 + $keyword_clause + and 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 + $keyword_clause + [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 + $keyword_clause + [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 - 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 + $keyword_clause + and dotlrn_class_instances_full.department_key = :department_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 + $keyword_clause + and dotlrn_class_instances_full.department_key = :department_key + [template::list::orderby_clause -orderby -name "classes"] + + + + + + where lower(dotlrn_class_instances_full.pretty_name) like '%'||lower(:keyword)||'%' + + + + + + where 1 = 1 + +