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 -r1.8 --- openacs-4/packages/dotlrn/www/admin/classes-chunk.xql 30 Oct 2003 17:04:40 -0000 1.7 +++ openacs-4/packages/dotlrn/www/admin/classes-chunk.xql 13 Jan 2005 13:57:21 -0000 1.8 @@ -17,12 +17,34 @@ from dotlrn_classes_full, dotlrn_departments_full where dotlrn_classes_full.department_key = dotlrn_departments_full.department_key - order by dotlrn_departments_full.pretty_name, - dotlrn_classes_full.class_key, - dotlrn_classes_full.pretty_name + $keyword_clause + [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, + 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 + $keyword_clause + [template::list::orderby_clause -orderby -name "classes"] + + + + select dotlrn_classes_full.class_key, @@ -38,10 +60,41 @@ from dotlrn_classes_full, dotlrn_departments_full where dotlrn_classes_full.department_key = :department_key + $keyword_clause and dotlrn_classes_full.department_key = dotlrn_departments_full.department_key - order by dotlrn_classes_full.class_key, - dotlrn_classes_full.pretty_name + [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, + 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 + $keyword_clause + and dotlrn_classes_full.department_key = dotlrn_departments_full.department_key + [template::list::orderby_clause -orderby -name "classes"] + + + + + + + + and lower(dotlrn_classes_full.pretty_name) like '%'||lower(:keyword)||'%' + + +