<?php $form = $this->beginWidget('CActiveForm', array('id' => 'evaluacion-form', 'enableAjaxValidation' => false)); ?> <p class="note">Los campos con <span class="required">*</span> son requeridos.</p> <?php echo $form->errorSummary($model); ?> <div class="row"> <?php echo $form->labelEx($model, 'id_matriz'); ?> <?php echo $form->dropDownList($model, 'id_matriz', CHtml::listData(Matriz::model()->findAll(), 'id_matriz', 'nombre_matriz')); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'id_empresa'); ?> <?php echo $form->dropDownList($model, 'id_empresa', CHtml::listData(Empresa::model()->findAll(), 'id_empresa', 'nombre_empresa')); ?> </div> <div class="row"> <?php echo $form->labelEx($model, 'fecha_evaluacion');
<!DOCTYPE html> <html> <head> <meta charset="utf-8" /> <style> input[type=text]{ width:60px; } table,tr,td,th{ border: 2px solid #000; } table{ width: 300px; border: 1px solid #000; } </style> </head> <body> <h1>Folha de Notas</h1> <hr> <form action="" method="post"> <? $objTabela = new Matriz(10,3); ?> </form> </body> </html> <?php if (filter_input(INPUT_POST, 'calcular')) { $objTabela->calculaMedia(); }
<head> <meta charset="UTF-8"> <title>Folha de Produtos</title> <style> input[type=text]{ width:60px; } table,tr,td,th{ border: 2px solid #000; } table{ width: 300px; border: 1px solid #000; } </style> </head> <body> <h1>Folha de Notas</h1> <hr> <form action="" method="post" > <? $objTabelaProduto = new Matriz(5,5) ?> </form> </body> </html> <?php if (filter_input(INPUT_POST, 'calcular')) { $objTabelaProduto->calculaMaiorPreco(); echo "<hr>"; $objTabelaProduto->calculaMenorPreco(); }
/** * Guarda los valores de los atributos en el archivo estadoDispositivos.properties */ public function guardarEstado() { parent::guardarEstado(); }
/** * Show the form for editing the specified resource. * * @param int id * @return Response */ public function edit($id) { $disciplinaEdit = $this->disciplina->find($id); $componenteCurricular = ComponenteCurricular::lists('nome_ccr', 'id'); $matrizList = Matriz::orderBy('nome_mat', 'desc')->lists('nome_mat', 'id'); $categoriaList = CategoriaDisciplina::orderBy('id', 'asc')->lists('nome_ctd', 'id'); /*$professorList = Professor::orderBy('nome_pro', 'asc')->lists('nome_pro','id');*/ if (is_null($disciplinaEdit)) { return Redirect::route('admin.disciplina.index'); } return View::make('disciplina.edit', array('disciplinaEdit' => $disciplinaEdit, 'componenteCurricular' => $componenteCurricular, 'matrizList' => $matrizList, 'categoriaList' => $categoriaList)); }
color: 'white' }], exporting: { enabled: false } }); }); }); </script> <h1>Resultado</h1> <?php $evaluacion = Evaluacion::model()->findByAttributes(array('id_evaluacion' => $evaluacion_id)); $matriz = Matriz::model()->findByAttributes(array('id_matriz' => $evaluacion->id_matriz)); $niveles = Nivel::model()->findAll(); $nive = array(); $resultado_graficar = array(); $repuestas_y_caracteristica = Yii::app()->db->createCommand("SELECT a.id_pregunta id_pregunta, a.id_respuesta metrica, " . "b.id_caracteristica caracteristica, c.valor valor " . "FROM resultado a " . "LEFT JOIN pregunta b ON a.id_pregunta = b.id_pregunta " . "LEFT JOIN metrica c ON a.id_respuesta = c.id_metrica " . "WHERE id_evaluacion = " . $evaluacion_id)->queryAll(); foreach ($niveles as $n) { $respuestas = 0; $valor_por_nivel = 0; $id_pregunta_array = array(); foreach ($repuestas_y_caracteristica as $ryc) { $repuestas_y_caracteristica2 = Yii::app()->db->createCommand(" SELECT a.id_caracteristica id_caracteristica " . "FROM caracteristica a " . "WHERE id_caracteristica in (" . $ryc['caracteristica'] . ") and id_nivel=" . $n['id_nivel'])->queryAll(); if (count($repuestas_y_caracteristica2) >= 1) { $respuestas++; $id_pregunta_array[] = $ryc['id_pregunta']; $resultados_por_nivel = Yii::app()->db->createCommand(" SELECT * " . "FROM resultado a " . "LEFT JOIN metrica b ON a.id_respuesta = b.id_metrica " . "WHERE a.id_pregunta=" . $ryc['id_pregunta'] . " and a.id_evaluacion = " . $evaluacion_id)->queryAll(); foreach ($resultados_por_nivel as $r) {
?> :</b> <?php echo CHtml::encode($data->definicion_aspecto); ?> <br /> <b><?php echo CHtml::encode($data->getAttributeLabel('id_matriz')); ?> :</b> <?php //echo CHtml::encode($data->id_matriz); ?> <?php $model = Matriz::model()->findByPk($data->id_matriz); echo $model->nombre_matriz; ?> <br /> <b><?php echo CHtml::encode($data->getAttributeLabel('meta_aspecto')); ?> :</b> <?php echo CHtml::encode($data->meta_aspecto); ?> <br />
public function actionIndex() { $mode1 = Matriz::model()->findAll(); $this->render("index", array("mode1" => $mode1)); }
/** * Funcion buscar las evaluaciones de una empresa * @return una lista de evaluaciones activas y cerradas * */ public function actionEvaluar_Mostrar() { $resultado = $_GET['id_empresa']; $matrices = Matriz::model()->findAll(); $band = true; $div = ''; foreach ($matrices as $matrix) { $evaluacion = Yii::app()->db->createCommand("SELECT nombre_empresa nombre_empresa, nombre_matriz nombre_matriz, " . "IF( a.estatus_evaluacion =1, 'Abierta', 'Cerrada' ) estatus, a.estatus_evaluacion est, " . "a.observacion observacion, a.id_evaluacion ID, DATE_FORMAT( a.fecha_evaluacion, '%d/%m/%y' ) fecha_e " . "FROM evaluacion a " . "LEFT JOIN empresa b ON a.id_empresa = b.id_empresa " . "LEFT JOIN matriz c ON a.id_matriz = c.id_matriz " . "WHERE a.id_empresa =" . $resultado . " and a.id_matriz=" . $matrix->id_matriz)->queryAll(); $div .= '<center><p><b>Matriz:</b> ' . $matrix->nombre_matriz . '</p></center>'; if (count($evaluacion) != 0) { $div .= '<table class="normal"> <tr> <th>Nro. Evaluación</th> <th>Empresa</th> <th>Estatus</th> <th>Observación</th> <th>Fecha Evaluación</th> <th>Acción</th> </tr>'; foreach ($evaluacion as $evalu) { if ($evalu['est'] == 1) { $link = '<a href="cuestionario?id_evaluacion=' . $evalu['ID'] . '">Evaluar </a>'; } else { $link = '<a href="reporte_grafico?id_evaluacion=' . $evalu['ID'] . '">Reporte </a>'; } $div .= '<tr><td>' . $evalu['ID'] . ' </td> <td>' . $evalu['nombre_empresa'] . '</td> <td>' . $evalu['estatus'] . '</td> <td>' . $evalu['observacion'] . '</td> <td>' . $evalu['fecha_e'] . '</td> <td>' . $link . '</td></tr>'; } $div .= '</table><br />'; } else { $div .= '<center><p><b>**No hay Evaluaciones creada para la empresa**</b></p></center>'; } } $return['message'] = $div; echo json_encode($return); }
public function actionMostrar() { $resultado = $_GET['id_matriz']; $matriz = Matriz::model()->findByPk($resultado); $niveles = Nivel::model()->findAll(); $aspecto = Aspecto::model()->findAllByAttributes(array('id_matriz' => $matriz->id_matriz)); if (count($aspecto) != 0) { $count = count($niveles); $div = '<br /><br /><center>' . $matriz->nombre_matriz . '</center><br />'; $div .= '<table class="normal" style="padding-left:40px"><tr> <th>Aspectos</th>'; foreach ($niveles as $data) { $div .= '<th>' . $data->nombre_nivel . '</th>'; } $div .= '</tr>'; foreach ($aspecto as $data2) { $div .= '<tr><td>' . $data2->nombre_aspecto . '</td>'; $caracteristica = Caracteristica::model()->findAllByAttributes(array('id_aspecto' => $data2->id_aspecto)); foreach ($caracteristica as $data3) { $div .= '<td><a href="#" title="' . $data3->definicion_caracteristica . '">' . $data3->nombre_caracteristica . '</a></td>'; } $div .= '</tr>'; } $div .= '</table>'; } else { $div = '<br /><br /><center><p><b>**Matriz sin aspectos**</b></p></center>'; } $return['message'] = $div; echo json_encode($return); }
/** * Guarda los valores de los atributos en el archivo estadoDispositivos.properties */ public function guardarEstado() { if ($this->audio == true) { $this->estadoDispositivo = new Properties(); $this->estadoDispositivo->load(file_get_contents("./estadoDispositivos.properties")); $this->estadoDispositivo->setProperty($this->disp . ".audio" . $this->input, $this->output); file_put_contents('./estadoDispositivos.properties', $this->estadoDispositivo->toString(true)); } else { parent::guardarEstado(); } }
/** * Remove the specified resource from storage. * * @param int id * @return Response */ public function destroy($id) { DB::table('matriz_sem')->where('id_matriz', '=', $id)->delete(); $this->matrizMat->find($id)->delete(); return Redirect::route('admin.matriz.index'); }
//Clase que controla los datos de cada ejecucion. $GLOBALS["firephp"]; //Variable global de herramienta de DEBUG. /*******************************************/ /* TODAS LAS VARIABLES DE SESION RECIBIDAS */ /*******************************************/ if (isset($_SESSION)) { $firephp->info($_SESSION, "SESIONES RECIBIDAS"); } /************************************/ /* OBJETOS LOCALES DEL APLICATIVO */ /************************************/ $ejecucion = new Ejecuciones(); $validador = new Validaciones(); $error = new Errores(); $matriz_poo = new Matriz(); /*************************************************************/ /* RECUPERACION DE VARIABLES PARA EL CORRECTO FUNCIONAMIENTO */ /*************************************************************/ $firephp->Group("SESIONES RECIBIDAS"); if (isset($_SESSION["T"])) { $ejecucion->set_casos_de_prueba($_SESSION["T"]); unset($_SESSION["T"]); $firephp->log("Los casos de prueba se recuperan por sesion."); } else { $firephp->log("Los casos de prueba no tienen sesion."); } if (isset($_SESSION["casos_prueba_ejecutados"])) { $ejecucion->set_caso_de_prueba_en_ejecucion($_SESSION["casos_prueba_ejecutados"]); unset($_SESSION["casos_prueba_ejecutados"]); $firephp->log("El caso de prueba ejecutados se recupera por sesion.");