summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfossee-dell2017-08-11 14:25:59 +0530
committerfossee-dell2017-08-11 14:25:59 +0530
commit1d1dcba8bbab9979009261148f89adcb4a8c6991 (patch)
tree96e754792102b1ca7eeba88ee8f74b219d1abb8b
parentcac9b204727a54f5ea426acd33e367b91a20006e (diff)
downloadesim_circuit_simulation_project_module-1d1dcba8bbab9979009261148f89adcb4a8c6991.tar.gz
esim_circuit_simulation_project_module-1d1dcba8bbab9979009261148f89adcb4a8c6991.tar.bz2
esim_circuit_simulation_project_module-1d1dcba8bbab9979009261148f89adcb4a8c6991.zip
Email issue fixed
-rwxr-xr-xemail.inc94
-rwxr-xr-xmanage_proposal.inc2
-rwxr-xr-xproposal.inc2
3 files changed, 30 insertions, 68 deletions
diff --git a/email.inc b/email.inc
index 66b45ce..93cfc74 100755
--- a/email.inc
+++ b/email.inc
@@ -13,10 +13,10 @@ function circuit_simulation_mail($key, &$message, $params)
/* initializing data */
$query = db_select('esim_circuit_simulation_proposal');
$query->fields('esim_circuit_simulation_proposal');
- $query->condition('id', $params['circuit_simulation_proposal_received']['proposal_id']);
+ $query->condition('id', $params['circuit_simulation_proposal_received']['result1']);
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
- $user_data = user_load($params['circuit_simulation_proposal_received']['user_id']);
+ $user = user_load($params['circuit_simulation_proposal_received']['user_id']);
if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
@@ -47,23 +47,15 @@ Dear !user_name,
We have received your eSim Circuit Simulation Project proposal with the following details:
Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
-Email : ' . $user_data->mail . '
-Month and Year of Award of Degree : ' . $proposal_data->month_year_of_degree . '
+Email : ' . $user->mail . '
University/Institute : ' . $proposal_data->university . '
City : ' . $proposal_data->city . '
State : ' . $proposal_data->state . '
Country : ' . $proposal_data->country . '
-
Project Guide : ' . $project_guide_name . '
Project Guide Email : ' . $project_guide_email_id . '
-
-eSim Version : ' . $proposal_data->version . '
-
Project Title : ' . $proposal_data->project_title . '
-Name of compound for which process development is carried out : ' . $proposal_data->process_development_compound_name . '
-
-
Your proposal is under review. You will soon receive an email when same has been approved/disapproved.
Best Wishes,
@@ -71,7 +63,7 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
@@ -84,7 +76,7 @@ FOSSEE,IIT Bombay', array(
$query->condition('id', $params['circuit_simulation_proposal_disapproved']['proposal_id']);
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
- $user_data = user_load($params['circuit_simulation_proposal_disapproved']['user_id']);
+ $user = user_load($params['circuit_simulation_proposal_disapproved']['user_id']);
if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
@@ -114,23 +106,15 @@ Dear !user_name,
We regret to inform you that your eSim Circuit Simulation Project proposal with following details have been disapproved:
Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
-Email : ' . $user_data->mail . '
-Month and Year of Award of Degree : ' . $proposal_data->month_year_of_degree . '
+Email : ' . $user->mail . '
University/Institute : ' . $proposal_data->university . '
City : ' . $proposal_data->city . '
State : ' . $proposal_data->state . '
Country : ' . $proposal_data->country . '
-
Project Guide : ' . $project_guide_name . '
Project Guide Email : ' . $project_guide_email_id . '
-
-eSim Version : ' . $proposal_data->version . '
-
Project Title : ' . $proposal_data->project_title . '
-Name of compound for which process development is carried out : ' . $proposal_data->process_development_compound_name . '
-
-
Reason for rejection: : ' . $proposal_data->dissapproval_reason . '
@@ -141,7 +125,7 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
@@ -154,7 +138,7 @@ FOSSEE,IIT Bombay', array(
$query->condition('id', $params['circuit_simulation_proposal_approved']['proposal_id']);
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
- $user_data = user_load($params['circuit_simulation_proposal_approved']['user_id']);
+ $user = user_load($params['circuit_simulation_proposal_approved']['user_id']);
if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
@@ -184,23 +168,15 @@ Dear !user_name,
Your eSim Circuit Simulation Project proposal with the following details has been approved:
Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
-Email : ' . $user_data->mail . '
-Month and Year of Award of Degree : ' . $proposal_data->month_year_of_degree . '
+Email : ' . $user->mail . '
University/Institute : ' . $proposal_data->university . '
City : ' . $proposal_data->city . '
State : ' . $proposal_data->state . '
Country : ' . $proposal_data->country . '
-
Project Guide : ' . $project_guide_name . '
Project Guide Email : ' . $project_guide_email_id . '
-
-eSim Version : ' . $proposal_data->version . '
-
Project Title : ' . $proposal_data->project_title . '
-Name of compound for which process development is carried out : ' . $proposal_data->process_development_compound_name . '
-
-
You can upload your abstract using abstract submission interface.
Best Wishes,
@@ -208,7 +184,7 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
@@ -221,7 +197,7 @@ FOSSEE,IIT Bombay', array(
$query->condition('id', $params['circuit_simulation_proposal_completed']['proposal_id']);
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
- $user_data = user_load($params['circuit_simulation_proposal_completed']['user_id']);
+ $user = user_load($params['circuit_simulation_proposal_completed']['user_id']);
if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
$project_guide_name = "Not Entered";
@@ -251,8 +227,7 @@ Dear !user_name,
Your eSim circuit simulation and abstract on the following process have been completed successfully.
Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
-Email : ' . $user_data->mail . '
-Month and Year of Award of Degree : ' . $proposal_data->month_year_of_degree . '
+Email : ' . $user->mail . '
University/Institute : ' . $proposal_data->university . '
City : ' . $proposal_data->city . '
State : ' . $proposal_data->state . '
@@ -260,18 +235,13 @@ Country : ' . $proposal_data->country . '
Project Guide : ' . $project_guide_name . '
Project Guide Email : ' . $project_guide_email_id . '
-
-eSim Version : ' . $proposal_data->version . '
-
Project Title : ' . $proposal_data->project_title . '
-
-Name of compound for which process development is carried out : ' . $proposal_data->process_development_compound_name . '
Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
@@ -284,7 +254,7 @@ FOSSEE,IIT Bombay', array(
$query->condition('id', $params['circuit_simulation_proposal_deleted']['proposal_id']);
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
- $user_data = user_load($params['circuit_simulation_proposal_deleted']['user_id']);
+ $user = user_load($params['circuit_simulation_proposal_deleted']['user_id']);
if ($proposal_data->project_guide_name == "NULL" || $proposal_data->project_guide_name == "")
{
@@ -315,24 +285,16 @@ Dear !user_name,
Your eSim Circuit Simulation Project proposal with the following details has been deleted :
Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
-Email : ' . $user_data->mail . '
-Month and Year of Award of Degree : ' . $proposal_data->month_year_of_degree . '
+Email : ' . $user->mail . '
+
University/Institute : ' . $proposal_data->university . '
City : ' . $proposal_data->city . '
State : ' . $proposal_data->state . '
Country : ' . $proposal_data->country . '
-
Project Guide : ' . $project_guide_name . '
Project Guide Email : ' . $project_guide_email_id . '
-
-eSim Version : ' . $proposal_data->version . '
-
Project Title : ' . $proposal_data->project_title . '
-Name of compound for which process development is carried out : ' . $proposal_data->process_development_compound_name . '
-
-
-
You can propose a new circuit simulation project.
Best Wishes,
@@ -340,7 +302,7 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
@@ -351,11 +313,11 @@ FOSSEE,IIT Bombay', array(
// $solution_q = db_query("SELECT * FROM {circuit_simulation_solution} WHERE id = %d LIMIT 1", $params['abstract_uploaded']['solution_id']);
$query = db_select('esim_circuit_simulation_proposal');
$query->fields('esim_circuit_simulation_proposal');
- $query->condition('id', $params['abstract_uploaded']['proposal_id']);
+ $query->condition('id', $params['abstract_uploaded']['result1']);
$query->range(0, 1);
$proposal_data = $query->execute()->fetchObject();
- $user_data = user_load($params['abstract_uploaded']['user_id']);
+ $user = user_load($params['abstract_uploaded']['user_id']);
$message['subject'] = t('[!site_name][Circuit Simulation Project] You have uploaded eSim circuit simulation abstract', array(
'!site_name' => variable_get('site_name', '')
), array(
@@ -378,7 +340,7 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
@@ -398,7 +360,7 @@ FOSSEE,IIT Bombay', array(
$query->range(0, 1);
$experiment_q = $query->execute();
$experiment_data = $experiment_q->fetchObject();
- $user_data = user_load($params['solution_approved']['user_id']);
+ $user = user_load($params['solution_approved']['user_id']);
$message['headers'] = $params['solution_approved']['headers'];
$message['subject'] = t('[!site_name] Your uploaded eSim circuit simulation solution has been approved', array(
'!site_name' => variable_get('site_name', '')
@@ -423,14 +385,14 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
);
break;
case 'solution_disapproved':
- $user_data = user_load($params['solution_disapproved']['user_id']);
+ $user = user_load($params['solution_disapproved']['user_id']);
$message['headers'] = $params['solution_disapproved']['headers'];
$message['subject'] = t('[!site_name] Your uploaded eSim circuit-simulation solution has been disapproved', array(
'!site_name' => variable_get('site_name', '')
@@ -454,14 +416,14 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
);
break;
case 'solution_deleted_user':
- $user_data = user_load($params['solution_deleted_user']['user_id']);
+ $user = user_load($params['solution_deleted_user']['user_id']);
$message['headers'] = $params['solution_deleted_user']['headers'];
$message['subject'] = t('[!site_name] User has deleted pending eSim circuit-simulation solution', array(
'!site_name' => variable_get('site_name', '')
@@ -486,14 +448,14 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
);
break;
case 'dependency_uploaded':
- $user_data = user_load($params['dependency_uploaded']['user_id']);
+ $user = user_load($params['dependency_uploaded']['user_id']);
$dependency_files = implode(',', $params['dependency_uploaded']['dependency_names']);
$message['headers'] = $params['dependency_uploaded']['headers'];
$message['subject'] = t('[!site_name] You have uploaded dependency file', array(
@@ -515,7 +477,7 @@ Best Wishes,
!site_name Team,
FOSSEE,IIT Bombay', array(
'!site_name' => variable_get('site_name', ''),
- '!user_name' => $user_data->name
+ '!user_name' => $user->name
), array(
'language' => $language->language
))
diff --git a/manage_proposal.inc b/manage_proposal.inc
index 2b017fd..557e5f7 100755
--- a/manage_proposal.inc
+++ b/manage_proposal.inc
@@ -429,7 +429,7 @@ function circuit_simulation_proposal_approval_form_submit($form, &$form_state)
$bcc = $user->mail . ', ' . variable_get('circuit_simulation_emails', '');
$cc = variable_get('circuit_simulation_cc_emails', '');
$params['circuit_simulation_proposal_disapproved']['proposal_id'] = $proposal_id;
- $params['circuit_simulation_proposal_disapproved']['user_id'] = $proposal_data->uid;
+ $params['circuit_simulation_proposal_disapproved']['user_id'] = $user->uid;
$params['circuit_simulation_proposal_disapproved']['headers'] = array(
'From' => $from,
'MIME-Version' => '1.0',
diff --git a/proposal.inc b/proposal.inc
index 659df5c..e5345a3 100755
--- a/proposal.inc
+++ b/proposal.inc
@@ -551,7 +551,7 @@ function circuit_simulation_proposal_form_submit($form, &$form_state)
$form = variable_get('circuit_simulation_from_email', '');
$bcc = variable_get('circuit_simulation_emails', '');
$cc = variable_get('circuit_simulation_cc_emails', '');
- $params['circuit_simulation_proposal_received']['proposal_id'] = $proposal_id;
+ $params['circuit_simulation_proposal_received']['result1'] = $result1;
$params['circuit_simulation_proposal_received']['user_id'] = $user->uid;
$params['circuit_simulation_proposal_received']['headers'] = array(
'From' => $form,