Index: openacs-4/packages/dotlrn/www/admin/class.adp
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class.adp,v
diff -u -r1.30 -r1.30.6.1
--- openacs-4/packages/dotlrn/www/admin/class.adp 13 Dec 2002 16:06:33 -0000 1.30
+++ openacs-4/packages/dotlrn/www/admin/class.adp 29 Oct 2004 02:50:47 -0000 1.30.6.1
@@ -42,8 +42,6 @@
-
-
@@ -77,51 +75,21 @@
-
-
Index: openacs-4/packages/dotlrn/www/admin/class.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class.tcl,v
diff -u -r1.17.6.1 -r1.17.6.2
--- openacs-4/packages/dotlrn/www/admin/class.tcl 25 Aug 2004 15:50:58 -0000 1.17.6.1
+++ openacs-4/packages/dotlrn/www/admin/class.tcl 29 Oct 2004 02:50:47 -0000 1.17.6.2
@@ -24,6 +24,7 @@
} -query {
class_key:notnull
{term_id -1}
+ {orderby "term_name,asc"}
} -properties {
pretty_name:onevalue
description:onevalue
@@ -66,12 +67,12 @@
}
set query select_class_instances
+set page_query select_class_instances_paginator
if {$term_id == -1} {
set query select_all_class_instances
+ set page_query select_all_class_instances_paginator
}
-db_multirow class_instances $query {}
-
set can_instantiate [dotlrn_class::can_instantiate]
set context_bar [list [list classes [parameter::get -localize -parameter classes_pretty_plural]] $pretty_name]
@@ -82,4 +83,45 @@
set class_instances_pretty_name [parameter::get -localize -parameter class_instances_pretty_name]
set class_instances_pretty_plural [parameter::get -localize -parameter class_instances_pretty_plural]
+template::list::create \
+ -name class_instances \
+ -multirow class_instances \
+ -filters { term_id {} class_key {} } \
+ -key class_key \
+ -page_size 50 \
+ -page_flush_p t \
+ -page_query_name $page_query \
+ -elements {
+ term_name {
+ display_template { @class_instances.term_name@ @class_instances.term_year@ }
+ label "[_ dotlrn.term]"
+ orderby_asc {term_name asc}
+ orderby_desc {term_name desc}
+ link_url_eval {[export_vars -base "term" { term_id }]}
+ }
+ class_name {
+ label "[_ dotlrn.class_name_header]"
+ orderby_asc {class_name asc}
+ orderby_desc {class_name desc}
+ link_url_col url
+ }
+ 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 class_instances $query {}
+
ad_return_template
Index: openacs-4/packages/dotlrn/www/admin/class.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class.xql,v
diff -u -r1.11 -r1.11.10.1
--- openacs-4/packages/dotlrn/www/admin/class.xql 22 May 2002 18:41:23 -0000 1.11
+++ openacs-4/packages/dotlrn/www/admin/class.xql 29 Oct 2004 02:50:47 -0000 1.11.10.1
@@ -19,7 +19,21 @@
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.class_key = :class_key
+ [template::list::page_where_clause -and -name "class_instances" -key "dotlrn_class_instances_full.class_instance_id"]
+ [template::list::orderby_clause -orderby -name "class_instances"]
+
+
+
+
+
+ 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.class_key = :class_key
+ [template::list::orderby_clause -orderby -name "class_instances"]
@@ -32,7 +46,22 @@
from dotlrn_class_instances_full
where dotlrn_class_instances_full.class_key = :class_key
and dotlrn_class_instances_full.term_id = :term_id
+ [template::list::page_where_clause -and -name "class_instances" -key "dotlrn_class_instances_full.class_instance_id"]
+ [template::list::orderby_clause -orderby -name "class_instances"]
+
+
+ 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.class_key = :class_key
+ and dotlrn_class_instances_full.term_id = :term_id
+ [template::list::orderby_clause -orderby -name "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.2 -r1.12.6.3
--- openacs-4/packages/dotlrn/www/admin/term.tcl 30 Sep 2004 17:14:09 -0000 1.12.6.2
+++ openacs-4/packages/dotlrn/www/admin/term.tcl 29 Oct 2004 02:50:47 -0000 1.12.6.3
@@ -150,7 +150,7 @@
orderby_asc {pretty_name asc} \
orderby_desc {pretty_name desc}]
lappend elements n_members \
- [list label "[_ dotlrn.actions]"]
+ [list label "[_ dotlrn.members]"]
lappend elements action \
[list label "[_ dotlrn.Actions]" \
display_template {