<div class="">
    <div class="page-title">
        <div class="title_left">
            <h3>Evaluacion Diagnostica</h3>
        </div>
    </div>

    <div class="clearfix"></div>

    <div class="row">
        <div class="col-md-12 col-sm-12 col-xs-12">
            <div class="x_panel">
                <div class="x_title">
                    <h2>Actualizar una evaluación diagnostica</h2>
                    <div class="clearfix"></div>
                </div>
                <div class="x_content">
                    <form id="form-nueva" data-parsley-validate class="form-horizontal form-label-left"
                        enctype="multipart/form-data">
                        @if (!empty($observacion))
                            <input type="hidden" name="ob" id="ob"
                                value="{{ $observacion->observaciones_obed }}">
                        @endif
                        @foreach ($ed as $edd)
                            @if (!empty($observacion) && $edd->status_evaldiag == 0)
                                <script>
                                    ms = $('#ob').val();
                                    mj = "Las razones por las cuales el documento fue regresado fueron: \n";
                                    mj = mj + " " + ms;
                                    msj2('Observaciones', mj);
                                </script>
                            @endif
                        @endforeach
                        @foreach ($ed as $e)
                            @foreach ($e->docenteEvaluacionDiagEP as $d)
                                <input type="hidden" name="docente" id="docente" value="{{ $d->id }}">
                            @endforeach
                            <div class="mb-1 row">
                                <div class="control-form-label col-md-4 col-sm-6 col-xs-12 text-left text-sm-right">
                                    <label class="label-align" for="segU">Fecha
                                        en la que se
                                        aplicó la evaluación diagnostica <span class="required">*</span>
                                    </label>
                                </div>
                                <div class="col-md-4 col-sm-6 col-xs-12">
                                    <input type="date" id="fecha_eva" name="fecha_eva"
                                        class="form-control form-control-sm" value="{{ $e->fecha_evaldiag }}"
                                        required="required">
                                </div>
                            </div>
                            <div class="mb-1 row">
                                <div class="control-form-label col-md-4 col-sm-6 col-xs-12 text-left text-sm-right">
                                    <label class="label-align" for="grupo">Grupo
                                        al que se aplico
                                        <span class="required">*</span>
                                    </label>
                                </div>
                                <div class="col-md-4 col-sm-6 col-xs-12">
                                    <input type="text" id="grupo" name="grupo" value="{{ $e->grupo_evaldiag }}"
                                        required="required" class="form-control form-control-sm" disabled>
                                </div>
                            </div>
                            <div class="mb-1 row">
                                <div class="control-form-label col-md-4 col-sm-6 col-xs-12 text-left text-sm-right">
                                    <label class="label-align" for="materia">Materia <span class="required">*</span>
                                    </label>
                                </div>
                                <div class="col-md-4 col-sm-6 col-xs-12">

                                    <input type="hidden" name="mat" id="mat"
                                        value="{{ $e->materia->cve_mat }}">
                                    <input type="text" name="materia" id="materia"
                                        value="{{ $e->materia->nombre_mat }}" required="required"
                                        class="form-control form-control-sm" disabled>
                                </div>
                            </div>
                            <div class="mb-1 row">
                                <div class="control-form-label col-md-4 col-sm-6 col-xs-12 text-left text-sm-right">
                                    <label class="label-align" for="resultados">Resultado global
                                        en promedio <span class="required">*</span>
                                    </label>
                                </div>
                                <div class="col-md-4 col-sm-6 col-xs-12">
                                    <input type="text" id="resultados" name="resultados" required="required"
                                        class="form-control form-control-sm" value="{{ $e->promglob_evaldiag }}"
                                        oninput="resultado_evaluacion_general()">
                                </div>
                            </div>
                            <div class="mb-1 row">
                                <div class="control-form-label col-md-4 col-sm-6 col-xs-12 text-left text-sm-right">
                                    <label class="label-align" for="evaluacion">Evaluación general
                                        <span class="required">*</span>
                                    </label>
                                </div>
                                <div class="col-md-4 col-sm-6 col-xs-12">
                                    <input type="text" id="evaluacion" name="evaluacion"
                                        value="{{ $e->evagen_evaldiag }}" required="required"
                                        class="form-control form-control-sm" disabled>
                                </div>
                            </div>
                            <div class="mb-1 row">
                                <div class="control-form-label col-md-4 col-sm-6 col-xs-12 text-left text-sm-right">
                                    <label class="label-align"></label>
                                </div>
                                <div class="col-md-4 col-sm-6 col-xs-12">
                                    <table class="table table-bordered">
                                        <thead>
                                            <tr>
                                                <th>Excelente</th>
                                                <th>95 - 100</th>
                                            </tr>
                                        </thead>
                                        <tbody>
                                            <tr>
                                                <th>Notable</th>
                                                <th>85 - 94</th>
                                            </tr>
                                            <tr>
                                                <th>Bueno</th>
                                                <th>75 - 84</th>
                                            </tr>
                                            <tr>
                                                <th>Suficiente</th>
                                                <th>70 - 74</th>
                                            </tr>
                                            <tr>
                                                <th>Insuficiente</th>
                                                <th> 0 - 69</th>
                                            </tr>
                                        </tbody>
                                    </table>
                                </div>
                            </div>
                            <div class="mb-1 row">
                                <div class="control-form-label col-md-4 col-sm-6 col-xs-12 text-left text-sm-right">
                                    <label class="label-align" for="recomiendo">Recomiendo
                                        realizar las siguientes acciones <span class="required">*</span>
                                    </label>
                                </div>
                                <div class="col-md-4 col-sm-6 col-xs-12">
                                    <textarea class="form-control form-control-sm" id="recomiendo" name="recomiendo" rows="3" required="required"
                                        style="resize: none">{{ $e->recacc_evaldiag }}</textarea>
                                </div>
                            </div>
                        @endforeach
                        <div class="ln_solid"></div>
                        <div class="mb-1 row">
                            <div class="col-md-3 col-sm-12"></div>
                            <div class="col-md-6 col-sm-12">
                                <div class="row">
                                    <div class="col">
                                        <button type="button"
                                            onclick="update_evaluaciondiagnosticoEntregada(this.form,{{ $e->cve_evaldiag }})"
                                            class="btn btn-success btn-block" form="form-nueva"><i
                                                class=" fa fa-pencil"></i> Entregar </button>
                                    </div>
                                    <div class="col">
                                        <button type="button"
                                            onclick="update_evaluaciondiagnosticoBorrador(this.form,{{ $e->cve_evaldiag }})"
                                            class="btn btn-info btn-block" form="form-nueva"><i
                                                class=" fa fa-eraser"></i> Borrador </button>
                                    </div>
                                    <div class="col">
                                        <button class="btn btn-dark btn-block" type="button"
                                            onclick="nueva_instrumentaciondidactica()"><i class="fa fa-times"></i>
                                            Cancelar</button>
                                    </div>
                                </div>
                            </div>
                            <div class="col-md-3 col-sm-12"></div>
                        </div>
                    </form>
                    <br>
                </div>
            </div>
        </div>
    </div>
</div>
