|
|
@ -128,6 +128,7 @@ $fck_attribute['ToolbarSet'] = 'Survey'; |
|
|
|
$form->addElement('html_editor', 'mail_text', get_lang('MailText')); |
|
|
|
$form->addElement('html_editor', 'mail_text', get_lang('MailText')); |
|
|
|
// some explanation of the mail |
|
|
|
// some explanation of the mail |
|
|
|
$form->addElement('static', null, null, get_lang('UseLinkSyntax')); |
|
|
|
$form->addElement('static', null, null, get_lang('UseLinkSyntax')); |
|
|
|
|
|
|
|
$form->addElement('checkbox', 'send_mail', '', get_lang('SendMail')); |
|
|
|
// allow resending to all selected users |
|
|
|
// allow resending to all selected users |
|
|
|
$form->addElement('checkbox', 'resend_to_all', '', get_lang('ReminderResendToAllUsers')); |
|
|
|
$form->addElement('checkbox', 'resend_to_all', '', get_lang('ReminderResendToAllUsers')); |
|
|
|
// submit button |
|
|
|
// submit button |
|
|
@ -141,7 +142,7 @@ if ($form->validate()) |
|
|
|
// save the invitation mail |
|
|
|
// save the invitation mail |
|
|
|
SurveyUtil::save_invite_mail($values['mail_text'], $values['resend_to_all']); |
|
|
|
SurveyUtil::save_invite_mail($values['mail_text'], $values['resend_to_all']); |
|
|
|
// saving the invitations for the course users |
|
|
|
// saving the invitations for the course users |
|
|
|
$count_course_users = SurveyUtil::save_invitations($values['course_users'], $values['mail_title'], $values['mail_text'], $values['resend_to_all']); |
|
|
|
$count_course_users = SurveyUtil::save_invitations($values['course_users'], $values['mail_title'], $values['mail_text'], $values['resend_to_all'], $values['send_mail']); |
|
|
|
// saving the invitations for the additional users |
|
|
|
// saving the invitations for the additional users |
|
|
|
$values['additional_users'] = $values['additional_users'].';'; // this is for the case when you enter only one email |
|
|
|
$values['additional_users'] = $values['additional_users'].';'; // this is for the case when you enter only one email |
|
|
|
$temp = str_replace(',',';',$values['additional_users']); // this is to allow , and ; as email separators |
|
|
|
$temp = str_replace(',',';',$values['additional_users']); // this is to allow , and ; as email separators |
|
|
@ -150,7 +151,7 @@ if ($form->validate()) |
|
|
|
{ |
|
|
|
{ |
|
|
|
$additional_users[$i] = trim($additional_users[$i]); |
|
|
|
$additional_users[$i] = trim($additional_users[$i]); |
|
|
|
} |
|
|
|
} |
|
|
|
$counter_additional_users = SurveyUtil::save_invitations($additional_users, $values['mail_title'], $values['mail_text'], $values['resend_to_all']); |
|
|
|
$counter_additional_users = SurveyUtil::save_invitations($additional_users, $values['mail_title'], $values['mail_text'], $values['resend_to_all'], $values['send_mail']); |
|
|
|
// updating the invited field in the survey table |
|
|
|
// updating the invited field in the survey table |
|
|
|
SurveyUtil::update_count_invited($survey_data['code']); |
|
|
|
SurveyUtil::update_count_invited($survey_data['code']); |
|
|
|
$total_count = $count_course_users + $counter_additional_users; |
|
|
|
$total_count = $count_course_users + $counter_additional_users; |
|
|
@ -169,6 +170,7 @@ else |
|
|
|
{ |
|
|
|
{ |
|
|
|
$defaults['mail_text'] = $survey_data['invite_mail']; |
|
|
|
$defaults['mail_text'] = $survey_data['invite_mail']; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
$defaults['send_mail'] = 1; |
|
|
|
$form->setDefaults($defaults); |
|
|
|
$form->setDefaults($defaults); |
|
|
|
|
|
|
|
|
|
|
|
$form->display(); |
|
|
|
$form->display(); |
|
|
|