コード例 #1
0
ファイル: Resultados.php プロジェクト: peterweck/catman
 public function getInforme($eid, $tipo = "", $mun = '')
 {
     $db = new DB();
     $preguntas = $this->_getPreguntasEncuesta($eid);
     //$resultado = array();
     $html = "";
     while ($line = $db->fetchNextObject($preguntas)) {
         $opc_resp = $this->_getOpcionesRespuesta($line->id);
         //$resultado[$line->id]['pregunta'] = $line->pregunta;
         $html .= "<table width='100%'>\n";
         $html .= "<tr><th>" . $line->pregunta . "</th>\n";
         $html .= "<th with='80'>Total</th>\n";
         //$html .= "<th with='80'>%</th></tr>\n";
         $datos = array();
         $textos = array();
         while ($row = $db->fetchNextObject($opc_resp)) {
             $html .= "<tr>\n";
             $html .= "<td>" . $row->respuesta . "</td>";
             $html .= "<td>" . $this->getResultsPregunta($line->id, $row->id, $mun) . "</td>";
             //$html .= "<td>".
             $this->porcentaje($this->getResultsPregunta($line->id, $row->id), $this->_total_resp) . "%</td>";
             $html .= "</tr>\n";
             array_push($datos, $this->getResultsPregunta($line->id, $row->id));
             array_push($textos, $this->truncate($row->respuesta, 40));
         }
         //$html .= "<tr><td colspan='3'><img src='".$this->_getTorta($datos, $textos)."'></td></tr>";
         $d = serialize($datos);
         $t = serialize($textos);
         $cd = urlencode($d);
         $ct = urlencode($t);
         $titulo = $this->truncate($line->pregunta, 60);
         $html .= "<tr><td colspan='3'><img src='torta.php?datos={$cd}&textos={$ct}&titulo={$titulo}'></td></tr>";
         $html .= "</table><br>";
     }
     $tpl = new Elfic_Smarty();
     $usuario = $this->_usuarios_id;
     $tpl->assign('titulo', $this->_titulo);
     $tpl->assign('fecha', $this->_fecha);
     $tpl->assign('total_resp', $this->_total_resp);
     $tpl->assign('usuario', Elfic::getNombreUsuario($this->_usuarios_id));
     $tpl->assign('data_res', $html);
     if ($tipo == 'print') {
         $tpl->display('reportes/encuestasBasicReportPrint.tpl');
     } else {
         $tpl->display('encuestas/encuestasBasicReport.tpl');
     }
 }
コード例 #2
0
ファイル: Agendas.php プロジェクト: peterweck/catman
 public function cargarAgenda($cid = "", $tutor_id = "")
 {
     global $uid, $uperms;
     $tpl = new Elfic_Smarty();
     if (!$uperms['cursos_w']) {
         $tpl->assign('tutores', "false");
         $tpl->assign('tutor', Elfic::getNombreUsuario($tutor_id));
     } else {
         $tpl->assign('tutores', Grupos::getUsuariosGrupo(4));
     }
     $tpl->assign('tutor_id', $tutor_id);
     if (!$uperms['cursos_w']) {
         $cursos = Cursos::getCursosTutorArray($uid);
     } else {
         $cursos = Cursos::getCursosTutorArray();
     }
     $tpl->assign('cursos', $cursos);
     $tpl->assign('curso', $cid);
     $tpl->display('cursos/agendasNew.tpl');
 }
コード例 #3
0
ファイル: Evaluacion.php プロジェクト: peterweck/catman
 public function viewEvaluacion()
 {
     $r = $this->_getResultadosEvaluacion();
     $tpl = new Elfic_Smarty();
     $tpl->assign('estudiante', Elfic::getNombreUsuario($this->estudiante_id));
     $tpl->assign('curso', $this->curso);
     $tpl->assign('tutor', Elfic::getNombreUsuario($this->tutor_id));
     $tpl->assign('concepto', $this->concepto_tutor);
     $tpl->assign('data', $this->_getResultadosEvaluacion());
     $tpl->display('evaluacion' . DS . 'evaluacionView.tpl');
 }
コード例 #4
0
ファイル: index2.php プロジェクト: peterweck/catman
function doCpanel()
{
    global $uid, $uperms;
    $tpl = new Elfic_Smarty();
    $tpl->assign('usuario', Elfic::getNombreUsuario($uid));
    $tpl->assign('usuarios', $uperms['usuarios_r']);
    $tpl->assign('agenda', $uperms['agenda_r']);
    $tpl->assign('asistencia', $uperms['asistencia_r']);
    $tpl->assign('cursos', $uperms['cursos_r']);
    $tpl->assign('evaluacion', $uperms['evaluacion_r']);
    $tpl->assign('reportes', $uperms['reportes']);
    $tpl->display('featCpanel.tpl');
    //$home = new Home();
}