{"id":9337,"date":"2026-11-23T12:02:55","date_gmt":"2026-11-23T12:02:55","guid":{"rendered":"https:\/\/hnjlegalservices.com\/?page_id=9337"},"modified":"2026-11-25T11:54:56","modified_gmt":"2026-11-25T11:54:56","slug":"student_test","status":"publish","type":"page","link":"https:\/\/hnjlegalservices.com\/?page_id=9337","title":{"rendered":"Student_Test"},"content":{"rendered":"\t\t<div data-elementor-type=\"wp-page\" data-elementor-id=\"9337\" class=\"elementor elementor-9337\">\n\t\t\t\t<div class=\"elementor-element elementor-element-2fca932 e-flex e-con-boxed e-con e-parent\" data-id=\"2fca932\" data-element_type=\"container\" data-e-type=\"container\">\n\t\t\t\t\t<div class=\"e-con-inner\">\n\t\t\t\t<div class=\"elementor-element elementor-element-f8aad84 elementor-widget elementor-widget-html\" data-id=\"f8aad84\" data-element_type=\"widget\" data-e-type=\"widget\" data-widget_type=\"html.default\">\n\t\t\t\t\t\n<div id=\"hnj-quiz\">\n\n  <div class=\"quiz-header\">\n    <h2>MCQs Assessment<\/h2>\n    <p>Test your knowledge by answering the following questions.<\/p>\n  <\/div>\n\n  <div class=\"quiz-progress-area\">\n    <div class=\"quiz-progress-info\">\n      <span id=\"question-counter\">Question 1 of 10<\/span>\n      <span id=\"progress-percent\">0% Completed<\/span>\n    <\/div>\n    <div class=\"quiz-progress-track\">\n      <div id=\"progress-bar\"><\/div>\n    <\/div>\n  <\/div>\n\n  <div id=\"question-area\">\n    <div class=\"question-card\">\n      <h3 id=\"question-text\"><\/h3>\n      <div id=\"options-area\"><\/div>\n    <\/div>\n\n    <div id=\"quiz-message\" role=\"status\" aria-live=\"polite\"><\/div>\n\n    <div class=\"quiz-navigation\">\n      <button type=\"button\" id=\"previous-btn\">Previous<\/button>\n      <button type=\"button\" id=\"next-btn\">Next<\/button>\n      <button type=\"button\" id=\"submit-btn\">Submit Assessment<\/button>\n    <\/div>\n  <\/div>\n\n  <div id=\"result-area\" style=\"display:none;\">\n    <div class=\"result-heading\">\n      <h2>Assessment Result<\/h2>\n      <p>Your assessment has been completed.<\/p>\n    <\/div>\n\n    <div class=\"result-score\">\n      <span id=\"percentage\">0%<\/span>\n      <small>Overall Percentage<\/small>\n    <\/div>\n\n    <div class=\"result-grid\">\n      <div class=\"result-box\">\n        <span id=\"total-questions\">10<\/span>\n        <small>Total Questions<\/small>\n      <\/div>\n\n      <div class=\"result-box\">\n        <span id=\"correct-answers\">0<\/span>\n        <small>Correct Answers<\/small>\n      <\/div>\n\n      <div class=\"result-box\">\n        <span id=\"wrong-answers\">0<\/span>\n        <small>Wrong Answers<\/small>\n      <\/div>\n\n      <div class=\"result-box\">\n        <span id=\"obtained-marks\">0\/10<\/span>\n        <small>Obtained Marks<\/small>\n      <\/div>\n    <\/div>\n\n    <div id=\"pass-status\"><\/div>\n\n    <button type=\"button\" id=\"restart-btn\">Retake Assessment<\/button>\n  <\/div>\n\n<\/div>\n\n<style>\n\n\/* MAIN QUIZ CONTAINER *\/\n\n#hnj-quiz {\n  width: 100%;\n  max-width: 850px;\n  margin: 30px auto;\n  padding: 30px;\n  background: #ffffff;\n  border: 1px solid #e5e7eb;\n  border-radius: 12px;\n  box-shadow: 0 5px 25px rgba(0,0,0,0.06);\n  font-family: Arial, sans-serif;\n  color: #252525;\n  overflow: hidden;\n  box-sizing: border-box;\n}\n\n#hnj-quiz *,\n#hnj-quiz *::before,\n#hnj-quiz *::after {\n  box-sizing: border-box;\n}\n\n\/* HEADER *\/\n\n#hnj-quiz .quiz-header {\n  text-align: center;\n  margin-bottom: 30px;\n}\n\n#hnj-quiz .quiz-header h2 {\n  font-size: 28px;\n  margin: 0 0 10px;\n  color: #222222;\n}\n\n#hnj-quiz .quiz-header p {\n  color: #666666;\n  font-size: 15px;\n  margin: 0;\n  line-height: 1.6;\n}\n\n\/* PROGRESS *\/\n\n#hnj-quiz .quiz-progress-area {\n  margin-bottom: 25px;\n  width: 100%;\n}\n\n#hnj-quiz .quiz-progress-info {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  flex-wrap: wrap;\n  gap: 8px;\n  margin-bottom: 10px;\n  font-size: 14px;\n  font-weight: 600;\n  color: #444444;\n}\n\n#hnj-quiz .quiz-progress-track {\n  width: 100%;\n  height: 9px;\n  background: #eeeeee;\n  border-radius: 20px;\n  overflow: hidden;\n}\n\n#hnj-quiz #progress-bar {\n  width: 0%;\n  height: 100%;\n  background: #b28a45;\n  border-radius: 20px;\n  transition: width 0.3s ease;\n}\n\n\/* QUESTION CARD *\/\n\n#hnj-quiz .question-card {\n  width: 100%;\n  min-width: 0;\n  padding: 25px;\n  background: #fafafa;\n  border: 1px solid #eeeeee;\n  border-radius: 10px;\n  overflow: hidden;\n}\n\n#hnj-quiz #question-text {\n  font-size: 20px;\n  line-height: 1.6;\n  color: #222222;\n  margin: 0 0 22px;\n  width: 100%;\n  overflow-wrap: anywhere;\n  word-wrap: break-word;\n}\n\n\/* OPTIONS AREA *\/\n\n#hnj-quiz #options-area {\n  display: flex;\n  flex-direction: column;\n  gap: 12px;\n  width: 100%;\n  min-width: 0;\n}\n\n\/* INDIVIDUAL OPTION *\/\n\n#hnj-quiz .quiz-option {\n  display: flex;\n  flex-direction: row;\n  align-items: flex-start;\n  gap: 12px;\n\n  width: 100%;\n  min-width: 0;\n  max-width: 100%;\n\n  padding: 15px;\n\n  background: #ffffff;\n  border: 1px solid #dddddd;\n  border-radius: 8px;\n\n  cursor: pointer;\n  text-align: left;\n  color: #333333;\n\n  font-family: Arial, sans-serif;\n  font-size: 15px;\n  line-height: 1.6;\n\n  white-space: normal;\n  overflow-wrap: anywhere;\n  word-break: normal;\n\n  transition: all 0.2s ease;\n}\n\n#hnj-quiz .quiz-option:hover {\n  border-color: #b28a45;\n  background: #fffdf8;\n}\n\n#hnj-quiz .quiz-option.selected {\n  border: 2px solid #b28a45;\n  background: #fffaf0;\n}\n\n\/* OPTION LETTER A B C D *\/\n\n#hnj-quiz .option-letter {\n  display: inline-flex;\n  align-items: center;\n  justify-content: center;\n\n  flex: 0 0 32px;\n\n  width: 32px;\n  height: 32px;\n  min-width: 32px;\n\n  border-radius: 50%;\n  background: #eeeeee;\n\n  font-weight: 700;\n  font-size: 13px;\n\n  line-height: 1;\n  text-align: center;\n}\n\n\/* OPTION TEXT - IMPORTANT MOBILE FIX *\/\n\n#hnj-quiz .quiz-option > span:not(.option-letter) {\n  display: block;\n\n  flex: 1 1 0%;\n  min-width: 0;\n  max-width: 100%;\n\n  white-space: normal !important;\n  overflow-wrap: anywhere !important;\n  word-break: normal;\n\n  line-height: 1.6;\n  text-align: left;\n}\n\n#hnj-quiz .quiz-option.selected .option-letter {\n  background: #b28a45;\n  color: #ffffff;\n}\n\n\/* MESSAGE *\/\n\n#hnj-quiz #quiz-message {\n  min-height: 24px;\n  margin-top: 14px;\n  font-size: 14px;\n  color: #b42318;\n  line-height: 1.5;\n}\n\n\/* NAVIGATION BUTTONS *\/\n\n#hnj-quiz .quiz-navigation {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  flex-wrap: wrap;\n  gap: 12px;\n  margin-top: 15px;\n}\n\n#hnj-quiz button {\n  font-family: inherit;\n  box-sizing: border-box;\n}\n\n#hnj-quiz .quiz-navigation button,\n#hnj-quiz #restart-btn {\n  padding: 13px 22px;\n  border: none;\n  border-radius: 7px;\n  background: #b28a45;\n  color: #ffffff;\n  font-size: 14px;\n  font-weight: 600;\n  cursor: pointer;\n  transition: background 0.2s ease;\n}\n\n#hnj-quiz .quiz-navigation button:hover,\n#hnj-quiz #restart-btn:hover {\n  background: #927039;\n}\n\n#hnj-quiz .quiz-navigation button:disabled {\n  background: #cccccc;\n  cursor: not-allowed;\n}\n\n#hnj-quiz #submit-btn {\n  background: #252525;\n}\n\n#hnj-quiz #submit-btn:hover {\n  background: #444444;\n}\n\n\/* RESULT AREA *\/\n\n#hnj-quiz .result-heading {\n  text-align: center;\n  margin-bottom: 25px;\n}\n\n#hnj-quiz .result-heading h2 {\n  font-size: 26px;\n  margin: 0 0 8px;\n}\n\n#hnj-quiz .result-heading p {\n  color: #666666;\n  margin: 0;\n}\n\n#hnj-quiz .result-score {\n  width: 150px;\n  height: 150px;\n  margin: 0 auto 25px;\n  border: 7px solid #b28a45;\n  border-radius: 50%;\n\n  display: flex;\n  flex-direction: column;\n  justify-content: center;\n  align-items: center;\n}\n\n#hnj-quiz #percentage {\n  font-size: 34px;\n  font-weight: 700;\n  color: #222222;\n}\n\n#hnj-quiz .result-score small {\n  font-size: 12px;\n  color: #666666;\n  margin-top: 5px;\n}\n\n#hnj-quiz .result-grid {\n  display: grid;\n  grid-template-columns: repeat(4, minmax(0, 1fr));\n  gap: 12px;\n  margin-bottom: 25px;\n}\n\n#hnj-quiz .result-box {\n  min-width: 0;\n  padding: 20px 10px;\n  text-align: center;\n  background: #fafafa;\n  border: 1px solid #eeeeee;\n  border-radius: 8px;\n}\n\n#hnj-quiz .result-box span {\n  display: block;\n  font-size: 25px;\n  font-weight: 700;\n  margin-bottom: 7px;\n  color: #222222;\n}\n\n#hnj-quiz .result-box small {\n  font-size: 12px;\n  color: #666666;\n}\n\n#hnj-quiz #pass-status {\n  text-align: center;\n  font-size: 19px;\n  font-weight: 700;\n  margin-bottom: 25px;\n}\n\n#hnj-quiz #pass-status.passed {\n  color: #18864b;\n}\n\n#hnj-quiz #pass-status.failed {\n  color: #c0392b;\n}\n\n#hnj-quiz #restart-btn {\n  display: block;\n  margin: 0 auto;\n  background: #252525;\n}\n\n\/* TABLET VIEW *\/\n\n@media (max-width: 768px) {\n\n  #hnj-quiz {\n    padding: 22px;\n    margin: 20px auto;\n  }\n\n  #hnj-quiz .result-grid {\n    grid-template-columns: repeat(2, minmax(0, 1fr));\n  }\n\n}\n\n\/* MOBILE VIEW *\/\n\n@media (max-width: 600px) {\n\n  #hnj-quiz {\n    width: 100%;\n    max-width: 100%;\n    padding: 15px;\n    margin: 15px auto;\n    border-radius: 10px;\n  }\n\n  #hnj-quiz .quiz-header {\n    margin-bottom: 25px;\n  }\n\n  #hnj-quiz .quiz-header h2 {\n    font-size: 23px;\n  }\n\n  #hnj-quiz .quiz-header p {\n    font-size: 14px;\n  }\n\n  #hnj-quiz .quiz-progress-area {\n    margin-bottom: 20px;\n  }\n\n  #hnj-quiz .quiz-progress-info {\n    font-size: 12px;\n  }\n\n  #hnj-quiz .question-card {\n    width: 100%;\n    padding: 15px;\n  }\n\n  #hnj-quiz #question-text {\n    font-size: 17px;\n    line-height: 1.6;\n    margin-bottom: 18px;\n  }\n\n  #hnj-quiz #options-area {\n    width: 100%;\n    gap: 10px;\n  }\n\n  #hnj-quiz .quiz-option {\n    width: 100%;\n    max-width: 100%;\n    min-width: 0;\n\n    padding: 12px 10px;\n    gap: 10px;\n\n    font-size: 14px;\n    line-height: 1.6;\n\n    align-items: flex-start;\n    white-space: normal;\n  }\n\n  #hnj-quiz .option-letter {\n    flex: 0 0 32px;\n    width: 32px;\n    height: 32px;\n    min-width: 32px;\n  }\n\n  #hnj-quiz .quiz-option > span:not(.option-letter) {\n    flex: 1 1 0%;\n    min-width: 0;\n    max-width: 100%;\n    white-space: normal !important;\n    overflow-wrap: anywhere !important;\n    word-break: normal;\n    font-size: 14px;\n  }\n\n  #hnj-quiz .quiz-navigation {\n    display: flex;\n    flex-wrap: wrap;\n    gap: 8px;\n  }\n\n  #hnj-quiz .quiz-navigation button {\n    flex: 1 1 auto;\n    min-width: 0;\n    padding: 12px 10px;\n    font-size: 13px;\n  }\n\n  #hnj-quiz .result-grid {\n    grid-template-columns: repeat(2, minmax(0, 1fr));\n    gap: 10px;\n  }\n\n  #hnj-quiz .result-box {\n    padding: 15px 8px;\n  }\n\n  #hnj-quiz .result-box span {\n    font-size: 22px;\n  }\n\n}\n\n\/* EXTRA SMALL MOBILE *\/\n\n@media (max-width: 360px) {\n\n  #hnj-quiz {\n    padding: 12px;\n  }\n\n  #hnj-quiz .question-card {\n    padding: 12px;\n  }\n\n  #hnj-quiz .quiz-option {\n    padding: 10px 8px;\n    gap: 8px;\n    font-size: 13px;\n  }\n\n  #hnj-quiz .option-letter {\n    flex-basis: 29px;\n    width: 29px;\n    height: 29px;\n    min-width: 29px;\n  }\n\n  #hnj-quiz .quiz-option > span:not(.option-letter) {\n    font-size: 13px;\n  }\n\n}\n\n<\/style>\n\n<script>\n(function () {\n\n  const quiz = document.getElementById(\"hnj-quiz\");\n\n  if (!quiz || quiz.dataset.initialized === \"true\") return;\n  quiz.dataset.initialized = \"true\";\n\n  \/\/ QUIZ SETTINGS\n\n  const QUESTIONS_PER_TEST = 10;\n  const MARKS_PER_QUESTION = 1;\n  const PASS_PERCENTAGE = 50;\n\n  \/\/ COMPLETE QUESTION BANK: 42 MCQs\n  \/\/ Correct answer index: a=0, b=1, c=2, d=3\n\n  const questionBank = [\n\n    {\n      q: \"Audi alteram partem means:\",\n      o: [\"Beyond one's powers\", \"In good faith\", \"Let the buyer beware\", \"Hear the other side\"],\n      a: 3\n    },\n    {\n      q: \"Mens rea refers to:\",\n      o: [\"The guilty mind\", \"A writ of prohibition\", \"The burden of proof\", \"The guilty act\"],\n      a: 0\n    },\n    {\n      q: \"Habeas corpus is a writ against:\",\n      o: [\"Unlawful detention\", \"Contempt of court\", \"Defamation\", \"Breach of contract\"],\n      a: 0\n    },\n    {\n      q: \"Res judicata prevents:\",\n      o: [\n        \"An appeal to the Supreme Court\",\n        \"A witness being cross-examined\",\n        \"The same matter being litigated again after a final decision\",\n        \"A case being heard in public\"\n      ],\n      a: 2\n    },\n    {\n      q: \"Ultra vires means:\",\n      o: [\"By consent of the parties\", \"Without a witness\", \"Within legal power\", \"Beyond legal power or authority\"],\n      a: 3\n    },\n    {\n      q: \"Ratio decidendi is:\",\n      o: [\n        \"The final order of costs\",\n        \"A remark made in passing\",\n        \"The legal reasoning that forms the binding part of a judgment\",\n        \"The summary of the facts\"\n      ],\n      a: 2\n    },\n    {\n      q: \"Stare decisis means that courts:\",\n      o: [\"Avoid giving reasons\", \"Decide cases on their own motion\", \"Follow earlier decided cases\", \"Hear only one side\"],\n      a: 2\n    },\n    {\n      q: \"Volenti non fit injuria is a defence based on:\",\n      o: [\"Consent to the risk\", \"Mistake of law\", \"Necessity\", \"Insanity\"],\n      a: 0\n    },\n    {\n      q: \"The writ of quo warranto asks:\",\n      o: [\n        \"Why a person is detained\",\n        \"By what authority a person holds a public office\",\n        \"Why a lower court's order should not be quashed\",\n        \"Why a public duty is not performed\"\n      ],\n      a: 1\n    },\n    {\n      q: \"Suo motu means:\",\n      o: [\"From the beginning\", \"By agreement of both parties\", \"On the court's own motion\", \"In good faith\"],\n      a: 2\n    },\n    {\n      q: \"The command theory of law is associated with:\",\n      o: [\"Ronald Dworkin\", \"John Austin\", \"Hans Kelsen\", \"Savigny\"],\n      a: 1\n    },\n    {\n      q: \"The Grundnorm is a concept of:\",\n      o: [\"Roscoe Pound\", \"H.L.A. Hart\", \"Hans Kelsen\", \"Henry Maine\"],\n      a: 2\n    },\n    {\n      q: \"The rule of recognition appears in the work of:\",\n      o: [\"H.L.A. Hart\", \"Oliver Wendell Holmes\", \"Jeremy Bentham\", \"Lon Fuller\"],\n      a: 0\n    },\n    {\n      q: \"The idea of the Volksgeist belongs to:\",\n      o: [\"Hohfeld\", \"Pound\", \"Austin\", \"Savigny\"],\n      a: 3\n    },\n    {\n      q: \"The movement of progressive societies 'from status to contract' is associated with:\",\n      o: [\"Salmond\", \"Ehrlich\", \"Savigny\", \"Henry Maine\"],\n      a: 3\n    },\n    {\n      q: \"In Hohfeld's scheme, the correlative of a right is:\",\n      o: [\"A duty\", \"A liberty\", \"A power\", \"An immunity\"],\n      a: 0\n    },\n    {\n      q: \"Law as a prediction of what the courts will do is the view of:\",\n      o: [\"Oliver Wendell Holmes\", \"John Austin\", \"Lon Fuller\", \"Aquinas\"],\n      a: 0\n    },\n    {\n      q: \"Salomon v. Salomon (1897) established that:\",\n      o: [\n        \"Directors are never liable\",\n        \"Precedent is not binding\",\n        \"A contract needs consideration\",\n        \"A company is a separate legal person\"\n      ],\n      a: 3\n    },\n    {\n      q: \"The 'inner morality of law' is associated with:\",\n      o: [\"John Austin\", \"Hans Kelsen\", \"Lon Fuller\", \"Jeremy Bentham\"],\n      a: 2\n    },\n    {\n      q: \"'Law as integrity' is a theory of:\",\n      o: [\"Savigny\", \"Ronald Dworkin\", \"H.L.A. Hart\", \"Austin\"],\n      a: 1\n    },\n    {\n      q: \"The Objectives Resolution was adopted in:\",\n      o: [\"1947\", \"1956\", \"1949\", \"1973\"],\n      a: 2\n    },\n    {\n      q: \"The first Constitution of Pakistan came into force in:\",\n      o: [\"1956\", \"1947\", \"1962\", \"1973\"],\n      a: 0\n    },\n    {\n      q: \"The present Constitution came into force on:\",\n      o: [\"14 August 1973\", \"23 March 1956\", \"5 July 1977\", \"1 March 1962\"],\n      a: 0\n    },\n    {\n      q: \"State v. Dosso (1958) relied on whose theory?\",\n      o: [\"Kelsen's\", \"Austin's\", \"Dworkin's\", \"Hart's\"],\n      a: 0\n    },\n    {\n      q: \"Which case overruled State v. Dosso?\",\n      o: [\n        \"Nusrat Bhutto's case\",\n        \"Asma Jilani v. Government of the Punjab\",\n        \"Tamizuddin Khan's case\",\n        \"Zafar Ali Shah's case\"\n      ],\n      a: 1\n    },\n    {\n      q: \"Article 58(2)(b) gave the President power to:\",\n      o: [\n        \"Amend the Constitution alone\",\n        \"Dissolve the National Assembly in his discretion\",\n        \"Appoint the Chief Justice\",\n        \"Declare war\"\n      ],\n      a: 1\n    },\n    {\n      q: \"Article 25A guarantees:\",\n      o: [\n        \"Protection against double jeopardy\",\n        \"Freedom of speech\",\n        \"Freedom of movement\",\n        \"Free and compulsory education for children aged 5 to 16\"\n      ],\n      a: 3\n    },\n    {\n      q: \"Article 10A provides:\",\n      o: [\"Security of person\", \"The right to a fair trial\", \"The right to information\", \"Freedom of association\"],\n      a: 1\n    },\n    {\n      q: \"Article 19A provides:\",\n      o: [\n        \"The right to access information of public importance\",\n        \"The right to fair trial\",\n        \"The right to property\",\n        \"The right to education\"\n      ],\n      a: 0\n    },\n    {\n      q: \"The writ jurisdiction of the High Court is found in:\",\n      o: [\"Article 199\", \"Article 184\", \"Article 175A\", \"Article 189\"],\n      a: 0\n    },\n    {\n      q: \"The Supreme Court's original jurisdiction over fundamental rights of public importance is under:\",\n      o: [\"Article 199\", \"Article 184(3)\", \"Article 10A\", \"Article 58\"],\n      a: 1\n    },\n    {\n      q: \"Article 9 of the Constitution deals with:\",\n      o: [\"Security of person\", \"Protection of minorities\", \"Freedom of trade\", \"Right to property\"],\n      a: 0\n    },\n    {\n      q: \"An FIR is registered under which section of the Code of Criminal Procedure?\",\n      o: [\"Section 161\", \"Section 497\", \"Section 144\", \"Section 154\"],\n      a: 3\n    },\n    {\n      q: \"Bail in non-bailable offences is dealt with in:\",\n      o: [\"Section 420 PPC\", \"Section 154 CrPC\", \"Section 497 CrPC\", \"Section 302 PPC\"],\n      a: 2\n    },\n    {\n      q: \"Pre-arrest bail is commonly sought under:\",\n      o: [\"Section 302 PPC\", \"Section 154 CrPC\", \"Section 498 CrPC\", \"Section 144 CrPC\"],\n      a: 2\n    },\n    {\n      q: \"Section 302 of the Pakistan Penal Code deals with:\",\n      o: [\n        \"Criminal breach of trust\",\n        \"Punishment of qatl-i-amd (intentional murder)\",\n        \"Cheating\",\n        \"Dishonest issue of a cheque\"\n      ],\n      a: 1\n    },\n    {\n      q: \"Section 420 of the Pakistan Penal Code deals with:\",\n      o: [\n        \"Cheating and dishonestly inducing delivery of property\",\n        \"Theft\",\n        \"Defamation\",\n        \"Murder\"\n      ],\n      a: 0\n    },\n    {\n      q: \"Section 489-F of the Pakistan Penal Code concerns:\",\n      o: [\"Kidnapping\", \"Dishonestly issuing a cheque\", \"Rioting\", \"Forgery of a will\"],\n      a: 1\n    },\n    {\n      q: \"The law of evidence in Pakistan is contained mainly in:\",\n      o: [\n        \"The Penal Code, 1860\",\n        \"The Contract Act, 1872\",\n        \"The Family Courts Act, 1964\",\n        \"The Qanun-e-Shahadat Order, 1984\"\n      ],\n      a: 3\n    },\n    {\n      q: \"Disputes such as khula, custody and maintenance are decided by:\",\n      o: [\"The Anti-Terrorism Court\", \"The Election Tribunal\", \"The Banking Court\", \"The Family Court\"],\n      a: 3\n    },\n    {\n      q: \"Under the Contract Act, 1872, an agreement without consideration is generally:\",\n      o: [\"Criminal\", \"Voidable only\", \"Void\", \"Valid\"],\n      a: 2\n    },\n    {\n      q: \"A valid contract requires free consent, competent parties, lawful object and:\",\n      o: [\"Lawful consideration\", \"A written deed\", \"A witness from each side\", \"Registration with the court\"],\n      a: 0\n    }\n\n  ];\n\n  \/\/ HTML ELEMENTS\n\n  const questionCounter = quiz.querySelector(\"#question-counter\");\n  const progressPercent = quiz.querySelector(\"#progress-percent\");\n  const progressBar = quiz.querySelector(\"#progress-bar\");\n  const questionText = quiz.querySelector(\"#question-text\");\n  const optionsArea = quiz.querySelector(\"#options-area\");\n\n  const previousBtn = quiz.querySelector(\"#previous-btn\");\n  const nextBtn = quiz.querySelector(\"#next-btn\");\n  const submitBtn = quiz.querySelector(\"#submit-btn\");\n\n  const quizMessage = quiz.querySelector(\"#quiz-message\");\n  const questionArea = quiz.querySelector(\"#question-area\");\n  const resultArea = quiz.querySelector(\"#result-area\");\n\n  let selectedQuestions = [];\n  let userAnswers = [];\n  let currentQuestion = 0;\n\n  \/\/ SHUFFLE QUESTIONS\n\n  function shuffleArray(array) {\n\n    const shuffled = [...array];\n\n    for (let i = shuffled.length - 1; i > 0; i--) {\n\n      const j = Math.floor(Math.random() * (i + 1));\n\n      [shuffled[i], shuffled[j]] = [shuffled[j], shuffled[i]];\n\n    }\n\n    return shuffled;\n\n  }\n\n  \/\/ CREATE RANDOM TEST\n\n  function createRandomTest() {\n\n    selectedQuestions = shuffleArray(questionBank)\n      .slice(0, QUESTIONS_PER_TEST);\n\n    userAnswers = new Array(QUESTIONS_PER_TEST).fill(null);\n\n    currentQuestion = 0;\n\n    questionArea.style.display = \"block\";\n    resultArea.style.display = \"none\";\n\n    renderQuestion();\n\n  }\n\n  \/\/ DISPLAY QUESTION\n\n  function renderQuestion() {\n\n    const question = selectedQuestions[currentQuestion];\n\n    questionCounter.textContent =\n      \"Question \" + (currentQuestion + 1) + \" of \" + QUESTIONS_PER_TEST;\n\n    const completed = Math.round(\n      ((currentQuestion + 1) \/ QUESTIONS_PER_TEST) * 100\n    );\n\n    progressPercent.textContent = completed + \"% Completed\";\n    progressBar.style.width = completed + \"%\";\n\n    questionText.textContent =\n      (currentQuestion + 1) + \". \" + question.q;\n\n    optionsArea.innerHTML = \"\";\n\n    const letters = [\"A\", \"B\", \"C\", \"D\"];\n\n    question.o.forEach(function (option, index) {\n\n      const optionButton = document.createElement(\"button\");\n\n      optionButton.type = \"button\";\n      optionButton.className = \"quiz-option\";\n\n      if (userAnswers[currentQuestion] === index) {\n        optionButton.classList.add(\"selected\");\n      }\n\n      const letter = document.createElement(\"span\");\n\n      letter.className = \"option-letter\";\n      letter.textContent = letters[index];\n\n      const optionText = document.createElement(\"span\");\n\n      optionText.className = \"option-text\";\n      optionText.textContent = option;\n\n      optionButton.appendChild(letter);\n      optionButton.appendChild(optionText);\n\n      optionButton.addEventListener(\"click\", function () {\n\n        userAnswers[currentQuestion] = index;\n\n        quizMessage.textContent = \"\";\n\n        renderQuestion();\n\n      });\n\n      optionsArea.appendChild(optionButton);\n\n    });\n\n    previousBtn.disabled = currentQuestion === 0;\n\n    const isLastQuestion =\n      currentQuestion === QUESTIONS_PER_TEST - 1;\n\n    nextBtn.style.display =\n      isLastQuestion ? \"none\" : \"inline-block\";\n\n    submitBtn.style.display =\n      isLastQuestion ? \"inline-block\" : \"none\";\n\n    quizMessage.textContent = \"\";\n\n  }\n\n  \/\/ PREVIOUS QUESTION\n\n  previousBtn.addEventListener(\"click\", function () {\n\n    if (currentQuestion > 0) {\n\n      currentQuestion--;\n\n      renderQuestion();\n\n    }\n\n  });\n\n  \/\/ NEXT QUESTION\n\n  nextBtn.addEventListener(\"click\", function () {\n\n    if (userAnswers[currentQuestion] === null) {\n\n      quizMessage.textContent =\n        \"Please select an answer before continuing.\";\n\n      return;\n\n    }\n\n    if (currentQuestion < QUESTIONS_PER_TEST - 1) {\n\n      currentQuestion++;\n\n      renderQuestion();\n\n    }\n\n  });\n\n  \/\/ SUBMIT ASSESSMENT\n\n  submitBtn.addEventListener(\"click\", function () {\n\n    if (userAnswers[currentQuestion] === null) {\n\n      quizMessage.textContent =\n        \"Please select an answer before submitting.\";\n\n      return;\n\n    }\n\n    const unansweredIndex = userAnswers.findIndex(\n      answer => answer === null\n    );\n\n    if (unansweredIndex !== -1) {\n\n      currentQuestion = unansweredIndex;\n\n      renderQuestion();\n\n      quizMessage.textContent =\n        \"Please answer this question before submitting.\";\n\n      return;\n\n    }\n\n    calculateResult();\n\n  });\n\n  \/\/ CALCULATE RESULT\n\n  function calculateResult() {\n\n    let correct = 0;\n\n    selectedQuestions.forEach(function (question, index) {\n\n      if (userAnswers[index] === question.a) {\n        correct++;\n      }\n\n    });\n\n    const wrong = QUESTIONS_PER_TEST - correct;\n\n    const totalMarks =\n      QUESTIONS_PER_TEST * MARKS_PER_QUESTION;\n\n    const obtainedMarks =\n      correct * MARKS_PER_QUESTION;\n\n    const percentage =\n      Math.round((obtainedMarks \/ totalMarks) * 100);\n\n    quiz.querySelector(\"#percentage\").textContent =\n      percentage + \"%\";\n\n    quiz.querySelector(\"#total-questions\").textContent =\n      QUESTIONS_PER_TEST;\n\n    quiz.querySelector(\"#correct-answers\").textContent =\n      correct;\n\n    quiz.querySelector(\"#wrong-answers\").textContent =\n      wrong;\n\n    quiz.querySelector(\"#obtained-marks\").textContent =\n      obtainedMarks + \"\/\" + totalMarks;\n\n    const passStatus = quiz.querySelector(\"#pass-status\");\n\n    if (percentage >= PASS_PERCENTAGE) {\n\n      passStatus.textContent =\n        \"Congratulations! You Passed.\";\n\n      passStatus.className = \"passed\";\n\n    } else {\n\n      passStatus.textContent =\n        \"You Did Not Pass. Please Try Again.\";\n\n      passStatus.className = \"failed\";\n\n    }\n\n    questionArea.style.display = \"none\";\n    resultArea.style.display = \"block\";\n\n  }\n\n  \/\/ RETAKE ASSESSMENT\n\n  quiz.querySelector(\"#restart-btn\").addEventListener(\"click\", function () {\n\n    createRandomTest();\n\n  });\n\n  \/\/ START FIRST ASSESSMENT\n\n  createRandomTest();\n\n})();\n<\/script>\n\t\t\t\t<\/div>\n\t\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t\t\t<\/div>\n\t\t","protected":false},"excerpt":{"rendered":"<p>MCQs Assessment Test your knowledge by answering the following questions. Question 1 of 10 0% Completed Previous Next Submit Assessment Assessment Result Your assessment has been completed. 0% Overall Percentage 10 Total Questions 0 Correct Answers 0 Wrong Answers 0\/10 Obtained Marks Retake Assessment<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"postBodyCss":"","postBodyMargin":[],"postBodyPadding":[],"postBodyBackground":{"backgroundType":"classic","gradient":""},"footnotes":""},"class_list":["post-9337","page","type-page","status-publish","hentry"],"_links":{"self":[{"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=\/wp\/v2\/pages\/9337","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=9337"}],"version-history":[{"count":9,"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=\/wp\/v2\/pages\/9337\/revisions"}],"predecessor-version":[{"id":9431,"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=\/wp\/v2\/pages\/9337\/revisions\/9431"}],"wp:attachment":[{"href":"https:\/\/hnjlegalservices.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=9337"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}