public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<h4>Nilai Tugas</h4>\n";
     // line 5
     echo get_flashdata("edit");
     echo "\n\n<table class=\"table table-striped\">\n    <tbody>\n        <tr>\n            <th width=\"35%\">Nilai</th>\n            <td>";
     // line 11
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["nilai"]) ? $context["nilai"] : null, "nilai"), "html", null, true);
     echo "</td>\n        <tr>\n        <tr>\n            <th width=\"35%\">Tgl Mengerjakan</th>\n            <td>";
     // line 15
     echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "mulai")), "html", null, true);
     echo "</td>\n        <tr>\n    </tbody>\n</table>\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 6
     echo "<div id=\"wrap\">\n    <div class=\"container\">\n        <h1 class=\"title\">";
     // line 8
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "judul"), "html", null, true);
     echo "</h1>\n        ";
     // line 9
     if (!array_key_exists("error", $context)) {
         // line 10
         echo "        <ul class=\"unstyled inline ul-top\">\n            <li><b class=\"title-info\">";
         // line 11
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "mapel"), "nama"), "html", null, true);
         echo "</b> </li>\n            ";
         // line 12
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "materi_kelas"));
         foreach ($context['_seq'] as $context["_key"] => $context["mk"]) {
             // line 13
             echo "                <li>";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "nama"), "html", null, true);
             echo "</li>\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 15
         echo "            <li>Diposting oleh <a href=\"";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "pembuat"), "link_profil"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "pembuat"), "nama"), "html", null, true);
         echo "</a></li>\n            <li>";
         // line 16
         echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "tgl_posting")), "html", null, true);
         echo "</li>\n        </ul>\n        ";
     }
     // line 19
     echo "        \n        <hr class=\"hr-top\">\n        <div class=\"wrap-content\">\n            <div class=\"content\">\n                ";
     // line 23
     if (!array_key_exists("error", $context)) {
         // line 24
         echo "                    ";
         if ((isset($context["type"]) ? $context["type"] : null) == "tertulis") {
             // line 25
             echo "                        ";
             echo html_entity_decode($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "konten"));
             echo "\n                    ";
         } elseif ((isset($context["type"]) ? $context["type"] : null) == "file") {
             // line 27
             echo "                        <dl class=\"dl-horizontal\">\n                            <dt>Name</dt>\n                            <dd>";
             // line 29
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "name"), "html", null, true);
             echo "</dd>\n                            <dt>Size</dt>\n                            <dd>";
             // line 31
             echo twig_escape_filter($this->env, byte_format($this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "size")), "html", null, true);
             echo "</dd>\n                            <dt>Modified</dt>\n                            <dd>";
             // line 33
             echo twig_escape_filter($this->env, tgl_jam_indo(mdate("%Y-%m-%d %H:%i:%s", $this->getAttribute(isset($context["materifile_info"]) ? $context["materifile_info"] : null, "date"))), "html", null, true);
             echo "</dd>\n                            <dt>Mime</dt>\n                            <dd>";
             // line 35
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "mime"), "html", null, true);
             echo "</dd>\n                            <dt></dt>\n                            <dd><br><a href=\"";
             // line 37
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "download_link"), "html", null, true);
             echo "\" class=\"btn btn-warning\"><i class=\"icon-download\"></i> Download File</a></dd>\n                        </dl>\n                    ";
         }
         // line 40
         echo "                ";
     } else {
         // line 41
         echo "                    <div class=\"alert alert-danger\">\n                        <h3>";
         // line 42
         echo twig_escape_filter($this->env, isset($context["error"]) ? $context["error"] : null, "html", null, true);
         echo "</h3>\n                    </div>\n                ";
     }
     // line 45
     echo "            </div>\n        </div>\n    </div>\n</div>\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<h4>Detail Jawaban</h4>\n\n<table class=\"table table-condensed table-striped\">\n    <thead>\n        <tr>\n            <th>Tgl Mengerjakan</th>\n            <th>Tgl Selesai</th>\n            <th>Lama Pengerjaan</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>";
     // line 16
     echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "mulai")), "html", null, true);
     echo "</td>\n            <td>";
     // line 17
     echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "tgl_submit")), "html", null, true);
     echo "</td>\n            <td>";
     // line 18
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["history"]) ? $context["history"] : null, "total_waktu"), "html", null, true);
     echo "</td>\n        </tr>\n    </tbody>\n</table>\n<br>\n\n<table class=\"table table-condensed table-striped\">\n    <thead>\n        <tr>\n            <th>Jml soal</th>\n            <th>Jml benar</th>\n            <th>Jml salah</th>\n            <th>Nilai</th>\n        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>";
     // line 35
     echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "pertanyaan")), "html", null, true);
     echo "</td>\n            <td>";
     // line 36
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["history"]) ? $context["history"] : null, "jml_benar"), "html", null, true);
     echo "</td>\n            <td>";
     // line 37
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["history"]) ? $context["history"] : null, "jml_salah"), "html", null, true);
     echo "</td>\n            <td><b>";
     // line 38
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["history"]) ? $context["history"] : null, "nilai"), "html", null, true);
     echo "</b></td>\n        </tr>\n    </tbody>\n</table>\n<br>\n\n<table class=\"table table-condensed\">\n    <thead>\n        <tr>\n            <th colspan=\"2\">List Jawaban</th>\n        </tr>\n    </thead>\n    <tbody>\n        ";
     // line 51
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "pertanyaan"));
     foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
         // line 52
         echo "        <tr id=\"pertanyaan-";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), "html", null, true);
         echo "\">\n            <td style=\"width:30px;\">\n                <b>";
         // line 54
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "urutan"), "html", null, true);
         echo ".</b>\n                <br>\n                ";
         // line 56
         if (get_jawaban($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "jawaban"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")) == get_kunci_pilihan($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "pilihan"))) {
             // line 57
             echo "                <span class=\"text-error\"><i class=\"icon icon-ok\"></i></span>\n                ";
         } else {
             // line 59
             echo "                <span class=\"text-error\"><i class=\"icon icon-remove\"></i></span>\n                ";
         }
         // line 61
         echo "            </td>\n            <td>\n                <div class=\"pertanyaan\">\n                    ";
         // line 64
         echo html_entity_decode($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "pertanyaan"));
         echo "\n                </div>\n\n                <div id=\"pilihan-";
         // line 67
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), "html", null, true);
         echo "\">\n                    <table class=\"table table-condensed table-striped\">\n                        <tbody>\n                            ";
         // line 70
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "pilihan"));
         foreach ($context['_seq'] as $context["_key"] => $context["pil"]) {
             // line 71
             echo "                            <tr>\n                                <td style=\"width:15px;\"><b>";
             // line 72
             echo twig_escape_filter($this->env, get_abjad($this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "urutan")), "html", null, true);
             echo "</b></td>\n                                <td>\n                                    ";
             // line 74
             echo html_entity_decode($this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "konten"));
             echo "\n\n                                    <ul class=\"unstyled inline\" style=\"margin-bottom: 0px;margin-left: -5px;\">\n                                        ";
             // line 77
             if ($this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "kunci") == 1) {
                 // line 78
                 echo "                                            <li><small class=\"text-warning\"><i class=\"icon icon-star\"></i> Kunci Jawaban</small></li>\n                                        ";
             }
             // line 80
             echo "                                        ";
             if (is_pilih($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "jawaban"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), $this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "id")) == true) {
                 // line 81
                 echo "                                            <li><small class=\"text-success\"><i class=\"icon-hand-up\"></i> Jawaban Siswa</small></li>\n                                        ";
             }
             // line 83
             echo "                                    </ul>\n                                </td>\n                            </tr>\n                            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['pil'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 87
         echo "                        </tbody>\n                    </table>\n                </div>\n\n            </td>\n        </tr>\n\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 95
     echo "    </tbody>\n</table>\n\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 6
     echo isset($context["module_title"]) ? $context["module_title"] : null;
     echo "</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 9
     echo get_flashdata("tugas");
     echo "\n\n        <div class=\"row-fluid\">\n            <div class=\"span8\">\n                <button class=\"btn btn-primary\" id=\"popover\" data-html=\"true\" data-title=\"Cara Tambah Tugas\" data-content=\"Masuk ke detail profil <b>Pengajar</b>. Tugas dapat ditambah pada <b>Matapelajaran</b> yang diajar.<br>\n                <br>";
     // line 14
     echo twig_escape_filter($this->env, anchor("admin/pengajar/filter", "Cari Pengajar", array("class" => "btn btn-small btn-primary")), "html", null, true);
     echo "\" data-toggle=\"popover\">Tambah Tugas</button>\n            </div>\n\n            <div class=\"span4\">\n                <div class=\"btn-group pull-right\">\n                    ";
     // line 19
     echo anchor("admin/tugas/list/0", "Semua", array("class" => (isset($context["type_id"]) ? $context["type_id"] : null) == 0 ? "btn btn-info" : "btn"));
     echo "\n                    ";
     // line 20
     echo anchor("admin/tugas/list/1", "Upload", array("class" => (isset($context["type_id"]) ? $context["type_id"] : null) == 1 ? "btn btn-info" : "btn"));
     echo "\n                    ";
     // line 21
     echo anchor("admin/tugas/list/2", "Essay", array("class" => (isset($context["type_id"]) ? $context["type_id"] : null) == 2 ? "btn btn-info" : "btn"));
     echo "\n                    ";
     // line 22
     echo anchor("admin/tugas/list/3", "Ganda", array("class" => (isset($context["type_id"]) ? $context["type_id"] : null) == 3 ? "btn btn-info" : "btn"));
     echo "\n                    ";
     // line 23
     echo anchor("admin/tugas/filter", "<i class=\"icon-search\"></i> Filter", array("class" => "btn"));
     echo "\n                </div>\n            </div>\n        </div>\n\n        <br>\n        ";
     // line 29
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["tugas"]) ? $context["tugas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
         // line 30
         echo "        <div class=\"well well-small\" style=\"box-shadow: none;border-radius: 0px;\">\n            <div class=\"btn-group pull-right\" style=\"margin-bottom: 0px;\">\n                ";
         // line 32
         echo anchor("admin/tugas/edit/" . $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "mapel_ajar_id") . "/" . $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default"));
         echo "\n\n                ";
         // line 34
         if ($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "type_id") != 1) {
             // line 35
             echo "                <a class=\"btn btn-default\" href=\"";
             echo twig_escape_filter($this->env, site_url("admin/tugas/soal/" . $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "mapel_ajar"), "id") . "/" . $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "id")), "html", null, true);
             echo "\" data-toggle=\"tooltip\" title=\"Manajemen Soal\"><i class=\"icon-align-justify\"></i> Soal</a>\n                ";
         }
         // line 37
         echo "\n                ";
         // line 38
         if ($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "aktif") == 0) {
             // line 39
             echo "                    ";
             echo anchor("admin/tugas/tampilkan/" . $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-ok\"></i> Tampilkan</a>", array("class" => "btn btn-default", "data-toggle" => "tooltip", "title" => "Tampilkan agar siswa dapat <br>mengerjakan tugas"));
             echo "\n                ";
         } else {
             // line 41
             echo "                    ";
             echo anchor("admin/tugas/sembunyikan/" . $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-ok\"></i> Sembunyikan</a>", array("class" => "btn btn-success", "data-toggle" => "tooltip", "title" => "Sembunyikan agar siswa sudah <br>tidak dapat mengerjakan tugas"));
             echo "\n                ";
         }
         // line 43
         echo "\n                ";
         // line 44
         echo anchor("admin/tugas/koreksi/" . $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "id"), "<i class=\"icon-eye-open\"></i> Koreksi", array("class" => "btn btn-default", "data-toggle" => "tooltip", "title" => "Koreksi Jawaban"));
         echo "\n            </div>\n            <h3 style=\"line-height: 25px;\">";
         // line 46
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "judul"), "html", null, true);
         echo "</h3>\n            <ul class=\"unstyled inline\" style=\"margin-bottom: 5px;margin-top: 5px;\">\n                <li class=\"label label-success\">";
         // line 48
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "type"), "html", null, true);
         echo "</li>\n                ";
         // line 49
         if ($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "type_id") == 2 || $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "type_id") == 3) {
             // line 50
             echo "                <li class=\"label label-success\">";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "durasi"), "html", null, true);
             echo " menit</li>\n                ";
         }
         // line 52
         echo "                <li class=\"label label-info\">";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "mapel"), "nama"), "html", null, true);
         echo "</li>\n                <li class=\"label label-info\">";
         // line 53
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "kelas"), "nama"), "html", null, true);
         echo " (";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "kelas"), "jumlah_siswa"), "html", null, true);
         echo " siswa)</li>\n                <li class=\"label label-info\">";
         // line 54
         echo twig_escape_filter($this->env, get_indo_hari($this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "mapel_ajar"), "hari_id")), "html", null, true);
         echo "</li>\n                <li class=\"label label-info\">";
         // line 55
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "mapel_ajar"), "jam_mulai"), "H:i"), "html", null, true);
         echo " - ";
         echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "mapel_ajar"), "jam_selesai"), "H:i"), "html", null, true);
         echo "</li>\n            </ul>\n            \n            <div class=\"row-fluid\">\n                <div class=\"span8\">\n                    ";
         // line 60
         echo $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "info");
         echo "\n                </div>\n                <div class=\"span4\">\n                    <span class=\"text-muted pull-right\">\n                        <a href=\"";
         // line 64
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "pengajar"), "link_profil"), "html", null, true);
         echo "\" data-toggle=\"tooltip\" title=\"Pembuat\">";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "pengajar"), "nama"), "html", null, true);
         echo "</a> ";
         echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "tgl_buat")), "html", null, true);
         echo "\n                    </span>\n                </div>\n            </div>\n        </div>\n        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 70
     echo "\n        <br>\n        ";
     // line 72
     echo isset($context["pagination"]) ? $context["pagination"] : null;
     echo "\n\n    </div>\n</div>\n";
 }
