public function store(Request $request)
 {
     //dd('jajaja');
     $file = $request->file('file');
     //obtenemos el campo file obtenido por el formulario
     if (is_null($request->file('file'))) {
         Session::flash('message', 'Seleccion el archivo');
         return redirect()->back();
     }
     $nombre = $file->getClientOriginalName();
     //indicamos que queremos guardar un nuevo archivo en el disco local
     \Storage::disk('local')->put($nombre, \File::get($file));
     $asignaturas = $request->get('asignaturas');
     $docentes = $request->get('docentes');
     $falla = false;
     \Excel::load('/storage/public/files/' . $nombre, function ($archivo) use(&$falla) {
         $result = $archivo->get();
         //leer todas las filas del archivo
         foreach ($result as $key => $value) {
             $asignaturas = Asignatura::whereNombre($value->asignatura_id)->pluck('id');
             $docentes = Docente::whereNombres($value->docente_id)->pluck('id');
             //echo $facultades."<br>";
             if (is_null($asignaturas)) {
                 // El campus no existe, deberia hacer algo para mitigar esto, o retornarlo al usuario ...
             }
             if (is_null($docentes)) {
                 // El campus no existe, deberia hacer algo para mitigar esto, o retornarlo al usuario ...
             }
             //if(!Curso::whereNombre('asignatura_id',$asignaturas)->whereNombres('docente_id',$docentes)->first()){
             $var = new Curso();
             $datos = ['asignatura_id' => $asignaturas, 'docente_id' => $docentes, 'semestre' => $value->semestre, 'anio' => $value->anio, 'seccion' => $value->seccion];
             $validator = Validator::make($datos, Curso::storeRules());
             if ($validator->fails()) {
                 Session::flash('message', 'Los Cursos ya existen o el archivo ingresado no es valido');
                 $falla = true;
             } else {
                 $var->fill($datos);
                 $var->save();
             }
         }
     })->get();
     if ($falla) {
         // Fallo la validacion de algun campus, retornar al index con mensaje
         return redirect()->route('Encargado.cursos.index');
     }
     \Storage::delete($nombre);
     Session::flash('message', 'Los Cursos fueron agregados exitosamente!');
     return redirect()->route('Encargado.cursos.index');
 }
 public function edit($id)
 {
     $cursadas = AsignaturaCursada::findOrFail($id);
     $cursos = Curso::lists('nombre', 'id');
     $estudiantes = Estudiante::lists('nombres', 'id');
     return view('Administrador.AsignaturaCursadaCrud.editarAsignaturasCursadas', compact('asignaturascursadas', 'cursos', 'estudiantes'));
 }
 public function destroy($id)
 {
     $cursos = Curso::find($id);
     $cursos->delete();
     Session::flash('message', 'El curso de la seccion ' . $cursos->seccion . ' fue eliminado');
     return redirect()->route('Encargado.cursos.index');
 }
 public function index()
 {
     $cursos = Curso::with('docentes', 'asignaturas')->paginate();
     return view('Encargado.AsignarSala.listaAsignarSala', compact('cursos'));
     // use Illuminate\Database\Query\Builder\docentes; mal puesto el nombre en la funcion
     // en el modelo, lo tenia como docente y asignatura
 }
 public function edit($id)
 {
     $horarios = Horario::findOrFail($id);
     $salas = Sala::lists('nombre', 'id');
     $periodos = Periodo::lists('bloque', 'id');
     $cursos = Curso::lists('seccion', 'id');
     return view('Administrador.HorarioCrud.editarHorario', compact('horarios', 'salas', 'periodos', 'cursos'));
 }
Пример #6
0
 /**
  * Updates an existing Aluno model.
  * If update is successful, the browser will be redirected to the 'view' page.
  * @param integer $id
  * @return mixed
  */
 public function actionUpdate($id)
 {
     $model = $this->findModel($id);
     $arraycursos = Curso::find()->all();
     if ($model->load(Yii::$app->request->post()) && $model->save()) {
         return $this->redirect(['view', 'id' => $model->id]);
     } else {
         return $this->render('update', ['model' => $model]);
     }
 }
 public function create()
 {
     $cursos = Curso::lists('seccion', 'id');
     $estudiantes = Estudiante::lists('nombres', 'id');
     return view('Administrador.AsignaturaCrud.crearAsignatura')->with('cursos', $cursos)->with('estudiantes', $estudiantes);
     //Trying to get property of non-object a veces me sale
     //se que viene de $asig->departamentos->nombre, pero no se que mierda!!!
     // y era porque tenia mala la funcion departamentos en el modelo de asignaturas
     //me faltaba el 'departamento_id', 'id'
     //sInvalid argument supplied for foreach()
 }
