public function getMarkViews($roll, $cid)
 {
     $stdInfo = Students::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $roll)->where('class', '=', $cid)->first();
     $stdClass = ClassAdd::where('class_id', '=', $stdInfo->class)->pluck('class_name');
     $showAllMark = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $roll)->where('class_id', '=', $cid)->get();
     $showAllMarkExamName = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $roll)->where('class_id', '=', $cid)->select('exam_name')->distinct()->get();
     //    $showAllMarkExamName=Mark::where('institute_code','=',Auth::user()->institute_id)->where('roll','=', $roll)->where('class_id','=',$cid)->get();
     $MarkViewGrade = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $roll)->where('class_id', '=', $cid)->first();
     //return $showAllMark->sub_mark;
     $allGrad = GradeSystem::where('institute_code', '=', Auth::user()->institute_id)->get();
     $MarkViewGrade = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $roll)->where('class_id', '=', $cid)->get();
     /*  foreach ($allGrad as $key => $value) {
              //return $MarkViewGrade->sub_mark;
              $MarkViewGrade=Mark::where('institute_code','=',Auth::user()->institute_id)->where('roll','=', $roll)->where('class_id','=',$cid)->get();
     
              //return $MarkViewGrade;
              foreach ($MarkViewGrade as $key => $markget) {
         //  return $value->mark_form;
                if ($markget->sub_mark>=$value->mark_form && $markget->sub_mark<=$value->mark_upto) {
     
                 $point=$value->grade_point ;
                 $grade=$value->grade_name ;
                 return view('admin.resultMark.markviews')->with('stdInfo',$stdInfo)->with('stdClass',$stdClass)
                 ->with('showAllMark',$showAllMark)->with('MarkViewGrade',$MarkViewGrade)->with('allGrad',$allGrad)->with('point',$point)->with('grade',$grade);
     
                }
     
                else {
                  return 2 ;
                }
              }
     
     
     
            }*/
     //  return $point.$grade;
     return view('admin.resultMark.markviews')->with('stdInfo', $stdInfo)->with('stdClass', $stdClass)->with('showAllMark', $showAllMark)->with('MarkViewGrade', $MarkViewGrade)->with('allGrad', $allGrad)->with('showAllMarkExamName', $showAllMarkExamName);
 }
Пример #2
0
 public function getMarkViews()
 {
     //  $stdInfo=Students::where('institute_code','=',Auth::user()->institute_id)->where('roll','=', $roll)->where('class','=',$cid)->first();
     $stdInfo = Students::where('institute_code', '=', Auth::user()->institute_id)->where('st_id', '=', Auth::user()->uid)->first();
     $stdClass = ClassAdd::where('class_id', '=', $stdInfo->class)->pluck('class_name');
     //return $stdInof->class;
     $showAllMark = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $stdInfo->roll)->where('class_id', '=', $stdInfo->class)->get();
     $showAllMarkExamName = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $stdInfo->roll)->where('class_id', '=', $stdInfo->class)->select('exam_name')->distinct()->get();
     //    $showAllMarkExamName=Mark::where('institute_code','=',Auth::user()->institute_id)->where('roll','=', $roll)->where('class_id','=',$cid)->get();
     $MarkViewGrade = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $stdInfo->roll)->where('class_id', '=', $stdInfo->class)->first();
     //return $showAllMark->sub_mark;
     $allGrad = GradeSystem::where('institute_code', '=', Auth::user()->institute_id)->get();
     $MarkViewGrade = Mark::where('institute_code', '=', Auth::user()->institute_id)->where('roll', '=', $stdInfo->roll)->where('class_id', '=', $stdInfo->class)->get();
     return view('admin.resultMark.markviews')->with('stdInfo', $stdInfo)->with('stdClass', $stdClass)->with('showAllMark', $showAllMark)->with('MarkViewGrade', $MarkViewGrade)->with('allGrad', $allGrad)->with('showAllMarkExamName', $showAllMarkExamName);
 }
Пример #3
0
 public function GradeDelete($gid)
 {
     $getEditGradeDelete = GradeSystem::where('institute_code', '=', Auth::user()->institute_id)->where('grade_id', '=', $gid)->delete();
     Session::flash('data', 'Delete successfully!');
     return Redirect::to('grade/index');
 }