Index: openacs-4/packages/dotlrn/www/community-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/community-edit.tcl,v diff -u -r1.12.2.1 -r1.12.2.2 --- openacs-4/packages/dotlrn/www/community-edit.tcl 31 May 2005 23:13:06 -0000 1.12.2.1 +++ openacs-4/packages/dotlrn/www/community-edit.tcl 12 Dec 2005 15:14:41 -0000 1.12.2.2 @@ -29,37 +29,41 @@ set user_id [ad_conn user_id] set community_id [dotlrn_community::get_community_id] dotlrn::require_user_admin_community -user_id $user_id -community_id $community_id -set description [dotlrn_community::get_community_description -community_id $community_id] -set pretty_name [dotlrn_community::get_community_name $community_id] -form create edit_community_info +ad_form -name edit_community_info -form { + + {pretty_name:text(text) + {label "#dotlrn.Name#"} + {html {size 60}} + } -element create edit_community_info pretty_name \ - -label [_ dotlrn.Name] \ - -datatype text \ - -widget text \ - -html {size 60} \ - -value $pretty_name + {description:text(textarea),optional + {label "#dotlrn.Description#"} + {html {rows 5 cols 60 wrap soft}} + } + + {active_start_date:date(date),to_sql(ansi),from_sql(ansi) + {label "#dotlrn.Start_date#"} + } -element create edit_community_info description \ - -label [_ dotlrn.Description] \ - -datatype text \ - -widget textarea \ - -html {rows 5 cols 60 wrap soft} \ - -value $description \ - -optional + {active_end_date:date(date),to_sql(ansi),from_sql(ansi) + {label "#dotlrn.End_date#"} + } -if {[form is_valid edit_community_info]} { - form get_values edit_community_info pretty_name description - - dotlrn_community::set_community_name \ - -community_id $community_id \ - -pretty_name $pretty_name +} -on_request { - dotlrn_community::set_community_description \ - -community_id $community_id \ - -description $description + db_1row get_community_info {select pretty_name, description, active_start_date, active_end_date from dotlrn_communities_all where community_id = :community_id} +} -on_submit { + + db_dml update_community_info {update dotlrn_communities_all + set pretty_name = :pretty_name, + description = :description, + active_start_date = :active_start_date, + active_end_date = :active_end_date + where community_id = :community_id + } + ad_returnredirect $referer ad_script_abort } Index: openacs-4/packages/dotlrn/www/manage-memberships-postgresql.xql =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/Attic/manage-memberships-postgresql.xql,v diff -u -r1.2 -r1.2.2.1 --- openacs-4/packages/dotlrn/www/manage-memberships-postgresql.xql 24 Jul 2004 08:34:10 -0000 1.2 +++ openacs-4/packages/dotlrn/www/manage-memberships-postgresql.xql 12 Dec 2005 15:14:41 -0000 1.2.2.1 @@ -23,7 +23,8 @@ dotlrn_member_rels_full where dotlrn_member_rels_full.user_id = :user_id and dotlrn_member_rels_full.community_id = dotlrn_class_instances_full.class_instance_id - order by dotlrn_class_instances_full.pretty_name, + order by dotlrn_class_instances_full.active_start_date, + dotlrn_class_instances_full.pretty_name, dotlrn_class_instances_full.community_key @@ -113,8 +114,10 @@ from dotlrn_member_rels_full where dotlrn_member_rels_full.user_id = :user_id and dotlrn_member_rels_full.community_id = dotlrn_class_instances_full.class_instance_id) - order by dotlrn_class_instances_full.pretty_name, + order by dotlrn_class_instances_full.active_start_date, + dotlrn_class_instances_full.pretty_name, dotlrn_class_instances_full.community_key +