Пример #8
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Curso::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id' => $this->id]);
     $query->andFilterWhere(['like', 'sigla', $this->sigla])->andFilterWhere(['like', 'nome', $this->nome]);
     return $dataProvider;
 }
Пример #9
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Curso::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['idCurso' => $this->idCurso, 'FechaInicio' => $this->FechaInicio, 'FechaFin' => $this->FechaFin, 'Horas' => $this->Horas]);
     $query->andFilterWhere(['like', 'Nombre', $this->Nombre])->andFilterWhere(['like', 'Descripcion', $this->Descripcion]);
     return $dataProvider;
 }
Пример #10
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Curso::find();
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     $query->andFilterWhere(['id_curso' => $this->id_curso, 'nivel' => $this->nivel]);
     $query->andFilterWhere(['like', 'nombre', $this->nombre])->andFilterWhere(['like', 'deescripcion', $this->deescripcion])->andFilterWhere(['like', 'lugar', $this->lugar]);
     return $dataProvider;
 }
 public function show($id)
 {
     $cursos = Curso::find($id);
     //dd($Campus);
     if ($cursos) {
         $data = array(array('semestre', 'anio', 'seccion', 'asignatura_id', 'docente_id'), array($cursos->semestre, $cursos->anio, $cursos->seccion, $cursos->asignaturas->nombre, $cursos->docentes->nombres));
         Excel::create('Cursos' . $cursos->seccion, function ($excel) use($data) {
             $excel->sheet('Sheetname', function ($sheet) use($data) {
                 $sheet->fromArray($data);
             });
         })->download('csv');
     } else {
         abort('404');
     }
 }
Пример #12
0
 /**
  * Creates data provider instance with search query applied
  *
  * @param array $params
  *
  * @return ActiveDataProvider
  */
 public function search($params)
 {
     $query = Curso::find();
     // add conditions that should always apply here
     $dataProvider = new ActiveDataProvider(['query' => $query]);
     $this->load($params);
     if (!$this->validate()) {
         // uncomment the following line if you do not want to return any records when validation fails
         // $query->where('0=1');
         return $dataProvider;
     }
     // grid filtering conditions
     $query->andFilterWhere(['id' => $this->id, 'max_horas' => $this->max_horas]);
     $query->andFilterWhere(['like', 'codigo', $this->codigo])->andFilterWhere(['like', 'nome', $this->nome]);
     return $dataProvider;
 }
 public function store(Request $request)
 {
     //dd('jajaja');
     $file = $request->file('file');
     //obtenemos el campo file obtenido por el formulario
     $nombre = $file->getClientOriginalName();
     $cursos = $request->get('cursos');
     $salas = $request->get('salas');
     $periodos = $request->get('periodos');
     //indicamos que queremos guardar un nuevo archivo en el disco local
     \Storage::disk('local')->put($nombre, \File::get($file));
     \Excel::load('/storage/public/files/' . $nombre, function ($archivo) use($cursos, $salas, $periodos) {
         $result = $archivo->get();
         //leer todas las filas del archivo
         foreach ($result as $key => $value) {
             $salas = Sala::whereNombre($value->sala_id)->pluck('id');
             $periodos = Periodo::whereBloque($value->periodo_id)->pluck('id');
             $cursos = Curso::where('seccion', $value->curso_id)->pluck('id');
             if (is_null($salas)) {
                 // El campus no existe, deberia hacer algo para mitigar esto, o retornarlo al usuario ...
             }
             if (is_null($periodos)) {
                 // El campus no existe, deberia hacer algo para mitigar esto, o retornarlo al usuario ...
             }
             if (is_null($cursos)) {
                 // El campus no existe, deberia hacer algo para mitigar esto, o retornarlo al usuario ...
             }
             if (!Horario::where('sala_id', $salas)->where('periodo_id', $periodos)->where('curso_id', $cursos)->first()) {
                 $var = new Horario();
                 $var->fill(['fecha' => $value->fecha, 'sala_id' => $salas, 'periodo_id' => $periodos, 'curso_id' => $cursos]);
                 $var->save();
             }
         }
     })->get();
     \Storage::delete($nombre);
     Session::flash('message', 'Los Horarios fueron agregados exitosamente!');
     return redirect()->route('Administrador.horarios.index');
 }
