Index: openacs-4/packages/dotlrn-ecommerce/lib/email-templates.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/email-templates.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/lib/email-templates.adp 8 Aug 2005 13:10:06 -0000 1.1 @@ -0,0 +1,4 @@ + +

Email Templates

+

Default email templates for new sections

+ \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/lib/email-templates.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/email-templates.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/lib/email-templates.tcl 8 Aug 2005 13:10:06 -0000 1.1 @@ -0,0 +1,58 @@ +# @param community_id +# @param course_name +# @param return_url (optional) + + +if {![exists_and_not_null return_url]} { + set return_url [ad_return_url] +} + +if {![exists_and_not_null scope]} { + set scope course +} +set email_types [list "on join" "waitinglist approved" "prereq approval" "prereq reject"] +if {[parameter::get -package_id [ad_conn package_id] -parameter EnableCourseApplicationsP -default 1]} { + lappend email_types "on approval" "awaiting payment" +} + +db_multirow -extend {type_pretty action_url action from} email_templates get_email_templates "select subject,type from dotlrn_member_emails where community_id=:community_id" { + set action_url [export_vars -base email-template-delete {{community_id $community_id} {action $type} return_url}] + set action "Revert to default" + if {[set index [lsearch $email_types $type]] > -1} { + set email_types [lreplace $email_types $index $index] + } + set type_pretty [dotlrn_ecommerce::email_type_pretty -type $type] + set from "using $scope specific template" +} + +foreach type $email_types { + set action_url [export_vars -base email-template {{community_id $community_id} {action $type} return_url}] + set action "Edit" + + set email [lindex [callback dotlrn::default_member_email -community_id $community_id -type $type -var_list [list course_name $course_name]] 0] + if {[llength $email]} { + set subject "[lindex $email 1]" + switch [lindex $email 3] { + dotlrn-ecommerce { + set from "using site-wide default template" + } + course { + set from "using course default template" + } + default { + + } + } + template::multirow append email_templates $subject $type [dotlrn_ecommerce::email_type_pretty -type $type] $action_url $action $from + } +} + +template::list::create \ + -name email_templates \ + -multirow email_templates \ + -elements { + subject {label "Email subject"} + from {label "Template Used"} + type_pretty {label "Type"} + action {label "" link_url_col action_url} + } \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/lib/email-templates.tcl~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/lib/Attic/email-templates.tcl~,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/lib/email-templates.tcl~ 8 Aug 2005 13:10:06 -0000 1.1 @@ -0,0 +1,51 @@ +# @param community_id +# @param course_name +# @param return_url (optional) + + +if {![exists_and_not_null return_url]} { + set return_url [ad_return_url] +} + +if {![exists_and_not_null scope]} { + set scope course +} +set email_types [list "on join" "waitinglist approved" "prereq approval" "prereq reject"] +if {[parameter::get -package_id [ad_conn package_id] -parameter EnableCourseApplicationsP -default 1]} { + lappend email_types "on approval" "awaiting payment" +} + +db_multirow -extend {edit_url} email_templates get_email_templates "select subject,type from dotlrn_member_emails where community_id=:community_id" { + set edit_url [export_vars -base email-template {{community_id $community_id} {action $type} return_url}] + if {[set index [lsearch $email_types $type]] > -1} { + set email_types [lreplace $email_types $index $index] + } +} + +foreach type $email_types { + set edit_url [export_vars -base email-template {{community_id $community_id} {action $type} return_url}] + set email [lindex [callback dotlrn::default_member_email -community_id $community_id -type $type -var_list [list course_name $course_name]] 0] + if {[llength $email]} { + set subject "[lindex $email 1]" + switch [lindex $email 3] { + dotlrn-ecommerce { + append subject "(using site-wide default template)" + } + course { + append subject "(using course default template)" + } + default { + + } + } + template::multirow append email_templates $subject $type $edit_url + } +} + +template::list::create \ + -name email_templates \ + -multirow email_templates \ + -elements { + subject {label "Email subject" link_url_col edit_url} + type {label "Type"} + } \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/tcl/course-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/course-procs.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn-ecommerce/tcl/course-procs.tcl 4 Aug 2005 18:49:36 -0000 1.8 +++ openacs-4/packages/dotlrn-ecommerce/tcl/course-procs.tcl 8 Aug 2005 13:10:06 -0000 1.9 @@ -95,7 +95,10 @@ "on approval" dotlrn-ecommerce.Application_approved \ submit_app dotlrn-ecommerce.Application_submitted \ approve_app dotlrn-ecommerce.Application_approved \ - "on join" dotlrn-ecommerce.Welcome_to_section] \ + "on join" dotlrn-ecommerce.Welcome_to_section \ + "prereq approval" dotlrn-ecommerce.Application_prereq_approved \ + "waitinglist approved" dotlrn-ecommerce.lt_A_space_has_opened_up \ + "prereq reject" dotlrn-ecommerce.Application_prereq_rejected] \ $type] } elseif {[string equal "body" $key]} { return [string map \ @@ -104,10 +107,30 @@ "on approval" dotlrn-ecommerce.lt_Your_application_to_j \ submit_app dotlrn-ecommerce.lt_Your_application_has_been_submitted \ approve_app dotlrn-ecommerce.lt_Your_application_to_j \ - "on join" dotlrn-ecommerce.lt_Welcome_to_section_1] \ + "on join" dotlrn-ecommerce.lt_Welcome_to_section_1 \ + "waitinglist approved" dotlrn-ecommerce.lt_A_space_has_opened_up_1 \ + "prereq approval" dotlrn-ecommercel.lt_Your_prereq_approved \ + "prereq reject" dotlrn-ecommerce.lt_Your_prereq_rejected] \ $type] } else { error "Key must be 'subject' or 'body'" } +} + +ad_proc -private dotlrn_ecommerce::email_type_pretty { + -type +} { + Pretty email type for display +} { + return [string map \ + [list \ + "awaiting_payment" "Application Approved (awaiting payment)" \ + "on approval" "Application Approved" \ + "submit_app" "Application Submitted" \ + "approve_app" "Application Approved" \ + "on join" "Welcome message" \ + "waitinglist approved" "Grant spot from waiting list" \ + "prereq approval" "Approve waiver of prerequisites" \ + "prereq reject" "Reject waiver of prerequitsites"] $type] } \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl,v diff -u -r1.15 -r1.16 --- openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl 7 Aug 2005 23:43:30 -0000 1.15 +++ openacs-4/packages/dotlrn-ecommerce/tcl/implementation-procs.tcl 8 Aug 2005 13:10:06 -0000 1.16 @@ -344,6 +344,13 @@ ad_proc -callback dotlrn::member_email_var_list -impl dotlrn-ecommerce {} { return list of variables for email templates } { + # check if this is a dotlrn-ecommerce community, if not, bail + if {![db_string is_section "select 1 from dotlrn_ecommerce_section where community_id=:community_id" -default 0]} { + # this return code tells the caller to ignore the results of this callback implementation + ns_log notice "DAVEB: Skipping default email for dotlrn-ecommerce, not in a section community" + return -code continue + DIE + } #FIXME depend on email type?? array set var_list [list first_name "" last_name "" full_name "" community_link "" community_name "" community_url "" course_name "" sessions "" instructor_names ""] # get user info Index: openacs-4/packages/dotlrn-ecommerce/www/application-approve.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/application-approve.tcl,v diff -u -r1.8 -r1.9 --- openacs-4/packages/dotlrn-ecommerce/www/application-approve.tcl 1 Aug 2005 00:06:58 -0000 1.8 +++ openacs-4/packages/dotlrn-ecommerce/www/application-approve.tcl 8 Aug 2005 13:10:06 -0000 1.9 @@ -24,15 +24,17 @@ full { set new_member_state "waitinglist approved" set old_member_state "needs approval" + set email_type "waitinglist approved" } prereq { set new_member_state "request approved" set old_member_state "request approval" - + set email_type "prereq approved" } payment { set new_member_state "payment received" set old_member_state "awaiting payment" + set email_type "on approval" } } @@ -115,18 +117,8 @@ set applicant_email [cc_email_from_party $user_id] set actor_email [cc_email_from_party $actor_id] set community_name [dotlrn_community::get_community_name $community_id] - set subject "[_ dotlrn-ecommerce.Application_prereq_approved]" - set body "[_ dotlrn-ecommerce.lt_Your_prereq_approved]" - if {![empty_string_p [string trim $reason]]} { - append body " -[_ dotlrn-ecommerce.Reason]: -[string trim $reason]" - } - acs_mail_lite::send \ - -to_addr $applicant_email \ - -from_addr $actor_email \ - -subject $subject \ - -body $body + dotlrn_community::send_member_email -community_id $community_id -to_user $user_id -type $email_type -var_list [list course_name $community_name reason $reason] + } \ -after_submit { ad_returnredirect $return_url @@ -163,23 +155,7 @@ set actor_email [cc_email_from_party $actor_id] set community_name [dotlrn_community::get_community_name $community_id] -# could be from waiting list -if {$new_member_state eq "waitinglist approved"} { - # site wide template - acs_mail_lite::send \ - -to_addr $applicant_email \ - -from_addr $actor_email \ - -subject [subst "[_ dotlrn-ecommerce.lt_A_space_has_opened_up]"] \ - -body [subst "[_ dotlrn-ecommerce.lt_A_space_has_opened_up_1]"] -} else { - if {![dotlrn_community::send_member_email -community_id $community_id -to_user $user_id -type "on approval"]} { - acs_mail_lite::send \ - -to_addr $applicant_email \ - -from_addr $actor_email \ - -subject [subst "[_ dotlrn-ecommerce.Application_approved]"] \ - -body [subst "[_ dotlrn-ecommerce.lt_Your_application_to_j]"] - } -} +dotlrn_community::send_member_email -community_id $community_id -to_user $user_id -type $email_type ad_returnredirect $return_url } } \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/www/application-confirm.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/application-confirm.adp,v diff -u -r1.1 -r1.2 --- openacs-4/packages/dotlrn-ecommerce/www/application-confirm.adp 21 Jul 2005 09:01:49 -0000 1.1 +++ openacs-4/packages/dotlrn-ecommerce/www/application-confirm.adp 8 Aug 2005 13:10:06 -0000 1.2 @@ -6,5 +6,7 @@

