summaryrefslogtreecommitdiff
path: root/manage_proposal.inc
diff options
context:
space:
mode:
Diffstat (limited to 'manage_proposal.inc')
-rwxr-xr-xmanage_proposal.inc16
1 files changed, 14 insertions, 2 deletions
diff --git a/manage_proposal.inc b/manage_proposal.inc
index a4db4d8..210d329 100755
--- a/manage_proposal.inc
+++ b/manage_proposal.inc
@@ -806,13 +806,25 @@ function proposal_status_form_submit($form, &$form_state)
$query->fields(array(
'submited_all_examples_code' => 0
));
- $query->condition('id', $proposal_id);
+ $query->condition('proposal_id', $proposal_id);
$num_updated = $query->execute();
/* sending email */
$book_user = user_load($proposal_data->uid);
+ $email_to = $book_user->mail;
+ $from = variable_get('textbook_companion_from_email', '');
+ $bcc = variable_get('textbook_companion_emails', '');
+ $cc = variable_get('textbook_companion_cc_emails', '');
$params['all_code_submitted_status_changed']['proposal_id'] = $proposal_id;
$params['all_code_submitted_status_changed']['user_id'] = $proposal_data->uid;
- $email_to = $book_user->mail;
+ $params['all_code_submitted_status_changed']['headers'] = array(
+ 'From' => $from,
+ 'MIME-Version' => '1.0',
+ 'Content-Type' => 'text/plain; charset=UTF-8; format=flowed; delsp=yes',
+ 'Content-Transfer-Encoding' => '8Bit',
+ 'X-Mailer' => 'Drupal',
+ 'Cc' => $cc,
+ 'Bcc' => $bcc
+ );
if (!drupal_mail('textbook_companion', 'all_code_submitted_status_changed', $email_to, language_default(), $params, variable_get('textbook_companion_from_email', NULL), TRUE))
drupal_set_message('Error sending email message.', 'error');
drupal_set_message('User has been notified of that code submission interface is now available .', 'status');