Esempio n. 5
0
 function format_msg($retrieve)
 {
     # 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']);
     }
     $retrieve['profil'] = $user;
     $retrieve['login'] = $login;
     # 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']);
     }
     return $retrieve;
 }
Esempio n. 6
0
			<td align="left"> : <?php 
    echo tgl_indo($data_pdf[0]->ETD);
    ?>
</td>
		</tr>
		<tr>
			<td >&nbsp;&nbsp;&nbsp;</td>
			<td align="left">Purpose</td>
			<td align="left"> : <?php 
    echo $data_pdf[0]->purpose;
    ?>
</td>
			<td>&nbsp;&nbsp;&nbsp;</td>
			<td align="left">Date Create</td>
			<td align="left"> : <?php 
    echo tgl_jam_indo($data_pdf[0]->date_create);
    ?>
</td>
		</tr>
		<tr>
			<td >&nbsp;&nbsp;&nbsp;</td>
			<td align="left">Category Request</td>
			<td align="left"> : <?php 
    echo $data_pdf[0]->cat_req;
    ?>
</td>
			<td>&nbsp;&nbsp;&nbsp;</td>
			<td align="left">ID Detail Pros</td>
			<td align="left"> : <?php 
    echo $data_pdf[0]->id_detail_pros;
    ?>
 public function block_content($context, array $blocks = array())
 {
     // line 6
     echo "<div id=\"wrap\">\n    <div class=\"container\">\n        <h1 class=\"title\">";
     // line 8
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "judul"), "html", null, true);
     echo "</h1>\n        ";
     // line 9
     if (!array_key_exists("error", $context)) {
         // line 10
         echo "        <ul class=\"unstyled inline ul-top\">\n            <li><b class=\"title-info\">";
         // line 11
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "mapel"), "nama"), "html", null, true);
         echo " ";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "kelas"), "nama"), "html", null, true);
         echo "</b> </li>\n            <li>Diposting oleh <a href=\"";
         // line 12
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "pembuat"), "link_profil"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "pembuat"), "nama"), "html", null, true);
         echo "</a></li>\n            <li>";
         // line 13
         echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "tgl_posting")), "html", null, true);
         echo "</li>\n        </ul>\n        ";
     }
     // line 16
     echo "        \n        <hr class=\"hr-top\">\n        <div class=\"wrap-content\">\n            <div class=\"content\">\n                ";
     // line 20
     if (!array_key_exists("error", $context)) {
         // line 21
         echo "                    ";
         if ((isset($context["type"]) ? $context["type"] : null) == "tertulis") {
             // line 22
             echo "                        ";
             echo html_entity_decode($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "konten"));
             echo "\n                    ";
         } elseif ((isset($context["type"]) ? $context["type"] : null) == "file") {
             // line 24
             echo "                        <dl class=\"dl-horizontal\">\n                            <dt>Name</dt>\n                            <dd>";
             // line 26
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "name"), "html", null, true);
             echo "</dd>\n                            <dt>Size</dt>\n                            <dd>";
             // line 28
             echo twig_escape_filter($this->env, byte_format($this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "size")), "html", null, true);
             echo "</dd>\n                            <dt>Modified</dt>\n                            <dd>";
             // line 30
             echo twig_escape_filter($this->env, tgl_jam_indo(mdate("%Y-%m-%d %H:%i:%s", $this->getAttribute(isset($context["materifile_info"]) ? $context["materifile_info"] : null, "date"))), "html", null, true);
             echo "</dd>\n                            <dt>Mime</dt>\n                            <dd>";
             // line 32
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "mime"), "html", null, true);
             echo "</dd>\n                            <dt></dt>\n                            <dd><br><a href=\"";
             // line 34
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "download_link"), "html", null, true);
             echo "\" class=\"btn btn-warning\"><i class=\"icon-download\"></i> Download File</a></dd>\n                        </dl>\n                    ";
         }
         // line 37
         echo "                ";
     } else {
         // line 38
         echo "                    <div class=\"alert alert-danger\">\n                        <h3>";
         // line 39
         echo twig_escape_filter($this->env, isset($context["error"]) ? $context["error"] : null, "html", null, true);
         echo "</h3>\n                    </div>\n                ";
     }
     // line 42
     echo "            </div>\n        </div>\n    </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>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 "&nbsp;\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";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == false) {
         // line 5
         echo "    <h4>Koreksi Jawaban</h4>\n";
     } else {
         // line 7
         echo "    <h4>Detail Jawaban</h4>\n";
     }
     // line 9
     echo "\n<table class=\"table table-condensed table-striped\">\n    <thead>\n        <tr>\n            <th>Tgl Mengerjakan</th>\n            <th>Tgl Selesai</th>\n            <th>Lama Pengerjaan</th>\n            ";
     // line 16
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == true) {
         // line 17
         echo "            <th>Nilai</th>\n            ";
     }
     // line 19
     echo "        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>";
     // line 23
     echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "mulai")), "html", null, true);
     echo "</td>\n            <td>";
     // line 24
     echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "tgl_submit")), "html", null, true);
     echo "</td>\n            <td>";
     // line 25
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["history"]) ? $context["history"] : null, "total_waktu"), "html", null, true);
     echo "</td>\n            ";
     // line 26
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == true) {
         // line 27
         echo "            <th>";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["nilai"]) ? $context["nilai"] : null, "nilai"), "html", null, true);
         echo "</th>\n            ";
     }
     // line 29
     echo "        </tr>\n    </tbody>\n</table>\n<br>\n\n";
     // line 34
     echo form_open("tugas/detail_jawaban/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id"));
     echo "\n<table class=\"table table-condensed\">\n    <thead>\n        <tr>\n            <th colspan=\"2\">List Jawaban</th>\n        </tr>\n    </thead>\n    <tbody>\n        ";
     // line 42
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "pertanyaan"));
     foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
         // line 43
         echo "        <tr id=\"pertanyaan-";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), "html", null, true);
         echo "\">\n            <td style=\"width:30px;\">\n                <b>";
         // line 45
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "urutan"), "html", null, true);
         echo ".</b>\n            </td>\n            <td>\n                <div class=\"pertanyaan\">\n                    ";
         // line 49
         echo html_entity_decode($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "pertanyaan"));
         echo "\n                </div>\n\n                <b>Jawaban :</b>\n                ";
         // line 53
         echo html_entity_decode(get_jawaban($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "jawaban"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")));
         echo "\n\n                <b>Nilai :</b>\n                <br>\n                <input type=\"text\" name=\"nilai[";
         // line 57
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), "html", null, true);
         echo "]\" style=\"width:50px;\" value=\"";
         echo twig_escape_filter($this->env, get_jawaban($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "nilai"), $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true);
         echo "\">\n            </td>\n        </tr>\n\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 62
     echo "    </tbody>\n</table>\n<hr>\n";
     // line 65
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == false) {
         // line 66
         echo "<button class=\"btn btn-primary\" type=\"submit\">Simpan Nilai</button>\n";
     } else {
         // line 68
         echo "<button class=\"btn btn-primary\" type=\"submit\">Update Nilai</button>\n";
     }
     // line 70
     echo "</form>\n\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            <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n                ";
     // line 17
     echo anchor("tugas/add/3", "Tambah Tugas Ganda", array("class" => "btn btn-primary"));
     echo "\n                ";
     // line 18
     echo anchor("tugas/add/2", "Tambah Tugas Essay", array("class" => "btn btn-primary"));
     echo "\n                ";
     // line 19
     echo anchor("tugas/add/1", "Tambah Tugas Upload", array("class" => "btn btn-primary"));
     echo "\n            </div>\n            <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 24
     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 30
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 31
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"mapel_id[]\" value=\"";
         // line 33
         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 37
     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 44
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 45
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
         // line 47
         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 51
     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=\"3\" ";
     // line 60
     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 65
     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 70
     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 79
     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 85
     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 88
     if (is_pengajar() == false) {
         // line 89
         echo "                        <tr>\n                            <th>Pembuat</th>\n                            <td>\n                                <input type=\"text\" name=\"pembuat\" class=\"span4\" value=\"";
         // line 92
         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 96
     echo "                        <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 120
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["tugas"]) ? $context["tugas"] : null);
     foreach ($context['_seq'] as $context["no"] => $context["m"]) {
         // line 121
         echo "                <tr>\n                    <td><b>";
         // line 122
         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 124
         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 125
         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 127
         $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 128
             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 130
         echo "\n                        ";
         // line 131
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") {
             // line 132
             echo "                            , ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "durasi"), "html", null, true);
             echo " Menit\n                        ";
         }
         // line 134
         echo "\n                        </small>\n                        <br><small><b>Pembuat : </b> <a href=\"";
         // line 136
         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                    </td>\n                    <td>\n                        ";
         // line 139
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda") {
             // line 140
             echo "                            <span class=\"label label-success\">Ganda</span>\n                        ";
         } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") {
             // line 142
             echo "                            <span class=\"label label-info\">Essay</span>\n                        ";
         } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Upload") {
             // line 144
             echo "                            <span class=\"label label-warning\">Upload</span>\n                        ";
         }
         // line 146
         echo "                    </td>\n                    <td>\n                        <div class=\"btn-group\">\n                            ";
         // line 149
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") {
             // line 150
             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 152
         echo "                            ";
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 0) {
             // line 153
             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 155
             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 157
         echo "\n                            ";
         // line 158
         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 159
         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                        </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 164
     echo "            </tbody>\n        </table>\n        <br>\n        ";
     // line 167
     echo isset($context["pagination"]) ? $context["pagination"] : null;
     echo "\n\n    </div>\n</div>\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == false) {
         // line 5
         echo "    <h4>Koreksi Jawaban</h4>\n";
     } else {
         // line 7
         echo "    <h4>Detail Jawaban</h4>\n";
     }
     // line 9
     echo "\n<table class=\"table table-condensed table-striped\">\n    <thead>\n        <tr>\n            <th>Tgl Mengerjakan</th>\n            ";
     // line 14
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == true) {
         // line 15
         echo "            <th>Nilai</th>\n            ";
     }
     // line 17
     echo "        </tr>\n    </thead>\n    <tbody>\n        <tr>\n            <td>";
     // line 21
     echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["history"]) ? $context["history"] : null, "mulai")), "html", null, true);
     echo "</td>\n            ";
     // line 22
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == true) {
         // line 23
         echo "            <th>";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["nilai"]) ? $context["nilai"] : null, "nilai"), "html", null, true);
         echo "</th>\n            ";
     }
     // line 25
     echo "        </tr>\n    </tbody>\n</table>\n<br>\n\n";
     // line 30
     echo form_open("tugas/detail_jawaban/" . $this->getAttribute(isset($context["siswa"]) ? $context["siswa"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id"));
     echo "\n<b>File upload</b>\n<table class=\"table table-condensed table-striped\">\n    <tbody>\n        <tr>\n            <th>Name</th>\n            <td><a href=\"";
     // line 36
     echo twig_escape_filter($this->env, base_url("userfiles/files/" . $this->getAttribute(isset($context["file_info"]) ? $context["file_info"] : null, "name")), "html", null, true);
     echo "\" target=\"_blank\">";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["file_info"]) ? $context["file_info"] : null, "name"), "html", null, true);
     echo "</a></td>\n        </tr>\n        <tr>\n            <th>Server Path</th>\n            <td>";
     // line 40
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["file_info"]) ? $context["file_info"] : null, "server_path"), "html", null, true);
     echo "</td>\n        </tr>\n        <tr>\n            <th>Size</th>\n            <td>";
     // line 44
     echo twig_escape_filter($this->env, byte_format($this->getAttribute(isset($context["file_info"]) ? $context["file_info"] : null, "size")), "html", null, true);
     echo "</td>\n        </tr>\n        <tr>\n            <th>Modified</th>\n            <td>";
     // line 48
     echo twig_escape_filter($this->env, mdate("%d %F %Y %H:%i", $this->getAttribute(isset($context["file_info"]) ? $context["file_info"] : null, "date")), "html", null, true);
     echo "</td>\n        </tr>\n        <tr>\n            <th>Mime</th>\n            <td>";
     // line 52
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["file_info"]) ? $context["file_info"] : null, "mime"), "html", null, true);
     echo "</td>\n        </tr>\n    </tbody>\n</table>\n<br>\n<b>Nilai :</b>\n<br>\n<input type=\"text\" name=\"nilai\" style=\"width:50px;\" value=\"";
     // line 59
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["nilai"]) ? $context["nilai"] : null, "nilai"), "html", null, true);
     echo "\">\n\n<hr style=\"margin-top: 5px;\">\n";
     // line 62
     if ((isset($context["sudah_dikoreksi"]) ? $context["sudah_dikoreksi"] : null) == false) {
         // line 63
         echo "<button class=\"btn btn-primary\" type=\"submit\">Simpan Nilai</button>\n";
     } else {
         // line 65
         echo "<button class=\"btn btn-primary\" type=\"submit\">Update Nilai</button>\n";
     }
     // line 67
     echo "</form>\n\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";
 }
