Index: openacs-4/packages/dotlrn/www/admin/classes-chunk.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes-chunk.adp,v diff -u -r1.18 -r1.18.6.1 --- openacs-4/packages/dotlrn/www/admin/classes-chunk.adp 11 Dec 2002 13:53:51 -0000 1.18 +++ openacs-4/packages/dotlrn/www/admin/classes-chunk.adp 30 Sep 2004 17:14:09 -0000 1.18.6.1 @@ -20,22 +20,6 @@
- - - - - -
- - [ - #dotlrn.new_class_1# - ] - -
- -
-
-
@@ -48,63 +32,18 @@
- - - - - - - - - - - - - + - - - - - - - - - - - +
<%= [parameter::get -localize -parameter departments_pretty_name] %>#dotlrn.class_name#<%= [parameter::get -localize -parameter class_instances_pretty_plural] %>#dotlrn.Actions#
@classes.department_name@@classes.pretty_name@@classes.n_instances@ - - - [ - #dotlrn.new_class_instance# - ] - - -
+
#dotlrn.no_classes#
-
- -
- - - - - -
- - [ - #dotlrn.new_class_1# - ] - -
-
- +
Index: openacs-4/packages/dotlrn/www/admin/classes-chunk.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes-chunk.tcl,v diff -u -r1.9 -r1.9.6.1 --- openacs-4/packages/dotlrn/www/admin/classes-chunk.tcl 11 Dec 2002 13:53:51 -0000 1.9 +++ openacs-4/packages/dotlrn/www/admin/classes-chunk.tcl 30 Sep 2004 17:14:09 -0000 1.9.6.1 @@ -58,11 +58,12 @@ } set query select_classes +set page_query select_classes_paginator if {![empty_string_p $department_key]} { set query select_classes_by_department + set page_query select_classes_by_department_paginator } -db_multirow classes $query {} set can_create [dotlrn_class::can_create] set can_instantiate [dotlrn_class::can_instantiate] @@ -72,4 +73,54 @@ set classes_pretty_plural [parameter::get -localize -parameter classes_pretty_plural] set class_instances_pretty_name [parameter::get -localize -parameter class_instances_pretty_name] +set actions "" + +if { $can_create } { + set actions [list "[_ dotlrn.new_class_1]" "[export_vars -base "class-new" -url { department_key referer }]"] +} + +template::list::create \ + -name classes \ + -multirow classes \ + -actions $actions \ + -pass_properties { can_instantiate {} } \ + -filters { department_key {} } \ + -key class_key \ + -page_size 50 \ + -page_flush_p t \ + -page_query_name $page_query \ + -elements { + department_name { + label "[parameter::get -localize -parameter departments_pretty_name]" + orderby_asc {department_name asc} + orderby_desc {department_name desc} + link_url_eval {[export_vars -base "department" { department_key }]} + } + class_name { + label "[_ dotlrn.class_name]" + orderby_asc {class_name asc} + orderby_desc {class_name desc} + link_url_eval {[export_vars -base "class" { class_key }]} + } + n_instances { + label "[parameter::get -localize -parameter class_instances_pretty_plural]" + orderby_asc {n_instances asc} + orderby_desc {n_instances desc} + } + actions { + label "[_ dotlrn.Actions]" + display_template { + + + \[ + [_ dotlrn.new_class_instance] + \] + + + } + } + } + +db_multirow classes $query {} + ad_return_template 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"] + + + + Index: openacs-4/packages/dotlrn/www/admin/classes.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes.tcl,v diff -u -r1.14.6.1 -r1.14.6.2 --- openacs-4/packages/dotlrn/www/admin/classes.tcl 25 Aug 2004 15:50:58 -0000 1.14.6.1 +++ openacs-4/packages/dotlrn/www/admin/classes.tcl 30 Sep 2004 17:14:09 -0000 1.14.6.2 @@ -22,6 +22,9 @@ @creation-date 2001-11-04 @version $Id$ } -query { + department_key:optional + {orderby "department_name,asc"} + page:optional } -properties { title:onevalue context_bar:onevalue Index: openacs-4/packages/dotlrn/www/admin/clubs.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/clubs.adp,v diff -u -r1.24 -r1.24.6.1 --- openacs-4/packages/dotlrn/www/admin/clubs.adp 13 Dec 2002 16:06:33 -0000 1.24 +++ openacs-4/packages/dotlrn/www/admin/clubs.adp 30 Sep 2004 17:14:09 -0000 1.24.6.1 @@ -24,77 +24,21 @@
- - - - -
- - [ - #dotlrn.new_community# - ] - -
-
- - - - - - - - - - + - - - - - - - - - - - - - - +
#dotlrn.community_header_name##dotlrn.Description##dotlrn.Members##dotlrn.Actions#
@clubs.pretty_name@@clubs.description@@clubs.n_members@ - - - #dotlrn.administer_link# - - -
+
#dotlrn.no_communities#
- - - -
- - - - - -
- - [ - #dotlrn.new_community# - ] - -
-
- +
Index: openacs-4/packages/dotlrn/www/admin/clubs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/clubs.tcl,v diff -u -r1.13.6.1 -r1.13.6.2 --- openacs-4/packages/dotlrn/www/admin/clubs.tcl 25 Aug 2004 15:50:58 -0000 1.13.6.1 +++ openacs-4/packages/dotlrn/www/admin/clubs.tcl 30 Sep 2004 17:14:09 -0000 1.13.6.2 @@ -23,6 +23,8 @@ @creation-date 2001-12-03 @version $Id$ } -query { + {orderby "pretty_name,asc"} + page:optional } -properties { title:onevalue context_bar:onevalue @@ -35,12 +37,51 @@ set title [parameter::get -localize -parameter clubs_pretty_plural] set context_bar [list $title] -db_multirow clubs select_clubs {} { - set description [ad_quotehtml $description] -} - # Some of the en_US messages in the adp use these variables set clubs_pretty_name [parameter::get -localize -parameter clubs_pretty_name] set clubs_pretty_plural [parameter::get -localize -parameter clubs_pretty_plural] +set actions [list "[_ dotlrn.new_community]" "club-new"] + +template::list::create \ + -name clubs \ + -multirow clubs \ + -actions $actions \ + -key community_id \ + -page_size 50 \ + -page_query_name clubs_pagination \ + -elements { + pretty_name { + label "[_ dotlrn.community_header_name]" + orderby_asc {pretty_name asc} + orderby_desc {pretty_name desc} + link_url_col url + } + description { + label "[_ dotlrn.Description]" + } + n_members { + label "[_ dotlrn.Members]" + orderby_asc {n_members asc} + orderby_desc {n_members desc} + } + actions { + label "[_ dotlrn.Actions]" + display_template { +
+ + + #dotlrn.administer_link# + + +
+ } + } + + } + +db_multirow clubs select_clubs {} { + set description [ad_quotehtml $description] +} + ad_return_template Index: openacs-4/packages/dotlrn/www/admin/clubs.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/clubs.xql,v diff -u -r1.4 -r1.4.10.1 --- openacs-4/packages/dotlrn/www/admin/clubs.xql 22 May 2002 18:41:23 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/clubs.xql 30 Sep 2004 17:14:09 -0000 1.4.10.1 @@ -9,9 +9,21 @@ from dotlrn_member_rels_approved where dotlrn_member_rels_approved.community_id = dotlrn_clubs_full.club_id) as n_members from dotlrn_clubs_full - order by dotlrn_clubs_full.pretty_name, - dotlrn_clubs_full.description + where 1 = 1 + [template::list::page_where_clause -and -name "clubs" -key "dotlrn_clubs_full.club_id"] + [template::list::orderby_clause -orderby -name "clubs"] + + + select dotlrn_clubs_full.*, + (select count(*) + from dotlrn_member_rels_approved + where dotlrn_member_rels_approved.community_id = dotlrn_clubs_full.club_id) as n_members + from dotlrn_clubs_full + [template::list::orderby_clause -orderby -name "clubs"] + + + Index: openacs-4/packages/dotlrn/www/admin/departments.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/departments.adp,v diff -u -r1.19.6.2 -r1.19.6.3 --- openacs-4/packages/dotlrn/www/admin/departments.adp 2 Aug 2004 10:40:44 -0000 1.19.6.2 +++ openacs-4/packages/dotlrn/www/admin/departments.adp 30 Sep 2004 17:14:09 -0000 1.19.6.3 @@ -24,84 +24,20 @@
- - - - -
- [ - #dotlrn.new_department# - ] -
- -
- - - - - - - - - - - - - - - - - - - - - - - - - - - + + +
#dotlrn.department_name##dotlrn.Actions#
- @departments.pretty_name@ - - - - [ - #dotlrn.new_class_1# - - - | - #dotlrn.Delete# - - ] - -
+
#dotlrn.no_departments#
- - -
- - - - - -
- - [ - #dotlrn.new_department# - ] - -
-
- +
Index: openacs-4/packages/dotlrn/www/admin/departments.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/departments.tcl,v diff -u -r1.9.6.1 -r1.9.6.2 --- openacs-4/packages/dotlrn/www/admin/departments.tcl 25 Aug 2004 15:50:58 -0000 1.9.6.1 +++ openacs-4/packages/dotlrn/www/admin/departments.tcl 30 Sep 2004 17:14:09 -0000 1.9.6.2 @@ -21,6 +21,8 @@ @creation-date 2002-01-20 @version $Id$ } -query { + {orderby "department_name,asc"} + page:optional } -properties { title:onevalue context_bar:onevalue @@ -38,6 +40,41 @@ set departments_pretty_plural [parameter::get -localize -parameter departments_pretty_plural] set classes_pretty_name [parameter::get -localize -parameter classes_pretty_name] +set actions [list "[_ dotlrn.new_department]" "[export_vars -base "department-new" -url { referer }]"] + +template::list::create \ + -name departments \ + -multirow departments \ + -actions $actions \ + -pass_properties { can_create {} referer {} } \ + -key department_key \ + -page_size 50 \ + -page_flush_p t \ + -page_query_name departments_pagination \ + -elements { + department_name { + label "[_ dotlrn.department_name]" + orderby_asc {department_name asc} + orderby_desc {department_name desc} + link_url_eval {[export_vars -base "department" { department_key }]} + } + actions { + label "[_ dotlrn.Actions]" + display_template { + + \[ + [_ dotlrn.new_class_1] + + + | + [_ dotlrn.Delete] + + \] + } + } + } + + db_multirow departments select_departments {} ad_return_template Index: openacs-4/packages/dotlrn/www/admin/departments.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/departments.xql,v diff -u -r1.6.10.2 -r1.6.10.3 --- openacs-4/packages/dotlrn/www/admin/departments.xql 2 Aug 2004 10:42:37 -0000 1.6.10.2 +++ openacs-4/packages/dotlrn/www/admin/departments.xql 30 Sep 2004 17:14:09 -0000 1.6.10.3 @@ -5,14 +5,28 @@ select department_key, - pretty_name, + pretty_name as department_name, (select count(*) from dotlrn_classes where department_key = dotlrn_departments_full.department_key) as n_classes from dotlrn_departments_full - order by pretty_name, - department_key + where 1 = 1 + [template::list::page_where_clause -and -name "departments" -key "dotlrn_departments_full.department_key"] + [template::list::orderby_clause -orderby -name "departments"] + + + select department_key, + pretty_name as department_name, + (select count(*) + from dotlrn_classes + where department_key = dotlrn_departments_full.department_key) as n_classes + from dotlrn_departments_full + [template::list::orderby_clause -orderby -name "departments"] + + + + Index: openacs-4/packages/dotlrn/www/admin/term.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/term.adp,v diff -u -r1.22.6.2 -r1.22.6.3 --- openacs-4/packages/dotlrn/www/admin/term.adp 2 Aug 2004 10:44:33 -0000 1.22.6.2 +++ openacs-4/packages/dotlrn/www/admin/term.adp 30 Sep 2004 17:14:09 -0000 1.22.6.3 @@ -75,60 +75,19 @@
- - - - - - - - - - - - - - - - - + - - - - - - - - - - - - - - - - +
<%= [parameter::get -localize -parameter departments_pretty_name] %><%= [parameter::get -localize -parameter classes_pretty_name] %>#dotlrn.term#<%= [parameter::get -localize -parameter class_instances_pretty_name] %>#dotlrn.members##dotlrn.actions#
@classes.department_name@@classes.class_name@@classes.term_name@ @classes.term_year@@classes.pretty_name@@classes.n_members@ - - - #dotlrn.administer_link# - - -
- - +
- - - - + #dotlrn.no_class_instances#
- +
Index: openacs-4/packages/dotlrn/www/admin/term.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/term.tcl,v diff -u -r1.12.6.1 -r1.12.6.2 --- openacs-4/packages/dotlrn/www/admin/term.tcl 25 Aug 2004 15:50:58 -0000 1.12.6.1 +++ openacs-4/packages/dotlrn/www/admin/term.tcl 30 Sep 2004 17:14:09 -0000 1.12.6.2 @@ -23,6 +23,8 @@ } -query { term_id:integer,notnull {department_key ""} + {orderby "department_name,asc"} + page:optional } -properties { classes:multirow } @@ -97,15 +99,16 @@ } set query "select_classes" +set paginator_query "select_classes_paginator" if {$term_id == -1} { set query "select_all_classes" + set paginator_query "select_all_classes_paginator" } if {![empty_string_p $department_key]} { append query "_by_department" + append paginator_query "_by_department" } -db_multirow classes $query {} - if {$term_id == -1} { set title "[_ dotlrn.All_Terms]" set context_bar [list [list terms [_ dotlrn.Terms]] "[_ dotlrn.All_Terms]"] @@ -122,4 +125,55 @@ # Used by the en_US version of the no_class_instances message in the adp set class_instances_pretty_plural [parameter::get -localize -parameter class_instances_pretty_plural] +set elements [list department_name \ + [list label "[parameter::get -localize -parameter departments_pretty_name]" \ + orderby_asc {department_name asc, class_name asc, pretty_name asc} \ + orderby_desc {department_name desc, class_name desc, pretty_name desc} \ + link_url_eval {[export_vars -base "department" { department_key }]}] \ + class_name \ + [list label "[parameter::get -localize -parameter classes_pretty_name]" \ + orderby_asc {class_name asc, pretty_name asc} \ + orderby_desc {class_name desc, pretty_name desc} \ + link_url_eval {[export_vars -base "class" { class_key }]}] \ + ] + +if { $term_id == -1 } { + lappend elements term_name \ + [list label "[_ dotlrn.term]" \ + orderby_asc {term_name asc, pretty_name asc} \ + orderby_desc {term_name desc, pretty_name desc}] +} + +lappend elements pretty_name \ + [list label "[parameter::get -localize -parameter class_instances_pretty_name]" \ + link_url_col url \ + orderby_asc {pretty_name asc} \ + orderby_desc {pretty_name desc}] +lappend elements n_members \ + [list label "[_ dotlrn.actions]"] +lappend elements action \ + [list label "[_ dotlrn.Actions]" \ + display_template { +
+ + + [_ dotlrn.administer_link] + + +
+ }] + + +template::list::create \ + -name classes \ + -multirow classes \ + -filters { department_key {} term_id {} } \ + -key class_key \ + -page_size 50 \ + -page_flush_p t \ + -page_query_name $paginator_query \ + -elements $elements + +db_multirow classes $query {} + ad_return_template 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"] + + + Index: openacs-4/packages/dotlrn/www/admin/terms.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/terms.xql,v diff -u -r1.7 -r1.7.6.1 --- openacs-4/packages/dotlrn/www/admin/terms.xql 18 Nov 2002 17:58:53 -0000 1.7 +++ openacs-4/packages/dotlrn/www/admin/terms.xql 30 Sep 2004 17:14:09 -0000 1.7.6.1 @@ -8,13 +8,32 @@ dotlrn_terms.term_name, dotlrn_terms.term_year, to_char(dotlrn_terms.start_date, 'YYYY-MM-DD') as start_date_ansi, + to_char(dotlrn_terms.start_date, 'YYYY-MM-DD') as start_date_pretty, to_char(dotlrn_terms.end_date, 'YYYY-MM-DD') as end_date_ansi, (select count(*) from dotlrn_class_instances where dotlrn_class_instances.term_id = dotlrn_terms.term_id) as n_classes from dotlrn_terms - order by dotlrn_terms.start_date + where 1 = 1 + [template::list::page_where_clause -and -name "terms" -key "dotlrn_terms.term_id"] + [template::list::orderby_clause -orderby -name "terms"] + + + + select dotlrn_terms.term_id, + dotlrn_terms.term_name, + to_char(dotlrn_terms.start_date, 'YYYY-MM-DD') as start_date_ansi, + to_char(dotlrn_terms.end_date, 'YYYY-MM-DD') as end_date_ansi, + (select count(*) + from dotlrn_class_instances + where dotlrn_class_instances.term_id = dotlrn_terms.term_id) as n_classes + from dotlrn_terms + [template::list::orderby_clause -orderby -name "terms"] + + + +