From 00a11c30851071bdf071421f872c8d4b2478ced1 Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Tue, 24 Sep 2019 18:03:14 +0530 Subject: Add link to download lab codes in completed labs table --- lab_details.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lab_details.inc b/lab_details.inc index b04986e..93ebff7 100755 --- a/lab_details.inc +++ b/lab_details.inc @@ -22,7 +22,7 @@ function lab_migration_completed_labs_all() $preference_rows[] = array( $i, $row->university, - $row->lab_title, + l($row->lab_title, "lab-migration/lab-migration-run/" . $row->id), $completion_date ); $i++; -- cgit From e64c735a9177a66923ca748a0ae7373eedf5de1d Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Tue, 24 Sep 2019 18:10:00 +0530 Subject: Minor changes in download completed lab --- download.inc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/download.inc b/download.inc index dcd5608..e15819c 100755 --- a/download.inc +++ b/download.inc @@ -5,7 +5,7 @@ function lab_migration_download_solution_file() $solution_file_id = arg(3); $root_path = lab_migration_path(); // $solution_files_q = db_query("SELECT * FROM {lab_migration_solution_files} WHERE id = %d LIMIT 1", $solution_file_id); - $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id LIMIT 1", array(':solution_id' => $solution_file_id)); + $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.solution_id = :solution_id LIMIT 1", array(':solution_id' => $solution_file_id)); /*$query = db_select('lab_migration_solution_files'); $query->fields('lab_migration_solution_files'); $query->condition('id', $solution_file_id); @@ -55,7 +55,7 @@ function lab_migration_download_solution() $query->fields('lab_migration_solution_files'); $query->condition('solution_id', $solution_id); $solution_files_q = $query->execute();*/ - $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id", array(':solution_id' => $solution_id)); + $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.solution_id = :solution_id", array(':solution_id' => $solution_id)); //$solution_dependency_files_q = db_query("SELECT * FROM {lab_migration_solution_dependency} WHERE solution_id = %d", $solution_id); $query = db_select('lab_migration_solution_dependency'); $query->fields('lab_migration_solution_dependency'); @@ -213,7 +213,7 @@ function lab_migration_download_lab() $CODE_PATH = 'CODE' . $solution_row->code_number . '/'; //$solution_files_q = db_query("SELECT * FROM {lab_migration_solution_files} WHERE solution_id = %d", $solution_row->id); - $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id", array(':solution_id' => $solution_row->id)); + $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.solution_id = :solution_id", array(':solution_id' => $solution_row->id)); /*$query = db_select('lab_migration_solution_files'); $query->fields('lab_migration_solution_files'); $query->condition('solution_id', $solution_row->id); -- cgit From 432d12d3e01e376d4fee9ba7ff6a0da3b72d3bb8 Mon Sep 17 00:00:00 2001 From: Sashi20 Date: Tue, 24 Sep 2019 18:17:30 +0530 Subject: Modify query to download solution file --- download.inc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/download.inc b/download.inc index e15819c..cb5783c 100755 --- a/download.inc +++ b/download.inc @@ -5,7 +5,7 @@ function lab_migration_download_solution_file() $solution_file_id = arg(3); $root_path = lab_migration_path(); // $solution_files_q = db_query("SELECT * FROM {lab_migration_solution_files} WHERE id = %d LIMIT 1", $solution_file_id); - $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.solution_id = :solution_id LIMIT 1", array(':solution_id' => $solution_file_id)); + $solution_files_q = db_query("SELECT lmsf.*, lmp.directory_name FROM lab_migration_solution_files lmsf JOIN lab_migration_solution lms JOIN lab_migration_experiment lme JOIN lab_migration_proposal lmp WHERE lms.id = lmsf.solution_id AND lme.id = lms.experiment_id AND lmp.id = lme.proposal_id AND lmsf.id = :solution_id LIMIT 1", array(':solution_id' => $solution_file_id)); /*$query = db_select('lab_migration_solution_files'); $query->fields('lab_migration_solution_files'); $query->condition('id', $solution_file_id); -- cgit