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("mapel");
     echo "\n\n        ";
     // line 11
     echo form_open("admin/mapel/edit/" . $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "id") . "/" . enurl_redirect(isset($context["uri_back"]) ? $context["uri_back"] : null), array("class" => "form-horizontal row-fluid"));
     echo "\n            <div class=\"control-group\">\n                <label class=\"control-label\">Nama <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"nama\" class=\"span8\" value=\"";
     // line 15
     echo twig_escape_filter($this->env, set_value("nama", $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "nama")), "html", null, true);
     echo "\">\n                    <br>";
     // line 16
     echo form_error("nama");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Deskripsi</label>\n                <div class=\"controls\">\n                    <textarea name=\"info\" class=\"span12\" rows=\"5\">";
     // line 22
     echo set_value("info", $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "info"));
     echo "</textarea>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Status</label>\n                <div class=\"controls\">\n                    <label class=\"checkbox inline\">\n                        <input type=\"checkbox\" value=\"1\" name=\"status\" ";
     // line 29
     echo twig_escape_filter($this->env, set_checkbox("status", "1", $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "aktif") == 1 ? true : false), "html", null, true);
     echo ">\n                        Aktif\n                    </label>\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n                    <a href=\"";
     // line 37
     echo twig_escape_filter($this->env, isset($context["uri_back"]) ? $context["uri_back"] : null, "html", null, true);
     echo "\" class=\"btn\">Batal</a>\n                </div>\n            </div>\n        ";
     // line 40
     echo form_close();
     echo "\n\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>Manajemen Matapelajaran</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("mapel");
     echo "\n\n        ";
     // line 15
     if (is_demo_app()) {
         // line 16
         echo "            ";
         echo get_alert("warning", get_demo_msg());
         echo "\n        ";
     }
     // line 18
     echo "\n        <div class=\"row-fluid\">\n            <div class=\"span2\">\n                <a href=\"";
     // line 21
     echo twig_escape_filter($this->env, site_url("mapel/add"), "html", null, true);
     echo "\" class=\"btn btn-primary\">Tambah Mapel</a>\n            </div>\n            <div class=\"span10\">\n                Atur matapelajaran yang ada di sekolah<br>\n                <b>Note: </b> Matapelajaran tidak dapat dihapus namun dapat di ubah menjadi tidak aktif\n            </div>\n        </div>\n\n        <br>\n        <table class=\"table table-striped\">\n            <thead>\n                <tr>\n                    <th width=\"5%\">No</th>\n                    <th>Matapelajaran</th>\n                    <th>Aktif</th>\n                    <th width=\"15%\"></th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
     // line 40
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapels"]) ? $context["mapels"] : null);
     foreach ($context['_seq'] as $context["no"] => $context["v"]) {
         // line 41
         echo "                <tr>\n                    <td>";
         // line 42
         echo twig_escape_filter($this->env, isset($context["no"]) ? $context["no"] : null, "html", null, true);
         echo ".</td>\n                    <td>\n                        ";
         // line 44
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true);
         echo "\n                        <br><small>";
         // line 45
         echo nl2br(twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "info"), "html", null, true));
         echo "</small>\n                    </td>\n                    <td>\n                        ";
         // line 48
         if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "aktif") == 1) {
             // line 49
             echo "                        <i class=\"icon-ok\"></i>\n                        ";
         } else {
             // line 51
             echo "                        <i class=\"icon-minus\"></i>\n                        ";
         }
         // line 53
         echo "                    </td>\n                    <td>\n                        <a class=\"btn btn-default\" href=\"";
         // line 55
         echo twig_escape_filter($this->env, site_url("mapel/edit/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id") . "/" . enurl_redirect(current_url())), "html", null, true);
         echo "\"><i class=\"icon-edit\"></i> Edit</a>\n                    </td>\n                </tr>\n                ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 59
     echo "            </tbody>\n        </table>\n\n        <br>\n        ";
     // line 63
     echo isset($context["pagination"]) ? $context["pagination"] : null;
     echo "\n    </div>\n</div>\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("mapel");
     echo "\n\n        <div class=\"bs-callout bs-callout-info\">\n        <p>\n            Pilih matapelajaran yang ingin di masukkan pada <b>";
     // line 13
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "nama", array(), "array"), "html", null, true);
     echo "</b>\n        </p>\n        </div>\n        <br>\n\n        ";
     // line 18
     echo form_open("admin/mapel_kelas/add/" . $this->getAttribute(isset($context["parent"]) ? $context["parent"] : null, "id", array(), "array") . "/" . $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "id", array(), "array") . "/" . enurl_redirect(isset($context["uri_back"]) ? $context["uri_back"] : null));
     echo "\n        <table class=\"table table-striped\">\n        <tbody>\n            ";
     // line 21
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapels"]) ? $context["mapels"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 22
         echo "            ";
         $context["checked"] = get_row_data("mapel_model", "retrieve_kelas", array(0 => null, 1 => $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "id", array(), "array"), 2 => $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")));
         // line 23
         echo "            <tr>\n                <td>\n                    ";
         // line 25
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") != 1) {
             // line 26
             echo "                    <span class=\"badge badge-warning pull-right\">Matapelajaran Tidak Aktif</span>\n                    ";
         }
         // line 28
         echo "                    <label><input type=\"checkbox\" name=\"mapel[]\" value=\"";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\" style=\"margin-top:-2px;margin-right:5px;\" ";
         echo $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") != 1 ? "disabled" : "";
         echo " ";
         echo twig_test_empty(isset($context["checked"]) ? $context["checked"] : null) ? "" : "checked";
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true);
         echo "</label>\n                    <small>";
         // line 29
         echo nl2br(twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "info"), "html", null, true));
         echo "</small>\n                </td>\n            </tr>\n            ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 33
     echo "        </tbody>\n        </table>\n        <br>\n        <button type=\"submit\" class=\"btn btn-primary\">Simpan</button>\n        <a href=\"";
     // line 37
     echo twig_escape_filter($this->env, isset($context["uri_back"]) ? $context["uri_back"] : null, "html", null, true);
     echo "\" class=\"btn btn-default\">Kembali</a>\n        ";
     // line 38
     echo form_close();
     echo "\n\n    </div>\n</div>\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";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 10
     echo anchor(isset($context["uri_back"]) ? $context["uri_back"] : null, "Tugas");
     echo " / Edit Tugas ";
     echo twig_escape_filter($this->env, isset($context["type_label"]) ? $context["type_label"] : null, "html", null, true);
     echo "</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("tugas");
     echo "\n\n        ";
     // line 15
     echo form_open_multipart("tugas/edit/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(isset($context["uri_back"]) ? $context["uri_back"] : null), array("class" => "form-horizontal row-fluid"));
     echo "\n            <div class=\"control-group\">\n                <label class=\"control-label\">Judul <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"judul\" class=\"span12\" value=\"";
     // line 19
     echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul")), "html", null, true);
     echo "\">\n                    <br>";
     // line 20
     echo form_error("judul");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Matapelajaran <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <select name=\"mapel_id\">\n                        <option value=\"\">--pilih--</option>\n                        ";
     // line 28
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 29
         echo "                        <option value=\"";
         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_select("mapel_id", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") == $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : 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 "</option>\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 31
     echo "                    </select>\n                    <br>";
     // line 32
     echo form_error("mapel_id");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Kelas <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                        ";
     // line 39
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 40
         echo "                        <li>\n                            <label class=\"checkbox inline\">\n                                <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
         // line 42
         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"), in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), isset($context["tugas_kelas"]) ? $context["tugas_kelas"] : null) ? 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 46
     echo "                    </ul>\n                    ";
     // line 47
     echo form_error("kelas_id[]");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Info</label>\n                <div class=\"controls\">\n                    <textarea name=\"info\" id=\"info\" style=\"width:100%; height:300px;\">";
     // line 53
     echo set_value("info", html_entity_decode($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "info")));
     echo "</textarea>\n                    ";
     // line 54
     echo form_error("info");
     echo "\n                </div>\n            </div>\n            ";
     // line 57
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") != 1) {
         // line 58
         echo "            <div class=\"control-group\">\n                <label class=\"control-label\">Durasi <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"durasi\" class=\"span2\" value=\"";
         // line 61
         echo twig_escape_filter($this->env, set_value("durasi", $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "durasi")), "html", null, true);
         echo "\" placeholder=\"Dalam menit\">\n                    <br>";
         // line 62
         echo form_error("durasi");
         echo "\n                </div>\n            </div>\n            ";
     }
     // line 66
     echo "            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n                    <a href=\"";
     // line 69
     echo twig_escape_filter($this->env, isset($context["uri_back"]) ? $context["uri_back"] : null, "html", null, true);
     echo "\" class=\"btn btn-default\">Kembali</a>\n                </div>\n            </div>\n        ";
     // line 72
     echo form_close();
     echo "\n\n    </div>\n</div>\n";
 }
