Proyectos de Subversion LeadersLinked - Backend

Rev

Rev 567 | Rev 939 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 567 Rev 855
Línea 234... Línea 234...
234
            if ($form->isValid()) {
234
            if ($form->isValid()) {
Línea 235... Línea 235...
235
 
235
 
236
                $selfEvaluationTest = new CompanySelfEvaluationTest();
236
                $selfEvaluationTest = new CompanySelfEvaluationTest();
237
                $selfEvaluationTest->status = CompanySelfEvaluationTest::STATUS_COMPLETED;
237
                $selfEvaluationTest->status = CompanySelfEvaluationTest::STATUS_COMPLETED;
-
 
238
                $selfEvaluationTest->content = $dataPost['content'];
Línea 238... Línea 239...
238
                $selfEvaluationTest->content = $dataPost['content'];
239
                $selfEvaluationTest->comments = $dataPost['comments'];
Línea 239... Línea 240...
239
 
240
 
240
                $result = $companySelfEvaluationTestMapper->update($selfEvaluationTest, $companySelfEvaluationTest->id);
241
                $result = $companySelfEvaluationTestMapper->update($selfEvaluationTest, $companySelfEvaluationTest->id);
Línea 389... Línea 390...
389
 
390
 
390
        // Set Data
391
        // Set Data
391
        $headerFormName = utf8_decode($companySelfEvaluationForm->name);
392
        $headerFormName = utf8_decode($companySelfEvaluationForm->name);
392
        $headerUserName = utf8_decode('Informe de Auto-evaluación: ' . trim($userMapper->first_name . ' ' . $userMapper->last_name) . ' al ' . date("m-d-Y H:i:s", strtotime($companySelfEvaluationTest->added_on)));
393
        $headerUserName = utf8_decode('Informe de Auto-evaluación: ' . trim($userMapper->first_name . ' ' . $userMapper->last_name) . ' al ' . date("m-d-Y H:i:s", strtotime($companySelfEvaluationTest->added_on)));
393
        $sections = json_decode($companySelfEvaluationTest->content, true);
-
 
394
        $comments = '';
394
        $sections = json_decode($companySelfEvaluationTest->content, true);
Línea 395... Línea 395...
395
        $labels = ['Total', 'Logrado'];
395
        $labels = ['Total', 'Logrado'];
396
 
396
 
Línea 422... Línea 422...
422
            $valueSection = floatval($sections[$i]['value']);
422
            $valueSection = floatval($sections[$i]['value']);
423
            $valueFormSections = $valueFormSections + $valueSection;
423
            $valueFormSections = $valueFormSections + $valueSection;
Línea 424... Línea 424...
424
 
424
 
425
            for ($j = 0; $j < count($sections[$i]['questions']); $j++) {
425
            for ($j = 0; $j < count($sections[$i]['questions']); $j++) {
426
                $totalQuestion = $totalQuestion + $this->getPtosAnswer($sections[$i]['questions'][$j]);
-
 
427
                if(isset($sections[$i]['questions'][$j]['comment'])){
-
 
428
                    $comments = $comments.' '.$sections[$i]['questions'][$j]['comment'];
-
 
429
                }
426
                $totalQuestion = $totalQuestion + $this->getPtosAnswer($sections[$i]['questions'][$j]);
Línea 430... Línea 427...
430
            }
427
            }
431
 
428
 
Línea 457... Línea 454...
457
        $filenameGeneral = 'data' . DIRECTORY_SEPARATOR . 'self-evaluation'. uniqid() . '.png';
454
        $filenameGeneral = 'data' . DIRECTORY_SEPARATOR . 'self-evaluation'. uniqid() . '.png';
458
        $pdf->pieChart($labels, $values, '', $filenameGeneral);
455
        $pdf->pieChart($labels, $values, '', $filenameGeneral);
459
        $pdf->Image($filenameGeneral, 60, $pdf->getY(), 90);
456
        $pdf->Image($filenameGeneral, 60, $pdf->getY(), 90);
460
        $pdf->setY($pdf->getY() + 60);
457
        $pdf->setY($pdf->getY() + 60);
Línea -... Línea 458...
-
 
458
 
-
 
459
        if($companySelfEvaluationTest->comments){
461
 
460
 
462
        $pdf->SetFont('Arial','B', 10);
461
            $pdf->SetFont('Arial','B', 10);
463
        $pdf->Cell(190,10, utf8_decode('Comentarios finales'),0,0,'C');
462
            $pdf->Cell(190,10, utf8_decode('Comentarios finales'),0,0,'C');
464
        $pdf->setY($pdf->getY() + 10);
463
            $pdf->setY($pdf->getY() + 10);
465
        
464
            
466
        $pdf->SetFont('Arial','', 8);
465
            $pdf->SetFont('Arial','', 8);
467
        $pdf->MultiCell(180,  8, $comments);
466
            $pdf->MultiCell(180,  8, utf8_decode($companySelfEvaluationTest->comments));
-
 
467
            $pdf->setY(60);
-
 
468
 
Línea 468... Línea 469...
468
        $pdf->setY(60);
469
        }
469
 
470
 
Línea 470... Línea 471...
470
        return $pdf->Output();
471
        return $pdf->Output();