summaryrefslogtreecommitdiff
path: root/download.inc
diff options
context:
space:
mode:
authorSashi202024-07-25 16:23:34 +0530
committerSashi202024-07-25 16:23:34 +0530
commit060ae0aab14b523afaef9065410d648e404f8898 (patch)
treeb29755d0f5c17424106dd13a90017b3bf3862999 /download.inc
parent5dcd3c041774adf03b91def20a52f5ddc42d49dc (diff)
downloadcfd_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-xdownload.inc12
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);