id);
$problem_data = db_fetch_object($problem_q);
$file_links .= '
' . l('Problem Statement', $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);
$migration_status = '';
if ($labs_data->solution_status == 0) {
$migration_status = 'In Progress';
} else if ($labs_data->solution_status == 1) {
$migration_status = 'Migrated';
if (($user->uid == $labs_data->uid) || user_access('manage proposal')) {
$sol_q = db_query("SELECT * FROM {lab_migration_files} WHERE link_id = %d AND filetype = 'A'", $labs_data->id);
$sol_data = db_fetch_object($sol_q);
$file_links .= '
' . l('Solution File', $dl_root_path . $sol_data->filepath);
}
}
$labs_rows[] = array($labs_data->university, $labs_data->lab_title, $labs_data->problem_topic . $file_links, l($labs_data->name_title . ' ' . $labs_data->name, 'user/' . $labs_data->uid) . '
' . $labs_data->department, $migration_status);
}
/* check if there are any pending proposals */
//if (!$labs_rows) {
// drupal_set_message(t('There are no lab migrations.'), 'status');
// return '';
//}
$output = "
Labs Migration Project: Do you want to shift your labs from MATLAB to Scilab?
Please get in touch with us at contact@scilab.in and we will help you.
Here are some previous labs that we have shifted from MATLAB to Scilab:
If you are a teacher and want access to the codes, please get in touch with us at contact@scilab.in from your official email ID.
"; $labs_header = array('University/Institute', 'Title of the Lab', 'Title of the Problem', 'Name of the Proposer and Department', 'Status'); $output .= theme_table($labs_header, $labs_rows); return $output; }