+ #dotlrn-ecommerce.lt_Register_for_Another_# Index: openacs-4/packages/dotlrn-ecommerce/www/admin/course-add-edit.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/course-add-edit.tcl,v diff -u -r1.7 -r1.8 --- openacs-4/packages/dotlrn-ecommerce/www/admin/course-add-edit.tcl 2 Aug 2005 18:19:39 -0000 1.7 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/course-add-edit.tcl 8 Aug 2005 13:10:07 -0000 1.8 @@ -173,7 +173,7 @@ } # add email template defaults - dotlrn_ecommerce::copy_course_default_email -community_id $community_id + # we will fall back to the site wide defaults instead } -edit_data { # New revision in the CR Index: openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.adp,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.adp 5 Aug 2005 04:00:15 -0000 1.5 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.adp 8 Aug 2005 13:10:07 -0000 1.6 @@ -120,7 +120,4 @@

Sections

- -

Email Templates

-

Default email templates for new sections

- \ No newline at end of file + \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.tcl,v diff -u -r1.9 -r1.10 --- openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.tcl 5 Aug 2005 04:00:15 -0000 1.9 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/course-info.tcl 8 Aug 2005 13:10:07 -0000 1.10 @@ -312,15 +312,3 @@ } set return_url [ad_return_url] - -db_multirow -extend {edit_url} email_templates get_email_templates "select * from dotlrn_member_emails where community_id=:template_community_id" { - set edit_url [export_vars -base email-template {{community_id $template_community_id} {action $type} return_url}] -} - -template::list::create \ - -name email_templates \ - -multirow email_templates \ - -elements { - subject {label "Email subject" link_url_col edit_url} - type {label "Type"} - } \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.adp,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.adp 8 Aug 2005 13:10:07 -0000 1.1 @@ -0,0 +1,2 @@ + + \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.tcl,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.tcl 8 Aug 2005 13:10:07 -0000 1.1 @@ -0,0 +1,69 @@ +# packages/dotlrn-ecommerce/www/admin/email-template.tcl + +ad_page_contract { + + add/edit an email template + + @author Deds Castillo (deds@i-manila.com.ph) + @creation-date 2005-07-20 + @arch-tag: cb528bf6-f4e5-4c87-bbe9-e987780a6709 + @cvs-id $Id: email-template-delete.tcl,v 1.1 2005/08/08 13:10:07 hamiltonc Exp $ +} { + {section_id ""} + {community_id ""} + {action ""} + {return_url ""} +} -properties { +} -validate { +} -errors { +} + +if {[empty_string_p $return_url]} { + set return_url [export_vars -base "one-section" {section_id}] +} + +set title "Add/edit email template" +if {![exists_and_not_null community_id]} { + set community_id [db_string get_community_id { + select community_id + from dotlrn_ecommerce_section + where section_id = :section_id + }] +} + +switch -exact $action { + "submit_app" { + set type "awaiting payment" + } + "approve_app" { + set type "on approval" + } + "on join" - + "awaiting payment" - + "on approval" - + "waitinglist approved" - + "prereq approval" - + "prereq reject" { + set type $action + } + default { + set type "" + } +} + +if {![db_0or1row get_email "select * from dotlrn_member_emails where community_id=:community_id and type=:type" -column_array email]} { + ad_returnredirect $return_url + ad_script_abort +} + +set info "Are you sure you want to delete '$email(subject)' for [dotlrn_ecommerce::email_type_pretty -type $type]?" +ad_form -name delete -export {section_id community_id action return_url type} -cancel_url $return_url -form { + {info:text(inform) {label "$info"}} + } -on_submit { + db_dml delete_email "delete from dotlrn_member_emails where community_id=:community_id and type=:type" + ad_returnredirect $return_url + ad_script_abort + } + +set page_title "Delete email" +ad_return_template \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.tcl~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/Attic/email-template-delete.tcl~,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/email-template-delete.tcl~ 8 Aug 2005 13:10:07 -0000 1.1 @@ -0,0 +1,32 @@ +# packages/dotlrn-ecommerce/www/admin/email-template.tcl + +ad_page_contract { + + add/edit an email template + + @author Deds Castillo (deds@i-manila.com.ph) + @creation-date 2005-07-20 + @arch-tag: cb528bf6-f4e5-4c87-bbe9-e987780a6709 + @cvs-id $Id: email-template-delete.tcl~,v 1.1 2005/08/08 13:10:07 hamiltonc Exp $ +} { + {section_id ""} + {community_id ""} + {action ""} + {return_url ""} +} -properties { +} -validate { +} -errors { +} + +if {[empty_string_p $return_url]} { + set return_url [export_vars -base "one-section" {section_id}] +} + +set title "Add/edit email template" +if {![exists_and_not_null community_id]} { + set community_id [db_string get_community_id { + select community_id + from dotlrn_ecommerce_section + where section_id = :section_id + }] +} Index: openacs-4/packages/dotlrn-ecommerce/www/admin/email-template.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/email-template.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-ecommerce/www/admin/email-template.tcl 1 Aug 2005 00:06:58 -0000 1.2 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/email-template.tcl 8 Aug 2005 13:10:07 -0000 1.3 @@ -29,7 +29,12 @@ "approve_app" { set type "on approval" } - "on join" { + "on join" - + "awaiting payment" - + "on approval" - + "waitinglist approved" - + "prereq approval" - + "prereq reject" { set type $action } default { Index: openacs-4/packages/dotlrn-ecommerce/www/admin/email-template.tcl.~1.2.~ =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/Attic/email-template.tcl.~1.2.~,v diff -u --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/email-template.tcl.~1.2.~ 8 Aug 2005 13:10:07 -0000 1.1 @@ -0,0 +1,54 @@ +# packages/dotlrn-ecommerce/www/admin/email-template.tcl + +ad_page_contract { + + add/edit an email template + + @author Deds Castillo (deds@i-manila.com.ph) + @creation-date 2005-07-20 + @arch-tag: cb528bf6-f4e5-4c87-bbe9-e987780a6709 + @cvs-id $Id: email-template.tcl.~1.2.~,v 1.1 2005/08/08 13:10:07 hamiltonc Exp $ +} { + {section_id ""} + {community_id ""} + {action ""} + {return_url ""} +} -properties { +} -validate { +} -errors { +} + +if {[empty_string_p $return_url]} { + set return_url [export_vars -base "one-section" {section_id}] +} + +switch -exact $action { + "submit_app" { + set type "awaiting payment" + } + "approve_app" { + set type "on approval" + } + "on join" { + set type $action + } + default { + set type "" + } +} + +if {[empty_string_p $type]} { + ad_returnredirect $return_url +} + + +set title "Add/edit email template" +if {![exists_and_not_null community_id]} { + set community_id [db_string get_community_id { + select community_id + from dotlrn_ecommerce_section + where section_id = :section_id + }] +} + +set extra_vars [list [list action $action] [list section_id $section_id]] \ No newline at end of file Index: openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.adp =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.adp,v diff -u -r1.10 -r1.11 --- openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.adp 4 Aug 2005 23:33:17 -0000 1.10 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.adp 8 Aug 2005 13:10:07 -0000 1.11 @@ -29,13 +29,15 @@ #dotlrn-ecommerce.Order_Summary# +

