diff options
author | Sashi20 | 2024-02-02 18:22:26 +0530 |
---|---|---|
committer | Sashi20 | 2024-02-02 18:22:26 +0530 |
commit | 5ba1b30e1b22af0750ec0eecb39a7c569b5c36e3 (patch) | |
tree | 276cba9eb27da0deb3434efb71173f34c88b4268 | |
parent | 9df9d0038d808c88540e3785a3d37d1dc7837d25 (diff) | |
download | cfd_hackathon_submissions-5ba1b30e1b22af0750ec0eecb39a7c569b5c36e3.tar.gz cfd_hackathon_submissions-5ba1b30e1b22af0750ec0eecb39a7c569b5c36e3.tar.bz2 cfd_hackathon_submissions-5ba1b30e1b22af0750ec0eecb39a7c569b5c36e3.zip |
Update hyperlinks to download upgraded reports and case files
-rw-r--r-- | cfd_hackathon_submissions.module | 16 | ||||
-rw-r--r-- | download.inc | 6 | ||||
-rw-r--r-- | run.inc | 8 |
3 files changed, 11 insertions, 19 deletions
diff --git a/cfd_hackathon_submissions.module b/cfd_hackathon_submissions.module index bceaafb..2163e2b 100644 --- a/cfd_hackathon_submissions.module +++ b/cfd_hackathon_submissions.module @@ -313,25 +313,15 @@ function cfd_hackathon_submissions_menu() 'file' => 'run.inc', ); $items['cfd-hackathon/download/upgraded-report'] = array( - 'title' => 'Download user defined compound file', - 'description' => 'Download Upgraded report file', - 'page callback' => 'cfd_hackathon_submissions_download_upgraded_report', + 'title' => 'Download Upgraded report', + 'description' => 'Download Upgraded report', + 'page callback' => 'cfd_hackathon_submissions_upgraded_report', 'access arguments' => array( 'download code', ), 'type' => MENU_CALLBACK, 'file' => 'download.inc', ); - $items['cfd-hackathon/download/project-title-file'] = array( - 'title' => 'Download Project Title file', - 'description' => 'Download Project Title file', - 'page callback' => 'download_case_study_project_title_files', - 'access arguments' => array( - 'download code', - ), - 'type' => MENU_CALLBACK, - 'file' => 'available_project_titles_list.inc', - ); $items['cfd-hackathon/download/project-files'] = array( 'title' => 'Download Project file', 'description' => 'Download project file', diff --git a/download.inc b/download.inc index 6b1ff51..5740571 100644 --- a/download.inc +++ b/download.inc @@ -65,8 +65,10 @@ function cfd_hackathon_submissions_project_files() } } -function cfd_case_study_project_files() { +function cfd_hackathon_submissions_upgraded_report() +{ $proposal_id = arg(3); + //var_dump($proposal_id);die; $root_path = cfd_hackathon_submissions_path(); $query = db_select('cfd_hackathon_submitted_abstracts_file'); $query->fields('cfd_hackathon_submitted_abstracts_file'); @@ -80,7 +82,7 @@ function cfd_case_study_project_files() { $result1 = $query1->execute(); $case_study = $result1->fetchObject(); $directory_name = $case_study->directory_name . '/'; - $abstract_file = $cfd_case_study_project_files->filename; + $abstract_file = $cfd_case_study_project_files->filepath; ob_clean(); header("Pragma: public"); header("Expires: 0"); @@ -56,15 +56,15 @@ function cfd_hackathon_project_details_callback($form, $form_state) { $commands = array(); $cfd_hackathon_default_value = $form_state['values']['cfd_hackathon']; - if ($cfd_hackathon_default_value != 0) { - $form['cfd_hackathon_details']['#markup'] = _cfd_hackathon_details($cfd_hackathon_default_value, $cfd_case_study_id); - $cfd_hackathon_details = _cfd_hackathon_information($cfd_hackathon_default_value); - $query = db_select('available_hackathon_project_titles'); + $cfd_hackathon_details = _cfd_hackathon_information($cfd_hackathon_default_value); + $query = db_select('available_hackathon_project_titles'); $query->fields('available_hackathon_project_titles'); $query->condition('project_title', $cfd_hackathon_details->project_title); $old_case_study_q = $query->execute(); $old_case_study_data = $old_case_study_q->fetchObject(); $cfd_case_study_id = $old_case_study_data->case_study_id; + if ($cfd_hackathon_default_value != 0) { + $form['cfd_hackathon_details']['#markup'] = _cfd_hackathon_details($cfd_hackathon_default_value, $cfd_case_study_id); $provider = user_load($cfd_hackathon_details->uid); if ($cfd_hackathon_details->uid > 0) { $commands[] = ajax_command_html('#ajax_selected_cfd_hackathon', l('Download Report of the Upgraded Case Study', "cfd-hackathon/download/upgraded-report/" . $cfd_hackathon_default_value) . '<br>' . l('Download Upgraded Case Files', 'cfd-hackathon/download/project-files/' . $cfd_hackathon_default_value) . '<br><br>' . l('Download the report of the Case Study', "https://cfd.fossee.in/case-study-project/download/project-file/" . $cfd_case_study_id) . '<br>' . l('Download Case Files of the Original Case Study', 'https://cfd.fossee.in/case-study-project/full-download/project/' . $cfd_case_study_id)); |