Пример #14
0
 /**
  * Finds the Curso model based on its primary key value.
  * If the model is not found, a 404 HTTP exception will be thrown.
  * @param integer $id
  * @return Curso the loaded model
  * @throws NotFoundHttpException if the model cannot be found
  */
 protected function findModel($id)
 {
     if (($model = Curso::findOne($id)) !== null) {
         return $model;
     } else {
         throw new NotFoundHttpException('The requested page does not exist.');
     }
 }
Пример #15
0
    <!-- <?php 
echo $form->errorSummary($model);
?>
 -->

    <?php 
echo $form->field($model, 'idDisciplina')->dropDownList($arrayDisciplinas, ['prompt' => 'Selecione uma disciplina', 'style' => 'width:600px']);
?>

    <?php 
echo $form->field($model, 'codTurma')->textInput(['maxlength' => true, 'style' => 'width:130px']);
?>

    <?php 
echo $form->field($model, 'idCurso')->dropDownList(ArrayHelper::map(Curso::find()->orderBy('nome')->asArray()->all(), 'id', 'nome'), ['prompt' => 'Selecione um curso', 'style' => 'width:300px']);
?>

    <?php 
echo $form->field($model, 'idProfessor')->dropDownList(ArrayHelper::map(Usuario::find()->where(['perfil' => 'Professor'])->orderBy('name')->asArray()->all(), 'id', 'name'), ['prompt' => 'Selecione o professor', 'style' => 'width:600px']);
?>

    <?php 
echo $form->field($model, 'nomeUnidade')->textInput(['maxlength' => true, 'style' => 'width:600px']);
?>

    <?php 
echo $form->field($model, 'numPeriodo')->textInput(['style' => 'width:130px']);
?>

    <?php 
Пример #16
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getIDCurso()
 {
     return $this->hasOne(Curso::className(), ['ID' => 'IDCurso']);
 }
Пример #17
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCurso()
 {
     return $this->hasOne(Curso::className(), ['id' => 'idCurso']);
 }
 public function index()
 {
     $users = Curso::with('docentes.departamentos', 'asignaturas')->get();
     //dd($users);
     return view('Encargado.AsignarSala.listaAsignarSala', array('periodo' => Periodo::lists('bloque', 'id'), 'campus' => Campus::lists('nombre', 'id'), 'cursos' => $users));
 }
Пример #19
0
    <div class="col-md-4">

        <?php 
echo $form->field($model, 'codigo')->textInput(['maxlength' => true]);
?>

        <?php 
echo $form->field($model, 'nome')->textInput(['maxlength' => true]);
?>

        <?php 
echo $form->field($model, 'max_horas')->textInput();
?>

        <?php 
echo $form->field($model, 'curso_id')->dropDownList(ArrayHelper::map(Curso::find()->all(), 'id', 'nome'), ['prompt' => 'Selecione']);
?>

        <?php 
echo $form->field($model, 'grupo_id')->dropDownList(ArrayHelper::map(Grupo::find()->all(), 'id', 'nome'), ['prompt' => 'Selecione']);
?>

        <div class="form-group">
            <?php 
