update
							parent
							
								
									7d5eb3f8fd
								
							
						
					
					
						commit
						4c1f07ea03
					
				|  | @ -710,16 +710,24 @@ if (!function_exists('formKriteria')) { | |||
| 
 | ||||
|         $kuesioner = Kuesioner::where('ms_sekolah_id',$idSekolah)->where('tahun',date('Y'))->first(); | ||||
| 
 | ||||
|         if(session('group_alias') == 'sekolah'){ | ||||
|             $status = 0; | ||||
|         }elseif(session('group_alias') == 'penilai_kota'){ | ||||
|             $status = 1; | ||||
|         }elseif(session('group_alias') == 'penilai_provinsi'){ | ||||
|             $status = 2; | ||||
|         } | ||||
| 
 | ||||
|         foreach($kriteria as $keyKriteria => $data){ | ||||
| 
 | ||||
|             if(@$type == 'kota'){ | ||||
|                 $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',1)->first(); | ||||
|                 $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); | ||||
|                 $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first(); | ||||
|             }elseif(@$type == 'provinsi'){ | ||||
|                 $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',2)->first(); | ||||
|                 $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); | ||||
|                 $penilaianOld = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',1)->first(); | ||||
|             }else{ | ||||
|                 $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',0)->first(); | ||||
|                 $penilaian = Penilaian::where('key',$data->key)->where('ms_sekolah_id',$idSekolah)->where('status',$status)->first(); | ||||
|             } | ||||
| 
 | ||||
|             // if(session('group_alias') == 'sekolah'){
 | ||||
|  |  | |||
		Loading…
	
		Reference in New Issue