summaryrefslogtreecommitdiff
path: root/full_download.inc
diff options
context:
space:
mode:
authorprashant2015-10-13 17:01:50 +0530
committerprashant2015-10-13 17:01:50 +0530
commitd28032bb60d83635ab536f4adbcae60719604ec2 (patch)
tree01bed664acf49798da63c9c60c9588bae0c3ddb6 /full_download.inc
parent75bddee850f35be8d56740ba66b0d93d6dc6072c (diff)
downloadDWSIM_lab_migration-d28032bb60d83635ab536f4adbcae60719604ec2.tar.gz
DWSIM_lab_migration-d28032bb60d83635ab536f4adbcae60719604ec2.tar.bz2
DWSIM_lab_migration-d28032bb60d83635ab536f4adbcae60719604ec2.zip
changed existing folder structure and mail format for git implementation
Diffstat (limited to 'full_download.inc')
-rwxr-xr-xfull_download.inc9
1 files changed, 5 insertions, 4 deletions
diff --git a/full_download.inc b/full_download.inc
index 31527ca..9b8a617 100755
--- a/full_download.inc
+++ b/full_download.inc
@@ -134,10 +134,11 @@ function lab_migration_download_full_lab()
//$lab_q = db_query("SELECT * FROM {lab_migration_proposal} WHERE id = %d", $lab_id);
$query = db_select('lab_migration_proposal');
$query->fields('lab_migration_proposal');
+
$query->condition('id', $lab_id);
$lab_q = $query->execute();
$lab_data = $lab_q->fetchObject();
- $LAB_PATH = $lab_data->lab . '/';
+ $LAB_PATH = $lab_data->lab_title . '/';
/* zip filename */
$zip_filename = $root_path . 'zip-' . time() . '-' . rand(0, 999999) . '.zip';
@@ -176,7 +177,7 @@ function lab_migration_download_full_lab()
$solution_dependency_files_q = $query->execute();
while ($solution_files_row = $solution_files_q->fetchObject())
{
- $zip->addFile($root_path . $solution_files_row->filepath, $LAB_PATH . $APPROVE_PATH . $EXP_PATH . $CODE_PATH . $solution_files_row->filename);
+ $zip->addFile($root_path . $solution_files_row->filepath, $APPROVE_PATH . $EXP_PATH . $CODE_PATH . $solution_files_row->filename);
}
/* dependency files */
while ($solution_dependency_files_row = $solution_dependency_files_q->fetchObject())
@@ -188,7 +189,7 @@ function lab_migration_download_full_lab()
$query->range(0, 1);
$dependency_file_data = $query->execute()->fetchObject();
if ($dependency_file_data)
- $zip->addFile($root_path . $dependency_file_data->filepath, $LAB_PATH . $APPROVE_PATH . $EXP_PATH . $CODE_PATH . 'DEPENDENCIES/' . $dependency_file_data->filename);
+ $zip->addFile($root_path . $dependency_file_data->filepath, $APPROVE_PATH . $EXP_PATH . $CODE_PATH . 'DEPENDENCIES/' . $dependency_file_data->filename);
}
}
@@ -246,7 +247,7 @@ function lab_migration_download_full_lab()
unlink($zip_filename);
} else {
drupal_set_message("There are no solutions in this lab to download", 'error');
- drupal_goto('lab_migration/code_approval/bulk');
+ drupal_goto('lab-migration/code-approval/bulk');
}
}