Пример #6
0
    private function mapel_kelas_hirarki($view = '', $params = array())
    {
        $parent = $this->kelas_model->retrieve_all(null, !empty($params['parent_id']) ? array('id' => $params['parent_id']) : array());
        $return = '';
        foreach ($parent as $p) {
            $return .= '<div class="parent-kelas" id="parent-' . $p['id'] . '">' . $p['nama'] . '</div>';
            $sub_kelas = $this->kelas_model->retrieve_all($p['id'], !empty($params['sub_id']) ? array('id' => $params['sub_id']) : array());
            foreach ($sub_kelas as $s) {
                $return .= '<div class="panel panel-info" id="subkelas-' . $s['id'] . '" style="margin-left:25px;margin-bottom:5px;">';
                switch ($view) {
                    default:
                        $return .= '<div class="panel-heading">
                            ' . $s['nama'] . '&nbsp;&nbsp;' . ($s['aktif'] == 0 ? '<span class="label label-warning">Kelas tidak aktif</span>' : '') . '
                            ' . ($s['aktif'] == 1 ? '<a href="' . site_url('admin/mapel_kelas/add/' . $p['id'] . '/' . $s['id'] . '/' . enurl_redirect(current_url())) . '" class="btn btn-info pull-right" style="margin-top:-5px;"><i class="icon-wrench"></i> Atur Matapelajaran</a>' : '') . '
                        </div>';
                        if ($s['aktif'] == 1) {
                            $return .= '<div class="panel-body">';
                            $retrieve_all = $this->mapel_model->retrieve_all_kelas(null, $s['id']);
                            $return .= '<table class="table table-striped table-condensed">
                            <tbody>';
                            foreach ($retrieve_all as $v) {
                                $m = $this->mapel_model->retrieve($v['mapel_id']);
                                if (empty($m)) {
                                    continue;
                                }
                                $return .= '<tr>
                                    <td>
                                        <div class="btn-group pull-right">
                                            <a class="btn btn-default" href="#modal-' . $v['id'] . '" data-toggle="modal"><i class="icon-trash"></i> Hapus</a>
                                        </div>
                                        ' . $m['nama'] . '<br>
                                        <small>' . nl2br($m['info']) . '</small>

                                        <div id="modal-' . $v['id'] . '" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
                                            <div class="modal-header">
                                                <button type="button" class="close" data-dismiss="modal" aria-hidden="true">×</button>
                                                <h3 id="myModalLabel">Konfirmasi</h3>
                                            </div>
                                            <div class="modal-body">
                                                <p>Menghapus matapelajaran kelas akan menghapus data - data yang berkaitan yaitu :</p>
                                                <ol>
                                                    <li>Jadwal Mengajar Pengajar</li>
                                                    <li>Tugas pada jadwal mengajar no. 1</li>
                                                </ol>
                                            </div>
                                            <div class="modal-footer">
                                                <button class="btn btn-default" data-dismiss="modal" aria-hidden="true">Batal</button>
                                                <a class="btn btn-danger" href="' . site_url('admin/mapel_kelas/remove/' . $p['id'] . '/' . $s['id'] . '/' . $v['id'] . '/' . enurl_redirect(current_url())) . '">Tetap Hapus</a>
                                            </div>
                                        </div>
                                    </td>
                                </tr>';
                            }
                            $return .= '</tbody>
                            </table>';
                            $return .= '</div>';
                        }
                        break;
                }
                $return .= '</div>';
            }
        }
        return $return;
    }
 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=\"bs-callout bs-callout-info bs-callout-noborder\">\n            <div class=\"row-fluid\">\n                <div class=\"span11\">\n                    <table class=\"table table-condensed table-striped\">\n                        <thead>\n                            <tr>\n                                <th>Pengajar</th>\n                                <th>Matapelajaran</th>\n                                <th>Hari</th>\n                                <th>Jam</th>\n                                <th>Kelas</th>\n                            </tr>\n                        </thead>\n                        <tbody>\n                            <tr>\n                                <td><a href=\"";
     // line 26
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "link_profil"), "html", null, true);
     echo "\">";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "nama"), "html", null, true);
     echo "</a></td>\n                                <td>";
     // line 27
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "nama"), "html", null, true);
     echo "</td>\n                                <td>";
     // line 28
     echo twig_escape_filter($this->env, get_indo_hari($this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "hari_id")), "html", null, true);
     echo "</td>\n                                <td>";
     // line 29
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "jam_mulai"), "H:i"), "html", null, true);
     echo " - ";
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "jam_selesai"), "H:i"), "html", null, true);
     echo "</td>\n                                <td>";
     // line 30
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "nama"), "html", null, true);
     echo " <b>( ";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "jumlah_siswa"), "html", null, true);
     echo " siswa)</b></td>\n                            </tr>\n                        </tbody>\n                    </table>\n                </div>\n                <div class=\"span1\">\n                    <img src=\"";
     // line 36
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "link_foto"), "html", null, true);
     echo "\" class=\"pull-right img-circle img-polaroid img-profile-top\">\n                </div>\n            </div>\n        </div>\n\n        <br>\n        ";
     // line 42
     echo form_open_multipart("admin/tugas/edit/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(isset($context["uri_back"]) ? $context["uri_back"] : null), array("class" => "form-horizontal row-fluid"));
     echo "\n        <div class=\"control-group\">\n            <label class=\"control-label\">Judul Tugas <span class=\"text-error\">*</span></label>\n            <div class=\"controls\">\n                <input type=\"text\" name=\"judul\" class=\"span12\" value=\"";
     // line 46
     echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul")), "html", null, true);
     echo "\">\n                <br>";
     // line 47
     echo form_error("judul");
     echo "\n            </div>\n        </div>\n        <div class=\"control-group\">\n            <label class=\"control-label\">Durasi</label>\n            <div class=\"controls\">\n                <input type=\"text\" name=\"durasi\" value=\"";
     // line 53
     echo twig_escape_filter($this->env, set_value("durasi", $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "durasi")), "html", null, true);
     echo "\" class=\"span2\" placeholder=\"Dalam Menit\">\n                <br><span class=\"text-muted\">Kusus untuk tipe soal <b>Pilihan Ganda</b> dan <b>Essay</b></span>\n                <br>";
     // line 55
     echo form_error("durasi");
     echo "\n            </div>\n        </div>\n        <div class=\"control-group\">\n            <label class=\"control-label\">Info</label>\n            <div class=\"controls\">\n                <textarea name=\"info\" id=\"info\" style=\"height:150px;width:100%;\">";
     // line 61
     echo set_value("info", $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "info"));
     echo "</textarea>\n                ";
     // line 62
     echo form_error("info");
     echo "\n            </div>\n        </div>\n        <div class=\"control-group\">\n            <div class=\"controls\">\n                <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n                ";
     // line 68
     echo anchor(isset($context["uri_back"]) ? $context["uri_back"] : null, "Kembali", array("class" => "btn"));
     echo "\n            </div>\n        </div>\n        ";
     // line 71
     echo form_close();
     echo "\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>Pencarian</h3>\n    </div>\n    <div class=\"module-body\">\n        <div class=\"well well-small\" style=\"box-shadow: none;\">\n            Hasil pencarian dengan kata kunci : <b>";
     // line 14
     echo twig_escape_filter($this->env, isset($context["keyword"]) ? $context["keyword"] : null, "html", null, true);
     echo "</b>\n        </div>\n\n        ";
     // line 17
     if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa"))) {
         // line 18
         echo "        <b><i class=\"icon-group\"></i> Siswa </b>(ditemukan ";
         echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa")), "html", null, true);
         echo " record)\n        <table class=\"table table-condensed table-striped\">\n            ";
         // line 20
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "siswa"));
         foreach ($context['_seq'] as $context["_key"] => $context["v"]) {
             // line 21
             echo "            <tr>\n                <td>\n                    <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\"";
             // line 23
             echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "medium", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true);
             echo "\">\n                    <b>";
             // line 24
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true);
             echo " ";
             echo !twig_test_empty($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nis") . ")</span>" : "";
             echo "</b>\n                    <br>";
             // line 25
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3 ? $this->getAttribute($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "kelas_aktif"), "nama") . " , " : "", "html", null, true);
             echo " ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin"), "html", null, true);
             echo " , ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "agama"), "html", null, true);
             echo "\n                </td>\n                <td width=\"20%\">\n                    <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n                        ";
             // line 29
             if (is_admin()) {
                 // line 30
                 echo "                        <li><a class=\"btn btn-default btn-small\" href=\"";
                 echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true);
                 echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n                        <li class=\"dropdown\">\n                            <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-";
                 // line 32
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true);
                 echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n                            <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-";
                 // line 33
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true);
                 echo "\">\n                                <li>";
                 // line 34
                 echo anchor("siswa/edit_profile/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Siswa"));
                 echo "</li>\n                                <li>";
                 // line 35
                 echo anchor("siswa/edit_picture/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Siswa"));
                 echo "</li>\n                                ";
                 // line 36
                 if ($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") != 3) {
                     // line 37
                     echo "                                <li>";
                     echo anchor("siswa/moved_class/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Kelas Aktif", array("class" => "iframe-kelas-aktif", "title" => "Edit Kelas Aktif"));
                     echo "</li>\n                                ";
                 }
                 // line 39
                 echo "                                <li>";
                 echo anchor("siswa/edit_username/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Siswa"));
                 echo "</li>\n                                <li>";
                 // line 40
                 echo anchor("siswa/edit_password/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Siswa"));
                 echo "</li>\n                            </ul>\n                        </li>\n                        ";
             } else {
                 // line 44
                 echo "                        <li><a class=\"btn btn-default btn-small\" href=\"";
                 echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true);
                 echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n                        ";
             }
             // line 46
             echo "                    </ul>\n                </td>\n            </tr>\n            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['v'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 50
         echo "        </table>\n        <br>\n        ";
     }
     // line 53
     echo "\n        ";
     // line 54
     if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar"))) {
         // line 55
         echo "        <b><i class=\"icon-user\"></i> Pengajar </b>(ditemukan ";
         echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar")), "html", null, true);
         echo " record)\n        <table class=\"table table-condensed table-striped\">\n            ";
         // line 57
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengajar"));
         foreach ($context['_seq'] as $context["no"] => $context["v"]) {
             // line 58
             echo "            <tr>\n                <td>\n                    <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\"";
             // line 60
             echo twig_escape_filter($this->env, get_url_image_pengajar($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "foto"), "medium", $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "jenis_kelamin")), "html", null, true);
             echo "\">\n                    <b>";
             // line 61
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nama"), "html", null, true);
             echo " ";
             echo !twig_test_empty($this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nip")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "nip") . ")</span>" : "";
             echo "</b>\n                    ";
             // line 62
             $context["is_admin"] = get_row_data("login_model", "retrieve", array(0 => null, 1 => null, 2 => null, 3 => null, 4 => $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "is_admin");
             // line 63
             echo "                    ";
             if ((isset($context["is_admin"]) ? $context["is_admin"] : null) == 1) {
                 // line 64
                 echo "                        <span class=\"label label-warning\">Administrator</span>\n                    ";
             }
             // line 66
             echo "                    <br><b>Alamat :</b> ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "alamat"), "html", null, true);
             echo "\n                </td>\n                <td width=\"20%\">\n                    <ul class=\"nav nav-pills\" style=\"margin-bottom:0px;\">\n                        ";
             // line 70
             if (is_admin() == true) {
                 // line 71
                 echo "                        <li><a class=\"btn btn-default btn-small\" href=\"";
                 echo twig_escape_filter($this->env, site_url("pengajar/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true);
                 echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n                        <li class=\"dropdown\">\n                            <a class=\"btn btn-default btn-small\" href=\"#\" id=\"act-";
                 // line 73
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true);
                 echo "\" class=\"dropdown-toggle\" data-toggle=\"dropdown\"><i class=\"icon-edit\"></i> Edit <b class=\"caret\" style=\"margin-top:5px;\"></b></a>\n                            <ul class=\"dropdown-menu\" role=\"menu\" aria-labelledby=\"act-";
                 // line 74
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "html", null, true);
                 echo "\">\n                                <li>";
                 // line 75
                 echo anchor("pengajar/edit_profile/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Profil", array("class" => "iframe-4", "title" => "Edit Profil Pengajar"));
                 echo "</li>\n                                <li>";
                 // line 76
                 echo anchor("pengajar/edit_picture/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Foto", array("class" => "iframe-5", "title" => "Edit Foto Pengajar"));
                 echo "</li>\n                                <li>";
                 // line 77
                 echo anchor("pengajar/edit_username/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Username", array("class" => "iframe-2", "title" => "Edit Username Pengajar"));
                 echo "</li>\n                                <li>";
                 // line 78
                 echo anchor("pengajar/edit_password/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "status_id") . "/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id"), "Edit Password", array("class" => "iframe-3", "title" => "Edit Password Pengajar"));
                 echo "</li>\n                            </ul>\n                        </li>\n                        ";
             } else {
                 // line 82
                 echo "                        <li><a class=\"btn btn-default btn-small\" href=\"";
                 echo twig_escape_filter($this->env, site_url("pengajar/detail/" . $this->getAttribute(isset($context["v"]) ? $context["v"] : null, "id")), "html", null, true);
                 echo "\"><i class=\"icon-zoom-in\"></i> Detail</a></li>\n                        ";
             }
             // line 84
             echo "                    </ul>\n                </td>\n            </tr>\n            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['no'], $context['v'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 88
         echo "        </table>\n        <br>\n        ";
     }
     // line 91
     echo "\n        ";
     // line 92
     if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi"))) {
         // line 93
         echo "        <b><i class=\"icon-book\"></i> Materi </b>(ditemukan ";
         echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi")), "html", null, true);
         echo " record)\n        <table class=\"table table-condensed table-striped\">\n            ";
         // line 95
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "materi"));
         foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
             // line 96
             echo "                ";
             if (is_admin() == true) {
                 // line 97
                 echo "                    ";
                 $context["action_edit"] = true;
                 // line 98
                 echo "                    ";
                 $context["action_delete"] = true;
                 // line 99
                 echo "                ";
             } elseif (is_pengajar() == true) {
                 // line 100
                 echo "                    ";
                 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pengajar_id") == get_sess_data("user", "id")) {
                     // line 101
                     echo "                        ";
                     $context["action_edit"] = true;
                     // line 102
                     echo "                        ";
                     $context["action_delete"] = true;
                     // line 103
                     echo "                    ";
                 } else {
                     // line 104
                     echo "                        ";
                     $context["action_edit"] = false;
                     // line 105
                     echo "                        ";
                     $context["action_delete"] = false;
                     // line 106
                     echo "                    ";
                 }
                 // line 107
                 echo "                ";
             }
             // line 108
             echo "\n                ";
             // line 109
             if (is_siswa()) {
                 // line 110
                 echo "                <tr>\n                    <td>\n                        <a href=\"";
                 // line 112
                 echo twig_escape_filter($this->env, site_url("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id")), "html", null, true);
                 echo "\" target=\"_tab\">";
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true);
                 echo "</a>\n                    </td>\n                </tr>\n                ";
             } else {
                 // line 116
                 echo "                <tr>\n                    <td>\n                        ";
                 // line 118
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true);
                 echo "\n                    </td>\n                    <td width=\"20%\">\n                        <div class=\"btn-group\">\n                            ";
                 // line 122
                 if (!twig_test_empty($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "file"))) {
                     // line 123
                     echo "                                ";
                     $context["url_type"] = "file";
                     // line 124
                     echo "                            ";
                 } else {
                     // line 125
                     echo "                                ";
                     $context["url_type"] = "tertulis";
                     // line 126
                     echo "                            ";
                 }
                 // line 127
                 echo "                            ";
                 echo anchor("materi/detail/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-zoom-in\"></i> Detail", array("class" => "btn btn-default btn-small", "target" => "_tab"));
                 echo "\n\n                            ";
                 // line 129
                 if ((isset($context["action_edit"]) ? $context["action_edit"] : null) == true) {
                     // line 130
                     echo "                                ";
                     echo anchor("materi/edit/" . (isset($context["url_type"]) ? $context["url_type"] : null) . "/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small"));
                     echo "\n                            ";
                 }
                 // line 132
                 echo "\n                            ";
                 // line 133
                 if ((isset($context["action_delete"]) ? $context["action_delete"] : null) == true) {
                     // line 134
                     echo "                                ";
                     echo anchor("materi/delete/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-trash\"></i> Hapus", array("class" => "btn btn-default btn-small", "onclick" => "return confirm('Anda yakin ingin menghapus?')"));
                     echo "\n                            ";
                 }
                 // line 136
                 echo "                        </div>\n                    </td>\n                </tr>\n                ";
             }
             // line 140
             echo "            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 141
         echo "        </table>\n        <br>\n        ";
     }
     // line 144
     echo "\n        ";
     // line 145
     if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas"))) {
         // line 146
         echo "        <b><i class=\"icon-tasks\"></i> Tugas </b>(ditemukan ";
         echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas")), "html", null, true);
         echo " record)\n        <table class=\"table table-condensed table-striped\">\n            ";
         // line 148
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "tugas"));
         foreach ($context['_seq'] as $context["no"] => $context["m"]) {
             // line 149
             echo "            ";
             if (is_admin() || is_pengajar()) {
                 // line 150
                 echo "                <tr>\n                    <td>\n                        ";
                 // line 152
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true);
                 echo "\n                    </td>\n                    <td width=\"20%\">\n                        <div class=\"btn-group\">\n                            ";
                 // line 156
                 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") {
                     // line 157
                     echo "                                ";
                     echo anchor("tugas/manajemen_soal/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon icon-tasks\"></i> Soal", array("class" => "btn btn-primary btn-small"));
                     echo "\n                            ";
                 }
                 // line 159
                 echo "                            ";
                 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 0) {
                     // line 160
                     echo "                                ";
                     echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-ok\"></i> Terbitkan", array("class" => "btn btn-success btn-small"));
                     echo "\n                            ";
                 } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1) {
                     // line 162
                     echo "                                ";
                     echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small"));
                     echo "\n                            ";
                 }
                 // line 164
                 echo "\n                            ";
                 // line 165
                 echo anchor("tugas/edit/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url() . "?q=" . (isset($context["keyword"]) ? $context["keyword"] : null)), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small"));
                 echo "\n                            ";
                 // line 166
                 if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_id") == 3) {
                     // line 167
                     echo "                                ";
                     echo anchor("tugas/nilai/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-eye-open\"></i> Lihat Nilai", array("class" => "btn btn-info btn-small"));
                     echo "\n                            ";
                 } else {
                     // line 169
                     echo "                                ";
                     echo anchor("tugas/koreksi/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-check\"></i> Koreksi", array("class" => "btn btn-info btn-small"));
                     echo "\n                            ";
                 }
                 // line 171
                 echo "                        </div>\n                    </td>\n                </tr>\n            ";
             } else {
                 // line 175
                 echo "                <tr>\n                    <td>\n                        <a href=\"";
                 // line 177
                 echo twig_escape_filter($this->env, site_url("tugas?judul=" . urlencode($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"))), "html", null, true);
                 echo "\">";
                 echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true);
                 echo "</a>\n                    </td>\n                </tr>\n            ";
             }
             // line 181
             echo "            ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['no'], $context['m'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 182
         echo "        </table><br>\n        ";
     }
     // line 184
     echo "\n        ";
     // line 185
     if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan"))) {
         // line 186
         echo "        <b><i class=\"icon-comments\"></i> Pesan </b>(ditemukan ";
         echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan")), "html", null, true);
         echo " record)\n        <div class=\"message\">\n        <table class=\"table table-message\">\n            <tbody>\n                ";
         // line 190
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pesan"));
         foreach ($context['_seq'] as $context["_key"] => $context["d"]) {
             // line 191
             echo "                <tr class=\"";
             echo $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "opened") == 0 ? "unread" : "";
             echo " clickable-row\" data-href=\"";
             echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "#msg-" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id")), "html", null, true);
             echo "\">\n                    <td class=\"cell-author\">\n                        <img style=\"height:30px;width:30px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\"";
             // line 193
             echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "foto"), "medium", $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "jenis_kelamin")), "html", null, true);
             echo "\">\n                        <a href=\"";
             // line 194
             echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "link_profil"), "html", null, true);
             echo "\">";
             echo twig_escape_filter($this->env, character_limiter($this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "profil"), "nama"), 23, "..."), "html", null, true);
             echo "</a>\n                        <br><small>";
             // line 195
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "date"), "html", null, true);
             echo "</small>\n                    </td>\n                    <td class=\"cell-title hidden-phone hidden-tablet\">\n                        <a class=\"pull-right\" style=\"margin-left:10px;\" href=\"";
             // line 198
             echo twig_escape_filter($this->env, site_url("message/detail/" . $this->getAttribute(isset($context["d"]) ? $context["d"] : null, "id") . "/?confirm=1#confirm"), "html", null, true);
             echo "\"><i class=\"icon-trash\"></i></a>\n                        ";
             // line 199
             if (!twig_test_empty($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"))) {
                 // line 200
                 echo "                        <div>To <a href=\"";
                 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"), "link_profil"), "html", null, true);
                 echo "\">";
                 echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "receiver"), "nama"), "html", null, true);
                 echo "</a></div>\n                        ";
             }
             // line 202
             echo "                        ";
             echo character_limiter(strip_tags($this->getAttribute(isset($context["d"]) ? $context["d"] : null, "content")), 80, "...");
             echo "\n                    </td>\n                </tr>\n                ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['d'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 206
         echo "            </tbody>\n        </table>\n        <div>\n        <br>\n        ";
     }
     // line 211
     echo "\n        ";
     // line 212
     if (!twig_test_empty($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman"))) {
         // line 213
         echo "        <b><i class=\"icon-bullhorn\"></i> Pengumuman </b>(ditemukan ";
         echo twig_escape_filter($this->env, count($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman")), "html", null, true);
         echo " record)\n        <table class=\"table table-striped\">\n            <thead>\n                <tr>\n                    <th width=\"5%\">ID</th>\n                    <th>Judul</th>\n                    <th width=\"17%\">Tgl. Tampil</th>\n                    <th width=\"17%\">Tgl. Tutup</th>\n                    <th width=\"15%\"></th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
         // line 225
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["results"]) ? $context["results"] : null, "pengumuman"));
         foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
             // line 226
             echo "                <tr>\n                    <td><b>";
             // line 227
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id"), "html", null, true);
             echo "</b></td>\n                    <td><a href=\"";
             // line 228
             echo twig_escape_filter($this->env, site_url("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true);
             echo "\"><b>";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "judul"), "html", null, true);
             echo "</b></a></td>\n                    <td>";
             // line 229
             echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tampil")), "html", null, true);
             echo "</td>\n                    <td>";
             // line 230
             echo twig_escape_filter($this->env, tgl_indo($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "tgl_tutup")), "html", null, true);
             echo "</td>\n                    <td>\n                        <div class=\"btn-group\">\n                        ";
             // line 233
             $context['_parent'] = (array) $context;
             $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "allow_action"));
             foreach ($context['_seq'] as $context["_key"] => $context["a"]) {
                 // line 234
                 echo "                            ";
                 if ((isset($context["a"]) ? $context["a"] : null) == "detail") {
                     // line 235
                     echo "                            <a class=\"btn btn-default btn-small\" href=\"";
                     echo twig_escape_filter($this->env, site_url("pengumuman/detail/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true);
                     echo "\" data-toggle=\"tooltip\" title=\"Detail\"><i class=\"icon-zoom-in\"></i></a>\n                            ";
                 }
                 // line 237
                 echo "\n                            ";
                 // line 238
                 if ((isset($context["a"]) ? $context["a"] : null) == "edit") {
                     // line 239
                     echo "                            <a class=\"btn btn-default btn-small\" href=\"";
                     echo twig_escape_filter($this->env, site_url("pengumuman/edit/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true);
                     echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-edit\"></i></a>\n                            ";
                 }
                 // line 241
                 echo "\n                            ";
                 // line 242
                 if ((isset($context["a"]) ? $context["a"] : null) == "delete") {
                     // line 243
                     echo "                            <a onclick=\"return confirm('Anda yakin ingin menghapus?')\" class=\"btn btn-default btn-small\" href=\"";
                     echo twig_escape_filter($this->env, site_url("pengumuman/delete/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true);
                     echo "\" data-toggle=\"tooltip\" title=\"Edit\"><i class=\"icon-trash\"></i></a>\n                            ";
                 }
                 // line 245
                 echo "                        ";
             }
             $_parent = $context['_parent'];
             unset($context['_seq'], $context['_iterated'], $context['_key'], $context['a'], $context['_parent'], $context['loop']);
             $context = array_intersect_key($context, $_parent) + $_parent;
             // line 246
             echo "                        </div>\n                    </td>\n                </tr>\n                ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['p'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 250
         echo "            </tbody>\n        </table>\n        <br>\n        ";
     }
     // line 254
     echo "\n    </div>\n</div>\n";
 }
 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";
 }
 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=\"bs-callout bs-callout-info bs-callout-noborder\">\n            <div class=\"btn-group pull-right\">\n                <a class=\"btn btn-default\" href=\"";
     // line 13
     echo twig_escape_filter($this->env, site_url("admin/tugas/edit/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url())), "html", null, true);
     echo "\"><i class=\"icon-edit\"></i> Edit Tugas</a>\n                ";
     // line 14
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "aktif") == 0) {
         // line 15
         echo "                    ";
         echo anchor("admin/tugas/tampilkan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : 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 17
         echo "                    ";
         echo anchor("admin/tugas/sembunyikan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : 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 19
     echo "            </div>\n            <h2 class=\"title-info\" data-toggle=\"collapse\" data-target=\"#demo\">";
     // line 20
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul"), "html", null, true);
     echo "</h2>\n            <div id=\"demo\" class=\"collapse\">\n            <label class=\"label label-warning\">Tipe : ";
     // line 22
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type"), "html", null, true);
     echo "</label>\n            <label class=\"label label-info\">Durasi : ";
     // line 23
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "durasi"), "html", null, true);
     echo " Menit</label>\n            <table class=\"table table-condensed table-striped\">\n                <thead>\n                    <tr>\n                        <th>Pengajar</th>\n                        <th>Matapelajaran</th>\n                        <th>Hari</th>\n                        <th>Jam</th>\n                        <th>Kelas</th>\n                    </tr>\n                </thead>\n                <tbody>\n                    <tr>\n                        <td><a href=\"";
     // line 36
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "link_profil"), "html", null, true);
     echo "\">";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "nama"), "html", null, true);
     echo "</a></td>\n                        <td>";
     // line 37
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "nama"), "html", null, true);
     echo "</td>\n                        <td>";
     // line 38
     echo twig_escape_filter($this->env, get_indo_hari($this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "hari_id")), "html", null, true);
     echo "</td>\n                        <td>";
     // line 39
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "jam_mulai"), "H:i"), "html", null, true);
     echo " - ";
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "jam_selesai"), "H:i"), "html", null, true);
     echo "</td>\n                        <td>";
     // line 40
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "nama"), "html", null, true);
     echo " <span class=\"badge badge-info\">";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "jumlah_siswa"), "html", null, true);
     echo " siswa</span></td>\n                    </tr>\n                </tbody>\n            </table>\n            </div>\n        </div>\n\n        <br>\n        <a href=\"";
     // line 48
     echo twig_escape_filter($this->env, site_url("admin/tugas/add_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id")), "html", null, true);
     echo "\" class=\"btn btn-primary\">Tambah Soal</a>\n        <br><br>\n\n        ";
     // line 51
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["retrieve_all_pertanyaan"]) ? $context["retrieve_all_pertanyaan"] : null, "results"));
     foreach ($context['_seq'] as $context["s_key"] => $context["s"]) {
         // line 52
         echo "            <div class=\"well well-small\" style=\"box-shadow: none;border-radius: 0px;\">\n            <table class=\"table table-condensed table-soal\">\n                <tbody>\n                    <tr>\n                        <td width=\"5%\" valign=\"top\"><span style=\"font-size:15px;font-size: bold;\">";
         // line 56
         echo twig_escape_filter($this->env, isset($context["s_key"]) ? $context["s_key"] : null, "html", null, true);
         echo ".</span></td>\n                        <td colspan=\"2\">\n                            ";
         // line 58
         echo $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "pertanyaan");
         echo "\n                        </td>\n                        <td width=\"10%\">\n                            <div class=\"btn-group pull-right\">\n                                ";
         // line 62
         echo anchor("admin/tugas/edit_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id"), "<i class=\"icon-edit\"></i>", array("class" => "btn", "data-toggle" => "tooltip", "title" => "Edit Soal"));
         echo "\n                                ";
         // line 63
         echo anchor("admin/tugas/delete_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id"), "<i class=\"icon-trash\"></i>", array("class" => "btn", "data-toggle" => "tooltip", "title" => "Hapus Soal", "onclick" => "return confirm('Anda yakin ingin menghapus soal?')"));
         echo "\n                            </div>\n                        </td>\n                    </tr>\n                    ";
         // line 67
         if (!twig_test_empty($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "pilihan"))) {
             // line 68
             echo "                        ";
             $context['_parent'] = (array) $context;
             $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "pilihan"));
             foreach ($context['_seq'] as $context["p_key"] => $context["p"]) {
                 // line 69
                 echo "                        <tr>\n                            <td></td>\n                            <td width=\"3%\"><b class=\"";
                 // line 71
                 echo $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "kunci") == 1 ? "badge badge-success" : "badge";
                 echo "\">";
                 echo twig_escape_filter($this->env, get_abjad(isset($context["p_key"]) ? $context["p_key"] : null), "html", null, true);
                 echo ".</b></td>\n                            <td>";
                 // line 72
                 echo $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "konten");
                 echo "</td>\n                            <td></td>\n                        </tr>\n                        ";
             }
             $_parent = $context['_parent'];
             unset($context['_seq'], $context['_iterated'], $context['p_key'], $context['p'], $context['_parent'], $context['loop']);
             $context = array_intersect_key($context, $_parent) + $_parent;
             // line 76
             echo "                    ";
         }
         // line 77
         echo "                </tbody>\n            </table>\n            </div>\n        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['s_key'], $context['s'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 81
     echo "\n        <br>\n        ";
     // line 83
     echo isset($context["pagination"]) ? $context["pagination"] : null;
     echo "\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>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 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>Tugas</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("tugas");
     echo "\n\n        <div class=\"bs-callout bs-callout-info\">\n            ";
     // line 16
     if (is_siswa() == false) {
         // line 17
         echo "            <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n                ";
         // line 18
         echo anchor("tugas/add/3", "Tambah Tugas Ganda", array("class" => "btn btn-primary"));
         echo "\n                ";
         // line 19
         echo anchor("tugas/add/2", "Tambah Tugas Essay", array("class" => "btn btn-primary"));
         echo "\n                ";
         // line 20
         echo anchor("tugas/add/1", "Tambah Tugas Upload", array("class" => "btn btn-primary"));
         echo "\n            </div>\n            ";
     }
     // line 23
     echo "            <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#form-filter\"><i class=\"icon-search\" style=\"line-height: 0px;\"></i> Filter</a></b>\n\n            <div id=\"form-filter\" class=\"collapse\" style=\"margin-top: 5px;\">\n                ";
     // line 26
     echo form_open("tugas");
     echo "\n                    <table class=\"table table-condensed\">\n                        <tr>\n                            <th  style=\"border-top: none;\">Mapel</th>\n                            <td  style=\"border-top: none;\">\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
     // line 32
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 33
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"mapel_id[]\" value=\"";
         // line 35
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\" ";
         echo twig_escape_filter($this->env, set_checkbox("mapel_id[]", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) && in_array($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) ? true : ""), "html", null, true);
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true);
         echo "\n                                        </label>\n                                    </li>\n                                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 39
     echo "                                </ul>\n                            </td>\n                        </tr>\n                        ";
     // line 42
     if (is_siswa() == false) {
         // line 43
         echo "                        <tr>\n                            <th>Kelas</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
         // line 47
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
         foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
             // line 48
             echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
             // line 50
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true);
             echo "\" ";
             echo twig_escape_filter($this->env, set_checkbox("kelas_id[]", $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) && in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) ? true : ""), "html", null, true);
             echo "> ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true);
             echo "\n                                        </label>\n                                    </li>\n                                    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['k'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 54
         echo "                                </ul>\n                            </td>\n                        </tr>\n                        ";
     }
     // line 58
     echo "                        <tr>\n                            <th>Tipe</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"3\" ";
     // line 64
     echo twig_escape_filter($this->env, set_checkbox("type[]", "3", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("3", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Ganda\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"2\" ";
     // line 69
     echo twig_escape_filter($this->env, set_checkbox("type[]", "2", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("2", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Essay\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"1\" ";
     // line 74
     echo twig_escape_filter($this->env, set_checkbox("type[]", "1", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("1", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Upload\n                                        </label>\n                                    </li>\n                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th width=\"15%\">Judul</th>\n                            <td>\n                                <input type=\"text\" name=\"judul\" class=\"span4\" value=\"";
     // line 83
     echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "judul")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Info</th>\n                            <td>\n                                <input type=\"text\" name=\"info\" class=\"span5\" value=\"";
     // line 89
     echo twig_escape_filter($this->env, set_value("info", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "info")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        ";
     // line 92
     if (is_pengajar() == false) {
         // line 93
         echo "                        <tr>\n                            <th>Pembuat</th>\n                            <td>\n                                <input type=\"text\" name=\"pembuat\" class=\"span4\" value=\"";
         // line 96
         echo twig_escape_filter($this->env, set_value("pembuat", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "pembuat")), "html", null, true);
         echo "\">\n                            </td>\n                        </tr>\n                        ";
     }
     // line 100
     echo "                        <tr>\n                            <th>Status</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"status[]\" value=\"1\" ";
     // line 106
     echo twig_escape_filter($this->env, set_checkbox("status[]", "1", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) && in_array("1", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) ? true : ""), "html", null, true);
     echo "> Terbit\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"status[]\" value=\"0\" ";
     // line 111
     echo twig_escape_filter($this->env, set_checkbox("status[]", "0", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status") != "" && in_array("0", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "status")) ? true : ""), "html", null, true);
     echo "> Tutup\n                                        </label>\n                                    </li>\n                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <td></td>\n                            <td>\n                                <button type=\"submit\" class=\"btn btn-primary\">Filter</button>\n                            </td>\n                        </tr>\n                    </table>\n                </form>\n            </div>\n\n        </div>\n\n        <br>\n\n        <table class=\"table table-striped\">\n            <thead>\n                <tr>\n                    <th width=\"7%\">ID</th>\n                    <th>Informasi Tugas</th>\n                    <th width=\"15%\">Tipe Tugas</th>\n                    <th width=\"15%\"></th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
     // line 141
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["tugas"]) ? $context["tugas"] : null);
     foreach ($context['_seq'] as $context["no"] => $context["m"]) {
         // line 142
         echo "                <tr ";
         echo is_siswa() && $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1 && sudah_ngerjakan($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), get_sess_data("user", "id")) == false ? "class=\"success\"" : "";
         echo ">\n                    <td><b>";
         // line 143
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "</b></td>\n                    <td>\n                        <strong class=\"text-warning\">";
         // line 145
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true);
         echo "</strong>\n                        <br><small><b>";
         // line 146
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "mapel"), "nama"), "html", null, true);
         echo "</b>\n\n                        ";
         // line 148
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "tugas_kelas"));
         foreach ($context['_seq'] as $context["_key"] => $context["mk"]) {
             // line 149
             echo "                            , ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "nama"), "html", null, true);
             echo "\n                        ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['mk'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 151
         echo "\n                        ";
         // line 152
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") {
             // line 153
             echo "                            , ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "durasi"), "html", null, true);
             echo " Menit\n                        ";
         }
         // line 155
         echo "\n                        </small>\n                        <br><small><b>Pembuat : </b> <a href=\"";
         // line 157
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pembuat"), "link_profil"), "html", null, true);
         echo "\">";
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pembuat"), "nama"), "html", null, true);
         echo "</a>, ";
         echo twig_escape_filter($this->env, tgl_jam_indo($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "tgl_buat")), "html", null, true);
         echo "</small>\n                        ";
         // line 158
         if (is_siswa() && $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "info") != "") {
             // line 159
             echo "                            <hr style=\"margin-top: 5px;margin-bottom: 5px;border:none;border-bottom: 1px dashed black;\">\n                            ";
             // line 160
             echo $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "info");
             echo "\n                        ";
         }
         // line 162
         echo "                    </td>\n                    <td>\n                        ";
         // line 164
         if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda") {
             // line 165
             echo "                            <span class=\"label label-success\">Ganda</span>\n                        ";
         } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") {
             // line 167
             echo "                            <span class=\"label label-info\">Essay</span>\n                        ";
         } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Upload") {
             // line 169
             echo "                            <span class=\"label label-warning\">Upload</span>\n                        ";
         }
         // line 171
         echo "                    </td>\n                    <td>\n                        <div class=\"btn-group\">\n                        ";
         // line 174
         if (is_siswa() == false) {
             // line 175
             echo "                            ";
             if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Ganda" || $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_label") == "Essay") {
                 // line 176
                 echo "                                ";
                 echo anchor("tugas/manajemen_soal/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon icon-tasks\"></i> Soal", array("class" => "btn btn-primary btn-small"));
                 echo "\n                            ";
             }
             // line 178
             echo "                            ";
             if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 0) {
                 // line 179
                 echo "                                ";
                 echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-ok\"></i> Terbitkan", array("class" => "btn btn-success btn-small"));
                 echo "\n                            ";
             } elseif ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1) {
                 // line 181
                 echo "                                ";
                 echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small"));
                 echo "\n                            ";
             }
             // line 183
             echo "\n                            ";
             // line 184
             echo anchor("tugas/edit/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-edit\"></i> Edit", array("class" => "btn btn-default btn-small"));
             echo "\n                            ";
             // line 185
             if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "type_id") == 3) {
                 // line 186
                 echo "                                ";
                 echo anchor("tugas/nilai/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-eye-open\"></i> Lihat Nilai", array("class" => "btn btn-info btn-small"));
                 echo "\n                            ";
             } else {
                 // line 188
                 echo "                                ";
                 echo anchor("tugas/koreksi/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-check\"></i> Koreksi", array("class" => "btn btn-info btn-small"));
                 echo "\n                            ";
             }
             // line 190
             echo "                        ";
         } elseif (is_siswa() == true) {
             // line 191
             echo "                            ";
             if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "aktif") == 1) {
                 // line 192
                 echo "                                ";
                 if (sudah_ngerjakan($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), get_sess_data("user", "id")) == false) {
                     // line 193
                     echo "                                    ";
                     echo anchor("tugas/kerjakan/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-ok-sign\"></i> Mulai Kerjakan", array("class" => "btn btn-success btn-small", "onclick" => "return confirm('Anda yakin ingin memulai mengerjakan tugas ini?')"));
                     echo "\n                                ";
                 }
                 // line 195
                 echo "                            ";
             } else {
                 // line 196
                 echo "                                ";
                 echo anchor("tugas/nilai/" . $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "<i class=\"icon-flag\"></i> Lihat Nilai", array("class" => "btn btn-info btn-small iframe-lihat-nilai"));
                 echo "\n                            ";
             }
             // line 198
             echo "                        ";
         }
         // line 199
         echo "                        </div>\n                    </td>\n                </tr>\n                ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['no'], $context['m'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 203
     echo "            </tbody>\n        </table>\n        <br>\n        ";
     // line 206
     echo isset($context["pagination"]) ? $context["pagination"] : null;
     echo "\n\n    </div>\n</div>\n";
 }
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 10
     echo anchor(isset($context["uri_back"]) ? $context["uri_back"] : null, "Materi");
     echo " / Edit Materi</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("materi");
     echo "\n\n        ";
     // line 15
     echo form_open_multipart("materi/edit/" . (isset($context["type"]) ? $context["type"] : null) . "/" . $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "id") . "/" . enurl_redirect(isset($context["uri_back"]) ? $context["uri_back"] : null), array("class" => "form-horizontal row-fluid"));
     echo "\n            <div class=\"control-group\">\n                <label class=\"control-label\">Judul <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <input type=\"text\" name=\"judul\" class=\"span12\" value=\"";
     // line 19
     echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "judul")), "html", null, true);
     echo "\">\n                    <br>";
     // line 20
     echo form_error("judul");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Matapelajaran <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <select name=\"mapel_id\">\n                        <option value=\"\">--pilih--</option>\n                        ";
     // line 28
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 29
         echo "                        <option value=\"";
         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_select("mapel_id", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id") == $this->getAttribute(isset($context["materi"]) ? $context["materi"] : 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 "</option>\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 31
     echo "                    </select>\n                    <br>";
     // line 32
     echo form_error("mapel_id");
     echo "\n                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Kelas <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                        ";
     // line 39
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 40
         echo "                        <li>\n                            <label class=\"checkbox inline\">\n                                <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
         // line 42
         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"), in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), isset($context["materi_kelas"]) ? $context["materi_kelas"] : null) ? 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 46
     echo "                    </ul>\n                    ";
     // line 47
     echo form_error("kelas_id[]");
     echo "\n                </div>\n            </div>\n            ";
     // line 50
     if ((isset($context["type"]) ? $context["type"] : null) == "tertulis") {
         // line 51
         echo "            <div class=\"control-group\">\n                <label class=\"control-label\">Konten <span class=\"text-error\">*</span></label>\n                <div class=\"controls\">\n                    <textarea name=\"konten\" id=\"konten\" style=\"height:500px;width:100%;\">";
         // line 54
         echo set_value("konten", html_entity_decode($this->getAttribute(isset($context["materi"]) ? $context["materi"] : null, "konten")));
         echo "</textarea>\n                    ";
         // line 55
         echo form_error("konten");
         echo "\n                </div>\n            </div>\n            ";
     } elseif ((isset($context["type"]) ? $context["type"] : null) == "file") {
         // line 59
         echo "            <div class=\"control-group\">\n                <label class=\"control-label\">Info File</label>\n                <div class=\"controls\">\n                    <table class=\"table table-condensed table-striped\">\n                        <tbody>\n                            <tr>\n                                <th>Name</th>\n                                <td><a href=\"";
         // line 66
         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=\"_tab\">";
         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 70
         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 74
         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 78
         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 82
         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                </div>\n            </div>\n            <div class=\"control-group\">\n                <label class=\"control-label\">Ganti File</label>\n                <div class=\"controls\">\n                    <input type=\"file\" name=\"userfile\">\n                    <br>";
         // line 92
         echo !twig_test_empty(isset($context["error_upload"]) ? $context["error_upload"] : null) ? isset($context["error_upload"]) ? $context["error_upload"] : null : "";
         echo "\n                </div>\n            </div>\n            ";
     }
     // line 96
     echo "            <div class=\"control-group\">\n                <div class=\"controls\">\n                    <button type=\"submit\" class=\"btn btn-primary\">Update</button>\n                    <a href=\"";
     // line 99
     echo twig_escape_filter($this->env, isset($context["uri_back"]) ? $context["uri_back"] : null, "html", null, true);
     echo "\" class=\"btn btn-default\">Kembali</a>\n                </div>\n            </div>\n        ";
     // line 102
     echo form_close();
     echo "\n\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>";
     // line 10
     echo anchor("tugas", "Tugas");
     echo " / Manajemen Soal 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/edit/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon icon-edit\"></i> Edit Tugas", array("class" => "btn btn-default"));
     echo "\n                ";
     // line 18
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "aktif") == 0) {
         // line 19
         echo "                    ";
         echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : 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["tugas"]) ? $context["tugas"] : null, "aktif") == 1) {
         // line 21
         echo "                    ";
         echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small"));
         echo "\n                ";
     }
     // line 23
     echo "            </div>\n            <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#detail-tugas\"><i class=\"icon-info-sign\" style=\"line-height: 0px;\"></i> ";
     // line 24
     echo twig_escape_filter($this->env, twig_upper_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul")), "html", null, true);
     echo "</a></b>\n\n            <div id=\"detail-tugas\" class=\"collapse\" style=\"margin-top: 5px;\">\n                <table class=\"table\">\n                    <tr>\n                        <th style=\"border-top: none;\" width=\"15%\">Tipe</th>\n                        <td style=\"border-top: none;\">";
     // line 30
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_label"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Judul</th>\n                        <td>";
     // line 34
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Matapelajaran</th>\n                        <td>";
     // line 38
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "mapel"), "nama"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Kelas</th>\n                        <td>\n                            <ul class=\"unstyled inline\" style=\"margin-left: -5px;margin-bottom: 0px;\">\n                                ";
     // line 44
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "tugas_kelas"));
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 45
         echo "                                <li>";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true);
         echo "</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 47
     echo "                            </ul>\n                        </td>\n                    </tr>\n                    <tr>\n                        <th>Info</th>\n                        <td>";
     // line 52
     echo $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "info");
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Durasi</th>\n                        <td>";
     // line 56
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "durasi"), "html", null, true);
     echo " Menit</td>\n                    </tr>\n                </table>\n            </div>\n\n        </div>\n        <br>\n\n        <div class=\"btn-group\">\n            <a href=\"";
     // line 65
     echo twig_escape_filter($this->env, site_url("tugas/tambah_soal/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id")), "html", null, true);
     echo "\" class=\"btn btn-primary iframe-pertanyaan\" title=\"Tambah Pertanyaan\">Tambah Pertanyaan</a>\n        </div>\n        <br><br>\n\n        <table class=\"table\">\n            <thead>\n                <tr>\n                    <th width=\"5%\">No</th>\n                    <th>Pertanyaan ";
     // line 73
     echo $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 3 ? " dan Pilihan" : "";
     echo "</th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
     // line 77
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["p"]) {
         // line 78
         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><b>";
         // line 79
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "urutan"), "html", null, true);
         echo ".</b></td>\n                    <td>\n                        <div class=\"pertanyaan\">\n                            <div class=\"btn-group pull-right\" style=\"margin-left:10px;\">\n                                ";
         // line 83
         if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 3) {
             // line 84
             echo "                                <a href=\"";
             echo twig_escape_filter($this->env, site_url("tugas/tambah_pilihan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true);
             echo "\" class=\"btn btn-small btn-default iframe-pilihan\" data-toggle=\"tooltip\" title=\"Tambah Pilihan\"><i class=\"icon-tasks\"></i></a>\n                                ";
         }
         // line 86
         echo "                                <a href=\"";
         echo twig_escape_filter($this->env, site_url("tugas/edit_soal/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id")), "html", null, true);
         echo "\" class=\"btn btn-small btn-default iframe-pertanyaan\" data-toggle=\"tooltip\" title=\"Edit Pertanyaan\"><i class=\"icon-edit\"></i></a>\n                                <a onclick=\"return confirm('Anda yakin ingin menghapus?')\" href=\"";
         // line 87
         echo twig_escape_filter($this->env, site_url("tugas/hapus_soal/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id") . "/" . enurl_redirect(current_url())), "html", null, true);
         echo "\" class=\"btn btn-small btn-default\" data-toggle=\"tooltip\" title=\"Hapus Pertanyaan\"><i class=\"icon-trash\"></i></a>\n                            </div>\n\n                            ";
         // line 90
         echo html_entity_decode($this->getAttribute(isset($context["p"]) ? $context["p"] : null, "pertanyaan"));
         echo "\n                        </div>\n\n                        ";
         // line 93
         if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 3) {
             // line 94
             echo "                        <div id=\"pilihan-";
             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 97
             $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 98
                 echo "                                    <tr ";
                 echo $this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "kunci") == 1 ? "class=\"success\"" : "";
                 echo ">\n                                        <td width=\"3%\"><b>(";
                 // line 99
                 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                                            <div class=\"btn-group pull-right\" style=\"margin-left:10px;\">\n                                                ";
                 // line 102
                 if ($this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "kunci") == 0) {
                     // line 103
                     echo "                                                    <a href=\"";
                     echo twig_escape_filter($this->env, site_url("tugas/kunci_pilihan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id") . "/" . $this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "id") . "/" . enurl_redirect(current_url())), "html", null, true);
                     echo "\" class=\"btn btn-small btn-default\" data-toggle=\"tooltip\" title=\"Jadikan Kunci\"><i class=\"icon-ok\"></i></a>\n                                                ";
                 }
                 // line 105
                 echo "                                                <a href=\"";
                 echo twig_escape_filter($this->env, site_url("tugas/edit_pilihan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id") . "/" . $this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "id")), "html", null, true);
                 echo "\" class=\"btn btn-small btn-default iframe-pilihan\" data-toggle=\"tooltip\" title=\"Edit Pilihan\"><i class=\"icon-edit\"></i></a>\n                                                <a onclick=\"return confirm('Anda yakin ingin menghapus?')\" href=\"";
                 // line 106
                 echo twig_escape_filter($this->env, site_url("tugas/hapus_pilihan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["p"]) ? $context["p"] : null, "id") . "/" . $this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "id") . "/" . enurl_redirect(current_url())), "html", null, true);
                 echo "\" class=\"btn btn-small btn-default\" data-toggle=\"tooltip\" title=\"Hapus Pilihan\"><i class=\"icon-trash\"></i></a>\n                                            </div>\n                                            ";
                 // line 108
                 echo html_entity_decode($this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "konten"));
                 echo "\n\n                                            ";
                 // line 110
                 if ($this->getAttribute(isset($context["pil"]) ? $context["pil"] : null, "kunci") == 1) {
                     // line 111
                     echo "                                            <b class=\"text-warning\"><i class=\"icon-star\"></i> Kunci Jawaban</b>\n                                            ";
                 }
                 // line 113
                 echo "                                        </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 116
             echo "                                </tbody>\n                            </table>\n                        </div>\n                        ";
         }
         // line 120
         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 125
     echo "            </tbody>\n        </table>\n        <br>\n        ";
     // line 128
     echo isset($context["pagination"]) ? $context["pagination"] : null;
     echo "\n\n    </div>\n</div>\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>\n            ";
     // line 12
     echo form_open("admin/tugas/edit_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null, "id"));
     echo "\n            <input type=\"hidden\" name=\"jumlah_pilihan\" value=\"4\">\n            <table class=\"table table-bordered table-hover\">\n                <thead>\n                    <tr>\n                        <th>\n                            <div class=\"bs-callout bs-callout-info bs-callout-noborder\">\n                                <div class=\"btn-group pull-right\">\n                                    <a class=\"btn btn-default\" href=\"";
     // line 20
     echo twig_escape_filter($this->env, site_url("admin/tugas/edit/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url())), "html", null, true);
     echo "\"><i class=\"icon-edit\"></i> Edit Tugas</a>\n                                    ";
     // line 21
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "aktif") == 0) {
         // line 22
         echo "                                        ";
         echo anchor("admin/tugas/tampilkan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : 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 24
         echo "                                        ";
         echo anchor("admin/tugas/sembunyikan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : 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 26
     echo "                                </div>\n                                <h2 class=\"title-info\" data-toggle=\"collapse\" data-target=\"#demo\">";
     // line 27
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul"), "html", null, true);
     echo "</h2>\n                                <div id=\"demo\" class=\"collapse\">\n                                <label class=\"label label-warning\">Tipe : ";
     // line 29
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type"), "html", null, true);
     echo "</label>\n                                <label class=\"label label-info\">Durasi : ";
     // line 30
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "durasi"), "html", null, true);
     echo " Menit</label>\n                                <table class=\"table table-condensed table-striped\">\n                                    <thead>\n                                        <tr>\n                                            <th>Pengajar</th>\n                                            <th>Matapelajaran</th>\n                                            <th>Hari</th>\n                                            <th>Jam</th>\n                                            <th>Kelas</th>\n                                        </tr>\n                                    </thead>\n                                    <tbody>\n                                        <tr>\n                                            <td><a href=\"";
     // line 43
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "link_profil"), "html", null, true);
     echo "\">";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["pengajar"]) ? $context["pengajar"] : null, "nama"), "html", null, true);
     echo "</a></td>\n                                            <td>";
     // line 44
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mapel"]) ? $context["mapel"] : null, "nama"), "html", null, true);
     echo "</td>\n                                            <td>";
     // line 45
     echo twig_escape_filter($this->env, get_indo_hari($this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "hari_id")), "html", null, true);
     echo "</td>\n                                            <td>";
     // line 46
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "jam_mulai"), "H:i"), "html", null, true);
     echo " - ";
     echo twig_escape_filter($this->env, twig_date_format_filter($this->env, $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "jam_selesai"), "H:i"), "html", null, true);
     echo "</td>\n                                            <td>";
     // line 47
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "nama"), "html", null, true);
     echo " <span class=\"badge badge-info\">";
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["kelas"]) ? $context["kelas"] : null, "jumlah_siswa"), "html", null, true);
     echo " siswa</span></td>\n                                        </tr>\n                                    </tbody>\n                                </table>\n                                </div>\n                            </div>\n                        </th>\n                    </tr>\n                </thead>\n                <tbody>\n                    <tr class=\"info\">\n                        <td>\n                            <div class=\"row-fluid\">\n                                <div class=\"span10\">\n                                    <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                        ";
     // line 62
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["retrieve_all_pertanyaan"]) ? $context["retrieve_all_pertanyaan"] : null, "results"));
     foreach ($context['_seq'] as $context["s_key"] => $context["s"]) {
         // line 63
         echo "                                        <li>\n                                            ";
         // line 64
         if (!twig_test_empty($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "kunci_index"))) {
             // line 65
             echo "                                                ";
             $context["kunci_index"] = get_abjad($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "kunci_index"));
             // line 66
             echo "                                            ";
         } else {
             // line 67
             echo "                                                ";
             $context["kunci_index"] = "";
             // line 68
             echo "                                            ";
         }
         // line 69
         echo "                                            ";
         echo anchor("admin/tugas/edit_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id"), (isset($context["s_key"]) ? $context["s_key"] : null) . ". " . (isset($context["kunci_index"]) ? $context["kunci_index"] : null), array("class" => "label label-info", "data-toggle" => "tooltip", "title" => word_limiter(strip_tags($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "pertanyaan")), 50)));
         echo "\n                                        </li>\n                                        ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['s_key'], $context['s'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 72
     echo "                                    </ul>\n                                    <b>Jumlah Soal Tersimpan : ";
     // line 73
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["retrieve_all_pertanyaan"]) ? $context["retrieve_all_pertanyaan"] : null, "total_record"), "html", null, true);
     echo "</b>\n                                </div>\n                                <div class=\"span2\">\n                                    ";
     // line 76
     echo anchor("admin/tugas/add_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id"), "Tambah Soal", array("class" => "btn btn-primary"));
     echo "\n                                </div>\n                            </div>\n                        </td>\n                    </tr>\n                    <tr>\n                        <td>\n                            <div class=\"btn-group pull-right\">\n                                <button class=\"btn btn-primary\" type=\"submit\">Update Soal</button>\n                                ";
     // line 85
     echo anchor("admin/tugas/delete_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null, "id"), "Hapus Soal", array("class" => "btn btn-danger", "onclick" => "return confirm('Anda yakin ingin manghapus soal ini?')"));
     echo "\n                            </div>\n                            <h3>Edit Pertanyaan <span class=\"text-error\">*</span> ";
     // line 87
     echo form_error("pertanyaan");
     echo "</h3>\n                            <textarea id=\"question\" name=\"pertanyaan\" style=\"width:100%;height:200px;\">";
     // line 88
     echo set_value("pertanyaan", $this->getAttribute(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null, "pertanyaan"));
     echo "</textarea>\n                        </td>\n                    </tr>\n                    ";
     // line 91
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_id") == 3) {
         // line 92
         echo "\n                    ";
         // line 93
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable(range(1, 4));
         foreach ($context['_seq'] as $context["_key"] => $context["i"]) {
             // line 94
             echo "                    <tr>\n                        <td>\n                            <input type=\"hidden\" name=\"pilihan_";
             // line 96
             echo twig_escape_filter($this->env, isset($context["i"]) ? $context["i"] : null, "html", null, true);
             echo "_id\" value=\"";
             echo twig_escape_filter($this->env, get_data_array(isset($context["pilihan"]) ? $context["pilihan"] : null, isset($context["i"]) ? $context["i"] : null, "id"), "html", null, true);
             echo "\">\n                            <div class=\"pull-right controls\">\n                                <label class=\"radio inline\"><input type=\"radio\" name=\"kunci\" value=\"pilihan_";
             // line 98
             echo twig_escape_filter($this->env, isset($context["i"]) ? $context["i"] : null, "html", null, true);
             echo "\" ";
             echo twig_escape_filter($this->env, set_radio("kunci", "pilihan_" . (isset($context["i"]) ? $context["i"] : null), get_data_array(isset($context["pilihan"]) ? $context["pilihan"] : null, isset($context["i"]) ? $context["i"] : null, "kunci") == 1 ? true : ""), "html", null, true);
             echo "> <b class=\"text-warning\">Jadikan Kunci</b></label>\n                            </div>\n                            <h3>Edit Pilihan ";
             // line 100
             echo twig_escape_filter($this->env, get_abjad(isset($context["i"]) ? $context["i"] : null), "html", null, true);
             echo "</h3>\n                            <textarea class=\"tiny_options\" name=\"pilihan_";
             // line 101
             echo twig_escape_filter($this->env, isset($context["i"]) ? $context["i"] : null, "html", null, true);
             echo "\" style=\"width:100%;height:200px;\">";
             echo set_value("pilihan_" . (isset($context["i"]) ? $context["i"] : null), get_data_array(isset($context["pilihan"]) ? $context["pilihan"] : null, isset($context["i"]) ? $context["i"] : null, "konten"));
             echo "</textarea>\n                        </td>\n                    </tr>\n                    ";
         }
         $_parent = $context['_parent'];
         unset($context['_seq'], $context['_iterated'], $context['_key'], $context['i'], $context['_parent'], $context['loop']);
         $context = array_intersect_key($context, $_parent) + $_parent;
         // line 105
         echo "                    \n                    ";
     }
     // line 107
     echo "                    <tr>\n                        <td>\n                            <button class=\"btn btn-primary\" type=\"submit\">Update Soal</button>\n                            <a class=\"btn btn-default\" href=\"";
     // line 110
     echo twig_escape_filter($this->env, site_url("admin/tugas/soal/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id")), "html", null, true);
     echo "\">Kembali</a>\n                        \n                            ";
     // line 112
     echo anchor("admin/tugas/delete_question/" . $this->getAttribute(isset($context["mapel_ajar"]) ? $context["mapel_ajar"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["pertanyaan"]) ? $context["pertanyaan"] : null, "id"), "Hapus Soal", array("class" => "btn btn-danger pull-right", "onclick" => "return confirm('Anda yakin ingin manghapus soal ini?')"));
     echo "\n                        </td>\n                    </tr>\n                </tbody>\n            </table>\n            ";
     // line 117
     echo form_close();
     echo "\n        </div>\n    </div>\n</div>\n";
 }
