Index: openacs-4/packages/attendance/www/admin/certificates.tcl
===================================================================
RCS file: /usr/local/cvsroot/openacs-4/packages/attendance/www/admin/certificates.tcl,v
diff -u -r1.8 -r1.9
--- openacs-4/packages/attendance/www/admin/certificates.tcl 14 Jun 2006 01:54:35 -0000 1.8
+++ openacs-4/packages/attendance/www/admin/certificates.tcl 14 Jun 2006 02:19:04 -0000 1.9
@@ -117,10 +117,16 @@
set image_id [content::revision::item_id -revision_id $image_revision_id]
}
}
+ if {([info exists new_image] && $new_image ne "") \
+ || ([info exists use_sw_submit] && $use_sw_submit ne "") \
+ || ([info exists set_sw_submit] && $set_sw_submit ne "") } {
if {[info exists new_image] && $new_image ne ""} {
- ad_returnredirect -message "Using the default image" [export_vars -base "certificates" {user_id community_id certificate certifies_that attended description_label course_description community_name instructors signature_1 signature_2 signature_3 signature_4 signature_5 signature_6 continuting_ed_credit_info}]
+
+ set image_info ""
+ ad_return_template
ad_script_abort
+
}
if {[info exists use_sw_submit] && $use_sw_submit ne ""} {
if {$image_id eq ""} {
@@ -139,9 +145,8 @@
-target_item_id $image_id]
content::item::set_live_revision -revision_id $image_revision_id
-
- ad_returnredirect -message "Using the default image" [export_vars -base "certificates" {user_id community_id certificate certifies_that attended description_label course_description community_name instructors signature_1 signature_2 signature_3 signature_4 signature_5 signature_6 continuting_ed_credit_info}]
- ad_script_abort
+ set image_info ""
+
}
if {[info exists set_sw_submit] && $set_sw_submit ne ""} {
@@ -168,10 +173,8 @@
-target_item_id $site_wide_image_id
content::item::set_live_revision -revision_id [content::item::get_live_revision -item_id $site_wide_image_id]
}
- ad_returnredirect -message "Using default image" [export_vars -base "certificates" {user_id community_id certificate certifies_that attended description_label course_description community_name instructors signature_1 signature_2 signature_3 signature_4 signature_5 signature_6 continuting_ed_credit_info}]
- ad_script_abort
}
-
+} else {
set user_id [split $user_id]
template::multirow create users name
foreach user $user_id {
@@ -211,5 +214,6 @@
file delete $pdf_tmpname
ad_script_abort
}
+}
ad_return_template
\ No newline at end of file