summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-x[-rw-r--r--]README.md0
-rwxr-xr-x[-rw-r--r--]abstract_bulk_approval.inc0
-rwxr-xr-x[-rw-r--r--]download.inc4
-rwxr-xr-xemail.inc19
-rwxr-xr-x[-rw-r--r--]full_download.inc12
-rwxr-xr-xom_pssp.module63
-rwxr-xr-xproposal.inc64
-rwxr-xr-x[-rw-r--r--]pssp_details.inc2
-rwxr-xr-x[-rw-r--r--]run.inc0
-rwxr-xr-xupload_code.inc4
10 files changed, 69 insertions, 99 deletions
diff --git a/README.md b/README.md
index 293277b..293277b 100644..100755
--- a/README.md
+++ b/README.md
diff --git a/abstract_bulk_approval.inc b/abstract_bulk_approval.inc
index 9796931..9796931 100644..100755
--- a/abstract_bulk_approval.inc
+++ b/abstract_bulk_approval.inc
diff --git a/download.inc b/download.inc
index 522700f..206d467 100644..100755
--- a/download.inc
+++ b/download.inc
@@ -25,8 +25,8 @@ function om_pssp_download_upload_file()
header('Pragma: no-cache');
readfile($root_path . $om_pssp_upload_file->samplefilepath);
ob_end_flush();
- ob_clean();
- flush();
+ ob_clean();
+ flush();
}
function om_pssp_project_files() {
$proposal_id = arg(4);
diff --git a/email.inc b/email.inc
index 62a01b9..1cf5b42 100755
--- a/email.inc
+++ b/email.inc
@@ -36,7 +36,7 @@ function om_pssp_mail($key, &$message, $params)
}
$message['headers'] = $params['om_pssp_proposal_received']['headers'];
- $message['subject'] = t('[!site_name][Power System Simulation Project] Your OM Power System Simulationg Project proposal has been received', array(
+ $message['subject'] = t('[!site_name][Power System Simulation Project] Your Power System Simulation Project proposal has been received', array(
'!site_name' => variable_get('site_name', '')
), array(
'language' => $language->language
@@ -45,14 +45,14 @@ function om_pssp_mail($key, &$message, $params)
'body' => t('
Dear !user_name,
-Thank you for submitting proposal for the DWSIM Flowsheeting Project. The details of your proposal are as below.
+Thank you for submitting proposal for the Power Systems Simulation Project. The details of your proposal are as below :
Full Name: ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
Email: ' . $user_data->mail . '
University/Institute: ' . $proposal_data->university . '
City: ' . $proposal_data->city . '
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 be notified via email about the approval/disapproval within ten working days.
@@ -94,7 +94,7 @@ FOSSEE,IIT Bombay', array(
$project_guide_email_id = $proposal_data->project_guide_email_id;
}
$message['headers'] = $params['om_pssp_proposal_disapproved']['headers'];
- $message['subject'] = t('[!site_name][Flowsheeting Project] Your DWSIM Flowsheeting Project proposal has been disapproved', array(
+ $message['subject'] = t('[!site_name][Power System Simulation Project] Your Power System Simulation Project proposal has been disapproved', array(
'!site_name' => variable_get('site_name', '')
), array(
'language' => $language->language
@@ -103,16 +103,15 @@ FOSSEE,IIT Bombay', array(
'body' => t('
Dear !user_name,
-We regret to inform you that your DWSIM Flowsheeting Project proposal with following details have been disapproved.
+We regret to inform you that your Power Systems Simulation Project proposal, with following details, has been disapproved.
Full Name: ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
Project Title: ' . $proposal_data->project_title . '
-Name of compound for which process development is carried out: ' . $proposal_data->process_development_compound_name . '
Reason(s) / Feedback: ' . $proposal_data->dissapproval_reason . '
Please note that any files that were uploaded along with the proposal form will be deleted from all our database(s).
-Thank you for participating in the DWSIM Flowsheeting Project. You are welcome to submit a new proposal.
+Thank you for participating in the Power Systems Simulation Project. You are welcome to submit a new proposal.
Best Wishes,
@@ -152,7 +151,7 @@ FOSSEE,IIT Bombay', array(
$project_guide_email_id = $proposal_data->project_guide_email_id;
}
$message['headers'] = $params['om_pssp_proposal_approved']['headers'];
- $message['subject'] = t('[!site_name][Flowsheeting Project] Your DWSIM Flowsheeting Project proposal has been approved', array(
+ $message['subject'] = t('[!site_name][Power Simulation Simulation Project] Your Power Simulation Simulation Project proposal has been approved', array(
'!site_name' => variable_get('site_name', '')
), array(
'language' => $language->language
@@ -161,13 +160,13 @@ FOSSEE,IIT Bombay', array(
'body' => t('
Dear !user_name,
-Congratulations! Your proposal for DWSIM Flowsheeting Project with the following details is approved.
+Congratulations! Your proposal for Power Systems Simulation Project with the following details is approved.
Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->contributor_name . '
Project Title : ' . $proposal_data->project_title . '
Name of compound for which process development is carried out : ' . $proposal_data->process_development_compound_name . '
-Please ensure that ALL the guidelines for coding at https://dwsim.fossee.in/flowsheeting-project/coding-guidelines-flowsheeting are strictly followed. Refer https://dwsim.fossee.in/flowsheeting-project/flowsheeting-internship for the further procedure for submission of the project. Kindly ensure that the flowsheet and abstract are submitted within 1 month.
+Please ensure that ALL the guidelines for coding at https://om.fossee.in/powersystems/pssp/coding-guidelines are strictly followed. Refer https://om.fossee.in/powersystems/pssp/internship for the further procedure for submission of the project. Kindly ensure that the flowsheet and abstract are submitted within 1 month.
You can upload your abstract using abstract submission interface.
diff --git a/full_download.inc b/full_download.inc
index 31f332b..6dace72 100644..100755
--- a/full_download.inc
+++ b/full_download.inc
@@ -61,8 +61,8 @@ function om_pssp_download_full_project()
}
} //$zip_file_count > 0
else {
- drupal_set_message("There are no circuit simulation project in this proposal to download", 'error');
- drupal_goto('circuit-simulation-project/full-download/project');
+ drupal_set_message("There are no power system simulation project in this proposal to download", 'error');
+ drupal_goto('powersystems');
}
}
function om_pssp_download_completed_project()
@@ -106,7 +106,7 @@ function om_pssp_download_completed_project()
header('Content-Length: ' . filesize($zip_filename));
ob_end_flush();
ob_clean();
- flush();
+ //flush();
readfile($zip_filename);
unlink($zip_filename);
} //$user->uid
@@ -119,13 +119,13 @@ function om_pssp_download_completed_project()
header('Pragma: no-cache');
ob_end_flush();
ob_clean();
- flush();
+ //flush();
readfile($zip_filename);
unlink($zip_filename);
}
} //$zip_file_count > 0
else {
- drupal_set_message("There are circuit simulation project in this proposal to download", 'error');
- drupal_goto('circuit-simulation-project/full-download/project');
+ drupal_set_message("There are no power system simulation project in this proposal to download", 'error');
+ drupal_goto('powersystems');
}
} \ No newline at end of file
diff --git a/om_pssp.module b/om_pssp.module
index 7e92d10..f5a0bed 100755
--- a/om_pssp.module
+++ b/om_pssp.module
@@ -229,7 +229,7 @@ function om_pssp_menu()
'description' => 'Download resource file',
'page callback' => 'om_pssp_download_upload_file',
'access arguments' => array(
- 'download code'
+ 'om pssp download code'
),
'type' => MENU_CALLBACK,
'file' => 'download.inc'
@@ -454,65 +454,7 @@ function om_pssp_permission()
);
// return array('om pssp create proposal', 'om pssp manage proposal', 'om pssp edit proposal', 'om pssp approve proposal', 'om pssp propose solution', 'om pssp approve code', 'om pssp bulk manage abstract', 'om pssp bulk delete code', 'om pssp upload code', 'om pssp download code', 'administer om pssp', 'om pssp generate lab');
}
-/* AJAX CALLS */
-/*function om_pssp_ajax()
-{
- $query_type = arg(2);
- if ($query_type == 'chapter_title')
- {
- $chapter_number = arg(3);
- $preference_id = arg(4);
- //$chapter_q = db_query("SELECT * FROM {om_pssp_chapter} WHERE number = %d AND preference_id = %d LIMIT 1", $chapter_number, $preference_id);
- $query = db_select('om_pssp_chapter');
- $query->fields('om_pssp_chapter');
- $query->condition('number', $chapter_number);
- $query->condition('preference_id', $preference_id);
- $query->range(0, 1);
- $chapter_q = $query->execute();
- if ($chapter_data = $chapter_q->fetchObject())
- {
- echo $chapter_data->name;
- return;
- } //$chapter_data = $chapter_q->fetchObject()
- } //$query_type == 'chapter_title'
- else if ($query_type == 'example_exists')
- {
- $chapter_number = arg(3);
- $preference_id = arg(4);
- $example_number = arg(5);
- $chapter_id = 0;
- $query = db_select('om_pssp_chapter');
- $query->fields('om_pssp_chapter');
- $query->condition('number', $chapter_number);
- $query->condition('preference_id', $preference_id);
- $query->range(0, 1);
- $chapter_q = $query->execute();
- if (!$chapter_data = $chapter_q->fetchObject())
- {
- echo '';
- return;
- } //!$chapter_data = $chapter_q->fetchObject()
- else
- {
- $chapter_id = $chapter_data->id;
- }
- $query = db_select('om_pssp_example');
- $query->fields('om_pssp_example');
- $query->condition('chapter_id', $chapter_id);
- $query->condition('number', $example_number);
- $query->range(0, 1);
- $example_q = $query->execute();
- if ($example_data = $example_q->fetchObject())
- {
- if ($example_data->approval_status == 1)
- echo 'Warning! Solution already approved. You cannot upload the same solution again.';
- else
- echo 'Warning! Solution already uploaded. Delete the solution and reupload it.';
- return;
- } //$example_data = $example_q->fetchObject()
- } //$query_type == 'example_exists'
- echo '';
-}*/
+
/*************************** VALIDATION FUNCTIONS *****************************/
function om_pssp_check_valid_filename($file_name)
{
@@ -907,3 +849,4 @@ function _om_pssp_list_of_user_defined_compound($proposal_id)
}
return $data;
}
+
diff --git a/proposal.inc b/proposal.inc
index 63664b4..0c20033 100755
--- a/proposal.inc
+++ b/proposal.inc
@@ -47,7 +47,7 @@ function om_pssp_proposal_form($form, &$form_state, $no_js_use = FALSE)
if ($proposal_data->approval_status == 0 || $proposal_data->approval_status == 1)
{
drupal_set_message(t('We have already received your proposal.'), 'status');
- drupal_goto('');
+ drupal_goto('powersystems');
return;
} //$proposal_data->approval_status == 0 || $proposal_data->approval_status == 1
} //$proposal_data
@@ -85,6 +85,27 @@ function om_pssp_proposal_form($form, &$form_state, $no_js_use = FALSE)
),
'#maxlength' => 250
);
+ $form['gender'] = array(
+ '#type' => 'select',
+ '#title' => t('Gender'),
+ '#options' => array(
+ 'Male' => 'Male',
+ 'Female' => 'Female',
+ 'Other' => 'Other'
+ ),
+ '#required' => TRUE
+ );
+ $form['month_year_of_degree'] = array(
+ '#type' => 'date_popup',
+ '#title' => t('Month and year of award of degree'),
+ '#date_label_position' => '',
+ '#description' => '',
+ '#default_value' => '',
+ '#date_format' => 'M-Y',
+ '#date_increment' => 0,
+ '#date_year_range' => '1960: +22',
+ '#required' => TRUE
+ );
$form['contributor_email_id'] = array(
'#type' => 'textfield',
'#title' => t('Email'),
@@ -225,19 +246,30 @@ function om_pssp_proposal_form($form, &$form_state, $no_js_use = FALSE)
'#type' => 'textarea',
'#title' => t('Simulation Title'),
'#size' => 80,
- '#description' => t('Maximum character limit is 80'),
+ '#description' => t('Maximum character limit is 80, minimum character 10'),
'#required' => TRUE
);
$form['description'] = array(
'#type' => 'textarea',
'#title' => t('Description of Proposed Simulation'),
'#size' => 120,
- '#description' => t('Minimum character limit is 60 and Maximum character limit is 120'),
+ '#description' => t('Maximum character limit is 120, minimum 60'),
'#required' => TRUE
);
+ $form['reference'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Reference'),
+ '#size' => 250,
+ '#required' => TRUE,
+ '#description' => t('Example: Plain Text, DOI, IEEE format etc.'),
+ '#attributes' => array(
+ 'placeholder' => 'The links to the documents or websites which are referenced while proposing this project.'
+ )
+
+ );
$form['version'] = array(
'#type' => 'select',
- '#title' => t('Version'),
+ '#title' => t('OM Version'),
'#options' => _df_list_of_software_version(),
'#required' => TRUE
);
@@ -265,17 +297,6 @@ function om_pssp_proposal_form($form, &$form_state, $no_js_use = FALSE)
<a href="https://static.fossee.in/om/internship-forms/05_PSS_Abstract%20Submission%20Form.pdf">
Click here</a></span>' . '<br />' . 'Upload filenames with allowed extensions only. No spaces or any special characters allowed in filename.') . '<br />' . t('<span style="color:red;">Allowed file extensions : ') . variable_get('resource_upload_extensions', '') . '</span>'
);
- $form['reference'] = array(
- '#type' => 'textfield',
- '#title' => t('Reference'),
- '#size' => 250,
- '#required' => TRUE,
- '#description' => t('Example: Plain Text, DOI, IEEE format etc.'),
- '#attributes' => array(
- 'placeholder' => 'The links to the documents or websites which are referenced while proposing this project.'
- )
-
- );
$form['term_condition'] = array(
'#type' => 'checkboxes',
'#title' => t('Terms And Conditions'),
@@ -349,9 +370,9 @@ function om_pssp_proposal_form_validate($form, &$form_state)
$form_state['values']['project_title'] = trim($form_state['values']['project_title']);
if ($form_state['values']['project_title'] != '')
{
- if (strlen($form_state['values']['project_title']) > 40)
+ if (strlen($form_state['values']['project_title']) > 80)
{
- form_set_error('project_title', t('Maximum charater limit is 40 charaters only, please check the length of the project title'));
+ form_set_error('project_title', t('Maximum charater limit is 80 charaters only, please check the length of the project title'));
} //strlen($form_state['values']['project_title']) > 250
else if (strlen($form_state['values']['project_title']) < 10)
{
@@ -423,6 +444,7 @@ function om_pssp_proposal_form_submit($form, &$form_state)
$project_title = trim($v['project_title']);
$proposar_name = $v['name_title'] . ' ' . $v['contributor_name'];
$university = $v['university'];
+ $month_year_of_degree = $v['month_year_of_degree'];
$directory_name = _df_dir_name($project_title, $proposar_name);
$result = "INSERT INTO {om_pssp_proposal}
(
@@ -431,6 +453,8 @@ function om_pssp_proposal_form_submit($form, &$form_state)
name_title,
contributor_name,
contact_no,
+ gender,
+ month_year_of_degree,
university,
city,
pincode,
@@ -457,6 +481,8 @@ function om_pssp_proposal_form_submit($form, &$form_state)
:name_title,
:contributor_name,
:contact_no,
+ :gender,
+ :month_year_of_degree,
:university,
:city,
:pincode,
@@ -483,6 +509,8 @@ function om_pssp_proposal_form_submit($form, &$form_state)
":name_title" => $v['name_title'],
":contributor_name" => _df_sentence_case(trim($v['contributor_name'])),
":contact_no" => $v['contributor_contact_no'],
+ ":gender" => $v['gender'],
+ ":month_year_of_degree" => $month_year_of_degree,
":university" => _df_sentence_case($v['university']),
":city" => $v['city'],
":pincode" => $v['pincode'],
@@ -571,5 +599,5 @@ function om_pssp_proposal_form_submit($form, &$form_state)
if (!drupal_mail('om_pssp', 'om_pssp_proposal_received', $email_to, user_preferred_language($user), $params, $form, TRUE))
drupal_set_message('Error sending email message.', 'error');
drupal_set_message(t('We have received your power systems simulation proposal. We will get back to you soon.'), 'status');
- drupal_goto('');
+ drupal_goto('powersystems');
}
diff --git a/pssp_details.inc b/pssp_details.inc
index 179a060..6a3abd2 100644..100755
--- a/pssp_details.inc
+++ b/pssp_details.inc
@@ -32,7 +32,7 @@ function om_pssp_completed_proposals_all()
$preference_rows[] = array(
$i,
l($row->project_title, "powersystems/pssp/om-pssp-run/" . $row->id),
- l('Download', "powersystems/pssp/download/project-file/" . $row->id),
+ l('Download', "powersystems/pssp/download/resource-file/" . $row->id),
$row->contributor_name,
$row->university,
$approval_date
diff --git a/run.inc b/run.inc
index 1ebdd3f..1ebdd3f 100644..100755
--- a/run.inc
+++ b/run.inc
diff --git a/upload_code.inc b/upload_code.inc
index 5adeb2e..6fec49d 100755
--- a/upload_code.inc
+++ b/upload_code.inc
@@ -7,7 +7,7 @@ function om_pssp_abstract()
$proposal_data = om_pssp_get_proposal();
if (!$proposal_data)
{
- drupal_goto('');
+ drupal_goto('powersystems');
return;
} //!$proposal_data
//$return_html .= l('Upload abstract', 'powersystems/pssp/abstract-code/upload') . '<br />';
@@ -280,7 +280,7 @@ function om_pssp_upload_abstract_code_form_submit($form, &$form_state)
$proposal_id = $proposal_data->id;
if (!$proposal_data)
{
- drupal_goto('');
+ drupal_goto('powersystems');
return;
} //!$proposal_data
$proposal_id = $proposal_data->id;