コード例 #1
0
ファイル: student.blade.php プロジェクト: bheftye/ceeacce_web
                    <input type="hidden" name="id_student" value="{{$student->id}}">
                    <table class="table table-bordered table-hover table-striped">
                        <thead>
                        <tr>
                            <th>Id</th>
                            <th>Clave</th>
                            <th>Nombre</th>
                            <th>Calificaci&oacute;n</th>
                            <th>Fecha</th>
                            <th>Modalidad</th>
                        </tr>
                        </thead>
                        <tbody>
                        @foreach ($module->subjects as $subject)
                        <?php 
$grade = \ceeacce\Grade::where(['id_subject' => $subject->id, "id_student" => $student->id])->first();
$studentGrade = isset($grade->grade) ? $grade->grade : 0;
?>
                        <tr>
                            <td><input type="hidden" value="{{$subject->id}}" name="ids[]">{{$subject->id}}</td>
                            <td>{{$subject->clv}}</td>
                            <td>{{mb_strtoupper($subject->name)}}</td>
                            <td><input type="text" name="grades[]" value="{{$studentGrade}}" disabled></td>
                            <td><input type="text" class="datepicker" name="dates_taken[]" value="{{(isset($grade->date_taken))?$grade->date_taken:''}}" disabled></td>
                            <td><input type="text" name="types[]" value="{{(isset($grade->type))?$grade->type:''}}" disabled></td>
                        </tr>
                        @endforeach
                        </tbody>
                    </table>
                    <input type="submit" value="Guardar" class="pull-right btn-success">
                    <input type="button" value="Editar" class="pull-right edit-grade-button btn-warning " data-id="{{$module->id}}">