public static function UserTable(array $params) { extract($params); /** * @var array $columns * @var array $fields * @var array $dataProvider * @var string $actions * @var string $align * @var string $tableName * @var bool $autoNumeric * @var string $id * @var string $nivel * @var string $controller */ $align = isset($align) ? $align : 'left'; $actions = isset($actions) ? $actions : ''; $controller = isset($controller) ? $controller : ''; $autoNumeric = isset($autoNumeric) ? $autoNumeric : false; $view = strrchr($actions, 'v'); $update = strrchr($actions, 'u'); $delete = strrchr($actions, 'd'); $print = strrchr($actions, 'p'); $check = strrchr($actions, 'c'); $radio = strrchr($actions, 'r'); $action = $delete || $update || $view || $print || $check || $radio; $table = '<table id="tabla" style="text-align:' . $align . '" data-name="' . $tableName . '" class="table table-bordered table-striped"><thead><tr>'; if ($autoNumeric) { $c = 0; $table .= '<th style="width: 20px;">#</th>'; } foreach ($columns as $columnName => $value) { if (!is_numeric($columnName)) { $table .= '<th style="' . (isset($value['style']) ? $value['style'] : '') . ';text-align:' . $align . '">' . $columnName . '</th>'; } else { $table .= '<th style="text-align:' . $align . '">' . $value . '</th>'; } } if ($action) { $table .= '<th style="">Acciones</th>'; } $table .= '</tr></thead><tbody>'; foreach ($dataProvider as $data) { $back = $data['NIVEL'] == 2 ? "style='background: rgba(0, 0, 255, 0.11)'" : ''; $table .= "<tr {$back}>"; if ($autoNumeric) { $table .= '<td>' . ++$c . '</td>'; } foreach ($fields as $key => $value) { if (!is_numeric($key)) { if (is_array($value)) { switch ($value['type']) { case 'img': #Represents a image $table .= '<td><img class="img-circle" style="height: 25px;width: 25px;" src="' . $value['path'] . '/' . $data[$key] . '"></td>'; break; } } else { switch ($value) { #Represents a moment helper case 'moment': $table .= '<td>' . Momento($data[$key]) . '</td>'; break; #Represents a date with the helper #Represents a date with the helper case 'date': $table .= '<td>' . date_format(new DateTime($data[$key]), 'd/m/Y') . '</td>'; break; #Represents a number format #Represents a number format case 'numeric': $table .= '<td>' . number_format($data[$key], 0, '', ',') . '</td>'; break; #Represents a phone number #Represents a phone number case 'phone': $table .= '<td>' . Telefono($data[$key]) . '</td>'; break; #Periodo académico (Campo particular) #Periodo académico (Campo particular) case 'periodo': $table .= '<td>' . date('Y-', strtotime($data[$key])) . (date('m', strtotime($data[$key])) > 6 ? 2 : 1) . '</td>'; break; } } } else { //var_dump($data[$value]);exit; $table .= '<td>' . $data[$value] . '</td>'; } } if ($action) { $table .= '<td>'; $kview = $controller . '/ver' . $tableName; $kupdate = $controller . '/actualizar' . $tableName; $kprint = $controller . '/imprimir' . $tableName; $keys = ''; if (is_array($id)) { foreach ($id as $ikey => $ids) { if (!is_numeric($ids)) { $keys .= '/' . $data[$ids]; } else { $keys .= '/' . $ids; } } } else { $keys .= '/' . $data[$id]; } //var_dump($keys);exit; if ($view) { $table .= '<a href="' . site_url($kview . $keys) . '" style="font-size:20pt;color: #29a84b" class="fa fa-eye" target="_blank" data-toggle="tooltip" title="Ver más..."></a> '; } if ($print) { $table .= '<a href="' . site_url($kprint . $keys) . '" style="font-size:20pt;color: black" target="_blank" class="fa fa-print" data-toggle="tooltip" title="Imprimir"></a> '; } if ($update && ($data['NIVEL'] != 2 || $nivel)) { $table .= '<a href="' . site_url($kupdate . $keys) . '" target="_blank" style="font-size:20pt;color: #0065c3" class="fa fa-pencil" data-toggle="tooltip" title="Editar"></a> '; } if ($delete && $nivel && $data['NIVEL'] != 2) { $table .= " <a data-id='{$data[$id]}' style='color:#e54040;font-size:20pt;' class='fa fa-trash-o' data-toggle='tooltip' title='Eliminar'></a>"; } ###Check### if ($check) { $table .= "<input type='checkbox' value='" . $data[$id] . "' checked>"; } ###Radio### if ($radio) { $table .= "<input type='radio' name='RADIO' value='" . $data[$id] . "' checked>"; } $table .= '</td>'; } $table .= '</tr>'; } $table .= '</tbody></table>'; return $table; }
<!-- /.widget-user --> </div> <!-- /.col --> </div> <br> <?php echo form_input(['readonly' => true, 'input' => ['col' => 7], 'label' => ['text' => 'Correo']], $Info->CORREO); ?> <?php echo form_input(['readonly' => true, 'input' => ['col' => 7], 'label' => ['text' => 'Documento']], number_format($Info->DOCUMENTO, 0, '', ',')); ?> <?php echo form_input(['readonly' => true, 'input' => ['col' => 7], 'label' => ['text' => 'Teléfono']], Telefono($Info->TELEFONO)); ?> <?php echo form_input(['readonly' => true, 'input' => ['col' => 7], 'label' => ['text' => 'Celular']], Telefono($Info->CELULAR)); ?> <?php echo br(2); ?> <div class="box"> <div class="box-header bg-gray"> <h3 style="color:#7d7d80;text-align: center"><span class="fa fa-group"></span> Practicantes </h3> </div> <div class="box-body"> <?php echo Component::Table(['columns' => ['Nombre', 'Proyecto', 'Agencia'], 'tableName' => 'practicante', 'autoNumeric' => true, 'id' => 'ID_PRACTICANTE', 'controller' => 'practicantes', 'fields' => ['NOMBRE_PRACTICANTE', 'NOMBRE_PROYECTO', 'NOMBRE_AGENCIA'], 'dataProvider' => $this->practicantes_model->TraePracticantes($Info->ID_USUARIO), 'actions' => 'uv']); ?> </div>
echo form_input(['class' => 'obligatorio', 'readonly' => true, 'label' => ['text' => 'Nombre']], $Info->NOMBRE_AGENCIA); ?> <?php echo form_input(['class' => 'correo', 'readonly' => true, 'label' => ['text' => 'Correo']], $Info->CORREO_AGENCIA); ?> <?php echo select_input(['select' => $Ciudades, 'text' => 'Ciudad']); ?> <?php echo form_input(['class' => 'obligatorio', 'readonly' => true, 'label' => ['text' => 'Dirección']], $Info->DIRECCION); ?> <?php echo form_input(['readonly' => true, 'label' => ['text' => 'Teléfono']], Telefono($Info->TELEFONO1)); ?> <?php echo form_input(['class' => '', 'readonly' => true, 'label' => ['text' => 'Teléfono#2']], Telefono($Info->TELEFONO2)); ?> <?php echo form_input(['class' => '', 'readonly' => true, 'label' => ['text' => 'Fax']], $Info->FAX); ?> <div class='form-group'> <label for='$name' class='col-lg-2 control-label'>Página</label> <div class='col-lg-10'> <a target="_blank" class="btn-link" href="http://<?php echo str_replace('https', '', str_replace('http', '', str_replace('://', '', $Info->PAGINA_WEB))); ?> "><b><?php echo $Info->PAGINA_WEB; ?> </b></a> </div>
private function ImprimeSeguimientoPractica() { $this->load->library('fpdf/pdf'); $pdf = new PDF('L'); $Practicante = $this->practicantes_model->TraePracticante($this->input->post('ID_PRACTICANTE')); $Agencia = $this->agencias_model->TraeAgencia($Practicante->ID_AGENCIA); $Epracticante = $this->seguimientos_model->TraeEvaluacionEstudiante($Practicante->ID_PRACTICANTE); $pdf->AddPage(); $pdf->Image(base_url('public/images/logo.jpg'), 20, 10, 40, 10); #ENCABEZADO $pdf->SetFont('Arial', 'B', 9); $pdf->Text(260, 20, 'DO-075-F'); $pdf->Text(80, 25, 'FACULTAD DE CIENCIAS EMPRESARIALES Y FACULTAD DE INGENIERÍAS'); $pdf->Text(97, 30, 'FORMATO SEGUIMIENTO A ESTUDIANTES EN PRÁCTICA'); $pdf->Text(110, 38, 'PROGRAMA: INGENIERÍA DE SISTEMAS'); #Fields $h = 6; $f = 0; $c = 45; $x = 12; $pdf->Rect(10, 45, 280, 150); $pdf->Rect(10, 45, 280, 54); $pdf->Rect(10, 45, 135, 54); $pdf->Rect(10, 45, 280, 78); $pdf->Rect(10, 45, 280, 100); ##############Información Practicante############ $pdf->SetFont('Arial', 'B', 8); $pdf->Text($x, $c + $h * ++$f, 'Información del practicante'); $pdf->SetFont('Arial', '', 8); $pdf->Text($x, $c + $h * ++$f, 'Nombre: ' . $Practicante->NOMBRE_PRACTICANTE); $pdf->Text($x + 65, $c + $h * $f, 'Código: ' . $Practicante->CODIGO); $pdf->Text($x, $c + $h * ++$f, 'Programa: ' . $Practicante->PROGRAMA); $pdf->Text($x, $c + $h * ++$f, 'Modalidad de práctica: ' . $Practicante->MODALIDAD); $pdf->Text($x, $c + $h * ++$f, 'Teléfono: ' . Telefono($Practicante->TELEFONO)); $pdf->Text($x, $c + $h * ++$f, 'Cargo o proyecto del practicante: ' . $Practicante->NOMBRE_PROYECTO); $f++; $pdf->Text($x, $c + $h * ++$f, 'Asesor de práctica: ' . $Practicante->NOMBRE_ASESOR); #############Información Agencia############### $r = 0; $pdf->SetFont('Arial', 'B', 8); $pdf->Text($x + 135, $c + $h * ++$r, 'Información de la empresa'); $pdf->SetFont('Arial', '', 8); $pdf->Text($x + 135, $c + $h * ++$r, 'Empresa: ' . $Agencia->NOMBRE_AGENCIA); $h = 5; $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'Ciudad-país: ' . ucfirst(strtolower($Agencia->NOMBRE_CUIDAD)) . ', Colombia'); $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'Dirección: ' . $Agencia->DIRECCION); $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'Teléfonos: ' . Telefono($Agencia->TELEFONO1) . ' ' . Telefono($Agencia->TELEFONO2)); $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'Fax: ' . Telefono($Agencia->FAX)); $pdf->Text($x + 170, 2 + $c + $h * $r, 'E-mail: ' . $Agencia->CORREO_AGENCIA); $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'Página web: ' . $Agencia->PAGINA_WEB); $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'Cooperador: ' . $Practicante->NOMBRE_COOPERADOR); $pdf->Text($x + 205, 2 + $c + $h * $r, 'Cargo: ' . $Practicante->CARGO_COOPERADOR); $r1 = $Epracticante->R1 == 'a' ? 'SI: X NO:' : 'SI: NO: X'; $r2 = $Epracticante->R2 == 'a' ? 'SI: X NO:' : 'SI: NO: X'; $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'El estudiante recibió inducción acerca de la empresa? ' . $r1); $pdf->Text($x + 135, 2 + $c + $h * ++$r, 'El estudiante recibió inducción del cargo o proyecto? ' . $r2); $h = 6; ################FUNCIONES DEL CARGO################# $pdf->Text($x, 4 + $c + $h * ++$f, 'Funciones (del cargo) o actividades (del proyecto) a realizar:'); $pdf->SetFont('Arial', 'B', 20); $pdf->Text($x + 10, 9 + $c + $h * $f, '.'); $pdf->Text($x + 10, 13 + $c + $h * $f, '.'); $pdf->Text($x + 10, 17 + $c + $h * $f, '.'); $pdf->Text($x + 10, 21 + $c + $h * $f, '.'); #Funciones feed $pdf->SetFont('Arial', '', 8); $pdf->Text($x + 10, 9 + $c + $h * $f, ' ' . $Epracticante->FUNCION1); $pdf->Text($x + 10, 13 + $c + $h * $f, ' ' . $Epracticante->FUNCION2); $pdf->Text($x + 10, 17 + $c + $h * $f, ' ' . $Epracticante->FUNCION3); $pdf->Text($x + 10, 21 + $c + $h * $f, ' ' . $Epracticante->FUNCION4); #End funcionesd Feed ################FUNCIÓN DIAGNÓSTICA################# $f += 4; $pdf->Text($x, $c + $h * ++$f - 2, '1. FUNCIÓN DIAGNÓSTICA'); $pdf->Text($x, $c + $h * ++$f - 2, 'Autoevaluación en fortalezas y debilidades, estableciendo metas y estrategias de acuerdo a la modalidad de práctica y al área específica.'); $pdf->SetFont('Arial', 'b', 8); $pdf->Text($x, $c + $h * ++$f - 2, 'Aspectos a analizar: '); $pdf->SetFont('Arial', '', 8); $pdf->SetXY($x + 27, $c + $h * $f - 5); $pdf->MultiCell(250, 4, $Epracticante->FD); ################FUNDAMENTACIÓN TEÓRICO-PRÁCTICA################# $pdf->Text($x, 2 + $c + $h * ++$f, '1.1 Fundamentación teórico-práctica'); $r3 = ''; switch ($Epracticante->R3) { case 'a': $r3 = 'a) Alta: X b) Mediano: c) Bajo:'; break; case 'b': $r3 = 'a) Alta: b) Mediano: X c) Bajo:'; break; case 'c': $r3 = 'a) Alta: b) Mediano: c) Bajo: X'; break; } $pdf->Text($x, 4 + $c + $h * ++$f, '1.1.1 ¿En qué grado considera usted que posee los elementos teóricos suficientes para la ejecución de las funciones o actividades de la práctica seleccionada?'); $pdf->Text($x, 4 + $c + $h * ++$f, ' ' . $r3); $pdf->Text($x, 4 + $c + $h * ++$f, '1.1.2 ¿Qué elementos conceptuales considera Usted que debería fortalecer o incorporar para cumplir exitosamente las funciones o actividades propuestas?'); $pdf->Text($x, 4 + $c + $h * ++$f, ' ' . $Epracticante->RESP1); $r4 = $Epracticante->R4 == 'a' ? 'Sí: X No:' : 'Sí: No: X'; $pdf->Text($x, 4 + $c + $h * ++$f, '1.1.3 ¿Ha tenido experiencia previa en las funciones o actividades establecidas?'); $pdf->Text($x, 4 + $c + $h * ++$f, ' ' . $r4); $pdf->Text(270, 13 + $c + $h * ++$f, 'Página ' . $pdf->PageNo()); ######################Page Nro 2###################### $pdf->AddPage('L'); $pdf->Image(base_url('public/images/logo.jpg'), 20, 10, 40, 10); #ENCABEZADO $pdf->SetFont('Arial', 'B', 9); $pdf->Text(260, 20, 'DO-075-F'); $pdf->Text(80, 25, 'FACULTAD DE CIENCIAS EMPRESARIALES Y FACULTAD DE INGENIERÍAS'); $pdf->Text(97, 30, 'FORMATO SEGUIMIENTO A ESTUDIANTES EN PRÁCTICA'); $pdf->SetFont('Arial', '', 8); #Fields $h = 6; $f = 0; $c = 35; $x = 12; $pdf->Rect(10, 32, 280, 169); $pdf->Rect(10, 32, 280, 5); $pdf->Rect(10, 32, 280, 78); #######################MOTIVACIÓN######################## $pdf->Text($x, $c + $h * ++$f, '1.2 Motivación e interés frente a la práctica.'); $r5 = $Epracticante->R5 == 'a' ? 'Sí: X No:' : 'Sí: No: X'; $pdf->Text($x, $c + $h * ++$f, '1.2.1 ¿Considera que las funciones o actividades a realizar en la práctica influyen positivamente en su formación profesional?'); $pdf->Text($x, $c + $h * ++$f, ' ' . $r5); switch ($Epracticante->R6) { case 'a': $r6 = 'Agencia: X Funciones: Oportunidad de Vinculación: Reto: Remuneración: Otra? Cual _________________________'; break; case 'b': $r6 = 'Agencia: Funciones: X Oportunidad de Vinculación: Reto: Remuneración: Otra? Cual _________________________'; break; case 'c': $r6 = 'Agencia: Funciones: Oportunidad de Vinculación: X Reto: Remuneración: Otra? Cual _________________________'; break; case 'd': $r6 = 'Agencia: Funciones: Oportunidad de Vinculación: Reto: X Remuneración: Otra? Cual _________________________'; break; case 'e': $r6 = 'Agencia: Funciones: Oportunidad de Vinculación: Reto: Remuneración: X Otra? Cual _________________________'; break; default: $r6 = 'Agencia: Funciones: Oportunidad de Vinculación: Reto: Remuneración: Otra? Cual: ' . $Epracticante->R121; break; } $pdf->Text($x, $c + $h * ++$f, '1.2.2 ¿Cuál es el aspecto más relevante para la selección de su práctica?'); $pdf->Text($x, $c + $h * ++$f, ' ' . $r6); $f++; $r7 = ''; switch ($Epracticante->R7) { case 'a': $r7 = 'Poco Pertinente: X Pertinente Muy Pertinente:'; break; case 'b': $r7 = 'Poco Pertinente: Pertinente: X Muy Pertinente:'; break; case 'c': $r7 = 'Poco Pertinente: Pertinente: Muy Pertinente: X'; break; } $pdf->Text($x, $c + $h * ++$f, '1.2.3 Respecto a su formación profesional, la experiencia de la práctica considera que es: ' . $r7); $pdf->Text($x, 1 + $c + $h * ++$f, '¿Porqué?: ' . $Epracticante->RESP2); $f++; $r8 = ''; switch ($Epracticante->R8) { case 'a': $r8 = 'Poco Beneficiosa: X Beneficiosa: Muy Beneficiosa:'; break; case 'b': $r8 = 'Poco Beneficiosa: Beneficiosa: X Muy Beneficiosa:'; break; case 'c': $r8 = 'Poco Beneficiosa: Beneficiosa: Muy Beneficiosa: X'; break; } $pdf->Text($x, $c + $h * ++$f, '1.2.4 Respecto a su formación personal, la experiencia de la práctica considera que es:'); $pdf->Text($x, $c + $h * ++$f, ' ' . $r8); $pdf->Text($x, $c + $h * ++$f, '¿Porqué?: ' . $Epracticante->RESP3); ######################HABILIDADES####################### $f++; $pdf->Text($x, $c - 2 + $h * ++$f, '1.3 Habilidades y competencias frente al área de desempeño'); $pdf->Text($x, $c + $h * ++$f, '1.3.1 En qué grado conoce Usted las competencias requeridas para las funciones o actividades a realizar'); switch ($Epracticante->R9) { case 'a': $pdf->Text($x + 15, $c + $h * ($f + 1) - 1, 'X'); break; case 'b': $pdf->Text($x + 15, $c + $h * ($f + 2) - 1, 'X'); break; case 'c': $pdf->Text($x + 15, $c + $h * ($f + 3) - 1, 'X'); break; } $pdf->Text($x + 10, $c + $h * ++$f - 1, 'a) __ Alto grado'); $pdf->Text($x + 10, $c + $h * ++$f - 1, 'b) __ Mediano grado'); $pdf->Text($x + 10, $c + $h * ++$f - 1, 'c) __ Bajo grado'); $r10 = ''; switch ($Epracticante->R10) { case 'a': $r10 = 'Interpretativa: X Argumentativa: Propositiva:'; break; case 'b': $r10 = 'Interpretativa: Argumentativa: X Propositiva:'; break; case 'c': $r10 = 'Interpretativa: Argumentativa: Propositiva: X'; break; } $pdf->Text($x, $c + $h * ++$f, '1.3.2 Cuál de las siguientes competencias considera Usted que tiene en mayor grado, para el desarrollo de las actividades o funciones establecidas'); $pdf->Text($x, $c + $h * ++$f, ' ' . $r10); #####################DEBILIDADES/METAS################# $pdf->Rect(10, $c + $h * ++$f, 280, 40); $pdf->Rect(10, $c + $h * $f, 140, 40); $pdf->Rect(10, $c + $h * $f, 280, 6); $pdf->SetFont('Arial', 'B', 8); $pdf->Text($x + 45, $c + $h * ++$f - 2, 'DEBILIDADES Y/O FORTALEZAS'); $pdf->Text($x + 190, $c + $h * $f - 2, 'METAS Y ESTRATEGIAS'); $pdf->SetFont('Arial', '', 20); #Debilidades y fortalezas $Debfor = explode(',', $Epracticante->DEBFOR); for ($i = 0; $i < count($Debfor); $i++) { $pdf->SetFont('Arial', '', 20); $pdf->Text($x + 5, 4 + $c + $h * $f + $i * 4, '. '); $pdf->SetFont('Arial', '', 8); $pdf->Text($x + 8, 4 + $c + $h * $f + $i * 4, rtrim(ucfirst(trim(strtolower($Debfor[$i]))), '.') . '.'); } #Metas y estrategias $Metest = explode(',', $Epracticante->METEST); for ($i = 0; $i < count($Metest); $i++) { $pdf->SetFont('Arial', '', 20); $pdf->Text($x + 145, 4 + $c + $h * $f + $i * 4, '. '); $pdf->SetFont('Arial', '', 8); $pdf->Text($x + 148, 4 + $c + $h * $f + $i * 4, rtrim(ucfirst(trim(strtolower($Metest[$i]))), '.') . '.'); } $pdf->SetFont('Arial', '', 8); $pdf->Text(270, 13 + $c + $h * ++$f + 20, 'Página ' . $pdf->PageNo()); ######################FUNCIÓN FORMATIVA######################### $Ambos = false; $Asesor = false; $Cooperador = false; if ($this->input->post('MOMENTO') == 2) { foreach ($this->seguimientos_model->TraeCalificacionPracticante($this->input->post('ID_PRACTICANTE'), 2) as $calificacion) { $calificacion->NOTA = explode(',', $calificacion->NOTA); switch ($calificacion->PERSONA) { case 'A': $Asesor = $calificacion; break; case 'C': $Cooperador = $calificacion; break; case 'M': $Ambos = $calificacion; break; } } $Asesor2 = false; $Ambos2 = false; $Cooperador2 = null; foreach ($this->seguimientos_model->TraeCalificacionPracticante($this->input->post('ID_PRACTICANTE'), 1) as $calificacion) { $calificacion->NOTA = explode(',', $calificacion->NOTA); switch ($calificacion->PERSONA) { case 'A': $Asesor2 = $calificacion; break; case 'C': $Cooperador2 = $calificacion; break; case 'M': $Ambos2 = $calificacion; break; } } ##Calculo las notas del momento 2 if ($Ambos === false) { $this->CalcularMomento($Asesor->NOTA, $Cooperador->NOTA, $Asesor->FECHA_REGISTRO); } else { $this->CalcularMomento($Ambos->NOTA, null, $Ambos->FECHA_REGISTRO); } ##Calculo de las posibles combinaciones de evaluacion en los 2 momentos if ($Ambos === false && $Ambos2 === false) { #Momento 1 $this->FuncionFormativa($pdf, $Asesor2); $this->Observaciones($pdf, $Asesor2); $this->FuncionFormativa($pdf, $Cooperador2); $this->Observaciones($pdf, $Cooperador2); #Momento 2 $this->FuncionFormativa($pdf, $Asesor); $this->Observaciones($pdf, $Asesor); $this->FuncionFormativa($pdf, $Cooperador); $this->Observaciones($pdf, $Cooperador); $this->FuncionSumativa($pdf, $Asesor2, $Cooperador2->NOTA); } else { if ($Ambos2 === false && $Ambos !== false) { #Momento 1 $this->FuncionFormativa($pdf, $Asesor2); $this->Observaciones($pdf, $Asesor2); $this->FuncionFormativa($pdf, $Cooperador2); $this->Observaciones($pdf, $Cooperador2); #Momento 2 $this->FuncionFormativa($pdf, $Ambos); $this->Observaciones($pdf, $Ambos); $this->FuncionSumativa($pdf, $Asesor2, $Cooperador2->NOTA); } else { if ($Ambos2 !== false && $Ambos === false) { #Momento 1 $this->FuncionFormativa($pdf, $Ambos2); $this->Observaciones($pdf, $Ambos2); #Momento 2 $this->FuncionFormativa($pdf, $Asesor); $this->Observaciones($pdf, $Asesor); $this->FuncionFormativa($pdf, $Cooperador); $this->Observaciones($pdf, $Cooperador); $this->FuncionSumativa($pdf, $Ambos2); } else { if ($Ambos2 !== false && $Ambos !== false) { #Momento 1 $this->FuncionFormativa($pdf, $Ambos2); $this->Observaciones($pdf, $Ambos2); #Momento 2 $this->FuncionFormativa($pdf, $Ambos); $this->Observaciones($pdf, $Ambos); $this->FuncionSumativa($pdf, $Ambos2); } } } } } else { foreach ($this->seguimientos_model->TraeCalificacionPracticante($this->input->post('ID_PRACTICANTE'), 1) as $calificacion) { $calificacion->NOTA = explode(',', $calificacion->NOTA); switch ($calificacion->PERSONA) { case 'A': $Asesor = $calificacion; break; case 'C': $Cooperador = $calificacion; break; case 'M': $Ambos = $calificacion; break; } } if ($Ambos == false) { $this->FuncionFormativa($pdf, $Asesor); $this->FuncionFormativa($pdf, $Cooperador); $this->Observaciones($pdf, $Asesor); $this->Observaciones($pdf, $Cooperador); $this->FuncionSumativa($pdf, $Asesor, $Cooperador->NOTA); } else { $this->FuncionFormativa($pdf, $Ambos); $this->Observaciones($pdf, $Ambos); $this->FuncionSumativa($pdf, $Ambos); } } $pdf->Output(); $pdf->Cell($pdf->PageNo()); }