From ded2973add27779689e6f4ebbeb7a23e67ad1245 Mon Sep 17 00:00:00 2001 From: Prashant P. Shah Date: Mon, 11 Jul 2011 12:06:57 +0530 Subject: added list of labs migrated Signed-off-by: Prashant P. Shah --- migrated_labs.inc | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 migrated_labs.inc (limited to 'migrated_labs.inc') diff --git a/migrated_labs.inc b/migrated_labs.inc new file mode 100644 index 0000000..334f2f8 --- /dev/null +++ b/migrated_labs.inc @@ -0,0 +1,36 @@ +id); + $problem_data = db_fetch_object($problem_q); + $file_links .= '
' . l('Problem Statment', $dl_root_path . $problem_data->filepath); + $sup_q = db_query("SELECT * FROM {lab_migration_files} WHERE link_id = %d AND filetype = 'S'", $labs_data->id); + $sup_data = db_fetch_object($sup_q); + if ($sup_data) + $file_links .= '
' . l('Suplementary Files', $dl_root_path . $sup_data->filepath); + + $labs_rows[] = array($labs_data->university, $labs_data->lab_title, $labs_data->problem_topic . $file_links, l($labs_data->name, 'user/' . $labs_data->uid) . '
' . $labs_data->department); + } + + /* check if there are any pending proposals */ + if (!$labs_rows) { + drupal_set_message(t('There are no lab migrations.'), 'status'); + return ''; + } + + $labs_header = array('University', 'Title of the Lab', 'Title of the Problem', 'Professor Name and Dept.'); + $output = theme_table($labs_header, $labs_rows); + return $output; +} + -- cgit