From 643aea437d36eac961e9384a130eff81241cc754 Mon Sep 17 00:00:00 2001 From: akshay9085 Date: Tue, 5 Dec 2023 18:56:31 +0530 Subject: Change in the content --- lab_migration.module | 12 +++++++---- pdf/generate_pdf.inc | 57 +++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 51 insertions(+), 18 deletions(-) diff --git a/lab_migration.module b/lab_migration.module index d3d2235..2ec2172 100755 --- a/lab_migration.module +++ b/lab_migration.module @@ -1011,6 +1011,7 @@ function lab_migration_certificate_form($form, $form_state) $form['semester_details'] = array( '#type' => 'textfield', '#title' => t('Semester details'), + '#description' => 'Eg. V or II', '#required' => TRUE ); $form['proposal_id'] = array( @@ -1031,7 +1032,7 @@ function lab_migration_certificate_form_submit($form, &$form_state) $v = $form_state["values"]; $result = "INSERT INTO {lab_migration_certificate} (uid, name_title, name, email_id, institute_name, institute_address, lab_name, department, semester_details,proposal_id,type,creation_date) VALUES - (:uid, :name_title, :name, :email_id, :institute_name, :institute_address, :lab_name, :department, :semester_details,:proposal_id,:type,:creation_date)"; + (:uid, :name_title, :name, :email_id, :institute_name, :institute_address, :lab_name, :department, :semester_details,:proposal_id,:type,:creation_date)"; $args = array( ":uid" => $user->uid, ":name_title" => trim($v['name_title']), @@ -1112,7 +1113,8 @@ function lab_migration_certificate_edit_form($form, $form_state) ); $form['semester_details'] = array( '#type' => 'textfield', - '#title' => t('Semester details'), + '#title' => t('Semester details '), + '#description' => 'Eg.V or II', '#default_value' => $details_list->semester_details ); $form['proposal_id'] = array( @@ -1233,7 +1235,8 @@ function lab_migration_certificate_participation_form($form, $form_state) ); $form['semester_details'] = array( '#type' => 'textfield', - '#title' => t('Semester details'), + '#title' => t('Semester details and department'), + '#description' => 'Eg. V or II', '#required' => TRUE ); $form['proposal_id'] = array( @@ -1333,7 +1336,8 @@ function lab_migration_certificate_participation_edit_form($form, $form_state) ); $form['semester_details'] = array( '#type' => 'textfield', - '#title' => t('Semester details'), + '#title' => t('Semester details and department'), + '#description' => 'Eg. V or II', '#default_value' => $details_list->semester_details ); $form['proposal_id'] = array( diff --git a/pdf/generate_pdf.inc b/pdf/generate_pdf.inc index e6990cc..14e3cbd 100755 --- a/pdf/generate_pdf.inc +++ b/pdf/generate_pdf.inc @@ -49,6 +49,16 @@ function generate_lm_pdf() // // under the supervision/guidance of // $pdf->Cell(320, 10, 'This is to certify that' . $data3->name_title . ' ' . $data3->name . ',', '0', 1, 'C'); + + // $pdf->SetFont('Times', 'I', 18); + // $pdf->SetTextColor(0, 0, 0); + // $pdf->Cell(115); + // $pdf->Cell(40, 10, 'This is to certify that', 0, 0, 'C'); + // $pdf->Cell(2); + // $pdf->SetFont('Times', 'BI', 18); + // $pdf->SetTextColor(37, 22, 247); + // $pdf->Cell(60, 10, $data3->name_title . ' ' . $data3->name, 0, 1, 'C'); + $pdf->SetFont('Times', 'BI', 18); $pdf->SetTextColor(0, 0, 0); $pdf->Cell(320, 10, 'This is to certify that', '0', '1', 'C'); @@ -58,30 +68,30 @@ function generate_lm_pdf() $pdf->SetTextColor(37, 22, 247); $pdf->Cell(320, 10, $data3->name_title . ' ' . $data3->name, '0', '1', 'C'); $pdf->Ln(0); - $pdf->SetTextColor(139, 69, 19); + $pdf->SetTextColor(0, 0, 0); $pdf->Ln(2); - $pdf->Cell(320, 10, 'from the ' . $data3->department . ',', '0', 1, 'C'); + $pdf->Cell(320, 10, 'from the ' . $data3->department . ' department,', '0', 1, 'C'); $pdf->Ln(0); $pdf->SetFont('Times', 'BI', 18); $pdf->SetTextColor(37, 22, 247); $pdf->Cell(320, 10, $data3->institute_name , '0', 1, 'C'); - $pdf->Cell(320, 10, $data3->institute_address, '0', 1, 'C'); + // $pdf->Cell(320, 10, $data3->institute_address, '0', 1, 'C'); $pdf->Ln(2); $pdf->SetFont('Times', 'BI', 18); $pdf->SetTextColor(0, 0, 0); - $pdf->Cell(320, 10, ' has successfully migrated the ', '0', '1', 'C'); + $pdf->Cell(320, 10, ' has helped migrate the ', '0', '1', 'C'); $pdf->Ln(0); $pdf->SetTextColor(37, 22, 247); - $pdf->Cell(320, 10, $data3->lab_name, '0', '1', 'C'); - //$pdf->Ln(0); - //$pdf->SetTextColor(0,0,0); - //$pdf->Cell(240,8,'in ', '0','1','C'); + $pdf->Cell(320, 10, $data3->lab_name , '0', '1', 'C'); + $pdf->Ln(0); + // $pdf->SetTextColor(0,0,0); + // $pdf->Cell(240,8,'in ', '0','1','C'); $pdf->Ln(0); $pdf->SetTextColor(139, 69, 19); - $pdf->Cell(320, 10, '(' . $data3->semester_details . ')', '0', '1', 'C'); + $pdf->Cell(320, 10,'of the semester '. $data3->semester_details . ' for ' . $data3->department. ' students', '0', '1', 'C'); $pdf->Ln(0); $pdf->SetTextColor(0, 0, 0); - $pdf->Cell(320, 10, 'to a CFD-only lab.', '0', '1', 'C'); + $pdf->Cell(320, 10, 'to an OpenFOAM lab only.', '0', '1', 'C'); $pdf->Ln(0); //$proposal_get_id=0; $UniqueString = ""; @@ -234,15 +244,32 @@ function generate_lm_pdf() $path = drupal_get_path('module', 'lab_migration'); //$image1 = $mpath . "/pdf/images/scilab.png"; $pdf->Ln(30); + + + + // $pdf->SetFont('Times', 'I', 18); + // $pdf->SetTextColor(0, 0, 0); + // $pdf->Cell(115); + // $pdf->Cell(40, 10, 'This is to certify that', 0, 0, 'C'); + // $pdf->Cell(2); + // $pdf->SetFont('Times', 'BI', 18); + // $pdf->SetTextColor(37, 22, 247); + // $pdf->Cell(60, 10, $data3->name_title . ' ' . $data3->name, 0, 1, 'C'); + + + //$pdf->Cell(200, 8, $pdf->Image($image1, 100, 19, 0, 28), 0, 1, 'C'); // $pdf->Ln(35); /*$pdf->SetFont('Times', 'BI', 25); $pdf->SetTextColor(139, 69, 19); $pdf->Cell(240, 8, 'Certificate of Participation', '0', 1, 'C'); $pdf->Ln(3);*/ + $pdf->SetFont('Times', 'I', 18); $pdf->SetTextColor(0, 0, 0); + // $data3->SetTextColor(37, 22, 247); $pdf->Cell(320, 10, 'This is to certify that', '0', '1', 'C'); + $pdf->Ln(0); $pdf->SetFont('Times', 'BI', 18); $pdf->SetTextColor(37, 22, 247); @@ -254,19 +281,21 @@ function generate_lm_pdf() $pdf->Ln(0); $pdf->SetTextColor(37, 22, 247); $pdf->Cell(320, 10, $data3->institute_name , '0', 1, 'C'); - $pdf->Cell(320, 10, $data3->institute_address, '0', 1, 'C'); + // $pdf->Cell(320, 10, $data3->institute_address, '0', 1, 'C'); $pdf->Ln(0); $pdf->SetTextColor(0, 0, 0); - $pdf->Cell(320, 10, ' has developed the solutions in CFD for the ', '0', 1, 'C'); + $pdf->Cell(320, 10, ' has developed the solutions in CFD for the course', '0', 1, 'C'); $pdf->Ln(0); $pdf->SetTextColor(37, 22, 247); - $pdf->Cell(320, 10, $data3->lab_name, '0', '1', 'C'); + $pdf->Cell(320, 10, $data3->lab_name. ',', '0', '1', 'C'); //$pdf->Ln(0); //$pdf->SetTextColor(0,0,0); //$pdf->Cell(240,8,'in ', '0','1','C'); $pdf->Ln(0); + $pdf->SetTextColor(0, 0, 0); + $pdf->Cell(320, 10, ' Which is offered in the ', '0', 1, 'C'); $pdf->SetTextColor(139, 69, 19); - $pdf->Cell(320, 10, '(' . $data3->semester_details . ')'. '.', '0', '1', 'C'); + $pdf->Cell(320, 10, 'semester ' . $data3->semester_details . ' for '. $data3->department. ' students.', '0', '1', 'C'); $pdf->Ln(4); // $pdf->Ln(0); // $pdf->Cell(320, 10, '', '0', '1', 'C'); -- cgit