diff options
author | Sashi20 | 2024-07-25 16:23:34 +0530 |
---|---|---|
committer | Sashi20 | 2024-07-25 16:23:34 +0530 |
commit | 060ae0aab14b523afaef9065410d648e404f8898 (patch) | |
tree | b29755d0f5c17424106dd13a90017b3bf3862999 /download.inc | |
parent | 5dcd3c041774adf03b91def20a52f5ddc42d49dc (diff) | |
download | cfd_lab_migration-060ae0aab14b523afaef9065410d648e404f8898.tar.gz cfd_lab_migration-060ae0aab14b523afaef9065410d648e404f8898.tar.bz2 cfd_lab_migration-060ae0aab14b523afaef9065410d648e404f8898.zip |
Add field for problem statement in proposal, display list of expirements from completed labs page
Diffstat (limited to 'download.inc')
-rwxr-xr-x | download.inc | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/download.inc b/download.inc index f16cf0f..821025b 100755 --- a/download.inc +++ b/download.inc @@ -18,6 +18,18 @@ function lab_migration_download_solution_file() header('Content-Length: ' . filesize($root_path . $solution_file_data->directory_name . '/' . $solution_file_data->filepath)); readfile($root_path . $solution_file_data->directory_name . '/' . $solution_file_data->filepath); } + function lab_migration_download_problem_statement() + { + $proposal_id = arg(3); + $root_path = lab_migration_path(); + $proposal_q = db_query("SELECT lmp.* FROM lab_migration_proposal lmp WHERE lmp.id = :proposal_id LIMIT 1", array(':proposal_id' => $proposal_id)); + $proposal_data = $proposal_q->fetchObject(); + header('Content-Type: doc'); + //header('Content-Type: application/octet-stram'); + header('Content-disposition: attachment; filename="' . str_replace(' ', '_', ($proposal_data->problem_statement_file)) . '"'); + header('Content-Length: ' . filesize($root_path . $proposal_data->directory_name . '/' . $proposal_data->problem_statement_file)); + readfile($root_path . $proposal_data->directory_name . '/' . $proposal_data->problem_statement_file); + } function lab_migration_download_dependency_file() { $dependency_file_id = arg(3); |