Esempio n. 13
0
 /**
  * Method untuk memformat data pesan
  *
  * @param  array $retrieve
  * @return array
  */
 function format_msg($retrieve)
 {
     # 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 profil penerima
         $retrieve['receiver'] = $this->get_user_data($retrieve['sender_receiver_id']);
     }
     $retrieve['profil'] = $this->get_user_data($get_user);
     $retrieve['login'] = $this->login_model->retrieve($get_user);
     # 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']);
     }
     return $retrieve;
 }
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div id=\"wrap\">\n    <div class=\"container\">\n        <h1 class=\"title\">";
     // line 10
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "judul"), "html", null, true);
     echo "</h1>\n        ";
     // line 11
     if (!array_key_exists("error", $context)) {
         // line 12
         echo "        <ul class=\"unstyled inline ul-top\">\n            <li><b>";
         // line 13
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "mapel"), "nama"), "html", null, true);
         echo "</b>,</li>\n            ";
         // line 14
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "materi_kelas"));
         foreach ($context['_seq'] as $context["_key"] => $context["mk"]) {
             // line 15
             echo "                <li>";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "nama"), "html", null, true);
             echo ",</li>\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 17
         echo "            <li>Diposting oleh <a href=\"";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "pembuat"), "link_profil"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "pembuat"), "nama"), "html", null, true);
         echo "</a></li>\n            <li>";
         // line 18
         echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "tgl_posting")), "html", null, true);
         echo ",</li>\n            <li>";
         // line 19
         echo (isset($context["type"]) ? $context["type"] : null) == "tertulis" ? "Dibaca" : "Diunduh";
         echo " ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "views"), "html", null, true);
         echo " Kali</li>\n            <li>";
         // line 20
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "jml_komentar"), "html", null, true);
         echo " Komentar</li>\n        </ul>\n        ";
     }
     // line 23
     echo "\n        <hr class=\"hr-top\">\n        <div class=\"wrap-content\">\n            <div class=\"content\">\n                ";
     // line 27
     if (!array_key_exists("error", $context)) {
         // line 28
         echo "                    ";
         if ((isset($context["type"]) ? $context["type"] : null) == "tertulis") {
             // line 29
             echo "                        ";
             echo call_user_func_array($this->env->getFilter('raw_youtube')->getCallable(), array($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "konten")));
             echo "\n                    ";
         } elseif ((isset($context["type"]) ? $context["type"] : null) == "file") {
             // line 31
             echo "                        <dl class=\"dl-horizontal\">\n                            <dt>Name</dt>\n                            <dd>";
             // line 33
             echo twig_escape_filter($this->env, twig_test_empty($this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "name")) ? "noname" : $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "name"), "html", null, true);
             echo "</dd>\n                            <dt>Size</dt>\n                            <dd>";
             // line 35
             echo twig_escape_filter($this->env, byte_format($this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "size")), "html", null, true);
             echo "</dd>\n                            <dt>Modified</dt>\n                            <dd>";
             // line 37
             echo twig_escape_filter($this->env, tgl_jam_indo(mdate("%Y-%m-%d %H:%i:%s", $this->getAttribute(isset($context["materifile_info"]) ? $context["materifile_info"] : null, "date"))), "html", null, true);
             echo "</dd>\n                            <dt>Mime</dt>\n                            <dd>";
             // line 39
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "file_info"), "mime"), "html", null, true);
             echo "</dd>\n                            <dt></dt>\n                            <dd><br><a href=\"";
             // line 41
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "download_link"), "html", null, true);
             echo "\" class=\"btn btn-warning\"><i class=\"icon-download\"></i> Download File</a></dd>\n                        </dl>\n                    ";
         }
         // line 44
         echo "\n                    <br>\n                    <div class=\"row-fluid\">\n                        <div class=\"span8\">\n                            <h4>\n                                <i class=\"fa fa-pencil\"></i> Tulis komentar\n                                <div class=\"pull-right\" style=\"font-size: 14px;\">";
         // line 50
         echo form_error("komentar");
         echo "</div>\n                            </h4>\n                            <div class=\"bg-form-komentar\" id=\"form-komentar\">\n                                <form method=\"post\" action=\"";
         // line 53
         echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "id")), "html", null, true);
         echo "\">\n                                    <p><textarea class=\"span12\" id=\"komentar\" name=\"komentar\">";
         // line 54
         echo set_value("komentar");
         echo "</textarea></p>\n                                    <p>\n                                        <button class=\"btn btn-primary pull-right\">Post komentar</button>\n                                        <img src=\"";
         // line 57
         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 "\" style=\"height:30px;width:30px; margin-right:5px;\" class=\"img-circle img-polaroid\">\n                                        ";
         // line 58
         echo twig_escape_filter($this->env, get_sess_data("user", "nama"), "html", null, true);
         echo "\n                                    </p>\n                                    <div class=\"clear\"></div>\n                                </form>\n                            </div>\n                            <br>\n\n                            ";
         // line 65
         if ($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "jml_komentar") > 0) {
             // line 66
             echo "                                <h4><i class=\"fa fa-comments\"></i> ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "jml_komentar"), "html", null, true);
             echo " Komentar</h4>\n\n                                ";
             // line 68
             $context['_parent'] = (array) $context;
             $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "komentar"));
             foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
                 // line 69
                 echo "                                <div class=\"komentar\" id=\"komentar-";
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true);
                 echo "\">\n                                    <img src=\"";
                 // line 70
                 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "login"), "link_image"), "html", null, true);
                 echo "\" style=\"height:25px;width:25px; margin-left:5px;\" class=\"img-circle img-polaroid pull-right\">\n                                    <p><a href=\"";
                 // line 71
                 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "login"), "link_profil"), "html", null, true);
                 echo "\"><b>";
                 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "login"), "nama"), "html", null, true);
                 echo "</b></a>, <small>";
                 echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "tgl_posting"), "d F Y"), "html", null, true);
                 echo "</small>, <small><a href=\"";
                 echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "id") . "/laporkan/" . $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id")), "html", null, true);
                 echo "\" class=\"text-muted iframe-laporkan\"><i class=\"fa fa-bug\"></i> laporkan</a></small></p>\n                                    ";
                 // line 72
                 echo call_user_func_array($this->env->getFilter('raw_youtube')->getCallable(), array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "konten")));
                 echo "\n                                </div>\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 75
             echo "\n                                <div style=\"font-size:12px;\">\n                                ";
             // line 77
             echo $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "komentar_pagination");
             echo "\n                                </div>\n                            ";
         }
         // line 80
         echo "                        </div>\n                        <div class=\"span4\">\n                            <h4><i class=\"fa fa-file\"></i> Materi lainnya</h4>\n                            <ul class=\"unstyled ul-materi\">\n                                ";
         // line 84
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["terkait"]) ? $context["terkait"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["t"]) {
             // line 85
             echo "                                <li>\n                                    <div class=\"materi\">\n                                        <a href=\"";
             // line 87
             echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "id")), "html", null, true);
             echo "\"><i class=\"fa ";
             echo twig_test_empty($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "file")) ? "fa-file-text" : "fa-file";
             echo " img-circle img-polaroid ";
             echo strlen($this->getAttribute(isset($context["t"]) ? $context["t"] : null, "judul")) > 33 ? "pull-left" : "";
             echo "\" style=\"padding:10px; margin-right:10px;\"></i>";
             echo $this->getAttribute(isset($context["t"]) ? $context["t"] : null, "judul");
             echo "</a>\n                                    </div>\n                                </li>\n                                ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['t'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 91
         echo "\n                                ";
         // line 92
         if (twig_test_empty(isset($context["terkait"]) ? $context["terkait"] : null)) {
             // line 93
             echo "                                <div class=\"alert alert-info\">Tidak ada materi terkait</div>\n                                ";
         }
         // line 95
         echo "                            </ul>\n                        </div>\n                    </div>\n\n                ";
     } else {
         // line 100
         echo "                    <div class=\"alert alert-danger\">\n                        <h3>";
         // line 101
         echo twig_escape_filter($this->env, isset($context["error"]) ? $context["error"] : null, "html", null, true);
         echo "</h3>\n                    </div>\n                ";
     }
     // line 104
     echo "            </div>\n        </div>\n    </div>\n</div>\n";
 }
