Exemplo n.º 1
0
 /**
  * 
  * // case 1 = Tipo do questionario diagnostico.
  */
 public function initTipo()
 {
     $this->execution->finishExecution($this->devolutive->getQuestionnaireId(), $this->devolutive->getUserId(), $this->devolutive->getArqPath(), null, $this->devolutive->getIsRA());
     $this->eligibility->doAutoavaliacaoEligibility($this->devolutive->getQuestionnaireId(), $this->devolutive->getUserId());
     $result = $this->devolutive->makePdfDevolutiveAllBlocks($this->devolutive->getQuestionnaireId(), $this->devolutive->getUserId(), $this->devolutive->getDirName(), $this->devolutive->getPublicDir(), $this->devolutive->getArqName(), $this->devolutive->getIsRA());
     return $result;
 }
Exemplo n.º 2
0
 /**
  * 
  * // case 2 = Tipo do questionario autoavaliacao.
  */
 public function initTipo()
 {
     // case 2 = Tipo do questionario autoavaliacao.
     $result = false;
     $arrScore = $this->devolutive->makeScoreRAA($this->devolutive->getQuestionnaireId(), $this->devolutive->getUserId());
     if ($arrScore) {
         //grava dados em Execution
         $this->execution->finishExecution($this->devolutive->getQuestionnaireId(), $this->devolutive->getUserId(), $this->devolutive->getArqPath(), $arrScore[2], $this->devolutive->getIsRA());
         //faz geracao do pdf
         $result = $this->devolutive->makePdfDevolutiveAutoAvaliacao($this->devolutive->getQuestionnaireId(), $this->devolutive->getUserId(), $this->devolutive->getDirName(), $this->devolutive->getPublicDir(), $this->devolutive->getArqName(), $this->devolutive->getIsRA());
     }
     //end if
     return $result;
 }
Exemplo n.º 3
0
 /**
  * 
  * @deprecated 
  * 
  * validacao de blocos refatorada para DEvolutiveController
  * 
  * versao do pdf devolutiva caso Blocos do questionario nao existam
  * 
  * @param string $urldevolutiva
  */
 public function printAvisoPdfDevolutivaCasoNaoHajaBlocoQuestionario($arrBlocksResult)
 {
     require_once APPLICATION_PATH . '/models/DevolutiveRAA.php';
     $arrHeader['title'] = "Relatório de Autoavaliação";
     $pdf = new Model_DevolutiveRAA($arrHeader);
     // Desabilita header e footer
     $pdf->header = 0;
     $pdf->footer = 0;
     // Prepara variáveis para paginação
     $pdf->AliasNbPages();
     // Habilita header e footer
     $pdf->header = 1;
     $pdf->AddPage();
     $pdf->footer = 1;
     $pdf->SetFont('Arial', 'BI', 16);
     $pdf->SetTextColor(255, 0, 0);
     $pdf->MultiCell(190, 13, utf8_decode("Faltando o cadastro dos blocos do Questionario"), 0, "C");
     // Renderização do arquivo PDF
     $pdf->Output($this->devolutive->getDirName() . $this->devolutive->getArqName());
     // Configura as permissões do arquivo
     chmod($this->devolutive->getDirName() . $this->devolutive->getArqName(), 0666);
     return $this->devolutive->getPublicDir() . $this->devolutive->getArqName();
 }