{"id":2427,"date":"2025-11-20T15:59:32","date_gmt":"2025-11-20T07:59:32","guid":{"rendered":"https:\/\/fmipak.unima.ac.id\/?page_id=2427"},"modified":"2025-11-20T16:53:13","modified_gmt":"2025-11-20T08:53:13","slug":"2427-2","status":"publish","type":"page","link":"https:\/\/fmipak.unima.ac.id\/?page_id=2427","title":{"rendered":""},"content":{"rendered":"\n<div style=\"max-width:900px;margin:auto;font-family:Arial;\">\n  <h2 style=\"text-align:center;\">Facilities Satisfaction Survey for Students<\/h2>\n\n  <form id=\"surveyForm\">\n    \n    <!-- Year -->\n    <label>Year of Entry<\/label>\n    <input type=\"text\" name=\"year\" required style=\"width:100%;padding:8px;margin-bottom:12px;\">\n\n    <!-- Name -->\n    <label>Student Name<\/label>\n    <input type=\"text\" name=\"name\" required style=\"width:100%;padding:8px;margin-bottom:12px;\">\n\n    <!-- Study Program -->\n    <label>Study Program<\/label>\n    <select name=\"program\" required style=\"width:100%;padding:8px;margin-bottom:12px;\">\n      <option value=\"\">Select Program<\/option>\n      <option>Bachelor of Biology Education<\/option>\n      <option>Bachelor of Biology<\/option>\n      <option>Bachelor of Education Physics<\/option>\n      <option>Bachelor of Physics<\/option>\n      <option>Bachelor of Education Chemistry<\/option>\n      <option>Bachelor of Chemistry<\/option>\n      <option>Bachelor of Mathematics Education<\/option>\n      <option>Bachelor of Science Education<\/option>\n      <option>Master of Biology<\/option>\n      <option>Master of Chemistry<\/option>\n      <option>Doctor of Biology<\/option>\n      <option>Doctor of Chemistry<\/option>\n    <\/select>\n\n    <hr style=\"margin:20px 0;\">\n    <h3>Rate each question (1\u20135)<\/h3>\n\n    <!-- Questions 1\u201316 -->\n    <div id=\"questions\"><\/div>\n\n    <button type=\"submit\" id=\"submitBtn\"\n      style=\"padding:10px 20px;background:#0b74de;color:white;border:none;border-radius:6px;cursor:pointer;\">\n      Submit\n    <\/button>\n\n    <p id=\"statusMsg\" style=\"margin-top:10px;\"><\/p>\n  <\/form>\n<\/div>\n\n<script>\n\/\/ Generate 16 questions dynamically\nconst questions = [\n  \"Classrooms are neat and clean\",\n  \"The lecture rooms are cool and comfortable\",\n  \"Learning facilities are available in the lecture halls\",\n  \"The faculty environment is always kept clean\",\n  \"Toilet facilities are sufficient in number and well maintained\",\n  \"Trash bins are available at all important points\",\n  \"Worship facilities are adequate and clean\",\n  \"There is an open area\/public space that is comfortable\",\n  \"Internet facilities are accessible\",\n  \"There is a comfortable service waiting room\",\n  \"Laboratory facilities are equipped with complete tools\",\n  \"The faculty library is comfortable for studying\",\n  \"References are easily accessible in the faculty library\",\n  \"The elevator is functioning properly\",\n  \"Adequate computers are available in the library\",\n  \"Facilities for persons with disabilities are adequate\"\n];\n\nconst container = document.getElementById(\"questions\");\nquestions.forEach((q, i) => {\n  const n = i + 1;\n  container.innerHTML += `\n    <div style=\"margin-bottom:12px;\">\n      <label><strong>${n}.<\/strong> ${q}<\/label><br>\n      ${[1,2,3,4,5].map(v =>\n        `<label style=\"margin-right:10px;\"><input type=\"radio\" name=\"q${n}\" value=\"${v}\" required> ${v}<\/label>`\n      ).join(\"\")}\n    <\/div>\n  `;\n});\n\n\/\/ Submit handler\ndocument.getElementById(\"surveyForm\").addEventListener(\"submit\", async function(e){\n  e.preventDefault();\n\n  const submitBtn = document.getElementById(\"submitBtn\");\n  const statusMsg = document.getElementById(\"statusMsg\");\n  submitBtn.disabled = true;\n  statusMsg.innerHTML = \"Sending...\";\n\n  const url = \"https:\/\/script.google.com\/macros\/s\/AKfycbyBf6NAyRSDwF2JFnw1B3sDGJtb-G9y8DQyufykNJIrtZh39ehWogFQhr53UK_QupbKLA\/exec\";\n\n  const formData = new FormData(this);\n\n  try {\n    const res = await fetch(url, {\n      method: \"POST\",\n      body: formData\n    });\n\n    const json = await res.json();\n\n    if (json.status === \"success\") {\n      statusMsg.style.color = \"green\";\n      statusMsg.innerHTML = \"Thank you! Your response has been recorded.\";\n      document.getElementById(\"surveyForm\").reset();\n    } else {\n      throw json.message;\n    }\n\n  } catch (err) {\n    statusMsg.style.color = \"red\";\n    statusMsg.innerHTML = \"Submission failed: \" + err;\n  }\n\n  submitBtn.disabled = false;\n});\n<\/script>\n\n","protected":false},"excerpt":{"rendered":"<p>Facilities Satisfaction Survey for Students Year of Entry Student Name Study Program Select ProgramBachelor of Biology EducationBachelor of BiologyBachelor of Education PhysicsBachelor of PhysicsBachelor of Education ChemistryBachelor of ChemistryBachelor of Mathematics EducationBachelor of Science EducationMaster of BiologyMaster of ChemistryDoctor of <a href=\"https:\/\/fmipak.unima.ac.id\/?page_id=2427\" class=\"read-more\">Read More &#8230;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"footnotes":""},"class_list":["post-2427","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=\/wp\/v2\/pages\/2427","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=2427"}],"version-history":[{"count":9,"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=\/wp\/v2\/pages\/2427\/revisions"}],"predecessor-version":[{"id":2438,"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=\/wp\/v2\/pages\/2427\/revisions\/2438"}],"wp:attachment":[{"href":"https:\/\/fmipak.unima.ac.id\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=2427"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}