Index: openacs-4/packages/survey/tcl/survey-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/survey/tcl/survey-procs.tcl,v diff -u -N -r1.5 -r1.5.2.1 --- openacs-4/packages/survey/tcl/survey-procs.tcl 22 Dec 2003 21:16:02 -0000 1.5 +++ openacs-4/packages/survey/tcl/survey-procs.tcl 1 Sep 2004 19:09:29 -0000 1.5.2.1 @@ -261,12 +261,14 @@ } if $html_p { - append return_string "# $sort_order: $question_text -
" + append return_string "# $sort_order: $question_text

" + append return_string "[ad_enhanced_text_to_html "$clob_answer $number_answer $varchar_answer $date_answer"]" } else { - append return_string "# $sort_order: $question_text: " + append return_string "$sort_order: " + append return_string [ad_html_to_text $question_text] + append return_string "\n\n" + append return_string "[ad_html_to_text [ad_enhanced_text_to_html "$clob_answer $number_answer $varchar_answer $date_answer"]]" } - append return_string [util_show_plain_text "$clob_answer $number_answer $varchar_answer $date_answer"] if {![empty_string_p $attachment_answer]} { set package_id [ad_conn package_id] @@ -422,42 +424,54 @@ db_1row get_response_info {} set notif_text "" + set notif_html "" + if {$dotlrn_installed_p} { append notif_text "\nGroup: $community_name" + append notif_html "Group: $community_name
" + } set comm_url "[ad_parameter -package_id [ad_acs_kernel_id] SystemURL][acs_community_member_url -user_id $responding_user_id]" - append notif_text "\n[_ survey.lt_Survey_survey_nameRes_1]\n" + append notif_text "\n[_ survey.lt_Survey_survey_name]" + append notif_text "\n[_ survey.lt_Survey_survey_Res]\n" + append notif_text "\n[_ survey.lt_Survey_survey_notif_intro]\n" + + append notif_html "[_ survey.lt_Survey_survey_name]
" + append notif_html "[_ survey.lt_Survey_survey_Res]
" + append notif_html "[_ survey.lt_Survey_survey_notif_intro]

" + + if {$edit_p} { append notif_text "\n[_ survey.Edited] " + append notif_html "
[_ survey.Edited]  " } - append notif_text "[_ survey.lt_Response_on_response_]\n" + append notif_text "[_ survey.lt_Response_on_response_]\n\n" + append notif_html "[_ survey.lt_Response_on_response_] :

" + append notif_text [survey_answer_summary_display $response_id 0] + append notif_html [survey_answer_summary_display $response_id 1] # add summary info for sloanspace if {$dotlrn_installed_p} { - set n_responses [db_string n_responses {}] - if {$n_responses > 0} { - append notif_text " -----\n[_ survey.lt_Already_Responsed_n_r_1]\n" - } - set n_members [db_string n_members {}] - set n_awaiting [expr {$n_members - $n_responses}] - - append notif_text "\n[_ survey.lt_Awaiting_a_response_n]\n" - db_foreach get_questions {} { - append notif_text "$sort_order. $question_text - [_ survey.View_responses_1] <$community_url/survey/view-text-responses?question_id=$question_id>\n" + # only doing the summary for HTML version because + # all the links make the text version a mess + append notif_html "$sort_order. $question_text - [_ survey.View_responses_1]
" } } + append notif_html "

" + notification::new \ -type_id [notification::type::get_type_id \ -short_name survey_response_notif] \ -object_id $survey_id \ -response_id $survey_id \ -notif_subject $subject \ - -notif_text $notif_text + -notif_text $notif_text \ + -notif_html $notif_html }