Index: openacs-4/packages/dotlrn/www/admin/class-new.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/class-new.tcl,v diff -u -r1.6 -r1.7 --- openacs-4/packages/dotlrn/www/admin/class-new.tcl 22 Jan 2002 00:13:09 -0000 1.6 +++ openacs-4/packages/dotlrn/www/admin/class-new.tcl 22 Jan 2002 23:04:48 -0000 1.7 @@ -6,6 +6,7 @@ @creation-date 2001-08-20 @version $Id$ } -query { + {department_key ""} {referer "classes"} } -properties { title:onevalue @@ -17,11 +18,19 @@ form create add_class -element create add_class department_key \ - -label "[ad_parameter departments_pretty_name]" \ - -datatype text \ - -widget select \ - -options [dotlrn_department::select_as_list] +if {[empty_string_p $department_key]} { + element create add_class department_key \ + -label "[ad_parameter departments_pretty_name]" \ + -datatype text \ + -widget select \ + -options [dotlrn_department::select_as_list] +} else { + element create add_class department_key \ + -label "[ad_parameter departments_pretty_name]" \ + -datatype text \ + -widget hidden \ + -value $department_key +} element create add_class class_key \ -label "[ad_parameter classes_pretty_name] Key (a short name, no spaces)" \ 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.4 -r1.5 --- openacs-4/packages/dotlrn/www/admin/class.adp 15 Jan 2002 20:47:02 -0000 1.4 +++ openacs-4/packages/dotlrn/www/admin/class.adp 22 Jan 2002 23:04:48 -0000 1.5 @@ -2,7 +2,7 @@ [ - New Instance + New Instance ] @@ -17,7 +17,7 @@
-
+
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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/classes-chunk.adp 22 Jan 2002 23:04:48 -0000 1.1 @@ -0,0 +1,20 @@ +[ New <%= [ad_parameter classes_pretty_name] %> ] + +

+ +

+ +@filter_bar@ + +

+ + + + +

+
+
+ + +[ New <%= [ad_parameter classes_pretty_name] %> ] + 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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/classes-chunk.tcl 22 Jan 2002 23:04:48 -0000 1.1 @@ -0,0 +1,44 @@ +ad_page_contract { + Displays dotLRN classes admin page + + @author Ben Adida (ben@openforce.net) + @author yon (yon@openforce.net) + @creation-date 2001-11-04 + @version $Id: classes-chunk.tcl,v 1.1 2002/01/22 23:04:48 yon Exp $ +} -query { + {filter "select_current_class_instances"} +} -properties { + filter_bar:onevalue + classes:multirow +} + +if {![exists_and_not_null department_key]} { + set department_key "" +} + +set filter_bar [ad_dimensional { + {filter "Term:" select_current_class_instances + { + {select_current_class_instances current {}} + {select_current_and_future_class_instances "+future" {}} + {select_all_class_instances "+past" {}} + } + } +}] + +if {![exists_and_not_null referer]} { + if {[empty_string_p $department_key]} { + set referer "classes?[export_vars filter]" + } else { + set referer "one-department?[export_vars {department_key filter}]" + } +} + +set query "select_classes" +if {![empty_string_p $department_key]} { + set query "select_classes_by_department" +} + +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 --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn/www/admin/classes-chunk.xql 22 Jan 2002 23:04:48 -0000 1.1 @@ -0,0 +1,24 @@ + + + + + + select class_key, + pretty_name, + description + from dotlrn_classes_full + order by pretty_name + + + + + + select class_key, + pretty_name, + description + from dotlrn_classes_full + where department_key = :department_key + order by pretty_name + + + Index: openacs-4/packages/dotlrn/www/admin/classes.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/classes.adp,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn/www/admin/classes.adp 15 Jan 2002 20:47:02 -0000 1.8 +++ openacs-4/packages/dotlrn/www/admin/classes.adp 22 Jan 2002 23:04:48 -0000 1.9 @@ -2,23 +2,4 @@ @title@ @context_bar@ -[ New <%= [ad_parameter classes_pretty_name] %> ] - -

- -

- -@filter_bar@ - -

- - - - -

-
-
- - -[ New <%= [ad_parameter classes_pretty_name] %> ] - + 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.7 -r1.8 --- openacs-4/packages/dotlrn/www/admin/classes.tcl 16 Jan 2002 16:10:37 -0000 1.7 +++ openacs-4/packages/dotlrn/www/admin/classes.tcl 22 Jan 2002 23:04:48 -0000 1.8 @@ -6,27 +6,12 @@ @creation-date 2001-11-04 @version $Id$ } -query { - {filter "select_current_class_instances"} } -properties { title:onevalue context_bar:onevalue - filter_bar:onevalue - classes:multirow } set title "[ad_parameter classes_pretty_plural]" set context_bar "[ad_parameter classes_pretty_plural]" -set filter_bar [ad_dimensional { - {filter "Term:" select_current_class_instances - { - {select_current_class_instances current {}} - {select_current_and_future_class_instances "+future" {}} - {select_all_class_instances "+past" {}} - } - } -}] - -db_multirow classes select_classes {} - ad_return_template Fisheye: Tag 1.3 refers to a dead (removed) revision in file `openacs-4/packages/dotlrn/www/admin/classes.xql'. Fisheye: No comparison available. Pass `N' to diff? Index: openacs-4/packages/dotlrn/www/admin/one-department.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/one-department.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/one-department.adp 22 Jan 2002 00:13:09 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/one-department.adp 22 Jan 2002 23:04:48 -0000 1.2 @@ -12,11 +12,4 @@

- -<% [ad_parameter classes_pretty_plural] %> - - + Index: openacs-4/packages/dotlrn/www/admin/one-department.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/one-department.tcl,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/one-department.tcl 22 Jan 2002 00:13:09 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/one-department.tcl 22 Jan 2002 23:04:48 -0000 1.2 @@ -20,8 +20,6 @@ ad_script_abort } -db_multirow classes select_classes {} - set context_bar [list [list departments [ad_parameter departments_pretty_plural]] One] ad_return_template Index: openacs-4/packages/dotlrn/www/admin/one-department.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/admin/Attic/one-department.xql,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn/www/admin/one-department.xql 22 Jan 2002 00:13:09 -0000 1.1 +++ openacs-4/packages/dotlrn/www/admin/one-department.xql 22 Jan 2002 23:04:48 -0000 1.2 @@ -10,12 +10,4 @@ where department_key = :department_key - - - - select * - from dotlrn_classes_full - where department_key = :department_key - -