/** * Display a listing of the resource. * * @return \Illuminate\Http\Response */ public function examAverageChart() { $exam_id = Input::get('exam_id'); $examAvg = Exam::find($exam_id)->marks->avg('obt_marks'); $jsonExamAvg = json_encode($examAvg); return $jsonExamAvg; }
/** * Show the form for creating a new resource. * * @return Response */ public function create($subject_id, $class_id) { $exams = \App\Exam::all(); $subject = \App\Subject::find($subject_id); $class = \App\Grade::find($class_id); return view('reports.create')->with('title', 'SMS|REPORT')->with('class', $class)->with('subject', $subject)->with('exams', $exams); }
/** * ルートモデル結合、パターンフィルターなどを定義 * * @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 score(Request $request) { $json = $request->get('data'); /** @var StudyExam $exam */ $exam = json_decode($json); /** @var Exam $actualExam */ $actualExam = Exam::findOrFail($exam->id); $ret = $this->_score($exam, $actualExam); return response()->json($ret); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request -- Not applicable anymore * @param int $id * @return \Illuminate\Http\Response */ public function update(ExamRequest $request, $id) { $exam = Exam::findOrFail($id); $exam->update($request->all()); foreach ($request->all()['categories-select'] as $key => $value) { $category = Category::findOrFail($value); $found = false; foreach ($exam->categories as $exam_category) { if ($exam_category->id == $category->id) { $found = true; break; } } if (!$found) { $exam->categories()->attach($category); } } return redirect('admin/exams'); }
/** * 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 listOfstudentsAndMarks() { $marksheets = Marksheet::all(); $exams = Exam::all(); return view('marksheet/listOfstudentsAndMarks', compact('marksheets', 'exams')); }
/** * Update the specified resource in storage. * * @param \Illuminate\Http\Request $request * @param int $id * @return \Illuminate\Http\Response */ public function update(Request $request, $id) { $exams = Exam::find($request->exam); $exams->grades()->sync($request->input('grade_id')); return redirect('principal/create#exam-tab')->withInput(); }
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { //dd($id); $ticket = Exam::whereid($id)->firstOrFail(); $ticket->delete(); return redirect('/exam')->with('status', 'The ticket ' . $id . ' has been deleted!'); }
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 listOfstudentsAndMarks($courseId) { // dd($courseId); $marksheets = DB::table('marksheets')->join('users', 'marksheets.trainee_id', '=', 'users.id')->join('role_user', 'marksheets.trainee_id', '=', 'role_user.user_id')->select('marksheets.id', 'marksheets.course_id', 'marksheets.exam_id', 'marksheets.trainee_id', 'marksheets.mark', 'users.name')->where('role_user.role_id', 3)->where('marksheets.course_id', $courseId)->get(); //dd($marksheets); //$marksheets=Marksheet::all(); $exams = Exam::all(); return view('marksheet/listOfstudentsAndMarks', compact('marksheets', 'exams')); }
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')
/** * Remove the specified resource from storage. * * @param int $id * @return \Illuminate\Http\Response */ public function destroy($id) { Exam::find($id)->delete(); return redirect('author/materialimage'); }