function index($segment_3 = '') { $page_no = (int) $segment_3; if (empty($page_no)) { $page_no = 1; } $data['page_no'] = $page_no; # jika siswa if (is_siswa()) { $where = array('tgl_tampil <=' => date('Y-m-d'), 'tgl_tutup >=' => date('Y-m-d'), 'tampil_siswa' => 1); } elseif (is_admin() or is_pengajar()) { $where = array(); } if (!empty($_GET['q'])) { $keyword = (string) urldecode($_GET['q']); $where = array_merge($where, array('judul' => $keyword, 'konten' => $keyword)); $data['keyword'] = $keyword; } $retrieve_all = $this->pengumuman_model->retrieve_all(10, $page_no, $where, true); # format pengumuman foreach ($retrieve_all['results'] as $key => &$val) { # cari pengajar $val['pengajar'] = $this->pengajar_model->retrieve($val['pengajar_id']); # allow action $val['allow_action'] = $this->get_allow_action($val); $retrieve_all['results'][$key] = $val; } $data['pengumuman'] = $retrieve_all['results']; $data['pagination'] = $this->pager->view($retrieve_all, 'pengumuman/index/', empty($keyword) ? array() : array('?q=' . urlencode($keyword))); $this->twig->display('list-pengumuman.html', $data); }
function pp() { must_login(); if (is_pengajar()) { # panggil colorbox $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-pengajar.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css'))); $data['pengajar'] = $this->pengajar_model->retrieve(get_sess_data('user', 'id')); $data['pengajar_login'] = $this->login_model->retrieve(get_sess_data('login', 'id')); $data['status_id'] = get_sess_data('user', 'status_id'); $this->twig->display('pp-pengajar.html', $data); } if (is_siswa()) { $retrieve_siswa = $this->siswa_model->retrieve(get_sess_data('user', 'id')); $retrieve_login = $this->login_model->retrieve(get_sess_data('login', 'id')); $retrieve_all_kelas = $this->kelas_model->retrieve_all_siswa(10, 1, array('siswa_id' => $retrieve_siswa['id'])); $data['siswa'] = $retrieve_siswa; $data['siswa_login'] = $retrieve_login; $data['siswa_kelas'] = $retrieve_all_kelas; $data['status_id'] = get_sess_data('user', 'status_id'); # panggil colorbox $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-siswa.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css'))); $data['show'] = !empty($_GET['show']) ? $_GET['show'] : ''; $this->twig->display('pp-siswa.html', $data); } }
function __construct() { parent::__construct(); date_default_timezone_set('Asia/Jakarta'); # load helper $this->load->helper(array('url', 'form', 'text', 'elearning', 'security', 'file', 'number', 'date', 'download')); try { $success = install_success(); if (!$success) { redirect('setup'); } } catch (Exception $e) { redirect('setup'); } $this->load->database(); # load library $this->load->library(array('session', 'form_validation', 'pager', 'parser', 'image_lib', 'upload', 'twig', 'user_agent', 'email')); # load saja semua model $this->load->model(array('config_model', 'kelas_model', 'login_model', 'mapel_model', 'materi_model', 'pengajar_model', 'siswa_model', 'tugas_model', 'msg_model', 'pengumuman_model')); # delimiters form validation $this->form_validation->set_error_delimiters('<span class="text-error"><i class="icon-info-sign"></i> ', '</span>'); if (is_login()) { # cek session kcfindernya ada atau tidak if (empty($_SESSION['E-LEARNING']['KCFINDER'])) { create_sess_kcfinder(get_sess_data('login', 'id')); } } if (is_siswa()) { # jika kelas aktifnya kosong, sebaiknya di die jasa $kelas_aktif = $this->kelas_model->retrieve_siswa(null, array('siswa_id' => get_sess_data('user', 'id'), 'aktif' => 1)); if (empty($kelas_aktif)) { exit('Kelas aktif anda tidak ditemukan, segera hubungi admin e-learning.'); } $this->siswa_kelas_aktif = $kelas_aktif; } $this->update_link = 'http://www.dokumenary.net/category/new-elearning/feed/'; $this->portal_update_link = 'http://www.dokumenary.net/category/new-elearning/'; $this->bug_tracker_link = 'http://www.dokumenary.net/category/bug-tracker-new-elearning/'; // $this->output->enable_profiler(TRUE); # cek versi $versi_install = '1.3'; $versi = get_pengaturan('versi', 'value'); if ($versi < $versi_install) { $this->config_model->update('versi', 'Versi', $versi_install); } }
function search() { must_login(); if (empty($_GET['q'])) { redirect('welcome'); } $q = (string) $_GET['q']; $q = urldecode($q); if (is_siswa()) { $kelas_aktif = $this->siswa_kelas_aktif; } # cari siswa $retrieve_all_siswa = $this->siswa_model->retrieve_all_filter($nis = '', $nama = $q, $jenis_kelamin = array(), $tahun_masuk = '', $tempat_lahir = '', $tgl_lahir = '', $bln_lahir = '', $thn_lahir = '', $alamat = '', $agama = array(), $kelas_id = array(), $status_id = is_admin() ? array() : array(1, 2, 3), $username = '', $page_no = 1, $pagination = false); foreach ($retrieve_all_siswa as $key => &$val) { $kelas_siswa = $this->kelas_model->retrieve_siswa(null, array('siswa_id' => $val['id'], 'aktif' => 1)); # kelas aktif if (!empty($kelas_siswa) and $val['status_id'] != 3) { $kelas = $this->kelas_model->retrieve($kelas_siswa['kelas_id']); $val['kelas_aktif'] = $kelas; } $retrieve_all_siswa[$key] = $val; } # cari pengajar $retrieve_all_pengajar = $this->pengajar_model->retrieve_all_filter($nip = '', $nama = $q, $jenis_kelamin = array(), $tempat_lahir = '', $tgl_lahir = '', $bln_lahir = '', $thn_lahir = '', $alamat = '', $status_id = is_admin() ? array() : array(1, 2), $username = '', $is_admin = '', $page_no = 1, $pagination = false); # cari materi $retrieve_all_materi = $this->materi_model->retrieve_all($no_of_records = 10, $page_no = 1, $pengajar_id = array(), $siswa_id = array(), $mapel_id = array(), $judul = $q, $konten = null, $tgl_posting = null, $publish = null, $kelas_id = array(), $type = array(), $pagination = false); # cari tugas $retrieve_all_tugas = $this->tugas_model->retrieve_all($no_of_records = 10, $page_no = 1, $mapel_id = array(), $pengajar_id = is_pengajar() ? array(get_sess_data('user', 'id')) : array(), $type_id = array(), $kelas_id = is_siswa() ? array($kelas_aktif['kelas_id']) : array(), $judul = $q, $info = null, $aktif = array(), $pagination = false); # cari pesan $retrieve_all_pesan = $this->msg_model->retrieve_all(10, $page_no, get_sess_data('login', 'id'), array('content' => $q), false); foreach ($retrieve_all_pesan as $key => &$val) { $retrieve_all_pesan[$key] = $this->format_msg($val); } $results = array('siswa' => $retrieve_all_siswa, 'pengajar' => $retrieve_all_pengajar, 'materi' => $retrieve_all_materi, 'tugas' => $retrieve_all_tugas, 'pesan' => $retrieve_all_pesan); $data['results'] = $results; $data['keyword'] = $q; if (is_admin()) { # panggil colorbox $html_js = load_comp_js(array(base_url('assets/comp/colorbox/jquery.colorbox-min.js'), base_url('assets/comp/colorbox/act-siswa.js'), base_url('assets/comp/colorbox/act-pengajar.js'))); $data['comp_js'] = $html_js; $data['comp_css'] = load_comp_css(array(base_url('assets/comp/colorbox/colorbox.css'))); } $this->twig->display('search-results.html', $data); }
function edit_ampuan($segment_3 = '', $segment_4 = '', $segment_5 = '') { # siswa tidak diijinkan if (is_siswa()) { exit('Akses ditolak'); } $status_id = (int) $segment_3; $pengajar_id = (int) $segment_4; $ma_id = (int) $segment_5; $retrieve_pengajar = $this->pengajar_model->retrieve($pengajar_id); if (empty($retrieve_pengajar)) { exit('Data Pengajar tidak ditemukan'); } # jika sebagai pengajar, hanya profilnya dia yang bisa diupdate if (is_pengajar() and get_sess_data('user', 'id') != $retrieve_pengajar['id']) { exit('Akses ditolak'); } $retrieve_ma = $this->pengajar_model->retrieve_ma($ma_id); if (empty($retrieve_ma)) { exit('Mapel Ajar tidak ditemukan'); } $retrieve_mk = $this->mapel_model->retrieve_kelas($retrieve_ma['mapel_kelas_id']); $data['comp_js'] = load_comp_js(array(base_url('assets/comp/jquery/ajax.js'))); $data['status_id'] = $status_id; $data['pengajar_id'] = $pengajar_id; $data['ma'] = $retrieve_ma; $data['mk'] = $retrieve_mk; $data['kelas'] = $this->kelas_model->retrieve_all_child(); if ($this->form_validation->run('pengajar/ampuan') == TRUE) { $mapel_kelas_id = $this->input->post('mapel_kelas_id', TRUE); $jam_mulai = $this->input->post('jam_mulai', TRUE); $jam_selesai = $this->input->post('jam_selesai', TRUE); $aktif = $this->input->post('aktif'); $this->pengajar_model->update_ma($retrieve_ma['id'], $retrieve_ma['hari_id'], $jam_mulai, $jam_selesai, $pengajar_id, $mapel_kelas_id, $aktif); $this->session->set_flashdata('edit', get_alert('success', 'Jadwal Ajar berhasil diperbaharui.')); redirect('pengajar/edit_ampuan/' . $status_id . '/' . $pengajar_id . '/' . $retrieve_ma['id']); } $this->twig->display('edit-pengajar-ampuan.html', $data); }
/** * Method untuk mendapatkan banyak data tugas * * @param integer $no_of_records * @param integer $page_no * @param array $mapel_id * @param array $pengajar_id * @param array $type_id * @param array $kelas_id * @param string $judul * @param string $info * @param array $aktif * @return array * * @author Almazari <*****@*****.**> */ public function retrieve_all($no_of_records = 10, $page_no = 1, $mapel_id = array(), $pengajar_id = array(), $type_id = array(), $kelas_id = array(), $judul = null, $info = null, $aktif = array(), $pagination = true) { $no_of_records = (int) $no_of_records; $page_no = (int) $page_no; $where = array(); $group_by = array(); if (!empty($pengajar_id)) { $where['tugas.pengajar_id'] = array($pengajar_id, 'where_in'); } if (!empty($siswa_id)) { $where['tugas.siswa_id'] = array($siswa_id, 'where_in'); } if (!empty($mapel_id)) { $where['tugas.mapel_id'] = array($mapel_id, 'where_in'); } if (!empty($kelas_id)) { $where['tugas_kelas'] = array('tugas.id = tugas_kelas.tugas_id', 'join', 'inner'); $where['tugas_kelas.kelas_id'] = array($kelas_id, 'where_in'); $group_by[] = 'tugas.id'; } if (!empty($type_id)) { $where['tugas.type_id'] = array($type_id, 'where_in'); } $like = 0; if (!empty($judul)) { $where['tugas.judul'] = array($judul, 'like'); $like = 1; } if (!empty($info)) { if ($like) { $value = array($like, 'or_like'); } else { $value = array($like, 'like'); } $where['tugas.info'] = array($like, 'like'); } if (!empty($aktif)) { $where['tugas.aktif'] = array($aktif, 'where_in'); } if (is_siswa()) { $where['tugas.tampil_siswa'] = array(1, 'where'); $orderby = array('tugas.id' => 'DESC', 'tugas.aktif' => 'DESC'); } else { $orderby = array('tugas.id' => 'DESC'); } if ($pagination) { $data = $this->pager->set('tugas', $no_of_records, $page_no, $where, $orderby, 'tugas.*', $group_by); } else { # cari jumlah semua pengajar $no_of_records = $this->db->count_all('tugas'); $search_all = $this->pager->set('tugas', $no_of_records, $page_no, $where, $orderby, 'tugas.*', $group_by); $data = $search_all['results']; } return $data; }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n "; // line 10 if (is_admin() == true) { // line 11 echo " <h3>"; echo anchor("pengajar/index/" . (isset($context["status_id"]) ? $context["status_id"] : null), "Data Pengajar"); echo " / Detail Pengajar</h3>\n "; } else { // line 13 echo " <h3>"; echo anchor("pengajar/filter", "Filter Pengajar"); echo " / Detail Pengajar</h3>\n "; } // line 15 echo " </div>\n <div class=\"module-body\">\n "; // line 17 echo get_flashdata("pengajar"); echo "\n\n "; // line 19 if ($this->getAttribute(isset($context["pengajar_login"]) ? $context["pengajar_login"] : null, "id") != get_sess_data("login", "id")) { // line 20 echo " <div class=\"row-fluid\">\n <div class=\"span4\">\n <div class=\"btn-group\">\n <a class=\"btn btn-default btn-sm\" href=\""; // line 23 echo twig_escape_filter($this->env, site_url("message/to/pengajar/" . $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-comments\"></i> Kirim Pesan</a>\n </div>\n </div>\n </div>\n <br>\n "; } // line 29 echo "\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <strong>Profil pengajar "; // line 32 echo $this->getAttribute(isset($context["pengajar_login"]) ? $context["pengajar_login"] : null, "is_admin") == 1 ? "<label class=\"label label-warning\">Administrator</label>" : ""; echo "</strong>\n "; // line 33 if (is_admin() == true) { // line 34 echo " <div class=\"btn-group pull-right\" style=\"margin-top:-4px;\">\n "; // line 35 echo anchor("pengajar/edit_profile/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id"), "Edit Profil", array("class" => "iframe-4 btn btn-small btn-primary", "title" => "Edit Profil Pengajar")); echo "\n "; // line 36 echo anchor("pengajar/edit_picture/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id"), "Edit Foto", array("class" => "iframe-5 btn btn-small btn-primary", "title" => "Edit Foto Pengajar")); echo "\n </div>\n "; } // line 39 echo " </div>\n <div class=\"panel-body\">\n <table class=\"table\">\n <tr>\n <th bgcolor=\"#FBFBFB\" width=\"25%\" style=\"border-top: 0px;\">NIP</th>\n <td style=\"border-top: 0px;\">"; // line 44 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "nip"), "html", null, true); echo "</td>\n <td rowspan=\"5\" width=\"15%\" style=\"border-top: 0px;\">\n <img style=\"width:113px;\" class=\"img-polaroid\" src=\""; // line 46 echo twig_escape_filter($this->env, get_url_image_pengajar($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "foto"), "medium", $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Nama</th>\n <td>"; // line 51 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "nama"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Jenis Kelamin</th>\n <td>"; // line 55 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "jenis_kelamin"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tempat Lahir</th>\n <td>"; // line 59 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "tempat_lahir"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Tanggal Lahir</th>\n <td>"; // line 63 echo twig_escape_filter($this->env, !twig_test_empty($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "tgl_lahir")) ? tgl_indo($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "tgl_lahir")) : "", "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Alamat</th>\n <td colspan=\"2\">"; // line 67 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "alamat"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Status</th>\n <td colspan=\"2\">\n "; // line 72 if ($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "status_id") == 0) { // line 73 echo " Pending\n "; } elseif ($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "status_id") == 1) { // line 75 echo " Aktif\n "; } elseif ($this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "status_id") == 2) { // line 77 echo " Blocking\n "; } // line 79 echo " </td>\n </tr>\n </table>\n </div>\n </div>\n\n <div class=\"row-fluid\">\n <div class=\"span12\">\n <div class=\"panel panel-default\">\n <div class=\"panel-heading\">\n <strong>Jadwal Mengajar</strong>\n </div>\n <div class=\"panel-body\">\n <table class=\"table\">\n <thead>\n <tr bgcolor=\"#fbfbfb\">\n <th>HARI</th>\n <th>MATAPELAJARAN DAN JAM</th>\n </tr>\n </thead>\n <tbody>\n "; // line 100 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(get_indo_hari()); foreach ($context['_seq'] as $context["hari_id"] => $context["h"]) { // line 101 echo " <tr>\n <th width=\"15%\">"; // line 102 echo twig_escape_filter($this->env, isset($context["h"]) ? $context["h"] : null, "html", null, true); echo "</th>\n <td>\n "; // line 104 if (is_admin() == true) { // line 105 echo " "; echo anchor("pengajar/add_ampuan/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id") . "/" . (isset($context["hari_id"]) ? $context["hari_id"] : null), "Tambah", array("class" => "iframe btn btn-small btn-primary", "title" => "Tambah jadwal hari " . (isset($context["h"]) ? $context["h"] : null))); echo "\n "; } // line 107 echo "\n "; // line 108 $context["retrieve_all_ma"] = get_row_data("pengajar_model", "retrieve_all_ma", array(0 => isset($context["hari_id"]) ? $context["hari_id"] : null, 1 => $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id"), 2 => null, 3 => is_pengajar() == true || is_siswa() == true ? 1 : null)); // line 109 echo " "; if (!twig_test_empty(isset($context["retrieve_all_ma"]) ? $context["retrieve_all_ma"] : null)) { // line 110 echo " <table style=\"margin-top:10px;\" class=\"table table-condensed\">\n "; // line 111 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["retrieve_all_ma"]) ? $context["retrieve_all_ma"] : null); foreach ($context['_seq'] as $context["_key"] => $context["ma"]) { // line 112 echo " "; $context["mk"] = get_row_data("mapel_model", "retrieve_kelas", array(0 => $this->getAttribute(isset($context["ma"]) ? $context["ma"] : null, "mapel_kelas_id"))); // line 113 echo " "; $context["k"] = get_row_data("kelas_model", "retrieve", array(0 => $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "kelas_id"))); // line 114 echo " "; $context["m"] = get_row_data("mapel_model", "retrieve", array(0 => $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "mapel_id"))); // line 115 echo " <tr "; echo $this->getAttribute(isset($context["ma"]) ? $context["ma"] : null, "aktif") == 0 ? "class=\"error text-muted\"" : "class=\"info text-info\""; echo ">\n <td width=\"15%\">"; // line 116 echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["ma"]) ? $context["ma"] : null, "jam_mulai"), "H:i"), "html", null, true); echo " - "; echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["ma"]) ? $context["ma"] : null, "jam_selesai"), "H:i"), "html", null, true); echo "</td>\n <td>"; // line 117 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true); echo "</td>\n <td width=\"20%\">"; // line 118 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true); echo "</td>\n\n "; // line 120 if (is_admin() == true) { // line 121 echo " <td width=\"10%\">\n "; // line 122 echo anchor("pengajar/edit_ampuan/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id") . "/" . $this->getAttribute(isset($context["ma"]) ? $context["ma"] : null, "id"), "<i class=\"icon-edit\"></i> Edit", array("title" => "Edit Jadwal Ajar", "class" => "iframe-6")); echo "\n </td>\n "; } // line 125 echo "\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['ma'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 128 echo " </table>\n "; } // line 130 echo " </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['hari_id'], $context['h'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 133 echo " </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n "; // line 139 if (is_admin() == true) { // line 140 echo " <div class=\"row-fluid\">\n <div class=\"span5\">\n <div class=\"panel panel-default\" id=\"akun\">\n <div class=\"panel-heading\">\n <strong>Akun Login</strong>\n <div class=\"btn-group pull-right\" style=\"margin-top:-4px;\">\n "; // line 146 echo anchor("pengajar/edit_username/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id"), "Edit Username", array("class" => "iframe-2 btn btn-small btn-primary", "title" => "Edit Username pengajar")); echo "\n "; // line 147 echo anchor("pengajar/edit_password/" . (isset($context["status_id"]) ? $context["status_id"] : null) . "/" . $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "id"), "Edit Password", array("class" => "iframe-3 btn btn-small btn-primary", "title" => "Edit Password pengajar")); echo "\n </div>\n </div>\n <div class=\"panel-body\">\n <table class=\"table\">\n <tbody>\n <tr>\n <th width=\"30%\" bgcolor=\"#FBFBFB\" style=\"border-top: 0px;\">Username</th>\n <td style=\"border-top: 0px;\">\n "; // line 156 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar_login"]) ? $context["pengajar_login"] : null, "username"), "html", null, true); echo "\n </td>\n </tr>\n <tr>\n <th bgcolor=\"#FBFBFB\">Password</th>\n <td>\n *********\n </td>\n </tr>\n </tbody>\n </table>\n </div>\n </div>\n </div>\n </div>\n "; } // line 172 echo " </div>\n</div>\n"; }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>Tugas</h3>\n </div>\n <div class=\"module-body\">\n "; // line 13 echo get_flashdata("tugas"); echo "\n\n <div class=\"bs-callout bs-callout-info\">\n "; // line 16 if (is_siswa() == false) { // line 17 echo " <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n "; // line 18 echo anchor("tugas/add/3", "Tambah Tugas Ganda", array("class" => "btn btn-primary")); echo "\n "; // line 19 echo anchor("tugas/add/2", "Tambah Tugas Essay", array("class" => "btn btn-primary")); echo "\n "; // line 20 echo anchor("tugas/add/1", "Tambah Tugas Upload", array("class" => "btn btn-primary")); echo "\n </div>\n "; } // line 23 echo " <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#form-filter\"><i class=\"icon-search\" style=\"line-height: 0px;\"></i> Filter</a></b>\n\n <div id=\"form-filter\" class=\"collapse\" style=\"margin-top: 5px;\">\n "; // line 26 echo form_open("tugas"); echo "\n <table class=\"table table-condensed\">\n <tr>\n <th style=\"border-top: none;\">Mapel</th>\n <td style=\"border-top: none;\">\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n "; // line 32 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 33 echo " <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"mapel_id[]\" value=\""; // line 35 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true); echo "\" "; echo twig_escape_filter($this->env, set_checkbox("mapel_id[]", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) && in_array($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) ? true : ""), "html", null, true); echo "> "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true); echo "\n </label>\n </li>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 39 echo " </ul>\n </td>\n </tr>\n "; // line 42 if (is_siswa() == false) { // line 43 echo " <tr>\n <th>Kelas</th>\n <td>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n "; // line 47 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null); foreach ($context['_seq'] as $context["_key"] => $context["k"]) { // line 48 echo " <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"kelas_id[]\" value=\""; // line 50 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true); echo "\" "; echo twig_escape_filter($this->env, set_checkbox("kelas_id[]", $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) && in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) ? true : ""), "html", null, true); echo "> "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true); echo "\n </label>\n </li>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['k'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 54 echo " </ul>\n </td>\n </tr>\n "; } // line 58 echo " <tr>\n <th>Tipe</th>\n <td>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"type[]\" value=\"3\" "; // line 64 echo twig_escape_filter($this->env, set_checkbox("type[]", "3", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("3", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true); echo "> Ganda\n </label>\n </li>\n <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"type[]\" value=\"2\" "; // line 69 echo twig_escape_filter($this->env, set_checkbox("type[]", "2", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("2", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true); echo "> Essay\n </label>\n </li>\n <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"type[]\" value=\"1\" "; // line 74 echo twig_escape_filter($this->env, set_checkbox("type[]", "1", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("1", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true); echo "> Upload\n </label>\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <th width=\"15%\">Judul</th>\n <td>\n <input type=\"text\" name=\"judul\" class=\"span4\" value=\""; // line 83 echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "judul")), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th>Info</th>\n <td>\n <input type=\"text\" name=\"info\" class=\"span5\" value=\""; // line 89 echo twig_escape_filter($this->env, set_value("info", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "info")), "html", null, true); echo "\">\n </td>\n </tr>\n "; // line 92 if (is_pengajar() == false) { // line 93 echo " <tr>\n <th>Pembuat</th>\n <td>\n <input type=\"text\" name=\"pembuat\" class=\"span4\" value=\""; // line 96 echo twig_escape_filter($this->env, set_value("pembuat", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "pembuat")), "html", null, true); echo "\">\n </td>\n </tr>\n "; } // line 100 echo " <tr>\n <th>Status</th>\n <td>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"status[]\" value=\"1\" "; // line 106 echo twig_escape_filter($this->env, set_checkbox("status[]", "1", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) && in_array("1", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) ? true : ""), "html", null, true); echo "> Terbit\n </label>\n </li>\n <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"status[]\" value=\"0\" "; // line 111 echo twig_escape_filter($this->env, set_checkbox("status[]", "0", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status") != "" && in_array("0", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) ? true : ""), "html", null, true); echo "> Tutup\n </label>\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <td></td>\n <td>\n <button type=\"submit\" class=\"btn btn-primary\">Filter</button>\n </td>\n </tr>\n </table>\n </form>\n </div>\n\n </div>\n\n <br>\n\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"7%\">ID</th>\n <th>Informasi Tugas</th>\n <th width=\"15%\">Tipe Tugas</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n "; // line 141 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["tugas"]) ? $context["tugas"] : null); foreach ($context['_seq'] as $context["no"] => $context["m"]) { // line 142 echo " <tr "; echo is_siswa() && $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1 && sudah_ngerjakan($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), get_sess_data("user", "id")) == false ? "class=\"success\"" : ""; echo ">\n <td><b>"; // line 143 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true); echo "</b></td>\n <td>\n <strong class=\"text-warning\">"; // line 145 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</strong>\n <br><small><b>"; // line 146 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "mapel"), "nama"), "html", null, true); echo "</b>\n\n "; // line 148 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "tugas_kelas")); foreach ($context['_seq'] as $context["_key"] => $context["mk"]) { // line 149 echo " , "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "nama"), "html", null, true); echo "\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['mk'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 151 echo "\n "; // line 152 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") { // line 153 echo " , "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "durasi"), "html", null, true); echo " Menit\n "; } // line 155 echo "\n </small>\n <br><small><b>Pembuat : </b> <a href=\""; // line 157 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pembuat"), "link_profil"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pembuat"), "nama"), "html", null, true); echo "</a>, "; echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "tgl_buat")), "html", null, true); echo "</small>\n "; // line 158 if (is_siswa() && $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "info") != "") { // line 159 echo " <hr style=\"margin-top: 5px;margin-bottom: 5px;border:none;border-bottom: 1px dashed black;\">\n "; // line 160 echo $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "info"); echo "\n "; } // line 162 echo " </td>\n <td>\n "; // line 164 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda") { // line 165 echo " <span class=\"label label-success\">Ganda</span>\n "; } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") { // line 167 echo " <span class=\"label label-info\">Essay</span>\n "; } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Upload") { // line 169 echo " <span class=\"label label-warning\">Upload</span>\n "; } // line 171 echo " </td>\n <td>\n <div class=\"btn-group\">\n "; // line 174 if (is_siswa() == false) { // line 175 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") { // line 176 echo " "; echo anchor("tugas/manajemen_soal/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon icon-tasks\"></i> Soal", array("class" => "btn btn-primary btn-small")); echo "\n "; } // line 178 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 0) { // line 179 echo " "; echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-ok\"></i> Terbitkan", array("class" => "btn btn-success btn-small")); echo "\n "; } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1) { // line 181 echo " "; echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small")); echo "\n "; } // line 183 echo "\n "; // line 184 echo anchor("tugas/edit/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small")); echo "\n "; // line 185 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_id") == 3) { // line 186 echo " "; echo anchor("tugas/nilai/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-eye-open\"></i> Lihat Nilai", array("class" => "btn btn-info btn-small")); echo "\n "; } else { // line 188 echo " "; echo anchor("tugas/koreksi/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-check\"></i> Koreksi", array("class" => "btn btn-info btn-small")); echo "\n "; } // line 190 echo " "; } elseif (is_siswa() == true) { // line 191 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1) { // line 192 echo " "; if (sudah_ngerjakan($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), get_sess_data("user", "id")) == false) { // line 193 echo " "; echo anchor("tugas/kerjakan/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-ok-sign\"></i> Mulai Kerjakan", array("class" => "btn btn-success btn-small", "onclick" => "return confirm('Anda yakin ingin memulai mengerjakan tugas ini?')")); echo "\n "; } // line 195 echo " "; } else { // line 196 echo " "; echo anchor("tugas/nilai/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-flag\"></i> Lihat Nilai", array("class" => "btn btn-info btn-small iframe-lihat-nilai")); echo "\n "; } // line 198 echo " "; } // line 199 echo " </div>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 203 echo " </tbody>\n </table>\n <br>\n "; // line 206 echo isset($context["pagination"]) ? $context["pagination"] : null; echo "\n\n </div>\n</div>\n"; }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n "; // line 9 if (is_siswa() == false) { // line 10 echo " <div class=\"module-head\">\n <h3>"; // line 11 echo anchor("pengumuman", "Pengumuman"); echo " / Detail Pengumuman</h3>\n </div>\n "; } // line 14 echo "\n <div class=\"module-body\">\n "; // line 16 echo get_flashdata("pengumuman"); echo "\n\n <div class=\"btn-group pull-right\" style=\"margin-left: 10px;\">\n "; // line 19 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "allow_action")); foreach ($context['_seq'] as $context["_key"] => $context["a"]) { // line 20 echo " "; if ((isset($context["a"]) ? $context["a"] : null) == "edit") { // line 21 echo " <a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/edit/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-edit\"></i></a>\n "; } // line 23 echo "\n "; // line 24 if ((isset($context["a"]) ? $context["a"] : null) == "delete") { // line 25 echo " <a onclick=\"return confirm('Anda yakin ingin menghapus?')\" class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/delete/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-trash\"></i></a>\n "; } // line 27 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 28 echo " </div>\n\n <b style=\"margin-bottom: 0px;\">"; // line 30 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul"), "html", null, true); echo "</b>\n <small>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n <li><b>Pembuat : </b>"; // line 33 echo anchor($this->getAttribute($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "pengajar"), "link_profil"), $this->getAttribute($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "pengajar"), "nama")); echo "</li>\n <li><b>Tgl. Tampil : </b>"; // line 34 echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tampil")), "html", null, true); echo " s/d "; echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tutup")), "html", null, true); echo "</li>\n </ul>\n </small>\n <hr style=\"margin-top: 5px;margin-bottom: 10px;\">\n\n "; // line 39 echo $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "konten"); echo "\n </div>\n</div>\n"; }
function delete($segment_3 = '', $segment_4 = '') { # versi 1.2 siswa tidak bisa tambah,edit,hapus materi if (is_siswa()) { redirect('materi'); } $materi_id = (int) $segment_3; $uri_back = (string) $segment_4; if (empty($uri_back)) { $uri_back = site_url('materi'); } else { $uri_back = deurl_redirect($uri_back); } $materi = $this->materi_model->retrieve($materi_id); if (empty($materi)) { redirect($uri_back); } # cek kepemilikan if (is_pengajar() and $materi['pengajar_id'] != get_sess_data('user', 'id')) { redirect($uri_back); } if (is_siswa() and $materi['siswa_id'] != get_sess_data('user', 'id')) { redirect($uri_back); } # jika file if (!empty($materi['file']) and is_file(get_path_file($materi['file']))) { unlink(get_path_file($materi['file'])); } $this->materi_model->delete($materi['id']); $this->session->set_flashdata('materi', get_alert('warning', 'Materi berhasil dihapus.')); redirect($uri_back); }
protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>"; // line 6 $this->displayBlock('title', $context, $blocks); echo "</title>\n <link type=\"text/css\" href=\""; // line 7 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 8 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "bootstrap/css/bootstrap-responsive.min.css\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 9 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "css/theme.css\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 10 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "images/icons/css/font-awesome.css\" rel=\"stylesheet\">\n "; // line 11 $this->displayBlock('css', $context, $blocks); // line 12 echo " "; echo isset($context["comp_css"]) ? $context["comp_css"] : null; echo "\n <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\""; // line 13 echo twig_escape_filter($this->env, isset($context["favicon_url"]) ? $context["favicon_url"] : null, "html", null, true); echo "\">\n </head>\n <body>\n <div class=\"navbar navbar-fixed-top\">\n <div class=\"navbar-inner\">\n <div class=\"container\">\n <a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".navbar-inverse-collapse\">\n <i class=\"icon-reorder shaded\"></i>\n </a>\n <a class=\"brand\" href=\""; // line 22 echo twig_escape_filter($this->env, isset($context["site_url"]) ? $context["site_url"] : null, "html", null, true); echo "\">\n <img src=\""; // line 23 echo twig_escape_filter($this->env, isset($context["logo_url_medium"]) ? $context["logo_url_medium"] : null, "html", null, true); echo "\"> "; echo twig_escape_filter($this->env, isset($context["site_name"]) ? $context["site_name"] : null, "html", null, true); echo "\n </a>\n <div class=\"nav-collapse collapse navbar-inverse-collapse\">\n <form class=\"navbar-search pull-left input-append\" method=\"get\" action=\""; // line 26 echo twig_escape_filter($this->env, site_url("welcome/search"), "html", null, true); echo "\">\n <input type=\"text\" class=\"span3\" name=\"q\">\n <button class=\"btn\" type=\"submit\">\n <i class=\"icon-search\"></i>\n </button>\n </form>\n <ul class=\"nav pull-right\">\n <li class=\"nav-user dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n "; // line 34 echo twig_escape_filter($this->env, nama_panggilan(get_sess_data("user", "nama")), "html", null, true); echo "\n\n <img src=\""; // line 36 echo twig_escape_filter($this->env, get_url_image_pengajar(get_sess_data("user", "foto"), "medium", get_sess_data("user", "jenis_kelamin")), "html", null, true); echo "\" class=\"nav-avatar img-polaroid\" />\n\n <b class=\"caret\"></b></a>\n <ul class=\"dropdown-menu\">\n "; // line 40 if (is_admin()) { // line 41 echo " <li>"; echo anchor("pengajar/detail/" . get_sess_data("user", "status_id") . "/" . get_sess_data("user", "id"), "Detail Profil", array("title" => "Detail Profil")); echo "</li>\n "; } // line 43 echo "\n "; // line 44 if (is_pengajar()) { // line 45 echo " <li>"; echo anchor("login/pp", "Profil & Akun Login"); echo "</li>\n "; } // line 47 echo "\n "; // line 48 if (is_siswa()) { // line 49 echo " <li>"; echo anchor("login/pp", "Profil & Akun Login"); echo "</li>\n "; } // line 51 echo "\n <li><a href=\""; // line 52 echo twig_escape_filter($this->env, site_url("login/logout"), "html", null, true); echo "\">Logout</a></li>\n </ul>\n </li>\n </ul>\n </div>\n <!-- /.nav-collapse -->\n </div>\n </div>\n <!-- /navbar-inner -->\n </div>\n\n <!-- /navbar -->\n <div class=\"wrapper\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"span3\">\n <div class=\"sidebar\">\n "; // line 69 if (is_admin()) { // line 70 echo " <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 71 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\"><i class=\"menu-icon icon-home\"></i>Beranda</a></li>\n <li><a href=\""; // line 72 echo twig_escape_filter($this->env, site_url("pengumuman"), "html", null, true); echo "\"><i class=\"menu-icon icon-bullhorn\"></i>Pengumuman</a></li>\n <li><a href=\""; // line 73 echo twig_escape_filter($this->env, site_url("message"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Pesan <span id=\"count-new-msg\"></span></a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 77 echo twig_escape_filter($this->env, site_url("siswa"), "html", null, true); echo "\"><i class=\"menu-icon icon-group\"></i>Siswa </a></li>\n <li><a href=\""; // line 78 echo twig_escape_filter($this->env, site_url("pengajar"), "html", null, true); echo "\"><i class=\"menu-icon icon-user\"></i>Pengajar </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 82 echo twig_escape_filter($this->env, site_url("tugas?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Tugas </a></li>\n <li><a href=\""; // line 83 echo twig_escape_filter($this->env, site_url("materi?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Materi </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 87 echo twig_escape_filter($this->env, site_url("kelas/mapel_kelas"), "html", null, true); echo "\"><i class=\"menu-icon icon-paste\"></i>Matapelajaran Kelas </a></li>\n <li><a href=\""; // line 88 echo twig_escape_filter($this->env, site_url("kelas"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Manajemen Kelas </a></li>\n <li><a href=\""; // line 89 echo twig_escape_filter($this->env, site_url("mapel"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Manajemen Matapelajaran </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 93 echo twig_escape_filter($this->env, site_url("welcome/pengaturan"), "html", null, true); echo "\"><i class=\"menu-icon icon-wrench\"></i>Pengaturan</a></li>\n <li><a href=\""; // line 94 echo twig_escape_filter($this->env, site_url("email"), "html", null, true); echo "\"><i class=\"menu-icon icon-envelope\"></i>Email Template</a></li>\n </ul>\n "; } // line 97 echo "\n "; // line 98 if (is_pengajar()) { // line 99 echo " <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 100 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\"><i class=\"menu-icon icon-home\"></i>Beranda</a></li>\n <li><a href=\""; // line 101 echo twig_escape_filter($this->env, site_url("pengumuman"), "html", null, true); echo "\"><i class=\"menu-icon icon-bullhorn\"></i>Pengumuman</a></li>\n <li><a href=\""; // line 102 echo twig_escape_filter($this->env, site_url("message"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Pesan <span id=\"count-new-msg\"></span></a></li>\n <li><a href=\""; // line 103 echo twig_escape_filter($this->env, site_url("login/pp"), "html", null, true); echo "\"><i class=\"menu-icon icon-user\"></i>Profilku</a></li>\n <li><a href=\""; // line 104 echo twig_escape_filter($this->env, site_url("pengajar/jadwal"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Jadwal Mengajar </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 108 echo twig_escape_filter($this->env, site_url("tugas?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Tugas </a></li>\n <li><a href=\""; // line 109 echo twig_escape_filter($this->env, site_url("materi?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Materi </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 113 echo twig_escape_filter($this->env, site_url("pengajar/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Pengajar </a></li>\n <li><a href=\""; // line 114 echo twig_escape_filter($this->env, site_url("siswa/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Siswa </a></li>\n </ul>\n "; } // line 117 echo "\n "; // line 118 if (is_siswa()) { // line 119 echo " <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 120 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\"><i class=\"menu-icon icon-home\"></i>Beranda</a></li>\n <li><a href=\""; // line 121 echo twig_escape_filter($this->env, site_url("message"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Pesan <span id=\"count-new-msg\"></span></a></li>\n <li><a href=\""; // line 122 echo twig_escape_filter($this->env, site_url("login/pp"), "html", null, true); echo "\"><i class=\"menu-icon icon-user\"></i>Profilku</a></li>\n <li><a href=\""; // line 123 echo twig_escape_filter($this->env, site_url("siswa/jadwal_mapel"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Jadwal Matapelajaran</a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 127 echo twig_escape_filter($this->env, site_url("tugas?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Tugas </a></li>\n <li><a href=\""; // line 128 echo twig_escape_filter($this->env, site_url("materi?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Materi </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 132 echo twig_escape_filter($this->env, site_url("pengajar/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Pengajar </a></li>\n <li><a href=\""; // line 133 echo twig_escape_filter($this->env, site_url("siswa/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Siswa </a></li>\n </ul>\n "; } // line 136 echo "\n <!--/.widget-nav-->\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 139 echo twig_escape_filter($this->env, site_url("login/logout"), "html", null, true); echo "\"><i class=\"menu-icon icon-signout\"></i>Logout </a></li>\n </ul>\n </div>\n <!--/.sidebar-->\n </div>\n <!--/.span3-->\n <div class=\"span9\">\n <div class=\"content\">\n "; // line 147 $this->displayBlock('content', $context, $blocks); // line 148 echo " </div>\n </div>\n <!--/.span9-->\n </div>\n </div>\n <!--/.container-->\n </div>\n <!--/.wrapper-->\n <div class=\"footer\">\n <div class=\"container\">\n <center>\n <b class=\"copyright\">"; // line 159 echo isset($context["copyright"]) ? $context["copyright"] : null; echo " </b> All rights reserved.<br>\n "; // line 160 echo isset($context["version"]) ? $context["version"] : null; echo " | Page loaded in "; echo twig_escape_filter($this->env, isset($context["elapsed_time"]) ? $context["elapsed_time"] : null, "html", null, true); echo " seconds.\n </center>\n </div>\n </div>\n <script type=\"text/javascript\">\n var site_url = \""; // line 165 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\";\n var base_url = \""; // line 166 echo twig_escape_filter($this->env, base_url(), "html", null, true); echo "\";\n </script>\n <script src=\""; // line 168 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "scripts/jquery-1.9.1.min.js\" type=\"text/javascript\"></script>\n <script src=\""; // line 169 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "scripts/jquery-ui-1.10.1.custom.min.js\" type=\"text/javascript\"></script>\n <script src=\""; // line 170 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "bootstrap/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n "; // line 171 echo isset($context["comp_js"]) ? $context["comp_js"] : null; echo "\n <script src=\""; // line 172 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "scripts/script.js\" type=\"text/javascript\"></script>\n "; // line 173 $this->displayBlock('js', $context, $blocks); // line 174 echo " </body>\n</html>\n"; }
/** * Method untuk mendapatkan link foto pengajar/admin/siswa ketika sudah login * * @param string $img * @param string $size * @param string $jk * @return string url */ function get_url_image_session($img = '', $size = 'medium', $jk = 'Laki-laki') { if (is_pengajar() or is_admin()) { return get_url_image_pengajar($img, $size, $jk); } elseif (is_siswa()) { return get_url_image_siswa($img, $size, $jk); } }
function detail_jawaban($siswa_id = '', $tugas_id = '') { $siswa_id = (int) $siswa_id; $siswa = $this->siswa_model->retrieve($siswa_id); if (empty($siswa)) { exit('Siswa tidak ditemukan'); } # cek jika siswa, punya dia tidak if (is_siswa() and $siswa['id'] != get_sess_data('user', 'id')) { exit('Akses ditolak'); } $tugas_id = (int) $tugas_id; $tugas = $this->tugas_model->retrieve($tugas_id); if (empty($tugas)) { exit('Tugas tidak ditemukan'); } $data['tugas'] = $this->formatData($tugas); $data['siswa'] = $siswa; # cari history $history_id = 'history-mengerjakan-' . $siswa['id'] . '-' . $tugas['id']; $history = retrieve_field($history_id); if (empty($history)) { exit('Tugas belum dikerjakan'); } $history_value = json_decode($history['value'], 1); $data['history'] = $history_value; if ($tugas['type_id'] == 3) { $this->twig->display('detail-jawaban-ganda.html', $data); } elseif ($tugas['type_id'] == 2) { # jika ada post nilai if (!empty($_POST['nilai'])) { $total_nilai = 0; foreach ($_POST['nilai'] as $p_id => $p_nilai) { $total_nilai = $total_nilai + $p_nilai; } # update history $history_value['nilai'] = $_POST['nilai']; update_field($history_id, $history['nama'], json_encode($history_value)); # simpan atau update nilai $check = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); if (empty($check)) { $this->tugas_model->create_nilai($total_nilai, $tugas['id'], $siswa['id']); } else { $this->tugas_model->update_nilai($check['id'], $total_nilai, $tugas['id'], $siswa['id']); } redirect('tugas/detail_jawaban/' . $siswa['id'] . '/' . $tugas['id']); } # cek sudah koreksi belum, dengan cara cek nilainya sudah ada belum $nilai = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); $data['sudah_dikoreksi'] = !empty($nilai) ? true : false; $data['nilai'] = $nilai; $this->twig->display('detail-jawaban-essay.html', $data); } elseif ($tugas['type_id'] == 1) { if (!empty($_POST['nilai'])) { $nilai = $this->input->post('nilai', true); # update history $history_value['nilai'] = $nilai; update_field($history_id, $history['nama'], json_encode($history_value)); # simpan atau update nilai $check = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); if (empty($check)) { $this->tugas_model->create_nilai($nilai, $tugas['id'], $siswa['id']); } else { $this->tugas_model->update_nilai($check['id'], $nilai, $tugas['id'], $siswa['id']); } redirect('tugas/detail_jawaban/' . $siswa['id'] . '/' . $tugas['id']); } # cek sudah koreksi belum, dengan cara cek nilainya sudah ada belum $nilai = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); $data['sudah_dikoreksi'] = !empty($nilai) ? true : false; $data['nilai'] = $nilai; $data['file_info'] = get_file_info(get_path_file($history_value['file_name'])); $data['file_info']['mime'] = get_mime_by_extension(get_path_file($history_value['file_name'])); $this->twig->display('detail-jawaban-upload.html', $data); } }
public function block_content($context, array $blocks = array()) { // line 4 echo "<div class=\"btn-controls\">\n <div class=\"btn-box-row row-fluid\">\n <div class=\"span12\">\n <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n <small class=\"pull-right\">"; // line 8 echo twig_escape_filter($this->env, tgl_indo(date("Y-m-d")), "html", null, true); echo ", IP "; echo twig_escape_filter($this->env, get_ip(), "html", null, true); echo "</small>\n Selamat datang di <b>E-learning "; // line 9 echo twig_escape_filter($this->env, get_pengaturan("nama-sekolah", "value"), "html", null, true); echo "</b>\n <br>\n <i class=\"icon icon-map-marker\"></i> "; // line 11 echo twig_escape_filter($this->env, get_pengaturan("alamat", "value"), "html", null, true); echo "\n "; // line 12 if (!twig_test_empty(get_pengaturan("telp", "value"))) { // line 13 echo " <i class=\"icon icon-phone\"></i> "; echo twig_escape_filter($this->env, get_pengaturan("telp", "value"), "html", null, true); echo "\n "; } // line 15 echo " </div>\n </div>\n </div>\n <br>\n\n "; // line 20 if (is_admin()) { // line 21 echo " <div class=\"btn-box-row row-fluid\">\n <a href=\""; // line 22 echo twig_escape_filter($this->env, site_url("siswa/index/1"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-group\"></i><b>"; // line 23 echo twig_escape_filter($this->env, isset($context["jml_siswa"]) ? $context["jml_siswa"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Siswa</p>\n </a>\n <a href=\""; // line 26 echo twig_escape_filter($this->env, site_url("pengajar/index/1"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-user\"></i><b>"; // line 27 echo twig_escape_filter($this->env, isset($context["jml_pengajar"]) ? $context["jml_pengajar"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Pengajar</p>\n </a>\n <a href=\""; // line 30 echo twig_escape_filter($this->env, site_url("siswa/index/0"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-group\"></i><b>"; // line 31 echo twig_escape_filter($this->env, isset($context["jml_siswa_pending"]) ? $context["jml_siswa_pending"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Pending siswa</p>\n </a>\n <a href=\""; // line 34 echo twig_escape_filter($this->env, site_url("pengajar/index/0"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-user\"></i><b>"; // line 35 echo twig_escape_filter($this->env, isset($context["jml_pengajar_pending"]) ? $context["jml_pengajar_pending"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Pending pengajar</p>\n </a>\n </div>\n\n <div class=\"btn-box-row row-fluid\">\n <div class=\"span6\">\n <div class=\"well well-small\" style=\"box-shadow: none;background-color: #FFF;\">\n <b><i class=\"icon-bullhorn\"></i> Pengumuman</b>\n <table class=\"table table-striped table-condensed\">\n "; // line 45 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["pengumuman"]) ? $context["pengumuman"] : null); foreach ($context['_seq'] as $context["_key"] => $context["p"]) { // line 46 echo " <tr>\n <td>"; // line 47 echo anchor("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul")); echo "</td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 50 echo " </table>\n </div>\n </div>\n \n "; } // line 55 echo "\n "; // line 56 if (is_pengajar()) { // line 57 echo " <div class=\"btn-box-row row-fluid\">\n <div class=\"span6\">\n <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n <b><i class=\"icon-bullhorn\"></i> Pengumuman</b>\n <table class=\"table table-striped table-condensed\">\n "; // line 62 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["pengumuman"]) ? $context["pengumuman"] : null); foreach ($context['_seq'] as $context["_key"] => $context["p"]) { // line 63 echo " <tr>\n <td>"; // line 64 echo anchor("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul")); echo "</td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 67 echo " </table>\n </div>\n </div>\n <div class=\"span6\">\n <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n <b>Peraturan E-learning : </b><br>\n "; // line 73 echo get_pengaturan("peraturan-elearning", "value"); echo "\n </div>\n </div>\n </div>\n "; } // line 78 echo "\n "; // line 79 if (is_siswa()) { // line 80 echo " <div class=\"btn-box-row row-fluid\">\n <div class=\"span6\">\n\n <div class=\"widget-usage\" style=\"padding: 10px 15px; margin-bottom: 20px;\">\n <b>Tugas terbaru</b>\n <table class=\"table table-striped table-condensed\">\n "; // line 86 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["tugas_terbaru"]) ? $context["tugas_terbaru"] : null); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 87 echo " <tr>\n <td>\n <a href=\""; // line 89 echo twig_escape_filter($this->env, site_url("tugas?judul=" . urlencode($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"))), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 93 echo " </table>\n </div>\n\n <div class=\"widget-usage\" style=\"padding: 10px 15px; margin-bottom: 20px;\">\n <b>Materi terbaru</b>\n <table class=\"table table-striped table-condensed\">\n "; // line 99 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["materi_terbaru"]) ? $context["materi_terbaru"] : null); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 100 echo " <tr>\n <td>\n <a href=\""; // line 102 echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")), "html", null, true); echo "\" target=\"_tab\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 106 echo " </table>\n </div>\n\n </div>\n <div class=\"span6\">\n <div class=\"widget-usage\" style=\"padding: 10px 15px; margin-bottom: 20px;\">\n <b><i class=\"icon-bullhorn\"></i> Pengumuman</b>\n <table class=\"table table-striped table-condensed\">\n "; // line 114 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["pengumuman"]) ? $context["pengumuman"] : null); foreach ($context['_seq'] as $context["_key"] => $context["p"]) { // line 115 echo " <tr>\n <td>"; // line 116 echo anchor("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul")); echo "</td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 119 echo " </table>\n </div>\n\n <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n <b>Peraturan E-learning : </b><br>\n "; // line 124 echo get_pengaturan("peraturan-elearning", "value"); echo "\n </div>\n </div>\n </div>\n "; } // line 129 echo "\n</div>\n<!--/#btn-controls-->\n"; }
public function block_content($context, array $blocks = array()) { // line 4 echo "<div class=\"btn-controls\">\n <div class=\"btn-box-row row-fluid\">\n <div class=\"span12\">\n <div class=\"widget-usage\" style=\"padding: 10px 15px;margin-bottom: 20px;\">\n <small class=\"pull-right\">"; // line 8 echo twig_escape_filter($this->env, tgl_indo(date("Y-m-d")), "html", null, true); echo ", IP "; echo twig_escape_filter($this->env, get_ip(), "html", null, true); echo "</small>\n Selamat datang di <b>E-learning "; // line 9 echo twig_escape_filter($this->env, get_pengaturan("nama-sekolah", "value"), "html", null, true); echo "</b>\n <br>\n <i class=\"icon icon-map-marker\"></i> "; // line 11 echo twig_escape_filter($this->env, get_pengaturan("alamat", "value"), "html", null, true); echo "\n "; // line 12 if (!twig_test_empty(get_pengaturan("telp", "value"))) { // line 13 echo " <i class=\"icon icon-phone\"></i> "; echo twig_escape_filter($this->env, get_pengaturan("telp", "value"), "html", null, true); echo "\n "; } // line 15 echo " </div>\n\n "; // line 17 if (is_admin() == false && !twig_test_empty(get_pengaturan("peraturan-elearning", "value"))) { // line 18 echo " <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n <b>Peraturan E-learning : </b><br>\n "; // line 20 echo get_pengaturan("peraturan-elearning", "value"); echo "\n </div>\n "; } // line 23 echo " </div>\n </div>\n <br>\n "; // line 26 if (is_siswa()) { // line 27 echo " <div class=\"btn-box-row row-fluid\">\n <div class=\"span6\">\n <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n <b>Materi terbaru</b>\n <table class=\"table table-striped table-condensed\">\n "; // line 32 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["materi_terbaru"]) ? $context["materi_terbaru"] : null); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 33 echo " <tr>\n <td>\n <a href=\""; // line 35 echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")), "html", null, true); echo "\" target=\"_blank\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 39 echo " </table>\n </div>\n </div>\n <div class=\"span6\">\n <div class=\"widget-usage\" style=\"padding: 10px 15px;\">\n <b>Tugas terbaru</b>\n <table class=\"table table-striped table-condensed\">\n "; // line 46 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["tugas_terbaru"]) ? $context["tugas_terbaru"] : null); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 47 echo " <tr>\n <td>\n <a href=\""; // line 49 echo twig_escape_filter($this->env, site_url("tugas?judul=" . urlencode($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"))), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 53 echo " </table>\n </div>\n </div>\n </div>\n "; } // line 58 echo "\n "; // line 59 if (is_admin()) { // line 60 echo " <div class=\"btn-box-row row-fluid\" style=\"margin-top:-20px;\">\n <a href=\""; // line 61 echo twig_escape_filter($this->env, site_url("siswa/index/1"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-group\"></i><b>"; // line 62 echo twig_escape_filter($this->env, isset($context["jml_siswa"]) ? $context["jml_siswa"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Siswa</p>\n </a>\n <a href=\""; // line 65 echo twig_escape_filter($this->env, site_url("pengajar/index/1"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-user\"></i><b>"; // line 66 echo twig_escape_filter($this->env, isset($context["jml_pengajar"]) ? $context["jml_pengajar"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Pengajar</p>\n </a>\n <a href=\""; // line 69 echo twig_escape_filter($this->env, site_url("siswa/index/0"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-group\"></i><b>"; // line 70 echo twig_escape_filter($this->env, isset($context["jml_siswa_pending"]) ? $context["jml_siswa_pending"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Pending siswa</p>\n </a>\n <a href=\""; // line 73 echo twig_escape_filter($this->env, site_url("pengajar/index/0"), "html", null, true); echo "\" class=\"btn-box big span3\">\n <i class=\"icon-user\"></i><b>"; // line 74 echo twig_escape_filter($this->env, isset($context["jml_pengajar_pending"]) ? $context["jml_pengajar_pending"] : null, "html", null, true); echo "</b>\n <p class=\"text-muted\">Pending pengajar</p>\n </a>\n </div>\n\n <div class=\"well well-small\" style=\"box-shadow: none;background-color: #FFF;\">\n <div class=\"pull-right\">\n <a class=\"muted\" href=\""; // line 81 echo twig_escape_filter($this->env, isset($context["portal_update_link"]) ? $context["portal_update_link"] : null, "html", null, true); echo "\" target=\"_blank\">Portal update</a> |\n <a class=\"muted\" href=\""; // line 82 echo twig_escape_filter($this->env, isset($context["bug_tracker_link"]) ? $context["bug_tracker_link"] : null, "html", null, true); echo "\" target=\"_blank\">Bug tracker</a>\n </div>\n <b><i class=\"icon-bullhorn\"></i> Info Update</b>\n <table class=\"table table-striped table-condensed\" id=\"info-update\"></table>\n <input type=\"hidden\" id=\"info-update-link\" value=\""; // line 86 echo twig_escape_filter($this->env, isset($context["info_update_link"]) ? $context["info_update_link"] : null, "html", null, true); echo "\">\n </div>\n "; } // line 89 echo "</div>\n<!--/#btn-controls-->\n"; }
function jadwal_mapel() { if (!is_siswa()) { redirect('siswa'); } $data['list_jadwal'] = $this->get_jadwal_mapel_siswa(get_sess_data('user', 'id')); $this->twig->display('jadwal-mapel.html', $data); }
function detail_jawaban($siswa_id = '', $tugas_id = '') { $siswa_id = (int) $siswa_id; $siswa = $this->siswa_model->retrieve($siswa_id); if (empty($siswa)) { exit('Siswa tidak ditemukan'); } # cek jika siswa, punya dia tidak if (is_siswa() and $siswa['id'] != get_sess_data('user', 'id')) { exit('Akses ditolak'); } $tugas_id = (int) $tugas_id; $tugas = $this->tugas_model->retrieve($tugas_id); if (empty($tugas)) { exit('Tugas tidak ditemukan'); } $data['tugas'] = $this->formatData($tugas); $data['siswa'] = $siswa; # cari history $history_id = 'history-mengerjakan-' . $siswa['id'] . '-' . $tugas['id']; $history = retrieve_field($history_id); if (empty($history)) { exit('Tugas belum dikerjakan'); } $history_value = json_decode($history['value'], 1); # ini utnuk mengantisipasi versi < 1.5 if (!empty($history_value['pertanyaan_id'])) { $soal = array(); foreach ($history_value['pertanyaan_id'] as $key => $p_id) { $pertanyaan = $this->tugas_model->retrieve_pertanyaan($p_id); # jika pilihan ganda ambil pilihannya if ($history_value['tugas']['type_id'] == 3) { $pertanyaan['pilihan'] = $this->tugas_model->retrieve_all_pilihan($pertanyaan['id']); } $soal[$key] = $pertanyaan; } $history_value['pertanyaan'] = $soal; } $data['history'] = $history_value; if ($tugas['type_id'] == 3) { $this->twig->display('detail-jawaban-ganda.html', $data); } elseif ($tugas['type_id'] == 2) { # jika ada post nilai if (!empty($_POST['nilai'])) { $total_nilai = 0; foreach ($_POST['nilai'] as $p_id => $p_nilai) { $total_nilai = $total_nilai + $p_nilai; } # update history $new_history = $history_value; $new_history['nilai'] = $_POST['nilai']; unset($new_history['pertanyaan']); update_field($history_id, $history['nama'], json_encode($new_history)); # simpan atau update nilai $check = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); if (empty($check)) { $this->tugas_model->create_nilai($total_nilai, $tugas['id'], $siswa['id']); } else { $this->tugas_model->update_nilai($check['id'], $total_nilai, $tugas['id'], $siswa['id']); } redirect('tugas/detail_jawaban/' . $siswa['id'] . '/' . $tugas['id']); } # cek sudah koreksi belum, dengan cara cek nilainya sudah ada belum $nilai = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); $data['sudah_dikoreksi'] = !empty($nilai) ? true : false; $data['nilai'] = $nilai; $this->twig->display('detail-jawaban-essay.html', $data); } elseif ($tugas['type_id'] == 1) { if (!empty($_POST['nilai'])) { $nilai = $this->input->post('nilai', true); # update history $new_history = $history_value; $new_history['nilai'] = $nilai; unset($new_history['pertanyaan']); update_field($history_id, $history['nama'], json_encode($new_history)); # simpan atau update nilai $check = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); if (empty($check)) { $this->tugas_model->create_nilai($nilai, $tugas['id'], $siswa['id']); } else { $this->tugas_model->update_nilai($check['id'], $nilai, $tugas['id'], $siswa['id']); } redirect('tugas/detail_jawaban/' . $siswa['id'] . '/' . $tugas['id']); } # cek sudah koreksi belum, dengan cara cek nilainya sudah ada belum $nilai = $this->tugas_model->retrieve_nilai(null, $tugas['id'], $siswa['id']); $data['sudah_dikoreksi'] = !empty($nilai) ? true : false; $data['nilai'] = $nilai; $data['file_info'] = get_file_info(get_path_file($history_value['file_name'])); # bug ci http://stackoverflow.com/questions/24095996/codeignter-get-file-info-returns-filename-as-false if (empty($data['file_info']['name'])) { $data['file_info']['name'] = $history_value['file_name']; } $data['file_info']['mime'] = get_mime_by_extension(get_path_file($history_value['file_name'])); $this->twig->display('detail-jawaban-upload.html', $data); } }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>Materi</h3>\n </div>\n <div class=\"module-body\">\n "; // line 13 echo get_flashdata("materi"); echo "\n\n <div class=\"bs-callout bs-callout-info\">\n "; // line 16 if (is_siswa() == false) { // line 17 echo " <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n "; // line 18 echo anchor("materi/add/tertulis", "Tambah Materi Tertulis", array("class" => "btn btn-primary")); echo "\n "; // line 19 echo anchor("materi/add/file", "Tambah Materi File", array("class" => "btn btn-primary")); echo "\n </div>\n "; } // line 22 echo " <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#form-filter\"><i class=\"icon-search\" style=\"line-height: 0px;\"></i> PARAMETER PENCARIAN</a></b>\n\n <div id=\"form-filter\" class=\"collapse\" style=\"margin-top: 5px;\">\n "; // line 25 echo form_open("materi"); echo "\n <table class=\"table table-condensed\">\n <tr>\n <th style=\"border-top: none;\">Mapel</th>\n <td style=\"border-top: none;\">\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n "; // line 31 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 32 echo " <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"mapel_id[]\" value=\""; // line 34 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true); echo "\" "; echo twig_escape_filter($this->env, set_checkbox("mapel_id[]", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) && in_array($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) ? true : ""), "html", null, true); echo "> "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true); echo "\n </label>\n </li>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 38 echo " </ul>\n </td>\n </tr>\n <tr>\n <th>Kelas</th>\n <td>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n "; // line 45 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null); foreach ($context['_seq'] as $context["_key"] => $context["k"]) { // line 46 echo " <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"kelas_id[]\" value=\""; // line 48 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true); echo "\" "; echo twig_escape_filter($this->env, set_checkbox("kelas_id[]", $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) && in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) ? true : ""), "html", null, true); echo "> "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true); echo "\n </label>\n </li>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['k'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 52 echo " </ul>\n </td>\n </tr>\n <tr>\n <th>Tipe</th>\n <td>\n <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"type[]\" value=\"tertulis\" "; // line 61 echo twig_escape_filter($this->env, set_checkbox("type[]", "tertulis", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("tertulis", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true); echo "> Tertulis\n </label>\n </li>\n <li>\n <label class=\"checkbox inline\">\n <input type=\"checkbox\" name=\"type[]\" value=\"file\" "; // line 66 echo twig_escape_filter($this->env, set_checkbox("type[]", "file", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("file", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true); echo "> File\n </label>\n </li>\n </ul>\n </td>\n </tr>\n <tr>\n <th width=\"15%\">Judul</th>\n <td>\n <input type=\"text\" name=\"judul\" class=\"span4\" value=\""; // line 75 echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "judul")), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th>Konten</th>\n <td>\n <input type=\"text\" name=\"konten\" class=\"span5\" value=\""; // line 81 echo twig_escape_filter($this->env, set_value("konten", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "konten")), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <th>Pembuat</th>\n <td>\n <input type=\"text\" name=\"pembuat\" class=\"span4\" value=\""; // line 87 echo twig_escape_filter($this->env, set_value("pembuat", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "pembuat")), "html", null, true); echo "\">\n </td>\n </tr>\n <tr>\n <td></td>\n <td>\n <button type=\"submit\" class=\"btn btn-primary\">Filter</button>\n </td>\n </tr>\n </table>\n </form>\n </div>\n\n </div>\n\n <br>\n\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"7%\">ID</th>\n <th>Informasi Materi</th>\n <th width=\"15%\">Tipe Materi</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n "; // line 114 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable(isset($context["materi"]) ? $context["materi"] : null); foreach ($context['_seq'] as $context["no"] => $context["m"]) { // line 115 echo "\n "; // line 116 if (is_admin() == true) { // line 117 echo " "; $context["action_edit"] = true; // line 118 echo " "; $context["action_delete"] = true; // line 119 echo " "; } elseif (is_pengajar() == true) { // line 120 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pengajar_id") == get_sess_data("user", "id")) { // line 121 echo " "; $context["action_edit"] = true; // line 122 echo " "; $context["action_delete"] = true; // line 123 echo " "; } else { // line 124 echo " "; $context["action_edit"] = false; // line 125 echo " "; $context["action_delete"] = false; // line 126 echo " "; } // line 127 echo " "; } elseif (is_siswa() == true) { // line 128 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "siswa_id") == get_sess_data("user", "id")) { // line 129 echo " "; $context["action_edit"] = true; // line 130 echo " "; $context["action_delete"] = true; // line 131 echo " "; } else { // line 132 echo " "; $context["action_edit"] = false; // line 133 echo " "; $context["action_delete"] = false; // line 134 echo " "; } // line 135 echo " "; } // line 136 echo "\n <tr>\n <td><b>"; // line 138 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true); echo "</b></td>\n <td>\n <strong class=\"text-warning\">\n "; // line 141 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "\n <span class=\"as-link caret\" data-toggle=\"collapse\" data-target=\"#toggle-"; // line 142 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true); echo "\" style=\"margin-top:10px;\"></span>\n </strong>\n <div class=\"collapse\" id=\"toggle-"; // line 144 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true); echo "\">\n <table class=\"table table-condensed table-bordered\">\n <tr>\n <td width=\"20%\">Mapel</td>\n <td>"; // line 148 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "mapel"), "nama"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <td>Kelas</td>\n <td>\n "; // line 153 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "materi_kelas")); foreach ($context['_seq'] as $context["_key"] => $context["mk"]) { // line 154 echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "nama"), "html", null, true); echo " \n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['mk'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 156 echo " </td>\n </tr>\n <tr>\n <td>Pembuat</td>\n <td>\n <a href=\""; // line 161 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pembuat"), "link_profil"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pembuat"), "nama"), "html", null, true); echo "</a>, <small>"; echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "tgl_posting")), "html", null, true); echo "</small>\n </td>\n </tr>\n <tr>\n <td>"; // line 165 echo twig_test_empty($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "file")) ? "Dibaca" : "Diunduh"; echo "</td>\n <td>"; // line 166 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "views"), "html", null, true); echo "</td>\n </tr>\n <tr>\n <td>Komentar</td>\n <td>"; // line 170 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "jml_komentar"), "html", null, true); echo "</td>\n </tr>\n </table>\n </div>\n </td>\n <td>\n "; // line 176 echo !twig_test_empty($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "file")) ? "<span class=\"label label-info\">File</span>" : "<span class=\"label label-success\">Tertulis</span>"; echo "\n </td>\n <td>\n <div class=\"btn-group\">\n "; // line 180 if (!twig_test_empty($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "file"))) { // line 181 echo " "; $context["url_type"] = "file"; // line 182 echo " "; } else { // line 183 echo " "; $context["url_type"] = "tertulis"; // line 184 echo " "; } // line 185 echo " "; echo anchor("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-zoom-in\"></i> Detail", array("class" => "btn btn-default btn-small", "target" => "_tab")); echo "\n\n "; // line 187 if ((isset($context["action_edit"]) ? $context["action_edit"] : null) == true) { // line 188 echo " "; echo anchor("materi/edit/" . (isset($context["url_type"]) ? $context["url_type"] : null) . "/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small")); echo "\n "; } // line 190 echo "\n "; // line 191 if ((isset($context["action_delete"]) ? $context["action_delete"] : null) == true) { // line 192 echo " "; echo anchor("materi/delete/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-trash\"></i> Hapus", array("class" => "btn btn-default btn-small", "onclick" => "return confirm('Anda yakin ingin menghapus?')")); echo "\n "; } // line 194 echo " </div>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 198 echo " </tbody>\n </table>\n <br>\n "; // line 201 echo isset($context["pagination"]) ? $context["pagination"] : null; echo "\n\n </div>\n</div>\n"; }
/** * Method untuk mendapatkan data session * * @param string $key1 * @param string $key2 * @return array */ function get_sess_data($key1, $key2) { $CI =& get_instance(); $CI->load->library('session'); $sess_data = $CI->session->userdata('login_' . APP_PREFIX); if (!empty($sess_data)) { $type = ''; if (is_admin()) { $type = 'admin'; } if (is_pengajar()) { $type = 'pengajar'; } if (is_siswa()) { $type = 'siswa'; } if (!empty($type)) { return $sess_data[$type][$key1][$key2]; } } }
public function block_content($context, array $blocks = array()) { // line 8 echo "<div class=\"module\">\n <div class=\"module-head\">\n <h3>Pencarian</h3>\n </div>\n <div class=\"module-body\">\n <div class=\"well well-small\" style=\"box-shadow: none;\">\n Hasil pencarian dengan kata kunci : <b>"; // line 14 echo twig_escape_filter($this->env, isset($context["keyword"]) ? $context["keyword"] : null, "html", null, true); echo "</b>\n </div>\n\n "; // line 17 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa"))) { // line 18 echo " <b><i class=\"icon-group\"></i> Siswa </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 20 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa")); foreach ($context['_seq'] as $context["_key"] => $context["v"]) { // line 21 echo " <tr>\n <td>\n <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 23 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "medium", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n <b>"; // line 24 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true); echo " "; echo !twig_test_empty($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis") . ")</span>" : ""; echo "</b>\n <br>"; // line 25 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3 ? $this->getAttribute($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "kelas_aktif"), "nama") . " , " : "", "html", null, true); echo " "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin"), "html", null, true); echo " , "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "agama"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n "; // line 29 if (is_admin()) { // line 30 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n <li class=\"dropdown\">\n <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-"; // line 32 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-"; // line 33 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\">\n <li>"; // line 34 echo anchor("siswa/edit_profile/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Siswa")); echo "</li>\n <li>"; // line 35 echo anchor("siswa/edit_picture/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Siswa")); echo "</li>\n "; // line 36 if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3) { // line 37 echo " <li>"; echo anchor("siswa/moved_class/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Kelas Aktif", array("class" => "iframe-kelas-aktif", "title" => "Edit Kelas Aktif")); echo "</li>\n "; } // line 39 echo " <li>"; echo anchor("siswa/edit_username/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Siswa")); echo "</li>\n <li>"; // line 40 echo anchor("siswa/edit_password/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Siswa")); echo "</li>\n </ul>\n </li>\n "; } else { // line 44 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n "; } // line 46 echo " </ul>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 50 echo " </table>\n <br>\n "; } // line 53 echo "\n "; // line 54 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar"))) { // line 55 echo " <b><i class=\"icon-user\"></i> Pengajar </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 57 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar")); foreach ($context['_seq'] as $context["no"] => $context["v"]) { // line 58 echo " <tr>\n <td>\n <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 60 echo twig_escape_filter($this->env, get_url_image_pengajar($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "medium", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true); echo "\">\n <b>"; // line 61 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true); echo " "; echo !twig_test_empty($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nip")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nip") . ")</span>" : ""; echo "</b>\n "; // line 62 $context["is_admin"] = get_row_data("login_model", "retrieve", array(0 => null, 1 => null, 2 => null, 3 => null, 4 => $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "is_admin"); // line 63 echo " "; if ((isset($context["is_admin"]) ? $context["is_admin"] : null) == 1) { // line 64 echo " <span class=\"label label-warning\">Administrator</span>\n "; } // line 66 echo " <br><b>Alamat :</b> "; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "alamat"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n "; // line 70 if (is_admin() == true) { // line 71 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengajar/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n <li class=\"dropdown\">\n <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-"; // line 73 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-"; // line 74 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true); echo "\">\n <li>"; // line 75 echo anchor("pengajar/edit_profile/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Pengajar")); echo "</li>\n <li>"; // line 76 echo anchor("pengajar/edit_picture/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Pengajar")); echo "</li>\n <li>"; // line 77 echo anchor("pengajar/edit_username/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Pengajar")); echo "</li>\n <li>"; // line 78 echo anchor("pengajar/edit_password/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Pengajar")); echo "</li>\n </ul>\n </li>\n "; } else { // line 82 echo " <li><a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengajar/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true); echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n "; } // line 84 echo " </ul>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 88 echo " </table>\n <br>\n "; } // line 91 echo "\n "; // line 92 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi"))) { // line 93 echo " <b><i class=\"icon-book\"></i> Materi </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 95 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi")); foreach ($context['_seq'] as $context["_key"] => $context["m"]) { // line 96 echo " "; if (is_admin() == true) { // line 97 echo " "; $context["action_edit"] = true; // line 98 echo " "; $context["action_delete"] = true; // line 99 echo " "; } elseif (is_pengajar() == true) { // line 100 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pengajar_id") == get_sess_data("user", "id")) { // line 101 echo " "; $context["action_edit"] = true; // line 102 echo " "; $context["action_delete"] = true; // line 103 echo " "; } else { // line 104 echo " "; $context["action_edit"] = false; // line 105 echo " "; $context["action_delete"] = false; // line 106 echo " "; } // line 107 echo " "; } // line 108 echo "\n "; // line 109 if (is_siswa()) { // line 110 echo " <tr>\n <td>\n <a href=\""; // line 112 echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")), "html", null, true); echo "\" target=\"_tab\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } else { // line 116 echo " <tr>\n <td>\n "; // line 118 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <div class=\"btn-group\">\n "; // line 122 if (!twig_test_empty($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "file"))) { // line 123 echo " "; $context["url_type"] = "file"; // line 124 echo " "; } else { // line 125 echo " "; $context["url_type"] = "tertulis"; // line 126 echo " "; } // line 127 echo " "; echo anchor("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-zoom-in\"></i> Detail", array("class" => "btn btn-default btn-small", "target" => "_tab")); echo "\n\n "; // line 129 if ((isset($context["action_edit"]) ? $context["action_edit"] : null) == true) { // line 130 echo " "; echo anchor("materi/edit/" . (isset($context["url_type"]) ? $context["url_type"] : null) . "/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small")); echo "\n "; } // line 132 echo "\n "; // line 133 if ((isset($context["action_delete"]) ? $context["action_delete"] : null) == true) { // line 134 echo " "; echo anchor("materi/delete/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-trash\"></i> Hapus", array("class" => "btn btn-default btn-small", "onclick" => "return confirm('Anda yakin ingin menghapus?')")); echo "\n "; } // line 136 echo " </div>\n </td>\n </tr>\n "; } // line 140 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 141 echo " </table>\n <br>\n "; } // line 144 echo "\n "; // line 145 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas"))) { // line 146 echo " <b><i class=\"icon-tasks\"></i> Tugas </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas")), "html", null, true); echo " record)\n <table class=\"table table-condensed table-striped\">\n "; // line 148 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas")); foreach ($context['_seq'] as $context["no"] => $context["m"]) { // line 149 echo " "; if (is_admin() || is_pengajar()) { // line 150 echo " <tr>\n <td>\n "; // line 152 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "\n </td>\n <td width=\"20%\">\n <div class=\"btn-group\">\n "; // line 156 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") { // line 157 echo " "; echo anchor("tugas/manajemen_soal/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon icon-tasks\"></i> Soal", array("class" => "btn btn-primary btn-small")); echo "\n "; } // line 159 echo " "; if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 0) { // line 160 echo " "; echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-ok\"></i> Terbitkan", array("class" => "btn btn-success btn-small")); echo "\n "; } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1) { // line 162 echo " "; echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small")); echo "\n "; } // line 164 echo "\n "; // line 165 echo anchor("tugas/edit/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small")); echo "\n "; // line 166 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_id") == 3) { // line 167 echo " "; echo anchor("tugas/nilai/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-eye-open\"></i> Lihat Nilai", array("class" => "btn btn-info btn-small")); echo "\n "; } else { // line 169 echo " "; echo anchor("tugas/koreksi/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-check\"></i> Koreksi", array("class" => "btn btn-info btn-small")); echo "\n "; } // line 171 echo " </div>\n </td>\n </tr>\n "; } else { // line 175 echo " <tr>\n <td>\n <a href=\""; // line 177 echo twig_escape_filter($this->env, site_url("tugas?judul=" . urlencode($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"))), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true); echo "</a>\n </td>\n </tr>\n "; } // line 181 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['no'], $context['m'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 182 echo " </table><br>\n "; } // line 184 echo "\n "; // line 185 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan"))) { // line 186 echo " <b><i class=\"icon-comments\"></i> Pesan </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan")), "html", null, true); echo " record)\n <div class=\"message\">\n <table class=\"table table-message\">\n <tbody>\n "; // line 190 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan")); foreach ($context['_seq'] as $context["_key"] => $context["d"]) { // line 191 echo " <tr class=\""; echo $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "opened") == 0 ? "unread" : ""; echo " clickable-row\" data-href=\""; echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "#msg-" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id")), "html", null, true); echo "\">\n <td class=\"cell-author\">\n <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\""; // line 193 echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "foto"), "medium", $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "jenis_kelamin")), "html", null, true); echo "\">\n <a href=\""; // line 194 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "link_profil"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, character_limiter($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "nama"), 23, "..."), "html", null, true); echo "</a>\n <br><small>"; // line 195 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "date"), "html", null, true); echo "</small>\n </td>\n <td class=\"cell-title hidden-phone hidden-tablet\">\n <a class=\"pull-right\" style=\"margin-left:10px;\" href=\""; // line 198 echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "/?confirm=1#confirm"), "html", null, true); echo "\"><i class=\"icon-trash\"></i></a>\n "; // line 199 if (!twig_test_empty($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"))) { // line 200 echo " <div>To <a href=\""; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"), "link_profil"), "html", null, true); echo "\">"; echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"), "nama"), "html", null, true); echo "</a></div>\n "; } // line 202 echo " "; echo character_limiter(strip_tags($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "content")), 80, "..."); echo "\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['d'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 206 echo " </tbody>\n </table>\n <div>\n <br>\n "; } // line 211 echo "\n "; // line 212 if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman"))) { // line 213 echo " <b><i class=\"icon-bullhorn\"></i> Pengumuman </b>(ditemukan "; echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman")), "html", null, true); echo " record)\n <table class=\"table table-striped\">\n <thead>\n <tr>\n <th width=\"5%\">ID</th>\n <th>Judul</th>\n <th width=\"17%\">Tgl. Tampil</th>\n <th width=\"17%\">Tgl. Tutup</th>\n <th width=\"15%\"></th>\n </tr>\n </thead>\n <tbody>\n "; // line 225 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman")); foreach ($context['_seq'] as $context["_key"] => $context["p"]) { // line 226 echo " <tr>\n <td><b>"; // line 227 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), "html", null, true); echo "</b></td>\n <td><a href=\""; // line 228 echo twig_escape_filter($this->env, site_url("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\"><b>"; echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul"), "html", null, true); echo "</b></a></td>\n <td>"; // line 229 echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tampil")), "html", null, true); echo "</td>\n <td>"; // line 230 echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tutup")), "html", null, true); echo "</td>\n <td>\n <div class=\"btn-group\">\n "; // line 233 $context['_parent'] = (array) $context; $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "allow_action")); foreach ($context['_seq'] as $context["_key"] => $context["a"]) { // line 234 echo " "; if ((isset($context["a"]) ? $context["a"] : null) == "detail") { // line 235 echo " <a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Detail\"><i class=\"icon-zoom-in\"></i></a>\n "; } // line 237 echo "\n "; // line 238 if ((isset($context["a"]) ? $context["a"] : null) == "edit") { // line 239 echo " <a class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/edit/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-edit\"></i></a>\n "; } // line 241 echo "\n "; // line 242 if ((isset($context["a"]) ? $context["a"] : null) == "delete") { // line 243 echo " <a onclick=\"return confirm('Anda yakin ingin menghapus?')\" class=\"btn btn-default btn-small\" href=\""; echo twig_escape_filter($this->env, site_url("pengumuman/delete/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true); echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-trash\"></i></a>\n "; } // line 245 echo " "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 246 echo " </div>\n </td>\n </tr>\n "; } $_parent = $context['_parent']; unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']); $context = array_intersect_key($context, $_parent) + $_parent; // line 250 echo " </tbody>\n </table>\n <br>\n "; } // line 254 echo "\n </div>\n</div>\n"; }
function post_data($page) { switch ($page) { case 'hirarki_kelas': $o = 1; foreach ((array) $_POST['list'] as $id => $parent_id) { if (!is_numeric($parent_id)) { $parent_id = null; } $retrieve = $this->kelas_model->retrieve($id, true); # update $this->kelas_model->update($id, $retrieve['nama'], $parent_id, $o, $retrieve['aktif']); $o++; } break; case 'get_subkelas': $parent_id = $this->input->post('parent_kelas_id', true); if (!empty($parent_id)) { echo '<option value="">--pilih--</option>'; $subkelas = $this->kelas_model->retrieve_all($parent_id, array('aktif' => 1)); foreach ($subkelas as $sub) { echo '<option value="' . $sub['id'] . '">' . $sub['nama'] . '</option>'; } } break; case 'mapel_kelas': $kelas_id = $this->input->post('kelas_id', TRUE); echo '<option value="">Pilih Matapelajaran</option>'; $retrieve_all = $this->mapel_model->retrieve_all_kelas(null, $kelas_id, 1); foreach ($retrieve_all as $v) { $m = $this->mapel_model->retrieve($v['mapel_id']); if (empty($m)) { continue; } echo '<option value="' . $v['id'] . '">' . $m['nama'] . '</option>'; } break; case 'update_jawaban_ganda': if (!is_siswa()) { exit('Akses ditolak'); } $tugas_id = (int) $this->input->post('tugas_id', true); $pertanyaan_id = (int) $this->input->post('pertanyaan_id', true); $pilihan_id = (int) $this->input->post('pilihan_id', true); $tugas = $this->tugas_model->retrieve($tugas_id); if (empty($tugas)) { exit('Akses ditolak'); } $pertanyaan = $this->tugas_model->retrieve_pertanyaan($pertanyaan_id); if (empty($pertanyaan)) { exit('Akses ditolak'); } if ($pertanyaan['tugas_id'] != $tugas['id']) { exit('Akses ditolak'); } $pilihan = $this->tugas_model->retrieve_pilihan($pilihan_id, $pertanyaan['id']); if (empty($pilihan)) { exit('Akses ditolak'); } $table_name = 'field_tambahan'; $field_id = 'mengerjakan-' . get_sess_data('user', 'id') . '-' . $tugas['id']; $field_name = 'Mengerjakan Tugas'; $check_field = retrieve_field($field_id); if (empty($check_field)) { exit('Akses ditolak'); } # update index jawaban $field_value = json_decode($check_field['value'], 1); $field_value['jawaban'][$pertanyaan['id']] = $pilihan['id']; update_field($field_id, $field_name, json_encode($field_value)); break; case 'update_jawaban_essay': if (!is_siswa()) { exit('Akses ditolak'); } $tugas_id = (int) $this->input->post('tugas_id', true); $pertanyaan_id = (int) $this->input->post('pertanyaan_id', true); $jawaban = $this->input->post('jawaban', true); $tugas = $this->tugas_model->retrieve($tugas_id); if (empty($tugas)) { exit('Akses ditolak'); } $pertanyaan = $this->tugas_model->retrieve_pertanyaan($pertanyaan_id); if (empty($pertanyaan)) { exit('Akses ditolak'); } if ($pertanyaan['tugas_id'] != $tugas['id']) { exit('Akses ditolak'); } $table_name = 'field_tambahan'; $field_id = 'mengerjakan-' . get_sess_data('user', 'id') . '-' . $tugas['id']; $field_name = 'Mengerjakan Tugas'; $check_field = retrieve_field($field_id); if (empty($check_field)) { exit('Akses ditolak'); } # update index jawaban $field_value = json_decode($check_field['value'], 1); $field_value['jawaban'][$pertanyaan['id']] = $jawaban; update_field($field_id, $field_name, json_encode($field_value)); break; case 'new_msg': $active_msg_id = $this->input->post('active_msg_id', true); $active_msg_id = (int) $active_msg_id; if (empty($active_msg_id)) { echo ''; } $msg = $this->msg_model->retrieve(get_sess_data('login', 'id'), $active_msg_id, false, false); if (empty($msg)) { echo ''; } $msg = $msg['retrieve']; $this->db->where('owner_id', get_sess_data('login', 'id')); $this->db->where('opened', '0'); $this->db->where_in('sender_receiver_id', array(get_sess_data('login', 'id'), $msg['sender_receiver_id'])); $this->db->order_by('id', 'ASC'); $results = $this->db->get('messages'); foreach ($results->result_array() as $retrieve) { $this->msg_model->update_read($retrieve['id']); # jika inbox yang dicari pengirimnya if ($retrieve['type_id'] == 1) { $get_user = $retrieve['sender_receiver_id']; } elseif ($retrieve['type_id'] == 2) { $get_user = $retrieve['owner_id']; } # cari sender/receiver $login = $this->login_model->retrieve($get_user); if (!empty($login['siswa_id'])) { $user = $this->siswa_model->retrieve($login['siswa_id']); if (is_admin()) { $user['link_profil'] = site_url('siswa/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('siswa/detail/' . $user['id']); } $user['link_image'] = get_url_image_siswa($user['foto'], 'medium', $user['jenis_kelamin']); } elseif (!empty($login['pengajar_id'])) { $user = $this->pengajar_model->retrieve($login['pengajar_id']); if (is_admin()) { $user['link_profil'] = site_url('pengajar/detail/' . $user['status_id'] . '/' . $user['id']); } else { $user['link_profil'] = site_url('pengajar/detail/' . $user['id']); } $user['link_image'] = get_url_image_pengajar($user['foto'], 'medium', $user['jenis_kelamin']); } # format tanggal, jika hari ini if (date('Y-m-d') == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])); } elseif (date('Y-m-d', strtotime('-1 day', strtotime(date('Y-m-d')))) == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])) . ' kemarin'; } elseif (date('Y-m-d', strtotime('-2 day', strtotime(date('Y-m-d')))) == date('Y-m-d', strtotime($retrieve['date']))) { $retrieve['date'] = date('H:i', strtotime($retrieve['date'])) . ' lusa'; } else { $retrieve['date'] = tgl_jam_indo($retrieve['date']); } ?> <tr id="msg-<?php echo $val['id']; ?> "> <td class="user flag-new"> <img class="img-user img-polaroid img-circle pull-left" src="<?php echo $user['link_image']; ?> "> <a href="{{ n.profil.link_profil }}"><?php echo character_limiter($user['nama'], 23, '...'); ?> </a> <br><small><?php echo $retrieve['date']; ?> </small> </td> <td class="msg-content"> <a class="pull-right" style="margin-left:10px;" href="<?php echo site_url('message/del/' . $retrieve['id'] . '/' . $msg['id']); ?> " onclick="return confirm('Anda yakin ingin menghapus?')"><i class="icon-trash"></i></a> <?php echo html_entity_decode($retrieve['content']); ?> </td> </tr> <?php } break; } }
/** * Method untuk cek apakah password siswa sama dengan nis * * @return boolean */ function pass_siswa_equal_nis() { if (is_siswa()) { $nis_siswa = get_sess_data('user', 'nis'); if (empty($nis_siswa)) { return false; } # ambil nis siswa $nis = get_row_data('siswa_model', 'retrieve', array('id' => get_sess_data('user', 'id')), 'nis'); if (empty($nis)) { return false; } $md5_nis = md5($nis); # dapatkan password siswa $md5_pass = get_row_data('login_model', 'retrieve', array('id' => get_sess_data('login', 'id')), 'password'); if ($md5_nis == $md5_pass) { return true; } } return false; }
/** * Method untuk ngecek apakah siswa sedang ujian atau tidak * @return boolean */ function sedang_ujian() { # cek login siswa if (!is_siswa()) { return false; } $field_id = 'mengerjakan-' . get_sess_data('user', 'id') . '-'; $table = 'field_tambahan'; # cek tabel $this->db->like('id', $field_id, 'after'); $result = $this->db->get($table); $data_field = $result->row_array(); if (!empty($data_field)) { return true; } }
function to($segment_3 = '', $segment_4 = '') { $tujuan = (string) $segment_3; if (!in_array($tujuan, array('siswa', 'pengajar'))) { exit('Tujuan tidak ditemukan.'); } $id = (int) $segment_4; if (empty($id)) { exit('Tujuan tidak ditemukan.'); } if ($tujuan == 'siswa') { $user = $this->siswa_model->retrieve($id); if (empty($user)) { exit('Tujuan tidak ditemukan.'); } if (is_siswa() && get_sess_data('user', 'id') == $user['id']) { exit('Anda tidak dapat mengirim pesan ke diri sendiri.'); } $login = $this->login_model->retrieve(null, null, null, $user['id']); } if ($tujuan == 'pengajar') { $user = $this->pengajar_model->retrieve($id); if (empty($user)) { exit('Tujuan tidak ditemukan.'); } if ((is_pengajar() || is_admin()) && get_sess_data('user', 'id') == $user['id']) { exit('Anda tidak dapat mengirim pesan ke diri sendiri.'); } $login = $this->login_model->retrieve(null, null, null, null, $user['id']); } # cari masih ada percakapan tidak $this->db->where('owner_id', get_sess_data('login', 'id')); $this->db->where_in('sender_receiver_id', array(get_sess_data('login', 'id'), $login['id'])); $this->db->order_by('id', 'DESC'); $result = $this->db->get('messages'); $result = $result->row_array(); if (!empty($result)) { redirect('message/detail/' . $result['id'] . '#msg-' . $result['id']); } redirect('message/create/' . $login['id']); }
protected function doDisplay(array $context, array $blocks = array()) { // line 1 echo "<!DOCTYPE html>\n<html lang=\"en\">\n <head>\n <meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />\n <meta name=\"viewport\" content=\"width=device-width, initial-scale=1.0\">\n <title>"; // line 6 $this->displayBlock('title', $context, $blocks); echo "</title>\n <link type=\"text/css\" href=\""; // line 7 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "bootstrap/css/bootstrap.min.css\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 8 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "bootstrap/css/bootstrap-responsive.min.css\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 9 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "css/theme.css\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 10 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "images/icons/css/font-awesome.css\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 11 echo twig_escape_filter($this->env, base_url("assets/comp/pace/flash.css"), "html", null, true); echo "\" rel=\"stylesheet\">\n <link type=\"text/css\" href=\""; // line 12 echo twig_escape_filter($this->env, base_url("assets/comp/offline/offline-theme-chrome.css"), "html", null, true); echo "\" rel=\"stylesheet\">\n <script type=\"text/javascript\" src=\"//cdn.mathjax.org/mathjax/latest/MathJax.js?config=TeX-AMS-MML_HTMLorMML\"></script>\n "; // line 14 $this->displayBlock('css', $context, $blocks); // line 15 echo " "; echo isset($context["comp_css"]) ? $context["comp_css"] : null; echo "\n <link rel=\"shortcut icon\" type=\"image/x-icon\" href=\""; // line 16 echo twig_escape_filter($this->env, isset($context["favicon_url"]) ? $context["favicon_url"] : null, "html", null, true); echo "\">\n </head>\n <body style=\"display: none;\">\n <div class=\"navbar navbar-fixed-top\">\n <div class=\"navbar-inner\">\n <div class=\"container\">\n <a class=\"btn btn-navbar\" data-toggle=\"collapse\" data-target=\".navbar-inverse-collapse\">\n <i class=\"icon-reorder shaded\"></i>\n </a>\n <a class=\"brand\" href=\""; // line 25 echo twig_escape_filter($this->env, isset($context["site_url"]) ? $context["site_url"] : null, "html", null, true); echo "\">\n <img src=\""; // line 26 echo twig_escape_filter($this->env, isset($context["logo_url_medium"]) ? $context["logo_url_medium"] : null, "html", null, true); echo "\"> "; echo twig_escape_filter($this->env, isset($context["site_name"]) ? $context["site_name"] : null, "html", null, true); echo "\n </a>\n <div class=\"nav-collapse collapse navbar-inverse-collapse\">\n <form class=\"navbar-search pull-left input-append\" method=\"get\" action=\""; // line 29 echo twig_escape_filter($this->env, site_url("welcome/search"), "html", null, true); echo "\">\n <input type=\"text\" class=\"span3\" name=\"q\">\n <button class=\"btn\" type=\"submit\">\n <i class=\"icon-search\"></i>\n </button>\n </form>\n <ul class=\"nav pull-right\">\n "; // line 36 if (is_admin()) { // line 37 echo " <li><a href=\""; echo twig_escape_filter($this->env, site_url("welcome/donation"), "html", null, true); echo "\">DONASI</a></li>\n "; } // line 39 echo " <li class=\"nav-user dropdown\"><a href=\"#\" class=\"dropdown-toggle\" data-toggle=\"dropdown\">\n "; // line 40 echo twig_escape_filter($this->env, nama_panggilan(get_sess_data("user", "nama")), "html", null, true); echo "\n\n <span class=\"pull-right\">\n <img src=\""; // line 43 echo twig_escape_filter($this->env, get_url_image_session(get_sess_data("user", "foto"), "medium", get_sess_data("user", "jenis_kelamin")), "html", null, true); echo "\" class=\"nav-avatar img-polaroid\" />\n <b class=\"caret\"></b></a>\n </span>\n <ul class=\"dropdown-menu\">\n "; // line 47 if (is_admin()) { // line 48 echo " <li>"; echo anchor("pengajar/detail/" . get_sess_data("user", "status_id") . "/" . get_sess_data("user", "id"), "Detail Profil", array("title" => "Detail Profil")); echo "</li>\n "; } // line 50 echo "\n "; // line 51 if (is_pengajar()) { // line 52 echo " <li>"; echo anchor("login/pp", "Profil & Akun Login"); echo "</li>\n "; } // line 54 echo "\n "; // line 55 if (is_siswa()) { // line 56 echo " <li>"; echo anchor("login/pp", "Profil & Akun Login"); echo "</li>\n "; } // line 58 echo "\n <li><a href=\""; // line 59 echo twig_escape_filter($this->env, site_url("login/logout"), "html", null, true); echo "\">Logout</a></li>\n </ul>\n </li>\n </ul>\n </div>\n <!-- /.nav-collapse -->\n </div>\n </div>\n <!-- /navbar-inner -->\n </div>\n\n <!-- /navbar -->\n <div class=\"wrapper\">\n <div class=\"container\">\n <div class=\"row\">\n <div class=\"span3\">\n <div class=\"sidebar\">\n "; // line 76 if (is_admin()) { // line 77 echo " <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 78 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\"><i class=\"menu-icon icon-home\"></i>Beranda</a></li>\n <li><a href=\""; // line 79 echo twig_escape_filter($this->env, site_url("pengumuman"), "html", null, true); echo "\"><i class=\"menu-icon icon-bullhorn\"></i>Pengumuman</a></li>\n <li><a href=\""; // line 80 echo twig_escape_filter($this->env, site_url("message"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Pesan <span id=\"count-new-msg\"></span></a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 84 echo twig_escape_filter($this->env, site_url("siswa"), "html", null, true); echo "\"><i class=\"menu-icon icon-group\"></i>Siswa </a></li>\n <li><a href=\""; // line 85 echo twig_escape_filter($this->env, site_url("pengajar"), "html", null, true); echo "\"><i class=\"menu-icon icon-user\"></i>Pengajar </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 89 echo twig_escape_filter($this->env, site_url("tugas?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Tugas </a></li>\n <li><a href=\""; // line 90 echo twig_escape_filter($this->env, site_url("materi?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Materi </a></li>\n <li><a href=\""; // line 91 echo twig_escape_filter($this->env, site_url("materi/komentar"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Komentar Materi </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 95 echo twig_escape_filter($this->env, site_url("kelas/mapel_kelas"), "html", null, true); echo "\"><i class=\"menu-icon icon-paste\"></i>Matapelajaran Kelas </a></li>\n <li><a href=\""; // line 96 echo twig_escape_filter($this->env, site_url("kelas"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Manajemen Kelas </a></li>\n <li><a href=\""; // line 97 echo twig_escape_filter($this->env, site_url("mapel"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Manajemen Matapelajaran </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 101 echo twig_escape_filter($this->env, site_url("welcome/pengaturan"), "html", null, true); echo "\"><i class=\"menu-icon icon-wrench\"></i>Pengaturan</a></li>\n <li><a href=\""; // line 102 echo twig_escape_filter($this->env, site_url("email"), "html", null, true); echo "\"><i class=\"menu-icon icon-envelope\"></i>Email Template</a></li>\n </ul>\n "; } // line 105 echo "\n "; // line 106 if (is_pengajar()) { // line 107 echo " <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 108 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\"><i class=\"menu-icon icon-home\"></i>Beranda</a></li>\n <li><a href=\""; // line 109 echo twig_escape_filter($this->env, site_url("pengumuman"), "html", null, true); echo "\"><i class=\"menu-icon icon-bullhorn\"></i>Pengumuman</a></li>\n <li><a href=\""; // line 110 echo twig_escape_filter($this->env, site_url("message"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Pesan <span id=\"count-new-msg\"></span></a></li>\n <li><a href=\""; // line 111 echo twig_escape_filter($this->env, site_url("login/pp"), "html", null, true); echo "\"><i class=\"menu-icon icon-user\"></i>Profilku</a></li>\n <li><a href=\""; // line 112 echo twig_escape_filter($this->env, site_url("pengajar/jadwal"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Jadwal Mengajar </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 116 echo twig_escape_filter($this->env, site_url("tugas?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Tugas </a></li>\n <li><a href=\""; // line 117 echo twig_escape_filter($this->env, site_url("materi?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Materi </a></li>\n <li><a href=\""; // line 118 echo twig_escape_filter($this->env, site_url("materi/komentar"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Komentar Materi </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 122 echo twig_escape_filter($this->env, site_url("pengajar/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Pengajar </a></li>\n <li><a href=\""; // line 123 echo twig_escape_filter($this->env, site_url("siswa/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Siswa </a></li>\n </ul>\n "; } // line 126 echo "\n "; // line 127 if (is_siswa()) { // line 128 echo " <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 129 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\"><i class=\"menu-icon icon-home\"></i>Beranda</a></li>\n <li><a href=\""; // line 130 echo twig_escape_filter($this->env, site_url("message"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Pesan <span id=\"count-new-msg\"></span></a></li>\n <li><a href=\""; // line 131 echo twig_escape_filter($this->env, site_url("login/pp"), "html", null, true); echo "\"><i class=\"menu-icon icon-user\"></i>Profilku</a></li>\n <li><a href=\""; // line 132 echo twig_escape_filter($this->env, site_url("siswa/jadwal_mapel"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Jadwal Matapelajaran</a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 136 echo twig_escape_filter($this->env, site_url("tugas?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-tasks\"></i>Tugas </a></li>\n <li><a href=\""; // line 137 echo twig_escape_filter($this->env, site_url("materi?clear_filter=true"), "html", null, true); echo "\"><i class=\"menu-icon icon-book\"></i>Materi </a></li>\n <li><a href=\""; // line 138 echo twig_escape_filter($this->env, site_url("materi/komentar"), "html", null, true); echo "\"><i class=\"menu-icon icon-comments\"></i>Komentar Materi </a></li>\n </ul>\n\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 142 echo twig_escape_filter($this->env, site_url("pengajar/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Pengajar </a></li>\n <li><a href=\""; // line 143 echo twig_escape_filter($this->env, site_url("siswa/filter"), "html", null, true); echo "\"><i class=\"menu-icon icon-search\"></i>Filter Siswa </a></li>\n </ul>\n "; } // line 146 echo "\n <!--/.widget-nav-->\n <ul class=\"widget widget-menu unstyled\">\n <li><a href=\""; // line 149 echo twig_escape_filter($this->env, site_url("login/logout"), "html", null, true); echo "\"><i class=\"menu-icon icon-signout\"></i>Logout </a></li>\n </ul>\n </div>\n <!--/.sidebar-->\n </div>\n <!--/.span3-->\n <div class=\"span9\">\n <div class=\"content\">\n "; // line 157 $this->displayBlock('content', $context, $blocks); // line 158 echo " </div>\n </div>\n <!--/.span9-->\n </div>\n </div>\n <!--/.container-->\n </div>\n <!--/.wrapper-->\n <div class=\"footer\">\n <div class=\"container\">\n <center>\n <b class=\"copyright\">"; // line 169 echo isset($context["copyright"]) ? $context["copyright"] : null; echo " </b> All rights reserved.<br>\n "; // line 170 echo isset($context["version"]) ? $context["version"] : null; echo " | Page loaded in "; echo twig_escape_filter($this->env, isset($context["elapsed_time"]) ? $context["elapsed_time"] : null, "html", null, true); echo " seconds.\n </center>\n </div>\n </div>\n <script type=\"text/javascript\">\n var site_url = \""; // line 175 echo twig_escape_filter($this->env, site_url(), "html", null, true); echo "\";\n var base_url = \""; // line 176 echo twig_escape_filter($this->env, base_url(), "html", null, true); echo "\";\n </script>\n <script data-pace-options='{ \"ajax\": false }' src=\""; // line 178 echo twig_escape_filter($this->env, base_url("assets/comp/pace/pace.min.js"), "html", null, true); echo "\" type=\"text/javascript\"></script>\n <script src=\""; // line 179 echo twig_escape_filter($this->env, base_url("assets/comp/offline/offline.min.js"), "html", null, true); echo "\" type=\"text/javascript\"></script>\n <script src=\""; // line 180 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "scripts/jquery-1.9.1.min.js\" type=\"text/javascript\"></script>\n <script src=\""; // line 181 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "scripts/jquery-ui-1.10.1.custom.min.js\" type=\"text/javascript\"></script>\n <script src=\""; // line 182 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "bootstrap/js/bootstrap.min.js\" type=\"text/javascript\"></script>\n "; // line 183 echo isset($context["comp_js"]) ? $context["comp_js"] : null; echo "\n <script src=\""; // line 184 echo twig_escape_filter($this->env, isset($context["base_url_theme"]) ? $context["base_url_theme"] : null, "html", null, true); echo "scripts/script.js\" type=\"text/javascript\"></script>\n "; // line 185 $this->displayBlock('js', $context, $blocks); // line 186 echo " <script type=\"text/javascript\">\n \$( document ).ready(function() {\n \$(\"body\").show();\n });\n </script>\n </body>\n</html>\n"; }