/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function examDropDown() { $sub_id = Input::get('sub_id'); $exams = Exam::where('subject_id', '=', $sub_id)->orderBy('exam', 'asc')->get(); $jsonExams = json_encode($exams); return $jsonExams; }
/** * ルートモデル結合、パターンフィルターなどを定義 * * @param \Illuminate\Routing\Router $router * @return void */ public function boot(Router $router) { // parent::boot($router); $router->model('slug', 'App\\Exam'); $router->bind('slug', function ($value) { return \App\Exam::where('slug', $value)->first(); }); }
public function searchmaterialimg(Request $request) { if ($request->ajax()) { if ($request->has('id')) { if ($request->input('id') > 0) { $find_exam = Exam::where('categories_id', '=', $request->input('id'))->get(); $scontent = view(athr . '.searchmaterialimg', ['find_exam' => $find_exam])->render(); return response()->json($scontent); } } } }
/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function index() { $student = Auth::user(); $regs = Registration::where('student_id', '=', $student->id)->get(); foreach ($regs as $reg) { $course = Course::where('id', '=', $reg->course_id)->firstOrFail(); $reg["course_name"] = $course->name; $reg["course_code"] = $course->code; $dept = Department::find($course->department_id); $reg["department"] = $dept->name; $reg["exam_taken"] = false; if (Exam::where('student_id', $student->id)->where('course_id', $course->id)->count() > 0) { $reg["exam_taken"] = true; } $reg["exam_ready"] = false; if (Question::where('course_id', $reg->course_id)->count() > 0) { $reg["exam_ready"] = true; } } return view('reg.index', compact('regs')); }
public function postAddMark() { $class = Input::get('classid'); $examNameviews = Input::get('examName'); $subJNames = Input::get('subject'); $sectionName = Input::get('section'); $examName = Exam::where('institute_code', '=', Auth::user()->institute_id)->lists('exam_id', 'exam_name'); $allclass = ClassAdd::where('institute_code', '=', Auth::user()->institute_id)->lists('class_id', 'class_name'); $markForStdSub1 = Mark::where('class_id', '=', $class)->where('exam_name', '=', $examNameviews)->where('exam_subject', '=', $subJNames)->where('section', '=', $sectionName)->get(); $markForStdSub = DB::table('tbl_studets')->join('tbl_class', 'tbl_studets.class', '=', 'tbl_class.class_id')->select('tbl_studets.*', 'tbl_class.*')->where('tbl_class.institute_code', '=', Auth::user()->institute_id)->where('tbl_studets.institute_code', '=', Auth::user()->institute_id)->where('tbl_studets.class', '=', $class)->get(); // return $markForStdSub; return view('admin.resultMark.markadd')->with('allclass', $allclass)->with('examName', $examName)->with('addmake', $markForStdSub)->with('examNameviews', $examNameviews)->with('subJNames', $subJNames)->with('classId', $class)->with('markForStdSub1', $markForStdSub1)->with('section', $sectionName); }
@if(count($alllessons) > 0) <!-- slider post --> <div class="container" id="eee"> <div id="owl-example" class="row owl-carousel slider_post_m_top"> @foreach($alllessons as $alllesson) <?php $exams = \App\Exam::where('categories_id', '=', $alllesson->categories->id)->get(); $specialitiesid = \App\Category::where('id', '=', $alllesson->categories->parent)->get(); foreach ($specialitiesid as $specialityid) { $iddspeciality = $specialityid->id; $fr_speciality = $specialityid->fr_name; $id_speciality = $specialityid->parent; } $levelsid = \App\Category::where('id', '=', $id_speciality)->get(); foreach ($levelsid as $levelid) { $fr_level = $levelid->fr_name; $id_level = $levelid->id; } ?> @if( strpos(URL::current(),'dirassa/') ) @if($idlevel == $id_level && $iddspeciality == $idspeciality) <div class="col s12 cardpost"> <div class="card"> <div class="card-image"> <img src="{{ASSET}}/images/@foreach($exams as $exam){{$exam->image}} @endforeach" alt="{{$alllesson->categories->ar_name}}"> </div> <div class="card-content"> <h2 class="box_title">{{$alllesson->categories->ar_name}}</h2> <div class="row mar_top"> <div class="col s4 center-align"> <a href="#!" class="btn-floating btn-large waves-effect waves-light gray_bg tooltipped" data-position="top" data-delay="50" data-tooltip="{{trans('accueil.quiz')}}"><img class="ver_align" src="{{ASSET}}/images/cup.png" alt="cup"></a>
public function postRoutineByClass() { //Moin //Exam routine search Function for admin //return 1; $class = Input::get('class'); //return $class; if ($class != '') { $examname = Exam::where('institute_code', '=', Auth::user()->institute_id)->lists('exam_id', 'exam_name'); $classname = ClassAdd::where('institute_code', '=', Auth::user()->institute_id)->lists('class_id', 'class_name'); $schedule = ExamSchedule::where('institute_code', '=', Auth::user()->institute_id)->get(); $teacher = Teacher::where('institute_code', '=', Auth::user()->institute_id)->get(); $sid = ClassRoutine::where('class_name', 'LIKE', $class)->pluck('institute_code'); $sat = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'SATURDAY')->get(); $sun = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'SUNDAY')->get(); $mon = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'MONDAY')->get(); $tue = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'TUESDAY')->get(); $wed = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'WEDNESDAY')->get(); $thu = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'THURSDAY')->get(); $fri = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->where('day', '=', 'FRIDAY')->get(); $search1 = Section::where('class_name', '=', $class)->where('institute_code', '=', $sid)->orderBy('section_name', 'ASC')->lists('section_category', 'section_name'); $indsec = ClassRoutine::where('class_name', '=', $class)->where('institute_code', '=', $sid)->get(); //return $indsec; return view('admin.addroutine', ['examview' => $examname, 'classview' => $classname, 'examschedule' => $schedule, 'sat' => $sat, 'sun' => $sun, 'mon' => $mon, 'tue' => $tue, 'wed' => $wed, 'thu' => $thu, 'fri' => $fri, 'sec' => $indsec, 'section' => $search1, 'teacher' => $teacher]); } }
/** * Display the specified resource. * * @param int $id * @return \Illuminate\Http\Response */ public function show($id) { $student = Auth::user(); $exam = Exam::where('course_id', '=', $id)->where('student_id', $student->id)->firstOrFail(); $course = Course::find($id); return view('exam.show', compact('exam', 'course')); }
@extends(proj.'.index') @section('dirassa') @include(proj.'.examens_first_title') <!--content--> <?php $examenspdf = \App\Exam::where('categories_id', '=', $idmaterial)->get(); foreach ($examenspdf as $examenpdf) { $examenpdf_path = $examenpdf->exam_pdf; $examencorrpdf_path = $examenpdf->exam_corr_pdf; $examencorrpdf_id = $examenpdf->id; $examencorrpdf_fr = $examenpdf->fr_title; } ?> <div class="container"> <h2 class="title_content">{{$ar_materialname}}</h2> <span class="title_lign pink accent-2"></span> </div> <object data="{{ASSET}}/pdf/{{$examenpdf_path}}" type="application/pdf" width="100%" height="800px"> <p>أنت لا تتوفر على تطبيق pdf في متصفحك ليمكنك من مشاهدة مباشرة للملف لكن يمكنك تحميل الملف من هنا <a href="{{ASSET}}/pdf/maths.pdf">تحميل الملف</a></p> </object> <h2 class="title_content">الحل</h2> <span class="title_lign pink accent-2"></span> <object data="{{ASSET}}/pdf/{{$examencorrpdf_path}}" type="application/pdf" width="100%" height="800px"> <p>أنت لا تتوفر على تطبيق pdf في متصفحك ليمكنك من مشاهدة مباشرة للملف لكن يمكنك تحميل الملف من هنا <a href="{{ASSET}}/pdf/examen.pdf">تحميل الملف</a></p> </object> <div class="container"> <div class="fb-comments" data-href="http://developers.facebook.com/{{$examencorrpdf_path}}" data-numposts="5"></div> </div> <div class="clear"></div> @include(proj.'.round') @include(proj.'.slide_post')