summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xdownload.inc2
-rwxr-xr-xemail.inc2
-rwxr-xr-xgeneral_deletion.inc2
-rwxr-xr-xmanage_proposal.inc13
-rwxr-xr-xproposal.inc4
-rwxr-xr-xrun.inc6
6 files changed, 8 insertions, 21 deletions
diff --git a/download.inc b/download.inc
index c411a2a..bcbf9ed 100755
--- a/download.inc
+++ b/download.inc
@@ -57,6 +57,6 @@ function cfd_case_study_project_files() {
header("Expires: 0");
header("Pragma: no-cache");
readfile($root_path . $directory_name . $abstract_file);
- //ob_end_flush();
+ ob_end_flush();
ob_clean();
}
diff --git a/email.inc b/email.inc
index efa4896..fd355f5 100755
--- a/email.inc
+++ b/email.inc
@@ -101,7 +101,7 @@ FOSSEE,IIT Bombay', array(
break;
case 'case_study_proposal_approved':
/* initializing data */
- $url = 'http://cfd.fossee.in/case-study-project/project-upload';
+ $url = 'http://cfd.fossee.in/case-study-project/abstract-code';
$query = db_select('case_study_proposal');
$query->fields('case_study_proposal');
$query->condition('id', $params['case_study_proposal_approved']['proposal_id']);
diff --git a/general_deletion.inc b/general_deletion.inc
index 4bc9d3f..2259c65 100755
--- a/general_deletion.inc
+++ b/general_deletion.inc
@@ -20,7 +20,7 @@ function case_study_abstract_delete_project($proposal_id)
$query->fields('case_study_submitted_abstracts_file');
$query->condition('proposal_id', $proposal_id);
$abstract_q = $query->execute();
- $dir_project_files = $root_path . $proposal_data->directory_name . '/';
+ $dir_project_files = $root_path . $proposal_data->directory_name;
while ($abstract_data = $abstract_q->fetchObject())
{
if (is_dir($dir_project_files)){
diff --git a/manage_proposal.inc b/manage_proposal.inc
index 69b20cb..ac16336 100755
--- a/manage_proposal.inc
+++ b/manage_proposal.inc
@@ -737,7 +737,7 @@ function cfd_case_study_proposal_edit_form($form, &$form_state)
)
);
$form['project_title'] = array(
- '#type' => 'textarea',
+ '#type' => 'textfield',
'#title' => t('Title of the Case Study Project'),
'#size' => 300,
'#maxlength' => 350,
@@ -750,11 +750,6 @@ function cfd_case_study_proposal_edit_form($form, &$form_state)
'#default_value' => date('d/m/Y', $proposal_data->creation_date),
'#disabled' => TRUE,
);
- $form['expected_completion_date'] =array(
- '#type' => 'textfield',
- '#title' => t('Expected Date of Completion'),
- '#default_value' => date('d/m/Y', $proposal_data->expected_date_of_completion),
- );
$form['delete_proposal'] = array(
'#type' => 'checkbox',
'#title' => t('Delete Proposal')
@@ -819,7 +814,7 @@ function cfd_case_study_proposal_edit_form_submit($form, &$form_state)
);
if (!drupal_mail('case_study', 'case_study_proposal_deleted', $email_to, user_preferred_language($user), $params, $from, TRUE))
drupal_set_message('Error sending email message.', 'error');
- drupal_set_message(t('CaseStudy Cicuit simulation proposal has been deleted.'), 'status');
+ drupal_set_message(t('Case Study proposal has been deleted.'), 'status');
if (rrmdir_project($proposal_id) == TRUE)
{
$query = db_delete('case_study_proposal');
@@ -852,8 +847,7 @@ function cfd_case_study_proposal_edit_form_submit($form, &$form_state)
pincode=:pincode,
state=:state,
project_title=:project_title,
- directory_name=:directory_name,
- expected_date_of_completion=:expected_date_of_completion
+ directory_name=:directory_name
WHERE id=:proposal_id";
$args = array(
':name_title' => $v['name_title'],
@@ -864,7 +858,6 @@ function cfd_case_study_proposal_edit_form_submit($form, &$form_state)
':state' => $v['all_state'],
':project_title' => $project_title,
':directory_name' => $directory_name,
- ':expected_date_of_completion' => strtotime(date('d/m/Y',$v['expected_date_of_completion'])),
':proposal_id' => $proposal_id
);
$result = db_query($query, $args);
diff --git a/proposal.inc b/proposal.inc
index eb1c09b..8c22858 100755
--- a/proposal.inc
+++ b/proposal.inc
@@ -443,7 +443,7 @@ function cfd_case_study_proposal_form_submit($form, &$form_state)
$query_pro->fields('case_study_proposal');
//$query_pro->condition('id', $proposal_data->id);
$abstracts_pro = $query_pro->execute()->fetchObject();
- $proposal_id = $abstracts_pro->id;
+ $proposal_id = $query_pro->id;
$dest_path = $directory_name . '/';
$dest_path1 = $root_path . $dest_path;
if (!is_dir($root_path . $dest_path))
@@ -496,7 +496,7 @@ function cfd_case_study_proposal_form_submit($form, &$form_state)
":approvar_uid" => 0,
":filename" => $_FILES['files']['name'][$file_form_name],
":filepath" => $_FILES['files']['name'][$file_form_name],
- ":filemime" => mime_content_type($root_path . $dest_path . $_FILES['files']['name'][$file_form_name]),
+ ":filemime" => mime_content_type($root_path . $dest_path_project_files . $_FILES['files']['name'][$file_form_name]),
":filesize" => $_FILES['files']['size'][$file_form_name],
":filetype" => 'A',
":timestamp" => time()
diff --git a/run.inc b/run.inc
index c047b78..a8166f9 100755
--- a/run.inc
+++ b/run.inc
@@ -137,12 +137,6 @@ function _case_study_details($case_study_default_value)
{
$case_study_details = _case_study_information($case_study_default_value);
if ($case_study_default_value != 0) {
- if($case_study_details->reference != NULL){
- $url = '~(?:(https?)://([^\s<]+)|(www\.[^\s<]+?\.[^\s<]+))(?<![\.,:])~i';
- $reference = preg_replace($url, '<a href="$0" target="_blank" title="$0">$0</a>', $case_study_details->reference);
- }else{
- $reference = 'Not provided';
- }
$form['case_study_details']['#markup'] = '<span style="color: rgb(128, 0, 0);"><strong>About the case study</strong></span></td><td style="width: 35%;"><br />' . '<ul>' . '<li><strong>Proposer Name:</strong> ' . $case_study_details->name_title . ' ' . $case_study_details->contributor_name . '</li>' . '<li><strong>Title of the Flowhseet:</strong> ' . $case_study_details->project_title . '</li>' . '<li><strong>University:</strong> ' . $case_study_details->university . '</li>' . '</ul>';
$details = $form['case_study_details']['#markup'];
return $details;