echo Html::submitButton($model->isNewRecord ? 'Salvar' : 'Atualizar', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
        </div>

    </div>

    <?php 
Пример #20
0
 public function afterFind()
 {
     switch ($this->bolsa) {
         case 0:
             $this->traducao_bolsa = 'Não';
             break;
         case 1:
             $this->traducao_bolsa = 'Sim';
             break;
     }
     switch ($this->status) {
         case 0:
             $this->traducao_status = 'Aguardando Avaliação';
             break;
         case 1:
             $this->traducao_status = 'Selecionado com bolsa';
             break;
         case 2:
             $this->traducao_status = 'Selecionado sem bolsa';
             break;
         case 3:
             $this->traducao_status = 'Não selecionado';
             break;
         case 4:
             $this->traducao_status = 'Indeferido - Nota < 7';
             break;
         case 5:
             $this->traducao_status = 'Indeferido - Coeficiente < 5';
             break;
         case 6:
             $this->traducao_status = 'Indeferido - Não cursou a disciplina';
             break;
     }
     $periodo = PeriodoInscricaoMonitoria::findOne(['id' => $this->IDperiodoinscr]);
     $this->IDperiodoinscr = $periodo->ano . '/' . $periodo->periodo;
     $disciplinaPeriodo = DisciplinaPeriodo::findOne($this->IDDisc);
     $disciplina = Disciplina::find()->where(['id' => $disciplinaPeriodo->idDisciplina])->one();
     $this->nomeDisciplina = $disciplina->nomeDisciplina;
     $curso = Curso::find()->where(['id' => $disciplinaPeriodo->idCurso])->one();
     $this->nomeCurso = $curso->nome;
 }
Пример #21
0
    public function actionGerarquadrogeral()
    {
        $modelPeriodo = DisciplinaPeriodo::find()->orderBy(['anoPeriodo' => SORT_DESC, 'numPeriodo' => SORT_DESC])->one();
        $periodoletivo = $modelPeriodo->anoPeriodo . '/' . $modelPeriodo->numPeriodo;
        $dadosCabecalho = Periodo::find()->where(['codigo' => $periodoletivo])->one();
        if ($dadosCabecalho != null) {
            $cssfile = file_get_contents('../web/css/estilo3.css');
            $mpdf = new mPDF('utf-8', 'A4-L');
            $mpdf->title = '3. Quadro Geral';
            $mpdf->WriteHTML($cssfile, 1);
            //$mpdf->Image('../web/img/cabecalho.png', 20, 5, 900, 80);
            // Cabeçalho + primeira tabela do documento
            $mpdf->WriteHTML('
                <img src="../web/img/cabecalho3.png" alt="Universidade Federal do Amazonas...." width="950" height="85">

                <p style = "text-align: center;"> <b style = "font-size: small;">
                QUADRO GERAL DE MONITORES BOLSISTAS E NÃO BOLSISTAS - 03 <br> </b>
                (<b style = "background-color: yellow;">Encaminhar também em formato .DOC -word- para o email monitoriaufam@outlook.com</b>)
                </p>

                <table id="cabecalho_1_QuadroGeral" width="99%" height="100%">
                    <tr>
                      <td bgcolor="#e6e6e6"> <b>SETOR RESPONSÁVEL (Coord.Dept/Outros)</b> </td>
                      <td width="30%">Coordenação Acadêmica</td>
                      <td bgcolor="#e6e6e6"><b>UNIDADE</b></td>
                      <td width="30%">Instituto de Computação - IComp</td>
                    </tr> 
                 </table>
                 <table id = "cabecalho_2_QuadroGeral" width="40%" height="100%">
                    <tr>
                      <td bgcolor="#e6e6e6" width="29%"><b>PERÍODO LETIVO</b></td>
                      <td width="20px">' . $modelPeriodo->anoPeriodo . '/' . $modelPeriodo->numPeriodo . ' </td> 
                    </tr> 
                 </table>

            ');
            // Tabela do meio do documento
            $mpdf->WriteHTML('
                <br>
                <table id="quadro_geral" width="99%">
                <tr>
                    <td id="n" value="0" bgcolor="#e6e6e6" width="3%" rowspan=2><b>Nº</b></td>
                    <td id="aluno" value="0" bgcolor="#e6e6e6" width="25%" rowspan=2><b>ALUNO</b><br>(nome completo, sem abreviações)</td>
                    <td id="mat" value="0" bgcolor="#e6e6e6" width="6%" rowspan=2><b>Nº <br>MATR.</b></td>
                    <td id="cpf" value="0" bgcolor="#e6e6e6" width="8%" rowspan=2><b>CPF</b></td>
                    <td id="cat" value="0" bgcolor="#e6e6e6" colspan=2 width="6%" colspan=2><b>CATEG.</b></td>
                    <td id="curso" value="0" bgcolor="#e6e6e6" width="13%" rowspan=2><b>CURSO</b></td>
                    <td id="disc" value="0" bgcolor="#e6e6e6" width="14%" rowspan=2><b>DISCIPLINAS</b><br> (código e título, sem abreviações)</td>
                    <td id="prof" value="0" bgcolor="#e6e6e6" width="25%" rowspan=2><b>PROFESSOR ORIENTADOR</b><br> (nome completo, sem abreviações)</td>
                </tr>
                <tr>
                    <td bgcolor="#e6e6e6" width="3%">B</tr>
                    <td bgcolor="#e6e6e6" width="3%">NB</tr>
                </tr>
                 </table>
                 ');
            $aM = AlunoMonitoria::find()->where(['periodo' => $periodoletivo])->andFilterWhere(['or', ['like', 'status', 'Selecionado com bolsa'], ['like', 'status', 'Selecionado sem bolsa']])->orderBy(['aluno' => SORT_DESC])->all();
            $count = count($aM);
            $n = 1;
            $id = 0;
            foreach ($aM as $monitor) {
                $disc = DisciplinaMonitoria::find()->where(['id' => $monitor->id_disciplina])->one();
                $codCurso = Curso::find()->where(['nome' => $monitor->nomeCurso])->one();
                if ($monitor->bolsa == 0) {
                    $mpdf->WriteHTML('
                    <table id="quadro_geral" width="99%">
                        <tr>
                            <td width="3%">' . $n . '</td>
                            <td width="25%">' . $monitor->aluno . '</td>
                            <td width="6%">' . $monitor->matricula . '</td>
                            <td width="8%">' . $monitor->cpf . '</td>
                            <td width="3%"></td>
                            <td width="3%">X</td>
                            <td width="13%">' . $codCurso->codigo . ' - ' . $monitor->nomeCurso . '</td>
                            <td width="14%">' . $disc->codDisciplina . ' - ' . $monitor->nomeDisciplina . '</td>
                            <td width="25%">' . $monitor->professor . '</td>
                        </tr>
                         </table>
                ');
                } elseif ($monitor->bolsa == 1) {
                    // Row para alunos bolsistas
                    $mpdf->WriteHTML('
                    <table id="quadro_geral" width="99%">
                        <tr>
                            <td width="3%">' . $n . '</td>
                            <td width="25%">' . $monitor->aluno . '</td>
                            <td width="6%">' . $monitor->matricula . '</td>
                            <td width="8%">' . $monitor->cpf . '</td>
                            <td width="3%">X</td>
                            <td width="3%"></td>
                            <td width="13%">' . $codCurso->codigo . ' - ' . $monitor->nomeCurso . '</td>
                            <td width="14%">' . $disc->codDisciplina . ' - ' . $monitor->nomeDisciplina . '</td>
                            <td width="25%">' . $monitor->professor . '</td>
                        </tr>
                    </table>
                ');
                }
                $count--;
                $n++;
                $id = $monitor->id;
            }
            // Footer do documento
            $mpdf->WriteHTML('

                 <footer> <p>
                    <b>(*)</b> Relacionar todos os monitores de todas as disciplinas do departamento neste mesmo quadro, observando a quantidade total de vagas aprovadas pela Comissão de Monitoria do Programa.<br>
                    <b>(*) B</b> = Bolsista<br>
                    <b>NB</b> = Não Bolsista<br>
                    OBS.: Encaminhar cópia deste quadro à DPA/PROEG para nomeação em portaria. 
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; 
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    Manaus, ' . date('d') . ' / ' . date('m') . ' / ' . date('Y') . '. 
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    _________________________________________________________
                    <br>
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
                    Chefe do Depto (com carimbo).    
                    </p>
                </footer>
                ');
            $mpdf->Output();
            exit;
        } else {
            return $this->render('gerarquadrogeral');
        }
    }
Пример #22
0
 public function store()
 {
     $input = Request::all();
     Curso::create($input);
     return redirect('encargado/crear-curso/exito');
 }
 public function search(Request $request)
 {
     $cursos = Curso::where('nombre_curso', 'like', '%' . $request->nombre . '%')->get();
     return \View::make('Curso/list_curso', compact('cursos'));
 }
Пример #24
0
?>

    <?php 
echo $form->field($model, 'matricula')->textInput();
?>

    <?php 
echo $form->field($model, 'nome')->textInput(['maxlength' => true]);
?>

    <?php 
echo $form->field($model, 'sexo')->dropDownList(['M' => 'Masculino', 'F' => 'Feminino']);
?>

    <?php 
echo $form->field($model, 'id_curso')->dropDownList(ArrayHelper::map(Curso::find()->all(), 'id', 'nome'));
?>

    <?php 
echo $form->field($model, 'ano_ingresso')->textInput();
?>

    <div class="form-group">
        <?php 
echo Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']);
?>
    </div>

    <?php 
ActiveForm::end();
?>
Пример #25
0
 /**
  * @return \yii\db\ActiveQuery
  */
 public function getCursoIdCursos()
 {
     return $this->hasMany(Curso::className(), ['idCurso' => 'Curso_idCurso'])->viaTable('ImparteCurso', ['Usuarios_Usuario' => 'id']);
 }