Esempio n. 15
0
    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;
        }
    }
 public function block_content($context, array $blocks = array())
 {
     // line 4
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 6
     echo isset($context["module_title"]) ? $context["module_title"] : null;
     echo "</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 9
     echo get_flashdata("materi");
     echo "\n\n        <div class=\"bs-callout bs-callout-info\">\n            <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n                ";
     // line 13
     echo anchor("admin/materi/add/tertulis", "Tambah Materi Tertulis", array("class" => "btn btn-primary"));
     echo "\n                ";
     // line 14
     echo anchor("admin/materi/add/file", "Tambah Materi File", array("class" => "btn btn-primary"));
     echo "\n            </div>\n            <a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#form-filter\"><i class=\"icon-search\" style=\"line-height: 0px;\"></i> Filter</a>\n\n            <div id=\"form-filter\" class=\"collapse\" style=\"margin-top: 5px;\">\n                ";
     // line 19
     echo form_open("admin/materi");
     echo "\n                    <table class=\"table table-condensed\">\n                        <tr>\n                            <th style=\"border-top: none;\" width=\"15%\">Judul</th>\n                            <td style=\"border-top: none;\">\n                                <input type=\"text\" name=\"judul\" class=\"span4\" value=\"";
     // line 24
     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 30
     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>Pengajar</th>\n                            <td>\n                                <input type=\"text\" name=\"pengajar\" class=\"span4\" value=\"";
     // line 36
     echo twig_escape_filter($this->env, set_value("pengajar", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "pengajar")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Siswa</th>\n                            <td>\n                                <input type=\"text\" name=\"siswa\" class=\"span4\" value=\"";
     // line 42
     echo twig_escape_filter($this->env, set_value("siswa", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "siswa")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Mapel</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
     // line 49
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 50
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"mapel_id[]\" value=\"";
         // line 52
         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 56
     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 63
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 64
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
         // line 66
         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 70
     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 79
     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 84
     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                            <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%\">No</th>\n                    <th>Materi</th>\n                    <th width=\"15%\">Tipe</th>\n                    <th width=\"10%\">View</th>\n                    <th width=\"15%\"></th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
     // line 115
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["materi"]) ? $context["materi"] : null);
     foreach ($context['_seq'] as $context["no"] => $context["m"]) {
         // line 116
         echo "                <tr>\n                    <td>";
         // line 117
         echo twig_escape_filter($this->env, isset($context["no"]) ? $context["no"] : null, "html", null, true);
         echo ".</td>\n                    <td>\n                        <span class=\"text-warning\">";
         // line 119
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true);
         echo "</span>\n                        <br><small><b>";
         // line 120
         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 122
         $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 123
             echo "                            ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "nama"), "html", null, true);
             echo "&nbsp;\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 125
         echo "\n                        </small>\n                        <br><small><b>Pembuat : </b> <a href=\"";
         // line 127
         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_posting")), "html", null, true);
         echo "</small>\n                    </td>\n                    <td>\n                        ";
         // line 130
         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>";
         // line 132
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "views"), "html", null, true);
         echo "</td>\n                    <td>\n                        <div class=\"btn-group\">\n                            ";
         // line 135
         if (!twig_test_empty($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "file"))) {
             // line 136
             echo "                                ";
             $context["url_type"] = "file";
             // line 137
             echo "                            ";
         } else {
             // line 138
             echo "                                ";
             $context["url_type"] = "tertulis";
             // line 139
             echo "                            ";
         }
         // line 140
         echo "                            ";
         echo anchor("admin/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" => "_blank"));
         echo "\n                            ";
         // line 141
         echo anchor("admin/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 142
         echo anchor("admin/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                        </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 147
     echo "            </tbody>\n        </table>\n        <br>\n        ";
     // line 150
     echo isset($context["pagination"]) ? $context["pagination"] : null;
     echo "\n\n    </div>\n</div>\n";
 }