#dotlrn-ecommerce.Public_Pages#

+

#dotlrn-ecommerce.lt_Sessions_and_Attendan#

- +
@@ -45,10 +47,8 @@ -

#dotlrn-ecommerce.Email_templates#

-#dotlrn-ecommerce.Email_t_submit_application#
-#dotlrn-ecommerce.Email_t_approve_application#
-Welcome Message + +

#dotlrn-ecommerce.Related_Items#

#dotlrn-ecommerce.Product#
Index: openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.tcl 23 Jul 2005 13:31:11 -0000 1.5 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/one-section.tcl 8 Aug 2005 13:10:07 -0000 1.6 @@ -38,6 +38,8 @@ set attendance_show_p [apm_package_installed_p "attendance"] set expensetracking_show_p [apm_package_installed_p "expenses"] +set show_public_pages_p [parameter::get -parameter SupportPublicPagesP -default 0] +set show_non_session_calendar_links [parameter::get -parameter ShowNonSessionCalendarLinks -default 0] # Flush cache for this section # Shouldn't have much effect on performance and will keep the data Index: openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl,v diff -u -r1.5 -r1.6 --- openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl 5 Aug 2005 13:31:08 -0000 1.5 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/index.tcl 8 Aug 2005 13:10:07 -0000 1.6 @@ -47,7 +47,7 @@ -name "orders" \ -multirow "orders" \ -page_flush_p 1 \ - -no_data "[_ dotlrn-ecommerce.lt_No_orders_for_this_se]" \ + -no_data "[_ dotlrn-ecommerce.No_orders]" \ -elements { order_id { label "[_ dotlrn-ecommerce.Order_ID]" Index: openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/items-return-4.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/items-return-4.tcl,v diff -u -r1.3 -r1.4 --- openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/items-return-4.tcl 5 Aug 2005 05:57:43 -0000 1.3 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/items-return-4.tcl 8 Aug 2005 13:10:07 -0000 1.4 @@ -213,7 +213,9 @@ and i.item_id = o.item_id and i.item_id = :item_id }] } { - dotlrn_community::remove_user $community_id $participant_id + if { [dotlrn_community::member_p $community_id $participant_id] } { + dotlrn_community::remove_user $community_id $participant_id + } } } Index: openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/one.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/one.tcl,v diff -u -r1.2 -r1.3 --- openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/one.tcl 5 Aug 2005 09:22:52 -0000 1.2 +++ openacs-4/packages/dotlrn-ecommerce/www/admin/ecommerce/one.tcl 8 Aug 2005 13:10:07 -0000 1.3 @@ -269,6 +269,7 @@ } set total_price [db_string total_price {select ec_total_price(:order_id)} -default 0] +set total_refunds [db_string total_refunds {select ec_total_refund(:order_id)} -default 0] switch $method { @@ -300,7 +301,7 @@ TOTAL: [ec_pretty_price $total_price]
- Balance: [ec_pretty_price [expr $total_price - $invoice_payment_sum]] + Balance: [ec_pretty_price [expr $total_price - $invoice_payment_sum + $total_refunds]] }] } "scholarship" { Index: openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl,v diff -u -r1.12 -r1.13 --- openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl 3 Aug 2005 07:55:29 -0000 1.12 +++ openacs-4/packages/dotlrn-ecommerce/www/ecommerce/application-request.tcl 8 Aug 2005 13:10:07 -0000 1.13 @@ -65,6 +65,7 @@ "request approval" { set mail_from [parameter::get -package_id [ad_acs_kernel_id] -parameter OutgoingSender] set community_name [dotlrn_community::get_community_name $community_id] + #FIXME add email templates for these?? if {$member_state eq "needs approval"} { set subject [_ dotlrn-ecommerce.lt_Added_to_waiting_list] set body [_ dotlrn-ecommerce.lt_Added_to_waiting_list_1]