diff options
-rwxr-xr-x | dependency.inc | 2 | ||||
-rwxr-xr-x[-rw-r--r--] | email.inc | 10 | ||||
-rwxr-xr-x | lab_migration.install | 46 | ||||
-rwxr-xr-x | lab_migration.module | 2 | ||||
-rwxr-xr-x | latex.inc | 3 | ||||
-rwxr-xr-x | manage_proposal.inc | 12 | ||||
-rwxr-xr-x | manage_solution_proposal.inc | 2 | ||||
-rwxr-xr-x | proposal.inc | 4 | ||||
-rwxr-xr-x | solution_proposal.inc | 2 | ||||
-rwxr-xr-x | upload_code.inc | 2 |
10 files changed, 65 insertions, 20 deletions
diff --git a/dependency.inc b/dependency.inc index 9343f46..a8aaaf0 100755 --- a/dependency.inc +++ b/dependency.inc @@ -151,7 +151,7 @@ function upload_dependency_form_submit($form, &$form_state) { $dependency_names[] = $_FILES['files']['name'][$file_form_name]; $file_upload_counter++; } else { - drupal_set_message('Error uploading dependency : ' . $dest_path . '/' . $_FILES['files']['name'][$file_form_name], 'error'); + drupal_set_message('Error uploading dependency : ' . $dest_path . $_FILES['files']['name'][$file_form_name], 'error'); } } } diff --git a/email.inc b/email.inc index cdee979..2ee24bd 100644..100755 --- a/email.inc +++ b/email.inc @@ -47,7 +47,7 @@ We have received your following Lab migration proposal: Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->name . ' Email : ' . $user_data->mail . ' -Contact Phone : ' . $proposal_data->contact_ph . ' +Contact No. : ' . $proposal_data->contact_ph . ' Department/Branch : ' . $proposal_data->department . ' University/Institute : ' . $proposal_data->university . ' @@ -104,7 +104,7 @@ Reason for disapproval: ' . $proposal_data->message . ' Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->name . ' Email : ' . $user_data->mail . ' -Contact Phone : ' . $proposal_data->contact_ph . ' +Contact No. : ' . $proposal_data->contact_ph . ' Department/Branch : ' . $proposal_data->department . ' University/Institute : ' . $proposal_data->university . ' @@ -157,7 +157,7 @@ Your following Lab migration proposal has been approved: Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->name . ' Email : ' . $user_data->mail . ' -Contact Phone : ' . $proposal_data->contact_ph . ' +Contact No. : ' . $proposal_data->contact_ph . ' Department/Branch : ' . $proposal_data->department . ' University/Institute : ' . $proposal_data->university . ' @@ -213,7 +213,7 @@ Following Lab migration has been completed sucessfully : Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->name . ' Email : ' . $user_data->mail . ' -Contact Phone : ' . $proposal_data->contact_ph . ' +Contact No. : ' . $proposal_data->contact_ph . ' Department/Branch : ' . $proposal_data->department . ' University/Institute : ' . $proposal_data->university . ' @@ -264,7 +264,7 @@ We have received your proposal for solution for following Lab migration : Full Name : ' . $proposal_data->name_title . ' ' . $proposal_data->name . ' Email : ' . $user_data->mail . ' -Contact Phone : ' . $proposal_data->contact_ph . ' +Contact No. : ' . $proposal_data->contact_ph . ' Department/Branch : ' . $proposal_data->department . ' University/Institute : ' . $proposal_data->university . ' diff --git a/lab_migration.install b/lab_migration.install index 8bdad94..6589a42 100755 --- a/lab_migration.install +++ b/lab_migration.install @@ -13,6 +13,15 @@ function lab_migration_install() { variable_set('lab_migration_dependency_extensions', ''); variable_set('lab_migration_result_extensions', ''); variable_set('lab_migration_xcos_extensions', ''); + + // create uploads folder + $upload_path = $_SERVER['DOCUMENT_ROOT'] . base_path() . 'lab_migration_uploads'; + if (!is_dir($upload_path)) + mkdir($upload_path); + if (!is_dir($upload_path . '/latex')) + mkdir($upload_path . '/latex'); + if (!is_dir($upload_path . '/DEPENDENCIES')) + mkdir($upload_path . '/DEPENDENCIES'); } /** @@ -35,7 +44,7 @@ function lab_migration_uninstall() { */ function lab_migration_schema() { - /* proposal */ + /* proposal */ $schema['lab_migration_proposal'] = array( 'description' => t('TODO: please describe this table!'), 'fields' => array( @@ -130,12 +139,47 @@ function lab_migration_schema() { 'type' => 'int', 'not null' => TRUE, ), + 'expected_completion_date' => array( + 'description' => t('TODO: please describe this field!'), + 'type' => 'int', + 'not null' => TRUE, + ), 'message' => array( 'description' => t('TODO: please describe this field!'), 'type' => 'text', 'size' => 'medium', 'not null' => TRUE, ), + 'solution_provider_name_title' => array( + 'description' => t('TODO: please describe this field!'), + 'type' => 'varchar', + 'length' => '5', + 'not null' => TRUE, + ), + 'solution_provider_name' => array( + 'description' => t('TODO: please describe this field!'), + 'type' => 'varchar', + 'length' => '255', + 'not null' => TRUE, + ), + 'solution_provider_contact_ph' => array( + 'description' => t('TODO: please describe this field!'), + 'type' => 'varchar', + 'length' => '15', + 'not null' => TRUE, + ), + 'solution_provider_department' => array( + 'description' => t('TODO: please describe this field!'), + 'type' => 'varchar', + 'length' => '255', + 'not null' => TRUE, + ), + 'solution_provider_university' => array( + 'description' => t('TODO: please describe this field!'), + 'type' => 'varchar', + 'length' => '255', + 'not null' => TRUE, + ), ), 'primary key' => array('id'), ); diff --git a/lab_migration.module b/lab_migration.module index b3bde09..2117482 100755 --- a/lab_migration.module +++ b/lab_migration.module @@ -426,7 +426,7 @@ function check_code_number($number = '') { } function lab_migration_path() { - return $_SERVER['DOCUMENT_ROOT'] . base_path() . 'lab_migration/uploads/'; + return $_SERVER['DOCUMENT_ROOT'] . base_path() . 'lab_migration_uploads/'; } /************************* USER VERIFICATION FUNCTIONS ************************/ @@ -193,8 +193,7 @@ function _latex_run_script($lab_filename, $solution_provider_filename, $latex_fi { $root_path = lab_migration_path(); $ret = 0; - chdir("lab_migration"); - chdir("uploads"); + chdir("lab_migration_uploads"); chdir("latex"); $sh_command = "./pdf_creator.sh " . $lab_filename . " " . $solution_provider_filename . " " . $latex_filename . " " . $latex_dep_filename; diff --git a/manage_proposal.inc b/manage_proposal.inc index 4a72198..50fa39f 100755 --- a/manage_proposal.inc +++ b/manage_proposal.inc @@ -30,7 +30,7 @@ function _proposal_pending_solution() $pending_q = db_query("SELECT * FROM {lab_migration_proposal} WHERE approval_status = 1 ORDER BY id DESC"); while ($pending_data = db_fetch_object($pending_q)) { - $pending_rows[$pending_data->id] = array(date('d-m-Y', $pending_data->creation_date), l($pending_data->name, 'user/' . $pending_data->uid), $pending_data->lab_title, $pending_data->department, l('Status', 'lab_migration/manage_proposal/status/' . $pending_data->id)); + $pending_rows[$pending_data->id] = array(date('d-m-Y', $pending_data->creation_date), date('d-m-Y', $pending_data->approval_date), l($pending_data->name, 'user/' . $pending_data->uid), $pending_data->lab_title, $pending_data->department, l('Status', 'lab_migration/manage_proposal/status/' . $pending_data->id)); } /* check if there are any pending proposals */ @@ -40,7 +40,7 @@ function _proposal_pending_solution() return ''; } - $pending_header = array('Date of Submission', 'Name', 'Title of the Lab', 'Department', 'Action'); + $pending_header = array('Date of Submission', 'Date of Approval', 'Name', 'Title of the Lab', 'Department', 'Action'); $output = theme_table($pending_header, $pending_rows); return $output; } @@ -149,7 +149,7 @@ function proposal_approval_form($form_state) $form['contact_ph'] = array( '#type' => 'item', '#value' => $proposal_data->contact_ph, - '#title' => t('Contact Phone No.'), + '#title' => t('Contact No.'), ); $form['department'] = array( '#type' => 'item', @@ -333,7 +333,7 @@ function proposal_status_form($form_state) $form['contact_ph'] = array( '#type' => 'item', '#value' => $proposal_data->contact_ph, - '#title' => t('Contact Phone No.'), + '#title' => t('Contact No.'), ); $form['department'] = array( '#type' => 'item', @@ -541,7 +541,7 @@ function proposal_edit_form($form_state) ); $form['contact_ph'] = array( '#type' => 'textfield', - '#title' => t('Contact Phone No.'), + '#title' => t('Contact No.'), '#size' => 30, '#maxlength' => 15, '#required' => TRUE, @@ -812,7 +812,7 @@ function category_edit_form($form_state) $form['contact_ph'] = array( '#type' => 'item', '#value' => $proposal_data->contact_ph, - '#title' => t('Contact Phone No.'), + '#title' => t('Contact No.'), ); $form['department'] = array( '#type' => 'item', diff --git a/manage_solution_proposal.inc b/manage_solution_proposal.inc index f6acbd7..09c23a8 100755 --- a/manage_solution_proposal.inc +++ b/manage_solution_proposal.inc @@ -63,7 +63,7 @@ function solution_proposal_approval_form($form_state) $form['contact_ph'] = array( '#type' => 'item', '#value' => $proposal_data->contact_ph, - '#title' => t('Contact Phone No.'), + '#title' => t('Contact No.'), ); $form['department'] = array( '#type' => 'item', diff --git a/proposal.inc b/proposal.inc index 44e6435..8be96e8 100755 --- a/proposal.inc +++ b/proposal.inc @@ -62,7 +62,7 @@ function lab_migration_proposal_form($form_state) ); $form['contact_ph'] = array( '#type' => 'textfield', - '#title' => t('Contact Phone No.'), + '#title' => t('Contact No.'), '#size' => 30, '#maxlength' => 15, '#required' => TRUE, @@ -114,6 +114,7 @@ function lab_migration_proposal_form($form_state) '#options' => array('1' => 'Yes', '2' => 'No'), '#required' => TRUE, '#default_value' => '1', + '#description' => 'If you dont want to provide the solution then it will be opened for the community, anyone may come forward and provide the solution.', ); $form['solution_display'] = array( @@ -122,6 +123,7 @@ function lab_migration_proposal_form($form_state) '#options' => array('1' => 'Yes', '2' => 'No'), '#required' => TRUE, '#default_value' => '1', + '#description' => 'If yes, solutions will be made available to everyone for downloading.', ); $form['submit'] = array( diff --git a/solution_proposal.inc b/solution_proposal.inc index 04c473e..3ddb024 100755 --- a/solution_proposal.inc +++ b/solution_proposal.inc @@ -76,7 +76,7 @@ function lab_migration_solution_proposal_form($form_state) ); $form['solution_provider_contact_ph'] = array( '#type' => 'textfield', - '#title' => t('Contact Phone No.'), + '#title' => t('Contact No.'), '#size' => 30, '#maxlength' => 15, '#required' => TRUE, diff --git a/upload_code.inc b/upload_code.inc index 71bb8c8..6b79fad 100755 --- a/upload_code.inc +++ b/upload_code.inc @@ -475,7 +475,7 @@ function upload_code_form_submit($form, &$form_state) { ); drupal_set_message($file_name . ' uploaded successfully.', 'status'); } else { - drupal_set_message('Error uploading file : ' . $dest_path . '/' . $file_name, 'error'); + drupal_set_message('Error uploading file : ' . $dest_path . $file_name, 'error'); } } } |