Index: openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl,v
diff -u -r1.50 -r1.51
--- openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 13 May 2002 06:00:06 -0000 1.50
+++ openacs-4/packages/dotlrn/tcl/dotlrn-procs.tcl 15 May 2002 22:13:57 -0000 1.51
@@ -112,8 +112,8 @@
set package_list [nsv_array get site_nodes "*$package_key*"]
set dotlrn_ancestor_p 0
- for {set x 1} {$x < [llength $package_list]} {incr x 2} {
- array set package_info [lindex $package_list $x]
+ for {set i 1} {$i < [llength $package_list]} {incr i 2} {
+ array set package_info [lindex $package_list $i]
if {[site_node_closest_ancestor_package -default 0 -url $package_info(url) "dotlrn"] != 0} {
set dotlrn_ancestor_p 1
Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.tcl,v
diff -u -r1.16 -r1.17
--- openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 12 May 2002 18:20:31 -0000 1.16
+++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.tcl 15 May 2002 22:13:57 -0000 1.17
@@ -341,4 +341,18 @@
return $node_id
}
+ ad_proc -public get_child_package_id {
+ {-parent_package_id ""}
+ {-package_key:required}
+ } {
+ get the package_id of package_key that is mounted directly under
+ parent_package_id. returns 0 if not found.
+ } {
+ if {[empty_string_p $parent_package_id]} {
+ set parent_package_id [ad_conn package_id]
+ }
+
+ return [db_string select_child_package_id {} -default 0]
+ }
+
}
Index: openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/tcl/Attic/site-nodes-procs.xql,v
diff -u -r1.10 -r1.11
--- openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql 12 May 2002 18:20:31 -0000 1.10
+++ openacs-4/packages/dotlrn/tcl/site-nodes-procs.xql 15 May 2002 22:13:57 -0000 1.11
@@ -40,4 +40,17 @@
+
+Index: openacs-4/packages/dotlrn/www/spam.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn/www/spam.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn/www/spam.tcl 6 May 2002 23:55:02 -0000 1.9 +++ openacs-4/packages/dotlrn/www/spam.tcl 15 May 2002 22:13:57 -0000 1.10 @@ -29,7 +29,8 @@ portal_id:onevalue } -set context_bar {{$referer Admin} {Spam Community}} +set spam_name [bulk_mail::parameter -parameter PrettyName -default Spam] +set context_bar [list [list $referer Admin] "$spam_name Community"] if {[empty_string_p $community_id]} { set community_id [dotlrn_community::get_community_id] @@ -40,15 +41,7 @@ set sender_id [ad_conn user_id] set portal_id [dotlrn_community::get_portal_id -community_id $community_id] -db_1row select_sender_info { - select parties.email as sender_email, - persons.first_names as sender_first_names, - persons.last_name as sender_last_name - from parties, - persons - where parties.party_id = :sender_id - and persons.person_id = :sender_id -} +db_1row select_sender_info {} form create spam_message @@ -84,6 +77,13 @@ -widget textarea \ -html {rows 10 cols 80 wrap soft} +element create spam_message send_date \ + -label {Send Date} \ + -datatype date \ + -widget date \ + -format {MONTH DD YYYY HH12:MI AM} \ + -value [template::util::date::now] + element create spam_message referer \ -label Referer \ -datatype text \ @@ -92,30 +92,56 @@ if {[form is_valid spam_message]} { form get_values spam_message \ - community_id from rel_type subject message referer + community_id from rel_type subject message send_date referer - # YON: should redirect and close the connection here so that the user - # doesn't have to wait for the emails to get sent out. - set segment_id [db_string select_rel_segment_id {}] set community_name [dotlrn_community::get_community_name $community_id] - set community_url [dotlrn_community::get_community_url $community_id] + set community_url "[ad_parameter -package_id [ad_acs_kernel_id] SystemURL][dotlrn_community::get_community_url $community_id]" - # replace some values in the subject and the message - set message_values [list] - lappend message_values [list {+
+The following variables can be used to insert user/community specific data: - <sender_email> +{from_addr} = Sender's Email Address - <community_name> +{community_name} = Community's Name - <community_url> +{community_url} = Community's Web Address - <email> +{email} = Recipient's Email - <first_names> +{first_names} = Recipient's First Name - +<last_name> +{last_name} = Recipient's Last Name