ion_auth->logged_in()){ redirect('auth'); } $this->load->library(['datatables']);// Load Library Ignited-Datatables $this->load->model('Master_model', 'master'); $this->load->model('Ujian_model', 'ujian'); $this->load->model('Soal_model', 'soal'); $this->user = $this->ion_auth->user()->row(); } public function output_json($data, $encode = true) { if($encode) $data = json_encode($data); $this->output->set_content_type('application/json')->set_output($data); } public function data() { $nip_dosen = null; if( $this->ion_auth->in_group('dosen') ) { $nip_dosen = $this->user->username; } $this->output_json($this->ujian->getHasilUjianMKWU($nip_dosen), false); } public function NilaiMhs($id) { $this->output_json($this->ujian->HslUjianById($id, true), false); } public function index() { $data = [ 'user' => $this->user, 'judul' => 'Ujian', 'subjudul'=> 'Hasil Ujian', ]; if($this->ion_auth->in_group('dosen')){ $data['matkul'] = $this->soal->getMatkulMKWUDosen($this->user->username); } $this->load->view('_templates/dashboard/_header.php', $data); $this->load->view('ujian/hasil'); $this->load->view('_templates/dashboard/_footer.php'); } public function detail($id) { $ujian = $this->ujian->getUjianMKWUById($id); $nilai = $this->ujian->bandingNilai($id); $data = [ 'user' => $this->user, 'judul' => 'Ujian', 'subjudul'=> 'Detail Hasil Ujian', 'ujian' => $ujian, 'nilai' => $nilai ]; $this->load->view('_templates/dashboard/_header.php', $data); $this->load->view('ujian/detail_hasil'); $this->load->view('_templates/dashboard/_footer.php'); } public function cetak($id) { $this->load->library('Pdf'); $mhs = $this->ujian->getIdMahasiswaMKWU($this->user->username); $hasil = $this->ujian->HslUjian($id, $mhs->id_mahasiswa)->row(); $ujian = $this->ujian->getUjianMKWUById($id); $data = [ 'ujian' => $ujian, 'hasil' => $hasil, 'mhs' => $mhs ]; $this->load->view('ujian/cetak', $data); } public function cetak_detail($id) { $this->load->library('Pdf'); $ujian = $this->ujian->getUjianMKWUById($id); $nilai = $this->ujian->bandingNilai($id); $hasil = $this->ujian->HslUjianById($id)->result(); $data = [ 'ujian' => $ujian, 'nilai' => $nilai, 'hasil' => $hasil ]; $this->load->view('ujian/cetak_detail', $data); } public function detail_ujian_mhs($id){ $ujian = $this->ujian->getUjianMKWUById($id); $nilai = $this->ujian->bandingNilai($id); $data = [ 'user' => $this->user, 'judul' => 'Ujian', 'subjudul'=> 'Detail Hasil Ujian', 'ujian' => $ujian, 'nilai' => $nilai ]; var_dump($id); $this->load->view('_templates/dashboard/_header.php', $data); $this->load->view('ujian/detail_hasil_mahasiswa'); $this->load->view('_templates/dashboard/_footer.php'); } }