Пример #16
0
 function add($segment_3 = '')
 {
     $type = (string) strtolower($segment_3);
     if (!in_array($type, array(1, 2, 3))) {
         redirect('tugas');
     }
     # type label
     if ($type == 1) {
         $data['type_label'] = 'Upload';
         $form_validation = 'tugas/add_upload';
     }
     if ($type == 2) {
         $data['type_label'] = 'Essay';
         $form_validation = 'tugas/add_ganda_essay';
     }
     if ($type == 3) {
         $data['type_label'] = 'Ganda';
         $form_validation = 'tugas/add_ganda_essay';
     }
     $data['type'] = $type;
     $data['mapel'] = $this->mapel_model->retrieve_all_mapel();
     $data['kelas'] = $this->kelas_model->retrieve_all_child();
     $data['comp_js'] = get_tinymce('info');
     if ($this->form_validation->run($form_validation) == TRUE) {
         $mapel_id = $this->input->post('mapel_id', TRUE);
         $judul = $this->input->post('judul', TRUE);
         $info = $this->input->post('info', TRUE);
         $durasi = null;
         if ($type != 1) {
             $durasi = $this->input->post('durasi', TRUE);
         }
         $tugas_id = $this->tugas_model->create($mapel_id, get_sess_data('user', 'id'), $type, $judul, $durasi, $info);
         # simpan kelas tugas
         $kelas_id = $this->input->post('kelas_id', TRUE);
         foreach ($kelas_id as $tugas_kelas_id) {
             $this->tugas_model->create_kelas($tugas_id, $tugas_kelas_id);
         }
         if ($type != 1) {
             # redirect ke manajemen soal
             $this->session->set_flashdata('tugas', get_alert('success', 'Manajemen soal tugas.'));
             redirect('tugas/manajemen_soal/' . $tugas_id . '/' . enurl_redirect(site_url('tugas')));
         } else {
             $this->session->set_flashdata('tugas', get_alert('success', 'Tugas Upload berhasil disimpan.'));
             redirect('tugas');
         }
     }
     $this->twig->display('tambah-tugas.html', $data);
 }
 public function block_content($context, array $blocks = array())
 {
     // line 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>Materi</h3>\n    </div>\n    <div class=\"module-body\">\n        ";
     // line 13
     echo get_flashdata("materi");
     echo "\n\n        <div class=\"bs-callout bs-callout-info\">\n            ";
     // line 16
     if (is_siswa() == false) {
         // line 17
         echo "            <div class=\"btn-group pull-right\" style=\"margin-top:-5px;\">\n                ";
         // line 18
         echo anchor("materi/add/tertulis", "Tambah Materi Tertulis", array("class" => "btn btn-primary"));
         echo "\n                ";
         // line 19
         echo anchor("materi/add/file", "Tambah Materi File", array("class" => "btn btn-primary"));
         echo "\n            </div>\n            ";
     }
     // line 22
     echo "            <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#form-filter\"><i class=\"icon-search\" style=\"line-height: 0px;\"></i> PARAMETER PENCARIAN</a></b>\n\n            <div id=\"form-filter\" class=\"collapse\" style=\"margin-top: 5px;\">\n                ";
     // line 25
     echo form_open("materi");
     echo "\n                    <table class=\"table table-condensed\">\n                        <tr>\n                            <th  style=\"border-top: none;\">Mapel</th>\n                            <td  style=\"border-top: none;\">\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
     // line 31
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["mapel"]) ? $context["mapel"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["m"]) {
         // line 32
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"mapel_id[]\" value=\"";
         // line 34
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\" ";
         echo twig_escape_filter($this->env, set_checkbox("mapel_id[]", $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) && in_array($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "mapel_id")) ? true : ""), "html", null, true);
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "nama"), "html", null, true);
         echo "\n                                        </label>\n                                    </li>\n                                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['m'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 38
     echo "                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Kelas</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    ";
     // line 45
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["kelas"]) ? $context["kelas"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 46
         echo "                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"kelas_id[]\" value=\"";
         // line 48
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), "html", null, true);
         echo "\" ";
         echo twig_escape_filter($this->env, set_checkbox("kelas_id[]", $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) && in_array($this->getAttribute(isset($context["k"]) ? $context["k"] : null, "id"), $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "kelas_id")) ? true : ""), "html", null, true);
         echo "> ";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true);
         echo "\n                                        </label>\n                                    </li>\n                                    ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['k'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 52
     echo "                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Tipe</th>\n                            <td>\n                                <ul class=\"unstyled inline\" style=\"margin-left: -5px;\">\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"tertulis\" ";
     // line 61
     echo twig_escape_filter($this->env, set_checkbox("type[]", "tertulis", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("tertulis", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> Tertulis\n                                        </label>\n                                    </li>\n                                    <li>\n                                        <label class=\"checkbox inline\">\n                                            <input type=\"checkbox\" name=\"type[]\" value=\"file\" ";
     // line 66
     echo twig_escape_filter($this->env, set_checkbox("type[]", "file", !twig_test_empty($this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) && in_array("file", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "type")) ? true : ""), "html", null, true);
     echo "> File\n                                        </label>\n                                    </li>\n                                </ul>\n                            </td>\n                        </tr>\n                        <tr>\n                            <th width=\"15%\">Judul</th>\n                            <td>\n                                <input type=\"text\" name=\"judul\" class=\"span4\" value=\"";
     // line 75
     echo twig_escape_filter($this->env, set_value("judul", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "judul")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Konten</th>\n                            <td>\n                                <input type=\"text\" name=\"konten\" class=\"span5\" value=\"";
     // line 81
     echo twig_escape_filter($this->env, set_value("konten", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "konten")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <th>Pembuat</th>\n                            <td>\n                                <input type=\"text\" name=\"pembuat\" class=\"span4\" value=\"";
     // line 87
     echo twig_escape_filter($this->env, set_value("pembuat", $this->getAttribute(isset($context["filter"]) ? $context["filter"] : null, "pembuat")), "html", null, true);
     echo "\">\n                            </td>\n                        </tr>\n                        <tr>\n                            <td></td>\n                            <td>\n                                <button type=\"submit\" class=\"btn btn-primary\">Filter</button>\n                            </td>\n                        </tr>\n                    </table>\n                </form>\n            </div>\n\n        </div>\n\n        <br>\n\n        <table class=\"table table-striped\">\n            <thead>\n                <tr>\n                    <th width=\"7%\">ID</th>\n                    <th>Informasi Materi</th>\n                    <th width=\"15%\">Tipe Materi</th>\n                    <th width=\"15%\"></th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
     // line 114
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["materi"]) ? $context["materi"] : null);
     foreach ($context['_seq'] as $context["no"] => $context["m"]) {
         // line 115
         echo "\n                ";
         // line 116
         if (is_admin() == true) {
             // line 117
             echo "                    ";
             $context["action_edit"] = true;
             // line 118
             echo "                    ";
             $context["action_delete"] = true;
             // line 119
             echo "                ";
         } elseif (is_pengajar() == true) {
             // line 120
             echo "                    ";
             if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "pengajar_id") == get_sess_data("user", "id")) {
                 // line 121
                 echo "                        ";
                 $context["action_edit"] = true;
                 // line 122
                 echo "                        ";
                 $context["action_delete"] = true;
                 // line 123
                 echo "                    ";
             } else {
                 // line 124
                 echo "                        ";
                 $context["action_edit"] = false;
                 // line 125
                 echo "                        ";
                 $context["action_delete"] = false;
                 // line 126
                 echo "                    ";
             }
             // line 127
             echo "                ";
         } elseif (is_siswa() == true) {
             // line 128
             echo "                    ";
             if ($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "siswa_id") == get_sess_data("user", "id")) {
                 // line 129
                 echo "                        ";
                 $context["action_edit"] = true;
                 // line 130
                 echo "                        ";
                 $context["action_delete"] = true;
                 // line 131
                 echo "                    ";
             } else {
                 // line 132
                 echo "                        ";
                 $context["action_edit"] = false;
                 // line 133
                 echo "                        ";
                 $context["action_delete"] = false;
                 // line 134
                 echo "                    ";
             }
             // line 135
             echo "                ";
         }
         // line 136
         echo "\n                <tr>\n                    <td><b>";
         // line 138
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "</b></td>\n                    <td>\n                        <strong class=\"text-warning\">\n                            ";
         // line 141
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "judul"), "html", null, true);
         echo "\n                            <span class=\"as-link caret\" data-toggle=\"collapse\" data-target=\"#toggle-";
         // line 142
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\" style=\"margin-top:10px;\"></span>\n                        </strong>\n                        <div class=\"collapse\" id=\"toggle-";
         // line 144
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["m"]) ? $context["m"] : null, "id"), "html", null, true);
         echo "\">\n                            <table class=\"table table-condensed table-bordered\">\n                                <tr>\n                                    <td width=\"20%\">Mapel</td>\n                                    <td>";
         // line 148
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "mapel"), "nama"), "html", null, true);
         echo "</td>\n                                </tr>\n                                <tr>\n                                    <td>Kelas</td>\n                                    <td>\n                                        ";
         // line 153
         $context['_parent'] = (array) $context;
         $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["m"]) ? $context["m"] : null, "materi_kelas"));
         foreach ($context['_seq'] as $context["_key"] => $context["mk"]) {
             // line 154
             echo "                                            ";
             echo twig_escape_filter($this->env, $this->getAttribute(isset($context["mk"]) ? $context["mk"] : null, "nama"), "html", null, true);
             echo "&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 8
     echo "<div class=\"module\">\n    <div class=\"module-head\">\n        <h3>";
     // line 10
     echo anchor("tugas", "Tugas");
     echo " / Koreksi</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/edit/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon icon-edit\"></i> Edit Tugas", array("class" => "btn btn-default"));
     echo "\n                ";
     // line 18
     if ($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "aktif") == 0) {
         // line 19
         echo "                    ";
         echo anchor("tugas/terbitkan/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : 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["tugas"]) ? $context["tugas"] : null, "aktif") == 1) {
         // line 21
         echo "                    ";
         echo anchor("tugas/tutup/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . enurl_redirect(current_url()), "<i class=\"icon-minus\"></i> Tutup", array("class" => "btn btn-danger btn-small"));
         echo "\n                ";
     }
     // line 23
     echo "            </div>\n            <b><a class=\"as-link\" data-toggle=\"collapse\" data-target=\"#detail-tugas\"><i class=\"icon-info-sign\" style=\"line-height: 0px;\"></i> ";
     // line 24
     echo twig_escape_filter($this->env, twig_upper_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul")), "html", null, true);
     echo "</a></b>\n\n            <div id=\"detail-tugas\" class=\"collapse\" style=\"margin-top: 5px;\">\n                <table class=\"table\">\n                    <tr>\n                        <th style=\"border-top: none;\" width=\"15%\">Tipe</th>\n                        <td style=\"border-top: none;\">";
     // line 30
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "type_label"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Judul</th>\n                        <td>";
     // line 34
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "judul"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Matapelajaran</th>\n                        <td>";
     // line 38
     echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "mapel"), "nama"), "html", null, true);
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Kelas</th>\n                        <td>\n                            <ul class=\"unstyled inline\" style=\"margin-left: -5px;margin-bottom: 0px;\">\n                                ";
     // line 44
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable($this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "tugas_kelas"));
     foreach ($context['_seq'] as $context["_key"] => $context["k"]) {
         // line 45
         echo "                                <li>";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["k"]) ? $context["k"] : null, "nama"), "html", null, true);
         echo "</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 47
     echo "                            </ul>\n                        </td>\n                    </tr>\n                    <tr>\n                        <th>Info</th>\n                        <td>";
     // line 52
     echo $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "info");
     echo "</td>\n                    </tr>\n                    <tr>\n                        <th>Durasi</th>\n                        <td>";
     // line 56
     echo twig_escape_filter($this->env, $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "durasi"), "html", null, true);
     echo " Menit</td>\n                    </tr>\n                </table>\n            </div>\n\n        </div>\n        <br>\n\n        <table class=\"table table-striped datatable\">\n            <thead>\n                <tr>\n                    <th>Siswa</th>\n                    <th>Kelas</th>\n                    <th>Nilai</th>\n                    <th></th>\n                </tr>\n            </thead>\n            <tbody>\n                ";
     // line 74
     $context['_parent'] = (array) $context;
     $context['_seq'] = twig_ensure_traversable(isset($context["data_siswa"]) ? $context["data_siswa"] : null);
     foreach ($context['_seq'] as $context["_key"] => $context["s"]) {
         // line 75
         echo "                <tr>\n                    <td>\n                        <img style=\"height:20px;width:20px; margin-right: 10px;\" class=\"img-polaroid img-circle pull-left\" src=\"";
         // line 77
         echo twig_escape_filter($this->env, get_url_image_siswa($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "foto"), "medium", $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "jenis_kelamin")), "html", null, true);
         echo "\">\n                        <a href=\"";
         // line 78
         echo twig_escape_filter($this->env, site_url("siswa/detail/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id")), "html", null, true);
         echo "\"><b>";
         echo twig_escape_filter($this->env, $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nama"), "html", null, true);
         echo " ";
         echo !twig_test_empty($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nis")) ? "<span class=\"text-muted\">(" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nis") . ")</span>" : "";
         echo "</b></a>\n                    </td>\n                    <td>";
         // line 80
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "kelas_aktif"), "nama"), "html", null, true);
         echo "</td>\n                    <td>";
         // line 81
         echo twig_escape_filter($this->env, $this->getAttribute($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nilai"), "nilai"), "html", null, true);
         echo "</td>\n                    <td>\n                        <div class=\"btn-group\">\n                            ";
         // line 84
         if (twig_test_empty($this->getAttribute(isset($context["s"]) ? $context["s"] : null, "nilai"))) {
             // line 85
             echo "                                ";
             echo anchor("tugas/detail_jawaban/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id"), "Koreksi", array("class" => "btn btn-small btn-primary iframe-koreksi-jawaban"));
             echo "\n                            ";
         } else {
             // line 87
             echo "                                ";
             echo anchor("tugas/detail_jawaban/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id") . "/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id"), "Detail", array("class" => "btn btn-small btn-primary iframe-koreksi-jawaban"));
             echo "\n                            ";
         }
         // line 89
         echo "                            <a href=\"";
         echo twig_escape_filter($this->env, site_url("tugas/reset_jawaban/" . $this->getAttribute(isset($context["tugas"]) ? $context["tugas"] : null, "id") . "/" . $this->getAttribute(isset($context["s"]) ? $context["s"] : null, "id")), "html", null, true);
         echo "\" class=\"btn btn-small btn-default\" onclick=\"return confirm('Anda yakin ingin menganggap siswa belum mengerjakan?')\" data-toggle=\"tooltip\" title=\"Reset jawaban siswa, <br>anggap siswa menjadi belum mengerjakan.\">Reset</a>\n                        </div>\n                    </td>\n                </tr>\n                ";
     }
     $_parent = $context['_parent'];
     unset($context['_seq'], $context['_iterated'], $context['_key'], $context['s'], $context['_parent'], $context['loop']);
     $context = array_intersect_key($context, $_parent) + $_parent;
     // line 94
     echo "            </tbody>\n        </table>\n\n    </div>\n</div>\n";
 }
