<?php 
	//open form
	echo form_open(base_url('nilai'),' class="form-horizontal"'); 
?>
<p class="text-left">	
	<a href="<?php echo base_url('form') ?>" class="btn btn-info" data-dismiss="modal"><i class="fa fa-plus"></i> Input Nilai</a>
	<?php if($this->session->userdata('level')=="Administrator") { ?>
	 <!-- <a class="btn btn-primary" href="<?php echo base_url('nilai/export') ?>" onclick="return confirm('Yakin ingin mengexport data ke excel ?')"><i class="fa fa-file-excel"></i> Export Excel</a> -->
	<?php } ?>	 
	<a href="<?php echo base_url('dashboard') ?>" class="btn btn-secondary" data-dismiss="modal"><i class="fa fa-times"></i> Kembali</a>	

</p>

<?php
//panggil form tambah
include('tambah.php');
//closing form
echo form_close();
?>
<table class="table table-bordered table-striped table-sm" id="example8">
	<thead>
		<tr>
			<th width="4%">NO.</th>
			<th width="8%">PEND/<span class="hide-on-export"><br>TGL.TES</span></th>
			<th width="8%">TGL.TES</th>
			<th width="20%">NAMA<span class="hide-on-export">/SEKOLAH</span></th>
			<th width="20%">SEKOLAH</th>
			<th width="13%">PROG
			<span class="hide-on-export"><br>/GEL.</span></th>			
			<th width="13%">GEL.</th>			
			<th width="5%">B1</th>
			<th width="5%">B2</th>
			<th width="5%">B3</th>
			<th width="5%">B4</th>
			<th width="5%">B5</th>
			<th width="5%">B6</th>
			<th width="5%">B7</th>
			<th width="5%">W1</th>
			<th width="5%">W2</th>
			<th width="5%">W3</th>
			<th width="5%">W4</th>
			<th width="5%">W5</th>
			<th width="5%">W6</th>
			<th width="5%">W7</th>
			<th width="5%">W8</th>
			<th width="4%">PENGUJI</th>
			<th width="5%">CATATAN</th>
			<th>ACTION</th>

		</tr>
	</thead>
	<tbody>
		<?php foreach ($nilai as $key => $nilai) { ?>
			
		
		<tr>
			<td><?php echo $key+1; ?></td>
			<td><b><?php echo $nilai->no_pendaftaran ?></b>
				<br><small class="hide-on-export"><?php echo date('d-m-Y H:i:s', strtotime($nilai->tanggal)) ?></small>
			</td>
			<td><?php echo date('d-m-Y H:i:s', strtotime($nilai->tanggal)) ?></td>
			<td><?php echo $nilai->nama_lengkap ?>
				<br><small class="hide-on-export"><?php echo $nilai->sekolah_asal ?></small>
			</td>	
			<td><?php echo $nilai->sekolah_asal ?></td>
			<td><?php echo $nilai->kd_kompetensi ?>
				<br><small class="hide-on-export"><?php echo $nilai->gelombang ?></small>
			</td>	
			<td><?php echo $nilai->gelombang ?></td>
			<td><?php echo $nilai->btq_membaca ?></td>
			<td><?php echo $nilai->btq_makhrojul ?></td>
			<td><?php echo $nilai->btq_tajwid ?></td>
			<td><?php echo $nilai->btq_huruftunggal ?></td>
			<td><?php echo $nilai->btq_merangkaihuruf ?></td>
			<td><?php echo $nilai->btq_kerapihan ?></td>
			<td><?php echo $nilai->btq_akhlak ?></td>
			<td><?php echo $nilai->w2n_alasan ?></td>
			<td><?php echo $nilai->w2n_kepercayaan ?></td>
			<td><?php echo $nilai->w2n_penanganan ?></td>
			<td><?php echo $nilai->w2n_kebiasaan ?></td>
			<td><?php echo $nilai->w2n_psikologi ?></td>
			<td><?php echo $nilai->w2n_sholat ?></td>
			<td><?php echo $nilai->w2n_keikutsertaan ?></td>
			<td><?php echo $nilai->w2n_kesediaan ?></td>
			<td><small><?php echo $nilai->penguji ?></small></td>
			<td><small><?php echo $nilai->catatan ?></small></td>
			<td>
				<div class="btn-group">
					<a href="<?php echo base_url('nilai/edit/'.$nilai->no_pendaftaran) ?>" class="btn btn-success btn-sm">
						<i class="fa fa-edit"></i>					
					</a>					
					<?php if($this->session->userdata('level')=="Administrator") { ?>
					<a href="<?php echo base_url('nilai/delete/'.$nilai->no_pendaftaran) ?>" class="btn btn-danger btn-sm" onclick="return confirm('Yakin ingin menghapus data nilai <?php echo $nilai->nama_lengkap ?> ?')">
						<i class="fa fa-trash"></i>					
					</a>
					<?php } ?>
				</div>
			</td>

		</tr>

	<?php } ?>	
	</tbody>
</table>
<br>
<p>
	<small>
		<b>KET. NILAI :</b><br>
		<b>1. BTQ :</b> B1:Membaca | B2:Makhrojul | B3:Tajwid | B4:Huruf Tunggal | B5:Merangkai Huruf | B6:Kerapihan | B7:Akhlak <br>
		<b>2. WAWANCARA :</b> W1:Alasan Memilih SMK MTD | W2:Besarnya Kepercayaan Terhadap Sekolah | W3:Penanganan Masalah Disekolah | W4:Kebiasaan Belajar Anak| W5:Psikologi Anak | W6:Pelaksanaan Sholat 5 Waktu | W7:Keikutsertaan Ortu dlm Meningkatkan Kualitas Pendidikan di Sekolah | W8:Kesediaan Memenuhi Kewajiban Administrasi <br>
		<b>3. Nilai diinput dari : 0 - 100</b>
	</small>
</p>
