Kalkulator sederhana untuk memudahkan dosen penguji yang malas menghitung hasil penilaian ujian/sidang TA/skripsi.
Du kan inte välja fler än 25 ämnen Ämnen måste starta med en bokstav eller siffra, kan innehålla bindestreck ('-') och vara max 35 tecken långa.

286 rader
12 KiB

  1. <!DOCTYPE html>
  2. <html lang="id">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0, shrink-to-fit=no">
  6. <meta http-equiv="X-UA-Compatible" content="ie=edge">
  7. <title>Penilaian Tugas Akhir</title>
  8. <link rel="shortcut icon" href="img/favicon.ico" type="image/x-icon">
  9. <link rel="stylesheet" href="css/bootstrap.min.css">
  10. <style>
  11. .input-nilai {
  12. min-width: 71px;
  13. }
  14. </style>
  15. </head>
  16. <body>
  17. <nav>
  18. <div class="nav nav-tabs" id="nav-tab" role="tablist">
  19. <a class="nav-item nav-link active" id="nav-dosen-tab" data-toggle="tab" href="#nav-dosen" role="tab"
  20. aria-controls="nav-dosen" aria-selected="true">Dosen Penguji</a>
  21. <a class="nav-item nav-link" id="nav-rekap-tab" data-toggle="tab" href="#nav-rekap" role="tab"
  22. aria-controls="nav-rekap" aria-selected="false">Rekapitulasi</a>
  23. </div>
  24. </nav>
  25. <div class="tab-content" id="nav-tabContent">
  26. <div class="tab-pane fade show active" id="nav-dosen" role="tabpanel" aria-labelledby="nav-dosen-tab">
  27. <div class="table-responsive">
  28. <table class="table mt-1" id="form-dosen">
  29. <thead>
  30. <tr>
  31. <th class="align-middle">Aspek</th>
  32. <th class="align-middle">Nilai</th>
  33. <th class="align-middle">Persentase</th>
  34. <th class="align-middle">Tertimbang</th>
  35. </tr>
  36. </thead>
  37. <tbody>
  38. <tr>
  39. <td class="align-middle">Presentasi dan Penampilan</td>
  40. <td class="align-middle text-center">
  41. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  42. max="100">
  43. </td>
  44. <td class="align-middle text-center">
  45. <span>10</span>%
  46. </td>
  47. <td class="align-middle text-center output-hasil">0</td>
  48. </tr>
  49. <tr>
  50. <td class="align-middle">Sistematika dan Format Laporan</td>
  51. <td class="align-middle text-center">
  52. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  53. max="100">
  54. </td>
  55. <td class="align-middle text-center">
  56. <span>15</span>%
  57. </td>
  58. <td class="align-middle text-center output-hasil">0</td>
  59. </tr>
  60. <tr>
  61. <td class="align-middle">Kualitas Hasil Penelitian</td>
  62. <td class="align-middle text-center">
  63. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  64. max="100">
  65. </td>
  66. <td class="align-middle text-center">
  67. <span>35</span>%
  68. </td>
  69. <td class="align-middle text-center output-hasil">0</td>
  70. </tr>
  71. <tr>
  72. <td class="align-middle">Kemampuan dan Penguasaan Materi</td>
  73. <td class="align-middle text-center">
  74. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  75. max="100" pattern="^\d*(\.\d{0,2})?$" step=".005">
  76. </td>
  77. <td class="align-middle text-center">
  78. <span>40</span>%
  79. </td>
  80. <td class="align-middle text-center output-hasil">0</td>
  81. </tr>
  82. </tbody>
  83. <tfoot>
  84. <tr>
  85. <td class="align-middle">
  86. <button type="button" class="btn btn-primary btn-reload">Reset</button>
  87. </td>
  88. <td class="align-middle text-right">Total Nilai:</td>
  89. <td class="align-middle text-center">100%</td>
  90. <td class="align-middle text-center output-total">0</td>
  91. </tr>
  92. </tfoot>
  93. </table>
  94. </div>
  95. </div>
  96. <div class="tab-pane fade" id="nav-rekap" role="tabpanel" aria-labelledby="nav-rekap-tab">
  97. <nav class="m-2">
  98. <div class="nav nav-pills" id="pills-tab" role="tablist">
  99. <a class="nav-item nav-link active" id="pills-two-tab" data-toggle="pill" href="#pills-two" role="tab"
  100. aria-controls="pills-two" aria-selected="true">3 Dosen</a>
  101. <a class="nav-item nav-link" id="pills-three-tab" data-toggle="pill" href="#pills-three" role="tab"
  102. aria-controls="pills-three" aria-selected="false">4 Dosen</a>
  103. </div>
  104. </nav>
  105. <div class="tab-content" id="pills-tabContent">
  106. <div class="tab-pane fade show active" id="pills-two" role="tabpanel" aria-labelledby="pills-two-tab">
  107. <div class="table-responsive">
  108. <table class="table" id="form-rekap1">
  109. <thead>
  110. <tr>
  111. <th class="align-middle">Dosen</th>
  112. <th class="align-middle">Nilai</th>
  113. <th class="align-middle">Persentase</th>
  114. <th class="align-middle">Tertimbang</th>
  115. </tr>
  116. </thead>
  117. <tbody>
  118. <tr>
  119. <td class="align-middle">Pembimbing</td>
  120. <td class="align-middle text-center">
  121. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  122. max="100">
  123. </td>
  124. <td class="align-middle text-center">
  125. <span>40</span>%
  126. </td>
  127. <td class="align-middle text-center output-hasil">0</td>
  128. </tr>
  129. <tr>
  130. <td class="align-middle">Penguji</td>
  131. <td class="align-middle text-center">
  132. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  133. max="100">
  134. </td>
  135. <td class="align-middle text-center">
  136. <span>30</span>%
  137. </td>
  138. <td class="align-middle text-center output-hasil">0</td>
  139. </tr>
  140. <tr>
  141. <td class="align-middle">Penguji</td>
  142. <td class="align-middle text-center">
  143. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  144. max="100">
  145. </td>
  146. <td class="align-middle text-center">
  147. <span>30</span>%
  148. </td>
  149. <td class="align-middle text-center output-hasil">0</td>
  150. </tr>
  151. </tbody>
  152. <tfoot>
  153. <tr>
  154. <td class="align-middle">
  155. <button type="button" class="btn btn-primary btn-reload">Reset</button>
  156. </td>
  157. <td class="align-middle text-right">Total Nilai:</td>
  158. <td class="align-middle text-center">100%</td>
  159. <td class="align-middle text-center output-total">0</td>
  160. </tr>
  161. </tfoot>
  162. </table>
  163. </div>
  164. </div>
  165. <div class="tab-pane fade" id="pills-three" role="tabpanel" aria-labelledby="pills-three-tab">
  166. <div class="table-responsive">
  167. <table class="table" id="form-rekap2">
  168. <thead>
  169. <tr>
  170. <th class="align-middle">Dosen</th>
  171. <th class="align-middle">Nilai</th>
  172. <th class="align-middle">Persentase</th>
  173. <th class="align-middle">Tertimbang</th>
  174. </tr>
  175. </thead>
  176. <tbody>
  177. <tr>
  178. <td class="align-middle">
  179. Pembimbing
  180. </td>
  181. <td class="align-middle text-center">
  182. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  183. max="100">
  184. </td>
  185. <td class="align-middle text-center">
  186. <span>40</span>%
  187. </td>
  188. <td class="align-middle text-center output-hasil">0</td>
  189. </tr>
  190. <tr>
  191. <td class="align-middle">Penguji</td>
  192. <td class="align-middle text-center">
  193. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  194. max="100">
  195. </td>
  196. <td class="align-middle text-center">
  197. <span>20</span>%
  198. </td>
  199. <td class="align-middle text-center output-hasil">0</td>
  200. </tr>
  201. <tr>
  202. <td class="align-middle">Penguji</td>
  203. <td class="align-middle text-center">
  204. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  205. max="100">
  206. </td>
  207. <td class="align-middle text-center">
  208. <span>20</span>%
  209. </td>
  210. <td class="align-middle text-center output-hasil">0</td>
  211. </tr>
  212. <tr>
  213. <td class="align-middle">Penguji</td>
  214. <td class="align-middle text-center">
  215. <input type="number" class="form-control form-control-lg text-center input-nilai" value="0" min="0"
  216. max="100">
  217. </td>
  218. <td class="align-middle text-center">
  219. <span>20</span>%
  220. </td>
  221. <td class="align-middle text-center output-hasil">0</td>
  222. </tr>
  223. </tbody>
  224. <tfoot>
  225. <tr>
  226. <td class="align-middle">
  227. <button type="button" class="btn btn-primary btn-reload">Reset</button>
  228. </td>
  229. <td class="align-middle text-right">Total Nilai:</td>
  230. <td class="align-middle text-center">100%</td>
  231. <td class="align-middle text-center output-total">0</td>
  232. </tr>
  233. </tfoot>
  234. </table>
  235. </div>
  236. </div>
  237. </div>
  238. </div>
  239. </div>
  240. <script src="js/jquery.min.js"></script>
  241. <script src="js/bootstrap.bundle.min.js"></script>
  242. <script>
  243. var scale = {};
  244. $(function () {
  245. $('.input-nilai').on('input', function () {
  246. var input = $(this),
  247. nilai = input.val(),
  248. td = input.parent().next(),
  249. persen = td.find('span').text(),
  250. output = td.next(),
  251. hasil = nilai * (persen / 100);
  252. output.text(Math.round(hasil * 1000) / 1000);
  253. nilaiTotal();
  254. });
  255. $('.btn-reload').click(function(){
  256. location.reload();
  257. });
  258. });
  259. function nilaiTotal() {
  260. var totalNilaiDosen = 0,
  261. totalRekap1 = 0,
  262. totalRekap2 = 0;
  263. $('#form-dosen .output-hasil').each(function () {
  264. totalNilaiDosen += parseFloat($(this).text());
  265. })
  266. $('#form-rekap1 .output-hasil').each(function () {
  267. totalRekap1 += parseFloat($(this).text());
  268. })
  269. $('#form-rekap2 .output-hasil').each(function () {
  270. totalRekap2 += parseFloat($(this).text());
  271. })
  272. $('#form-dosen .output-total').text(bulatkan(totalNilaiDosen, 3));
  273. $('#form-rekap1 .output-total').text(bulatkan(totalRekap1, 3));
  274. $('#form-rekap2 .output-total').text(bulatkan(totalRekap2, 3));
  275. }
  276. function bulatkan(nilai, desimal) {
  277. var faktor = Math.pow(10, desimal);
  278. return Math.round(nilai * faktor) / faktor;
  279. }
  280. </script>
  281. </body>
  282. </html>