Пример #19
0
 function mapel_kelas($act = 'list', $segment_4 = '', $segment_5 = '', $segment_6 = '', $segment_7 = '')
 {
     $data['comp_js'] = load_comp_js(array(base_url('assets/comp/jquery/ajax.js')));
     switch ($act) {
         case 'aktifkan':
             $parent_id = (int) $segment_4;
             $kelas_id = (int) $segment_5;
             $mapel_kelas_id = (int) $segment_6;
             $uri_back = (string) $segment_7;
             # ambil parent
             $parent = $this->kelas_model->retrieve($parent_id);
             if (empty($parent)) {
                 redirect('kelas/mapel_kelas');
             }
             $kelas = $this->kelas_model->retrieve($kelas_id);
             if (empty($kelas)) {
                 redirect('kelas/mapel_kelas');
             }
             $mapel_kelas = $this->mapel_model->retrieve_kelas($mapel_kelas_id);
             if (empty($mapel_kelas)) {
                 redirect('kelas/mapel_kelas');
             }
             if (empty($uri_back)) {
                 $uri_back = site_url('kelas/mapel_kelas/#subkelas-' . $kelas_id);
             } else {
                 $uri_back = deurl_redirect($uri_back);
                 $uri_back = rtrim($uri_back, '/');
                 $uri_back = $uri_back . '/#subkelas-' . $kelas_id;
             }
             if (!is_demo_app()) {
                 # update
                 $this->mapel_model->update_kelas($mapel_kelas_id, $mapel_kelas['kelas_id'], $mapel_kelas['mapel_id'], 1);
             }
             $this->session->set_flashdata('edit-mapel-kelas-' . $kelas['id'], get_alert('success', 'Matapelajaran kelas berhasil diaktifkan.'));
             redirect($uri_back);
             break;
         case 'remove':
             $parent_id = (int) $segment_4;
             $kelas_id = (int) $segment_5;
             $mapel_kelas_id = (int) $segment_6;
             $uri_back = (string) $segment_7;
             # ambil parent
             $parent = $this->kelas_model->retrieve($parent_id);
             if (empty($parent)) {
                 redirect('kelas/mapel_kelas');
             }
             $kelas = $this->kelas_model->retrieve($kelas_id);
             if (empty($kelas)) {
                 redirect('kelas/mapel_kelas');
             }
             if (empty($uri_back)) {
                 $uri_back = site_url('kelas/mapel_kelas/#subkelas-' . $kelas_id);
             } else {
                 $uri_back = deurl_redirect($uri_back);
                 $uri_back = rtrim($uri_back, '/');
                 $uri_back = $uri_back . '/#subkelas-' . $kelas_id;
             }
             if (!is_demo_app()) {
                 # hapus data
                 $this->mapel_model->delete_kelas($mapel_kelas_id);
             }
             $this->session->set_flashdata('edit-mapel-kelas-' . $kelas['id'], get_alert('warning', 'Matapelajaran kelas berhasil dihapus.'));
             redirect($uri_back);
             break;
         case 'add':
             $parent_id = (int) $segment_4;
             $kelas_id = (int) $segment_5;
             $uri_back = (string) $segment_6;
             # ambil parent
             $parent = $this->kelas_model->retrieve($parent_id);
             if (empty($parent)) {
                 redirect('kelas/mapel_kelas');
             }
             $kelas = $this->kelas_model->retrieve($kelas_id);
             if (empty($kelas)) {
                 redirect('kelas/mapel_kelas');
             }
             if (empty($uri_back)) {
                 $uri_back = site_url('kelas/mapel_kelas/add/' . $parent_id . '/' . $kelas_id);
             } else {
                 $uri_back = deurl_redirect($uri_back);
             }
             $data['uri_back'] = $uri_back;
             $content_file = 'tambah-mapel-kelas.html';
             $data['kelas'] = $kelas;
             $data['parent'] = $parent;
             # ambil semua matapelajaran
             $retrieve_all = $this->mapel_model->retrieve_all_mapel();
             $data['mapels'] = $retrieve_all;
             # ambil matapelajaran pada kelas ini
             $retrieve_all_kelas = $this->mapel_model->retrieve_all_kelas();
             $mapel_kelas_id = array();
             foreach ($retrieve_all_kelas as $v) {
                 $mapel_kelas_id[] = $v['mapel_id'];
             }
             if ($this->form_validation->run('kelas/mapel_kelas/add') == TRUE and !is_demo_app()) {
                 $mapel = $this->input->post('mapel', TRUE);
                 $mapel_post_id = array();
                 foreach ($mapel as $mapel_id) {
                     if (is_numeric($mapel_id) and $mapel_id > 0) {
                         # cek dulu
                         $check = $this->mapel_model->retrieve_kelas(null, $kelas_id, $mapel_id);
                         if (empty($check)) {
                             $this->mapel_model->create_kelas($kelas_id, $mapel_id);
                         } else {
                             # update aktif jadi 1
                             $this->mapel_model->update_kelas($check['id'], $kelas_id, $mapel_id, 1);
                         }
                         $mapel_post_id[] = $mapel_id;
                     }
                 }
                 # cari perbedaan
                 if (count($mapel_kelas_id) > count($mapel_post_id)) {
                     $diff_mapel_kelas = array_diff($mapel_kelas_id, $mapel_post_id);
                     foreach ($diff_mapel_kelas as $mapel_id) {
                         # ambil data
                         $retrieve = $this->mapel_model->retrieve_kelas(null, $kelas_id, $mapel_id);
                         if (!empty($retrieve)) {
                             # hapus
                             $this->mapel_model->delete_kelas($retrieve['id']);
                         }
                     }
                 }
                 $this->session->set_flashdata('mapel', get_alert('success', 'Matapelajaran kelas berhasil disimpan.'));
                 redirect('kelas/mapel_kelas/add/' . $parent_id . '/' . $kelas_id . '/' . enurl_redirect($uri_back));
             }
             break;
         default:
         case 'list':
             # detect post
             if (!empty($_POST)) {
                 $post_parent_id = (int) $this->input->post('parent_kelas', true);
                 $post_sub_id = (int) $this->input->post('sub_kelas', true);
                 redirect('kelas/mapel_kelas/list/' . $post_parent_id . '/' . $post_sub_id);
             }
             $content_file = 'list-mapel-kelas.html';
             $parent_kelas_id = (int) $segment_4;
             $sub_kelas_id = (int) $segment_5;
             $data['filter']['parent_id'] = $parent_kelas_id;
             $data['filter']['sub_id'] = $sub_kelas_id;
             if (!empty($parent_kelas_id)) {
                 $data['filter']['result']['parent'] = $this->kelas_model->retrieve($parent_kelas_id);
                 $data['sub_kelas'] = $this->kelas_model->retrieve_all($parent_kelas_id, array('aktif' => 1));
             }
             if (!empty($sub_kelas_id)) {
                 $data['filter']['result']['sub'] = $this->kelas_model->retrieve($sub_kelas_id);
             }
             $data['mapel_kelas_hirarki'] = $this->mapel_kelas_hirarki('', array('parent_id' => $parent_kelas_id, 'sub_id' => $sub_kelas_id));
             $data['parent_kelas'] = $this->kelas_model->retrieve_all(null, array('aktif' => 1));
             break;
     }
     $this->twig->display($content_file, $data);
 }