Untitled

Anonymous
html
10/19/2026 12:12 PM
73.3 KB
3
Indexable
<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>RFBT Batch 52 - Interactive Quiz</title>
  <style>
    :root {
      --primary-color: #1a365d;
      --secondary-color: #2b6cb0;
      --bg-color: #f7fafc;
      --card-bg: #ffffff;
      --text-color: #2d3748;
      --success-color: #38a169;
      --error-color: #e53e3e;
      --border-color: #e2e8f0;
    }

    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
      background-color: var(--bg-color);
      color: var(--text-color);
      line-height: 1.6;
      margin: 0;
      padding: 20px;
    }

    .container {
      max-width: 900px;
      margin: 0 auto;
      background: var(--card-bg);
      padding: 30px;
      border-radius: 12px;
      box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    }

    header {
      border-bottom: 2px solid var(--border-color);
      padding-bottom: 20px;
      margin-bottom: 20px;
      text-align: center;
    }

    h1 {
      color: var(--primary-color);
      margin: 0 0 10px 0;
      font-size: 1.8rem;
    }

    .subtitle {
      color: #718096;
      font-size: 0.95rem;
      margin: 0;
    }

    .controls {
      display: flex;
      flex-wrap: wrap;
      gap: 10px;
      justify-content: space-between;
      align-items: center;
      background: #edf2f7;
      padding: 15px;
      border-radius: 8px;
      margin-bottom: 25px;
    }

    .stats {
      font-weight: 600;
      color: var(--primary-color);
    }

    .btn-group {
      display: flex;
      gap: 10px;
    }

    button {
      background-color: var(--secondary-color);
      color: white;
      border: none;
      padding: 8px 16px;
      border-radius: 6px;
      cursor: pointer;
      font-size: 0.9rem;
      font-weight: 600;
      transition: background-color 0.2s;
    }

    button:hover {
      background-color: var(--primary-color);
    }

    button.btn-outline {
      background-color: transparent;
      color: var(--secondary-color);
      border: 1px solid var(--secondary-color);
    }

    button.btn-outline:hover {
      background-color: var(--secondary-color);
      color: white;
    }

    .question-card {
      border: 1px solid var(--border-color);
      border-radius: 8px;
      padding: 20px;
      margin-bottom: 20px;
      background-color: #fff;
    }

    .question-text {
      font-weight: 600;
      margin-bottom: 15px;
      white-space: pre-line;
    }

    .options {
      display: flex;
      flex-direction: column;
      gap: 10px;
    }

    .option-label {
      display: flex;
      align-items: flex-start;
      padding: 10px 12px;
      border: 1px solid var(--border-color);
      border-radius: 6px;
      cursor: pointer;
      transition: background-color 0.15s, border-color 0.15s;
    }

    .option-label:hover {
      background-color: #ebf8ff;
      border-color: #3182ce;
    }

    .option-label input {
      margin-top: 4px;
      margin-right: 12px;
    }

    /* Result feedback styling */
    .question-card.correct {
      border-left: 5px solid var(--success-color);
    }

    .question-card.incorrect {
      border-left: 5px solid var(--error-color);
    }

    .feedback {
      margin-top: 12px;
      font-weight: 600;
      font-size: 0.9rem;
    }

    .feedback.correct-text {
      color: var(--success-color);
    }

    .feedback.incorrect-text {
      color: var(--error-color);
    }

    #results-panel {
      display: none;
      background: #ebf8ff;
      border: 1px solid #3182ce;
      padding: 20px;
      border-radius: 8px;
      text-align: center;
      margin-bottom: 25px;
    }

    #results-panel h2 {
      margin-top: 0;
      color: var(--primary-color);
    }

    .score-display {
      font-size: 2rem;
      font-weight: bold;
      color: var(--secondary-color);
    }
  </style>
</head>
<body>

<div class="container">
  <header>
    <h1>RFBT Preweek Lecture Quiz</h1>
    <p class="subtitle">Regulatory Framework for Business Transactions - Batch 52</p>
  </header>

  <div class="controls">
    <div class="stats" id="progress-tracker">Answered: 0 / 110</div>
    <div class="btn-group">
      <button onclick="resetQuiz(true)">Shuffle & Restart</button>
      <button class="btn-outline" onclick="resetQuiz(false)">Retake (Original Order)</button>
      <button onclick="submitQuiz()">Submit Quiz</button>
    </div>
  </div>

  <div id="results-panel">
    <h2>Quiz Results</h2>
    <div class="score-display" id="score-text">0 / 110 (0%)</div>
    <p id="score-summary"></p>
  </div>

  <form id="quiz-form">
    <div id="questions-container"></div>
  </form>
</div>

<script>
// Raw Question Data
const originalQuestions = [
  {
    id: 1,
    question: "1. Which of the following governing principles in Government Procurement would relate to the fit for purpose approach?",
    choices: [
      "A. Transparency in the procurement process by providing access to all related information in accordance with open contracting practice that enables the disclosure of data and facilities information sharing related to all stages of procurement;",
      "B. Competitiveness through ensuring equal opportunity for all eligible and qualified suppliers, manufacturers, distributors, contractors, consultants, and service providers;",
      "C. Proportionality by ensuring that the conditions and parameters in the development of requirements, choice of procurement modality, and implementation of contracts shall be reasonably proportional to the needs of the Procuring Entity and the nature of the contract or project to be procured;",
      "D. Accountability where all public officials and personnel directly or indirectly involved in the procurement process and in the implementation of contracts are investigated and held accountable for their actions when necessary;"
    ],
    answerIndex: 2
  },
  {
    id: 2,
    question: "2. All of the following modes of procurement have a bidding process, except:",
    choices: [
      "A. Competitive dialogue",
      "B. Limited source bidding",
      "C. Unsolicited Offer with Bid Matching",
      "D. None of the choices is an exception"
    ],
    answerIndex: 3
  },
  {
    id: 3,
    question: "3. What criteria for evaluation of bids would consider only the cost/price?",
    choices: [
      "A. Lowest Calculated Bid",
      "B. Highest Rated Bid",
      "C. Most Economically Advantageous Bid",
      "D. Most Advantageous Bid"
    ],
    answerIndex: 0
  },
  {
    id: 4,
    question: "4. The pre-procurement conference is optional in the procurement of Infrastructure Projects if the cost is and below:",
    choices: [
      "A. P2,000,000",
      "B. P5,000,000",
      "C. P10,000,000",
      "D. P100,000,000"
    ],
    answerIndex: 2
  },
  {
    id: 5,
    question: "5. First Statement: In case the Head of the Procuring Entity or his duly authorized representative approves the recommendation, he/she shall immediately issue the Notice of Award.\nSecond Statement: The winning bidder shall formally enter into contract with the Procuring Entity within 10 calendar days from the receipt of the notice of award.\nThird Statement: The Procuring Entity shall issue the Notice to Proceed to the winning bidder not later than 3 calendar days from the date of approval of the contract by the appropriate authority.",
    choices: [
      "A. All statements are correct",
      "B. Only 2 statements are correct",
      "C. Only 1 statement is correct",
      "D. None of the statements is correct"
    ],
    answerIndex: 0
  },
  {
    id: 6,
    question: "6. To be entitled to a monthly pension under this benefit, the member must have contributed at least 36 months contributions in all of the following, except:",
    choices: [
      "A. Retirement",
      "B. Death",
      "C. Disability",
      "D. All of the choices"
    ],
    answerIndex: 0
  },
  {
    id: 7,
    question: "7. If a permanently disabled employee, who lost both arms upto his elbows, had 20 years of credited service with a monthly average salary credit of P20,000, how much is his monthly pension excluding the dependent's pension?",
    choices: [
      "A. P9,800",
      "B. P9,300",
      "C. P8,300",
      "D. P8,000"
    ],
    answerIndex: 0
  },
  {
    id: 8,
    question: "8. The unemployment insurance under the SSS Law is equivalent to:",
    choices: [
      "A. A monthly pension",
      "B. 90% of the average daily salary credit",
      "C. 50% of the average monthly salary credit",
      "D. P20,000 to P60,000"
    ],
    answerIndex: 2
  },
  {
    id: 9,
    question: "9. The maternity leave provided under the SSS Law is generally days for every birth:",
    choices: [
      "A. 15 days",
      "B. 30 days",
      "C. 60 days",
      "D. 105 days"
    ],
    answerIndex: 3
  },
  {
    id: 10,
    question: "10. Take into considerations the following kasambahays:\nI. X earns P4,000 per month\nII. Y earns P40,000 per month\nIf the minimum and maximum monthly salary credit for 2026 is P5,000 and P35,000, respectively, how much will be considered for the determining the monthly contributions of the above-mentioned kasambahays?",
    choices: [
      "A. X: P4,000 | Y: P40,000",
      "B. X: P4,000 | Y: P35,000",
      "C. X: P5,000 | Y: P40,000",
      "D. X: P5,000 | Y: P30,000"
    ],
    answerIndex: 1
  },
  {
    id: 11,
    question: "11. Which of the following leave credits requires at least 6 months employment before the employee can be entitled?",
    choices: [
      "A. VAWC Leave",
      "B. Service Incentive Leave",
      "C. Solo Parents' Leave",
      "D. Paternity Leave"
    ],
    answerIndex: 2
  },
  {
    id: 12,
    question: "12. The 13th month pay is equivalent to:",
    choices: [
      "A. 1 month basic salary",
      "B. 1 month basic salary less tardiness and absences without leave",
      "C. 1/12 of the total basic salary for the calendar year",
      "D. 1/12 of the total basic salary for the calendar year less tardiness and absences without leave"
    ],
    answerIndex: 3
  },
  {
    id: 13,
    question: "13. Araw ng Kagitingan and Maundy Thursday fell on the same day that Mr. Jollibee reported for work. If Mr. Jollibee worked for 12 hours from 11am to 11pm with only a short break from 6:00PM to 6:20PM, how much would he be entitled to on that day if he earns P1,000 per regular work day and it was also his rest day?",
    choices: [
      "A. P6,498",
      "B. P6,435",
      "C. P4,332",
      "D. P4,999"
    ],
    answerIndex: 0
  },
  {
    id: 14,
    question: "14. Under Presidential Proclamation No. 1006 dated 2026, which of the following is a regular holiday?",
    choices: [
      "A. Ninoy Aquino Day",
      "B. National Heroes Day",
      "C. All Saints' Day",
      "D. Feast of the Immaculate Concepcion of Mary"
    ],
    answerIndex: 1
  },
  {
    id: 15,
    question: "15. All of the following would lead to food, cosmetics, and drugs and devices being mislabeled, except:",
    choices: [
      "A. If its labeling or advertising is false or misleading in any way",
      "B. If in package form",
      "C. If its container is so made, formed or filled as to be misleading",
      "D. None is an exception"
    ],
    answerIndex: 3
  },
  {
    id: 16,
    question: "16. If a consumer product is extremely flammable, which word must be indicated in the label?",
    choices: [
      "A. Poison",
      "B. Danger",
      "C. Warning",
      "D. Caution"
    ],
    answerIndex: 1
  },
  {
    id: 17,
    question: "17. Which of the following must be done by a buyer of a vehicle within 12 months or 20,000 kilometers of operation, whichever is earlier?",
    choices: [
      "A. Four separate repair attempts",
      "B. Provide notice to the dealer/manufacturer",
      "C. File the complaint with the DTI",
      "D. All of the choices"
    ],
    answerIndex: 3
  },
  {
    id: 18,
    question: "18. Which of the following would pertain to a Chain Distribution Plans/Pyramid Sales Scheme?",
    choices: [
      "A. Allowed if there is prior permit from the DTI",
      "B. Allowed if the benefit to the consumer is stated in writing",
      "C. It shall not be allowed",
      "D. Must be conducted between 9:00AM to 7:00PM on a weekday"
    ],
    answerIndex: 2
  },
  {
    id: 19,
    question: "19. A sales report is required to be made by a distributor within days. Otherwise, he becomes directly liable under the warranty:",
    choices: [
      "A. 15",
      "B. 30",
      "C. 60",
      "D. 90"
    ],
    answerIndex: 1
  },
  {
    id: 20,
    question: "20. The minimum amount of liability required for the creditor/s to file an involuntary liquidation of a juridical debtor would be at least",
    choices: [
      "A. P500,000",
      "B. P1,000,000",
      "C. P5,000,000",
      "D. P10,000,000"
    ],
    answerIndex: 1
  },
  {
    id: 21,
    question: "21. Which of the following is false regarding Suspension of Payments?",
    choices: [
      "A. It is always initiated by the debtor",
      "B. It will require that the debtor must have sufficient properties to cover his liabilities",
      "C. It will not apply to juridical debtors",
      "D. It requires at least three creditors"
    ],
    answerIndex: 3
  },
  {
    id: 22,
    question: "22. The Cram-Down Effect applies to all of the following types of rehabilitation, except:",
    choices: [
      "A. Court-supervised",
      "B. Pre-negotiated",
      "C. Out-of-court",
      "D. None is an exception"
    ],
    answerIndex: 3
  },
  {
    id: 23,
    question: "23. The approval of an out-of-court rehabilitation plan would require:",
    choices: [
      "A. A majority of the total claims plus the confirmation of the court",
      "B. 2/3 of the total claims and more than 50% of the secured liabilities and 50% of the unsecured liabilities plus confirmation of the court",
      "C. 67% of the secured claims plus 75% of the unsecured claims plus 85% of the total liabilities",
      "D. 2/3 of the voting creditors and 3/5 of the total liabilities"
    ],
    answerIndex: 2
  },
  {
    id: 24,
    question: "24. A petition for rehabilitation was filed in court. However, the court found that the debtor is not insolvent. In this case, the court will:",
    choices: [
      "A. Give due course to the petition",
      "B. Deny the petition",
      "C. Convert the proceedings into liquidation",
      "D. Explore ways to make the rehabilitation viable"
    ],
    answerIndex: 1
  },
  {
    id: 25,
    question: "25. Involuntary liquidation of an individual debtor would require all of the following, except:",
    choices: [
      "A. Proving acts of insolvency",
      "B. Posting of a bond",
      "C. Liquidation order to be issued only after trial",
      "D. The debtor must not be absent"
    ],
    answerIndex: 3
  },
  {
    id: 26,
    question: "26. The following have insurable interest in life and health, except:",
    choices: [
      "A. The father as to the life of his son",
      "B. The wife as to the life of her husband",
      "C. The debtor as to the life of the creditor",
      "D. The nephew as to the life of his aunt to whom he is dependent for support"
    ],
    answerIndex: 2
  },
  {
    id: 27,
    question: "27. The following may be valid grounds to cancel or rescind a contract of insurance, except:",
    choices: [
      "A. Concealment",
      "B. False Representation",
      "C. Breach of Warranty",
      "D. None is an exception"
    ],
    answerIndex: 3
  },
  {
    id: 28,
    question: "28. The obligation of the insurer to pay the proceeds of the insurance arises only upon the happening of an event which is uncertain. This refers to which characteristic of an insurance contract?",
    choices: [
      "A. Contract of Adhesion",
      "B. Aleatory Contract",
      "C. Contract of Utmost Good Faith",
      "D. Personal Contract"
    ],
    answerIndex: 1
  },
  {
    id: 29,
    question: "29. The beneficiary is required to have insurable interest in which of the following instances?\nI. In property insurance\nII. In life insurance taken by the insured\nIII. In life insurance taken by a third person on the life of the insured",
    choices: [
      "A. I, II and III",
      "B. I and II only",
      "C. I and III only",
      "D. II and III only"
    ],
    answerIndex: 2
  },
  {
    id: 30,
    question: "30. Which of the following is false with regards insurable interest in life?",
    choices: [
      "A. There is generally no limit on the insurable amount except the creditor's insurable interest over the life of the debtor",
      "B. The insurable interest must exist both at the time the policy takes effect and at the time of loss",
      "C. The insured who takes an insurance over his own life can generally designate anyone as a beneficiary even if the latter does not have insurable interest",
      "D. If the insured has insurable interest over the life of another, the latter's consent is not necessary for the insurance policy to be taken out"
    ],
    answerIndex: 1
  },
  {
    id: 31,
    question: "31. Which threshold for compulsory notification of mergers and acquisitions to the Philippine Competition Commission will be applicable beginning March 1, 2026?",
    choices: [
      "A. The size of party is exceeding P9.1B and the size of transaction is exceeding P3.8B",
      "B. The size of party is exceeding P8.5B and the size of transaction is exceeding P3.5B",
      "C. The size of party is exceeding P7.8B and the size of transaction is exceeding P3.2B",
      "D. The size of party is exceeding P7B and the size of transaction is exceeding P2.9B"
    ],
    answerIndex: 0
  },
  {
    id: 32,
    question: "32. A criminal penalty of imprisonment of 2-7 years and a fine of P50M to P250M may be applicable to which prohibited act under the Philippine Competition Act?",
    choices: [
      "A. Anti-Competitive Agreements",
      "B. Abuse of Dominant Position",
      "C. Prohibited Mergers",
      "D. Failure to Notify the Commission"
    ],
    answerIndex: 0
  },
  {
    id: 33,
    question: "33. Soda Pop, Inc. (SPI) has a 70% share in the market. In selling its cola products to Saja Co. (SCo.), a distributor and retailer, SPI required SCo to support Senator Dismaya in his re-election bid, otherwise, SPI will not sell its products to SCo. This can be an example of:",
    choices: [
      "A. Anti-Competitive Agreement",
      "B. Abuse of Dominant Position",
      "C. Prohibited Acquisition",
      "D. Unfair or Unconscionable Sales Act"
    ],
    answerIndex: 1
  },
  {
    id: 34,
    question: "34. Bid rotation, bid rigging, bid suppression are all examples of which prohibited act under the Philippine Competition Act:",
    choices: [
      "A. Anti-Competitive Agreement",
      "B. Abuse of Dominant Position",
      "C. Prohibited Acquisition",
      "D. Unfair or Unconscionable Sales Act"
    ],
    answerIndex: 0
  },
  {
    id: 35,
    question: "35. The maximum period allowable by law for the PCC to conduct a review of a merger or acquisition:",
    choices: [
      "A. 30 days",
      "B. 60 days",
      "C. 90 days",
      "D. 120 days"
    ],
    answerIndex: 2
  },
  {
    id: 36,
    question: "36. A, B and C are partner of ABC Partnership, Ltd., with equal contributions. However, B is a limited partner. After 10 years of operations, the partnership now has debts to third persons amounting to P9,000,000 and their total assets amounted to P6,000,000. Who among the partners shall be liable with their separate property in favor of creditors?",
    choices: [
      "A. A, B and C for P1M each",
      "B. A and C for P1.5M each",
      "C. A and B for P1.5M each",
      "D. None can be made liable with their separate properties"
    ],
    answerIndex: 0
  },
  {
    id: 37,
    question: "37. In a universal partnership of all present property, all of the following becomes common property, except:",
    choices: [
      "A. Properties which belong to the partners at the time of the constitution of the partnership.",
      "B. Any profits derive from properties belonging to each partner at the time of the constitution of the partnership.",
      "C. Any after-acquired property from a donation, legacy, inheritance including the profits thereof.",
      "D. All of the above are included in the partnership"
    ],
    answerIndex: 2
  },
  {
    id: 38,
    question: "38. A capitalist partner:",
    choices: [
      "A. Cannot engage in business for himself of whatever industry except if with consent of the partners.",
      "B. Can engage in business of the same industry as that of the partnership even against the will of the other partners.",
      "C. Can engage in business for himself in an industry different from that of the partnership even without the consent of the partners",
      "D. Can engage in business of whatever industry even without the consent of the partners"
    ],
    answerIndex: 2
  },
  {
    id: 39,
    question: "39. First statement: a partner is deemed to be a co-owner of his co-partners of specific partnership property.\nSecond statement: A partner's right in specific partnership property is assignable provided there is consent from the other partners.",
    choices: [
      "A. Both statements are correct",
      "B. Both statements are incorrect",
      "C. Only the first statement is correct",
      "D. Only the second statement is correct"
    ],
    answerIndex: 2
  },
  {
    id: 40,
    question: "40. V, W, X, Y and Z are partners with 5%, 10%, 15%, 30%, 40% interest, respectively. V, W and Y were appointed as managing partners without specification as to their duties. V wanted to purchase raw materials from a particular supplier to which Y opposed. Which of the following is correct?",
    choices: [
      "A. Y's opposition would prevail since he has more interest than that of V.",
      "B. Y's opposition would prevail even if W agrees with V, since their combined interest is smaller than that of Y.",
      "C. If W agrees with V, V's decision would prevail.",
      "D. X and Z would have to intervene and vote also, to determine whose decision will prevail."
    ],
    answerIndex: 2
  },
  {
    id: 41,
    question: "41. X, Y and Z are partners of XYZ partnership. X, acting within the scope of his authority, received P20,000 from C, a creditor of the partnership, and misapplied the same. From whom can C collect the P20,000?",
    choices: [
      "A. X only",
      "B. X, Y and Z, solidarily",
      "C. X, Y and Z, jointly",
      "D. X, Y, Z and XYZ partnership, solidarily"
    ],
    answerIndex: 3
  },
  {
    id: 42,
    question: "42. The corporate officer who is also required to be a director:",
    choices: [
      "A. President",
      "B. Treasurer",
      "C. Corporate Secretary",
      "D. All of the choices"
    ],
    answerIndex: 0
  },
  {
    id: 43,
    question: "43. Alternative certification of the financial statements may be resorted to when the total assets or total liabilities of the corporation is less than P600,000. In which case the certification can be done by:",
    choices: [
      "A. The treasurer or any responsible officer",
      "B. The president or any responsible officer",
      "C. The treasurer or the president",
      "D. The treasurer and the president"
    ],
    answerIndex: 3
  },
  {
    id: 44,
    question: "44. A stock and transfer book or membership book shall be closed at least days before the special meeting:",
    choices: [
      "A. 5 days",
      "B. 7 days",
      "C. 20 days",
      "D. 21 days"
    ],
    answerIndex: 1
  },
  {
    id: 45,
    question: "45. Amendments to the Articles of Incorporation would generally require a majority vote of the Board of Directors and:",
    choices: [
      "A. Written assent of the 2/3 of the outstanding capital",
      "B. 2/3 vote of the outstanding capital in a meeting called for the purpose",
      "C. Written assent of the majority of the outstanding capital",
      "D. Majority vote of the outstanding capital in a meeting called for the purpose"
    ],
    answerIndex: 0
  },
  {
    id: 46,
    question: "46. The nominee or alternate nominee of a one person corporation is required to transfer the shares to the duly designated heir/s or estate within days from receipt of the proof of heirship.",
    choices: [
      "A. 7",
      "B. 15",
      "C. 30",
      "D. 60"
    ],
    answerIndex: 0
  },
  {
    id: 47,
    question: "47. Which of the following corporations acquire juridical personality from the filing of the verified application with the SEC and not the issuance of a Certificate of Registration?",
    choices: [
      "A. Foreign corporation",
      "B. Non-stock corporation",
      "C. Ecclesiastical Corporation",
      "D. Corporation Sole"
    ],
    answerIndex: 3
  },
  {
    id: 48,
    question: "48. A subscriber who is also a director failed to pay the full subscription price on the due date. However, the Board did not take any action to enforce the full payment. What kind of suit can be initiated to collect from the director/subscriber?",
    choices: [
      "A. Individual Suit",
      "B. Class Suit",
      "C. Representative Suit",
      "D. Derivative Suit"
    ],
    answerIndex: 3
  },
  {
    id: 49,
    question: "49. Which of the following actions requiring 2/3 vote of the stockholders, would also require a majority vote of the Board of Directors?",
    choices: [
      "A. Delegate to the board the power to amend the by-laws",
      "B. Ratify a business opportunity entered into by a member of the Board in vilation of the corporate opportunity doctrine",
      "C. Ratification of contracts of self-dealing directors, where his presence is required to constitute a quorum and/or his vote is required for its approval by the BOD",
      "D. Declare stock dividends"
    ],
    answerIndex: 3
  },
  {
    id: 50,
    question: "50. A preferred shareholder is not entitled to vote in this corporate act:",
    choices: [
      "A. Amendment of the articles of incorporation",
      "B. Sale of all or substantially all of the corporate's inventories",
      "C. Incurring, creating or increasing bonded indebtedness",
      "D. Entering into a merger or consolidation"
    ],
    answerIndex: 1
  },
  {
    id: 51,
    question: "51. Which of the following is generally regarded as voidable at the instance of the corporation?",
    choices: [
      "A. Transactions of a self-dealing director",
      "B. Transactions of an interlocking director",
      "C. Transactions of a director in violation of confidentiality of information",
      "D. Transactions of a director that should pertain to the corporation"
    ],
    answerIndex: 0
  },
  {
    id: 52,
    question: "52. Which of the following is not a responsibility of the Audit Committee of a publicly-listed company?",
    choices: [
      "A. Compensation of the management",
      "B. Monitoring management",
      "C. Review corporate reporting procedures",
      "D. Relations with the independent auditor"
    ],
    answerIndex: 0
  },
  {
    id: 53,
    question: "53. If the corporation failed to commence operations for years from the issuance of the Certificate of Registration, it will result to :",
    choices: [
      "A. 2 years; automatic dissolution.",
      "B. 5 years; the corporation being placed under a delinquent status",
      "C. 2 years; the corporation being placed under a delinquent status",
      "D. 5 years; automatic dissolution."
    ],
    answerIndex: 3
  },
  {
    id: 54,
    question: "54. A corporation's assets is P500,000 while its liabilities amounted to P15,000,000. In this case, the stockholders cannot be made liable beyond their investment under which principle?",
    choices: [
      "A. Piercing the Veil of Corporate Entity",
      "B. Doctrine of Limited Liability",
      "C. Corporate Entity Doctrine",
      "D. Presumption of Good Faith"
    ],
    answerIndex: 1
  },
  {
    id: 55,
    question: "55. As a rule, actions of the Board of Directors would only require a majority of those present, so long as they have a quorum. Which of the following is an incorrect exception?",
    choices: [
      "A. When the by-laws provide for a lower voting requirement",
      "B. To approve the transaction of a self-dealing director in a corporation vested with public interest",
      "C. To elect corporate officers",
      "D. All of the choices are exceptions to the general rule"
    ],
    answerIndex: 0
  },
  {
    id: 56,
    question: "56. As a rule, directors are not entitled to receive any compensation. Except in the following cases (choose which is not an exception):",
    choices: [
      "A. Reasonable per diems",
      "B. As provided in the by-laws",
      "C. Upon a majority vote of the stockholders",
      "D. All of the choices are exceptions"
    ],
    answerIndex: 3
  },
  {
    id: 57,
    question: "57. The following will not be applicable to a One Person Corporation, except:",
    choices: [
      "A. Articles of Incorporation",
      "B. By-laws",
      "C. Minutes of the Meeting of the Board",
      "D. Authorized Capital Stock"
    ],
    answerIndex: 0
  },
  {
    id: 58,
    question: "58. Which of the following is not covered by the Mandatory Tender Offer Rule as to X Corporation stockholders:",
    choices: [
      "A. A, who holds 30% of the shares of X Corporation, plans to acquire 25% more.",
      "B. B, who holds 20% of the shares of X Corporation offered to buy from C, an existing shareholder, an equivalent of 14% of X Corporation's shares",
      "C. X, Y and Z plans to acquire 15% of X Corporation each month for 3 months",
      "D. X plans to acquire 50% of ABC Corporation, which in turn owns 60% of XYZ Corporation; and X owns 22% share in XYZ Corporation"
    ],
    answerIndex: 1
  },
  {
    id: 59,
    question: "59. Juan is a director of ABC Corporation whose term already expired. For lack of quorum, the stockholders failed to elect a replacement director and Juan continued on a hold-over capacity. He later on resigned. His vacancy will be filled-up by:",
    choices: [
      "A. Stockholders",
      "B. Board of Directors if they constitute a quorum",
      "C. Board of Directors regardless if they constitute a quorum or not",
      "D. Juan's choosing"
    ],
    answerIndex: 0
  },
  {
    id: 60,
    question: "60. Dwargon Corporation has its head office in Gazel Building, Tanza, Cavite. All of the following is a valid venue for the Board of Directors' meeting, except:",
    choices: [
      "A. Anywhere in Cavite",
      "B. Anywhere in the Philippines",
      "C. Anywhere in the world",
      "D. All of the choices can be valid venues"
    ],
    answerIndex: 3
  },
  {
    id: 61,
    question: "61. A group of individuals desired to organize as a multi-purpose cooperative with an Authorized Share Capital (ASC) of P1,000,000. How much is the minimum paid-up capital requirement?",
    choices: [
      "A. P250,000",
      "B. P100,000",
      "C. P62,500",
      "D. P0"
    ],
    answerIndex: 1
  },
  {
    id: 62,
    question: "62. A tertiary cooperative which will organize as a Federation is required to have at least secondary cooperative members and a minimum paid-up capital of :",
    choices: [
      "A. 10; P5,000,000 or the feasibility study requirement, whichever is higher",
      "B. 3; P5,000,000 or the feasibility study requirement, whichever is higher",
      "C. 10; P1,000,000 or the feasibility study requirement, whichever is higher",
      "D. 3; P1,000,000 or the feasibility study requirement, whichever is higher"
    ],
    answerIndex: 1
  },
  {
    id: 63,
    question: "63. One whose members are engaged in the production of fresh milk which may be processed and/or marketed as dairy products:",
    choices: [
      "A. Farmers Cooperative",
      "B. Producers Cooperative",
      "C. Dairy Cooperative",
      "D. Agriculture Cooperative"
    ],
    answerIndex: 2
  },
  {
    id: 64,
    question: "64. The quorum requirement of a General Assembly meeting of a cooperative bank is generally:",
    choices: [
      "A. 25%",
      "B. Majority",
      "C. 2/3",
      "D. 3/4"
    ],
    answerIndex: 1
  },
  {
    id: 65,
    question: "65. The following rules for the Board of Directors of a Corporation do not apply to a Director in a Cooperative, except:",
    choices: [
      "A. Two organizations that transact with each other with a common director",
      "B. Directors can receive compensation for functions other than being a director",
      "C. The penalty of the director for taking on an opportunity that should belong to the organization is the profit obtained from the transaction",
      "D. The transaction of the director with the organization is generally regarded as voidable"
    ],
    answerIndex: 3
  },
  {
    id: 66,
    question: "66. Cooperatives are autonomous, self-help organizations controlled by their members. If they enter into agreements with other organizations, including government, or raise capital from external sources, they shall do so on terms that ensure democratic control of their members and maintain their cooperative autonomy. This describes which Cooperative Principle?",
    choices: [
      "A. Voluntary and Open Membership",
      "B. Democratic Member Control",
      "C. Autonomy and Independence",
      "D. Cooperation for Community"
    ],
    answerIndex: 2
  },
  {
    id: 67,
    question: "67. Which is required to be funded with at least 3% of the Net Surplus of a Cooperative?",
    choices: [
      "A. Reserve Fund",
      "B. Education and Training Fund",
      "C. Community Development Fund",
      "D. Optional Fund"
    ],
    answerIndex: 2
  },
  {
    id: 68,
    question: "68. The following are the accounts of A in the Bank that was taken over by the PDIC in November 2026 for being insolvent:\n- A by B (Savings): P800,000\n- A ITF B (Time Deposit): P800,000\n- A and C (Demand Deposit): P1,000,000\n- A or D (Savings): P1,400,000\n- A and/or E (Time Deposit): P1,000,000\n- A and F Corporation (Demand Deposit): P1,000,000\nHow much is the insured deposits of A?",
    choices: [
      "A. P1,500,000",
      "B. P1,800,000",
      "C. P2,000,000",
      "D. P2,300,000"
    ],
    answerIndex: 1
  },
  {
    id: 69,
    question: "69. Which of the following is treated as confidential by the Bank Secrecy Law and is considered insured under the PDIC Act?\nI. A deposit account in Land Bank for P457M\nII. An investment in bonds issued by the Philippine Government",
    choices: [
      "A. Both I and II",
      "B. Neither I nor II",
      "C. I only",
      "D. II only"
    ],
    answerIndex: 2
  },
  {
    id: 70,
    question: "70. Impeachment proceedings would be an exception to the secrecy of:\nI. Peso Deposits\nII. Foreign Currency Deposits",
    choices: [
      "A. Both I and II",
      "B. Neither I nor II",
      "C. I only",
      "D. II only"
    ],
    answerIndex: 2
  },
  {
    id: 71,
    question: "71. Failure to comply with the Truth in Lending Act will result in which of the following?",
    choices: [
      "A. The loan is deemed paid already",
      "B. The purchase will be considered fully paid",
      "C. The contract of loan will be unenforceable",
      "D. None of the choices"
    ],
    answerIndex: 3
  },
  {
    id: 72,
    question: "72. The global money laundering and terrorist financing watchdog:",
    choices: [
      "A. The International Monetary Fund",
      "B. The Financial Action Task Force",
      "C. The World Bank",
      "D. The International Chamber of Commerce"
    ],
    answerIndex: 1
  },
  {
    id: 73,
    question: "73. The most dangerous stage of money laundering for the launderer:",
    choices: [
      "A. Placement",
      "B. Layering",
      "C. Integration",
      "D. None of the choices"
    ],
    answerIndex: 0
  },
  {
    id: 74,
    question: "74. The following are predicate crimes or unlawful activities under the AMLA that will not require a court order before the AMLC can examine bank accounts, except:",
    choices: [
      "A. Murder",
      "B. Destructive Arson",
      "C. Drugs-related cases",
      "D. Plunder"
    ],
    answerIndex: 1
  },
  {
    id: 75,
    question: "75. Which of the following 'covered persons' under the AMLA, is supervised or regulated by the Insurance Commission?",
    choices: [
      "A. Investment houses",
      "B. Pawnshops",
      "C. Trust entities",
      "D. Holding companies"
    ],
    answerIndex: 3
  },
  {
    id: 76,
    question: "76. For Tax Evasion to be an unlawful activity, the amount of the basic tax in the final assessment must be:",
    choices: [
      "A. Exceeding P1,000,000",
      "B. Exceeding P10,000,000",
      "C. Exceeding P25,000,000",
      "D. Exceeding P50,000,000"
    ],
    answerIndex: 2
  },
  {
    id: 77,
    question: "77. X works as a security detail to a Congressman. Later on, X went to the Bank to deposit P487,000,000. In this case, what report is to be prepared by the Bank and what is the deadline for it to be submitted to the AMLC?",
    choices: [
      "A. Covered transaction report; 5 banking days from the transaction",
      "B. Suspicious transaction report; next working day from occurrence",
      "C. Both covered and suspicious transaction report; 5 banking days from the transaction",
      "D. Neither covered nor suspicious transaction report since it was done in behalf of the Congressman"
    ],
    answerIndex: 1
  },
  {
    id: 78,
    question: "78. X commissioned Y for a marble sculpture. Absent any stipulation, who owns the copyright and the sculpture?",
    choices: [
      "A. X owns both",
      "B. Y owns both",
      "C. X owns the copyright; Y owns the sculpture",
      "D. Y owns the copyright; X owns the sculpture"
    ],
    answerIndex: 3
  },
  {
    id: 79,
    question: "79. The term of protection for a copyright:",
    choices: [
      "A. 10 years from issuance date and can be renewed indefinitely",
      "B. Lifetime of the author plus 50 years from death",
      "C. 20 years from the date of filing of the application",
      "D. It will depend on the certificate issued by the IPO"
    ],
    answerIndex: 1
  },
  {
    id: 80,
    question: "80. Which of the following is generally allowed to be processed?",
    choices: [
      "A. Personal Information",
      "B. Sensitive Personal Information",
      "C. Privileged Information",
      "D. All of the choices are generally not allowed to be processed"
    ],
    answerIndex: 0
  },
  {
    id: 81,
    question: "81. Mr. X is applying for a credit card with the bank. Among the information being required by the bank are his blood type, political affiliation and college grades. This can be considered violative of which principle?",
    choices: [
      "A. Proportionality",
      "B. Legitimate Purpose",
      "C. Transparency",
      "D. None of the choices"
    ],
    answerIndex: 0
  },
  {
    id: 82,
    question: "82. Which of the following will be considered privileged information?",
    choices: [
      "A. Disclosure of the Data Subject made in a tax return",
      "B. Statements made by a Data Subject to his priest",
      "C. A Data Subject's Social Security Number",
      "D. Chikas mentioned during 'stop recording'"
    ],
    answerIndex: 1
  },
  {
    id: 83,
    question: "83. Unless otherwise agreed by the parties, an electronic data message or electronic document shall be deemed to be received at the place where:",
    choices: [
      "A. The originator has its place of business",
      "B. The addressee has its place of business",
      "C. The originator has its residence",
      "D. The addressee has its residence"
    ],
    answerIndex: 1
  },
  {
    id: 84,
    question: "84. All of the following requirements of the law may be met by an electronic document or electronic data message, except:",
    choices: [
      "A. The requirement that a transaction should be in writing to be enforceable",
      "B. The requirement that a transaction should be in a public instrument to be valid",
      "C. The requirement that a document must be retained and presented in its original form",
      "D. None is an exception"
    ],
    answerIndex: 3
  },
  {
    id: 85,
    question: "85. The time of receipt of the electronic data message or electronic document is upon entry in the information system of the addressee:",
    choices: [
      "A. if the parties has designated an information system for the purpose of receiving electronic data messages or electronic documents",
      "B. The electronic message or electronic document enters an information system of the address that is not the designated information system",
      "C. The parties did not designate an information system",
      "D. None of the choices"
    ],
    answerIndex: 2
  },
  {
    id: 86,
    question: "86. The maximum processing time for a complex transaction/application with a government agency should be:",
    choices: [
      "A. 3 working days",
      "B. 7 working days",
      "C. 20 working days",
      "D. 45 working days"
    ],
    answerIndex: 1
  },
  {
    id: 87,
    question: "87. The Philippines' ranking in the Ease of Doing Business Index of the World Bank in 2018:",
    choices: [
      "A. 103rd",
      "B. 99th",
      "C. 113th",
      "D. 124th"
    ],
    answerIndex: 2
  },
  {
    id: 88,
    question: "88. Which of the following is not a conditional obligation?",
    choices: [
      "A. D will pay C P10,000, 15 days after the former's graduation",
      "B. D will pay C P10,000, after passing the 2026 October Licensure Exams for CPAs",
      "C. D will pay C P10,000, as soon as his financial means permit him to do so",
      "D. D will pay C P10,000, 10 days after he marries W"
    ],
    answerIndex: 2
  },
  {
    id: 89,
    question: "89. The following are examples of a quasi-contract, except:",
    choices: [
      "A. A putting out the fire in the house of B to save the houses of C and D in the same row without their express consent, creating an obligation for C and D to reimburse A.",
      "B. A receiving P1,000 as payment for services which was supposedly worth P800 only, creating an obligation for A to return the P200 excess.",
      "C. A shouldering the funeral expense of B who was washed ashore near the house of A. Creating an obligation from B Sr. to reimburse A.",
      "D. None of the choices is an exception."
    ],
    answerIndex: 3
  },
  {
    id: 90,
    question: "90. D is indebted to C for P100,000. To secure the obligation, G executed a guaranty and M executed a Real Estate Mortgage over his land. X volunteered to pay the obligation, to which D agreed, in this case, which of the following is incorrect?",
    choices: [
      "A. The acceptance of the payment of X is dependent on the consent of C",
      "B. If D already paid P20,000 ahead of the payment of X, the latter is still entitled to collect P100,000",
      "C. If D does not reimburse X for the payment, the latter can run after G or foreclose the mortgage of M",
      "D. If X does not intend to be reimbursed, he would need the consent of D to constitute a donation"
    ],
    answerIndex: 0
  },
  {
    id: 91,
    question: "91. The remedy of substitute performance may be applicable to the non-performance of:\nI. Obligation to give a determinate thing\nII. Obligation to give a generic thing\nIII. Obligation to do",
    choices: [
      "A. I, II and III",
      "B. I and II only",
      "C. I and III only",
      "D. II and III only"
    ],
    answerIndex: 3
  },
  {
    id: 92,
    question: "92. W, X, Y, Z are solidarily indebted to C for P40,000. When C demanded payment from W, the latter refused claiming that X is a minor, Y's share was already condoned and that Z is insolvent. How much is W required to pay C?",
    choices: [
      "A. P40,000",
      "B. P30,000",
      "C. P20,000",
      "D. P10,000"
    ],
    answerIndex: 2
  },
  {
    id: 93,
    question: "93. Do ut facias",
    choices: [
      "A. I give that you may give",
      "B. I give that you may do",
      "C. I do that you may give",
      "D. I do that you may do"
    ],
    answerIndex: 1
  },
  {
    id: 94,
    question: "94. The defense that the employer exercised due diligence in the selection and supervision of the employee is valid against which liability?\nI. Vicarious liability under Quasi-Delict\nII. Subsidiary liability under Delict",
    choices: [
      "A. Both I and II",
      "B. I only",
      "C. II only",
      "D. Neither I nor II"
    ],
    answerIndex: 1
  },
  {
    id: 95,
    question: "95. The following are real contracts which require delivery for perfection, except:",
    choices: [
      "A. Pledge",
      "B. Mortgage",
      "C. Mutuum",
      "D. Deposit"
    ],
    answerIndex: 1
  },
  {
    id: 96,
    question: "96. D, who is indebted to C for P100,000, sold his only remaining property to X. There would be a presumption that the sale was in fraud of C:",
    choices: [
      "A. If D did not reserve sufficient properties to pay all debts contracted before the sale.",
      "B. If D did not reserve sufficient properties to pay all debts contracted before and after the sale.",
      "C. When there has been some judgment obtained by C issued against D before the sale.",
      "D. When there has been some judgment issued against D before the sale even if not obtained by C."
    ],
    answerIndex: 3
  },
  {
    id: 97,
    question: "97. The following are void contracts, except:",
    choices: [
      "A. Contract of sale between the guardian and his ward concerning the property of the latter.",
      "B. Contract of lease between the executors and administrators and the estate concerning the property of the estate under administration.",
      "C. Contract of sale where the buyer is a government official entrusted with the administration of the subject property",
      "D. Contract of loan between the principal and an agent, where the latter was authorized to borrow money."
    ],
    answerIndex: 3
  },
  {
    id: 98,
    question: "98. Which of the following is an incorrect match of remedies?",
    choices: [
      "A. Voidable - annulment",
      "B. Rescissible - rescission",
      "C. Void - declaration of nullity",
      "D. All of the choices are correct matches"
    ],
    answerIndex: 2
  },
  {
    id: 99,
    question: "99. A orally sold his cellphone to B for P15,000, where the latter paid P499 down-payment and the balance to be paid 30 days after. The contract entered into is:",
    choices: [
      "A. Valid and enforceable",
      "B. Rescissible",
      "C. Void",
      "D. Unenforceable"
    ],
    answerIndex: 0
  },
  {
    id: 100,
    question: "100. D obliged himself to deliver one of his five cars to C but it was not specified which car. In this case,",
    choices: [
      "A. The contract would be interpreted following the least transmission of rights",
      "B. The contract would be interpreted following the greatest reciprocity of interests",
      "C. The contract is void",
      "D. They would need to undergo reformation to clarify which car."
    ],
    answerIndex: 2
  },
  {
    id: 101,
    question: "101. H, through violence and intimidation, forced W (his wife) to sell the latter's exclusive land to him. The selling price was P200,000 when the fair market value thereof was P1,000,000. H and W never executed a written agreement to cover the sale. What is the status of the contract?",
    choices: [
      "A. Rescissible",
      "B. Voidable",
      "C. Unenforceable",
      "D. Void"
    ],
    answerIndex: 3
  },
  {
    id: 102,
    question: "102. S offered to sell his house and lot to B for P1,500,000. B was convinced and accepted the same. B gave P500 and was given 30 days to make good the balance of the price. Before the expiration of the 30 days, S withdrew and returned B's P500. In this case,",
    choices: [
      "A. S validly withdrew the offer since it is within the 30 day period.",
      "B. S cannot validly withdraw the offer since there was an option money of P500 that was given.",
      "C. S validly withdrew the offer since he is still the owner thereof pending delivery.",
      "D. S cannot validly withdraw the offer since there was already a perfected contract of sale."
    ],
    answerIndex: 3
  },
  {
    id: 103,
    question: "103. George entered into a Contract to Sell with Mary, concerning the former's house and lot, for P2,000,000. Immediately, Mary took possession of the house and lot but under the Contract to Sell, there was a condition that ownership will not transfer until full payment of the price. Mary was able to pay the full price 6 months after and accordingly George executed a Deed of Absolute Sale. Ownership transferred upon",
    choices: [
      "A. Execution of the Contract to Sell",
      "B. Occupancy of Mary of the house and lot",
      "C. Full payment of the price",
      "D. Execution of the Deed of Absolute Sale"
    ],
    answerIndex: 3
  },
  {
    id: 104,
    question: "104. Insolvency is a requisite in which rights of an unpaid seller?",
    choices: [
      "A. Possessory Lien",
      "B. Stoppage in Transitu",
      "C. Right of Resale",
      "D. All of the above"
    ],
    answerIndex: 3
  },
  {
    id: 105,
    question: "105. S sold to B a truck for P2,000,000 secured by a chattel mortgage on the truck. For added security, B's friend X executed a mortgage over his land in favor of S. S and B agreed that the latter would pay a 10% down payment and the balance to be paid in monthly installments of P100,000. B eventually defaulted twice and left a balance of the purchase price amounting to P1,200,000. S then foreclosed the mortgage over the land and sold it in a public sale for P1,500,000. In this case, who is entitled to the excess?",
    choices: [
      "A. S",
      "B. B",
      "C. X",
      "D. All of them, equally"
    ],
    answerIndex: 2
  },
  {
    id: 106,
    question: "106. In this accessory contract, future obligations can be covered without the need of executing a new agreement or amending the previous one:",
    choices: [
      "A. Pledge",
      "B. Chattel Mortgage",
      "C. Real Estate Mortgage",
      "D. None of the choices"
    ],
    answerIndex: 2
  },
  {
    id: 107,
    question: "107. In a pledge, the disposal of the thing given as security during the pendency of the contract of pledge is:",
    choices: [
      "A. Allowed if there is consent from the creditor-pledgee but possession remains with the creditor-pledgee",
      "B. Allowed always and any stipulation to the contrary would be void",
      "C. A criminal act punished under the Revised Penal Code if without the written consent of the creditor-pledgee",
      "D. Not allowed under any circumstance"
    ],
    answerIndex: 0
  },
  {
    id: 108,
    question: "108. The period to redeem the foreclosed real property if the creditor is a juridical person and the debtor is a bank would be:",
    choices: [
      "A. 1 year",
      "B. 3 months",
      "C. Until the certificate of sale is registered",
      "D. 3 months or until registration of the certificate of sale, whichever is earlier"
    ],
    answerIndex: 0
  },
  {
    id: 109,
    question: "109. A drawer of a check is presumed to have knowledge of the insufficiency of funds, for purposes of the violation of BP Blg 22, if the check is presented within days from its date:",
    choices: [
      "A. 30",
      "B. 60",
      "C. 90",
      "D. 120"
    ],
    answerIndex: 2
  },
  {
    id: 110,
    question: "110. Which of the following pertains to the violation of BP Blg 22 and not estafa?",
    choices: [
      "A. Good faith is a defense",
      "B. Deceit is a necessary element",
      "C. Notice requirement is 3 days from the time the check was dishonored",
      "D. There's still a violation even if the check was in payment of a pre-existing obligation"
    ],
    answerIndex: 3
  }
];

let activeQuestions = [];

function shuffleArray(array) {
  const arr = [...array];
  for (let i = arr.length - 1; i > 0; i--) {
    const j = Math.floor(Math.random() * (i + 1));
    [arr[i], arr[j]] = [arr[j], arr[i]];
  }
  return arr;
}

function resetQuiz(shouldShuffle = false) {
  document.getElementById('results-panel').style.display = 'none';
  
  // Clone original questions
  activeQuestions = JSON.parse(JSON.stringify(originalQuestions));

  if (shouldShuffle) {
    activeQuestions = shuffleArray(activeQuestions);
  }

  renderQuiz();
  updateProgress();
  window.scrollTo({ top: 0, behavior: 'smooth' });
}

function renderQuiz() {
  const container = document.getElementById('questions-container');
  container.innerHTML = '';

  activeQuestions.forEach((qItem, qIdx) => {
    const qCard = document.createElement('div');
    qCard.className = 'question-card';
    qCard.id = `q-card-${qIdx}`;

    const qText = document.createElement('div');
    qText.className = 'question-text';
    qText.textContent = `${qIdx + 1}. ${qItem.question.replace(/^\d+\.\s*/, '')}`;
    qCard.appendChild(qText);

    const optionsDiv = document.createElement('div');
    optionsDiv.className = 'options';

    qItem.choices.forEach((choiceText, cIdx) => {
      const label = document.createElement('label');
      label.className = 'option-label';

      const radio = document.createElement('input');
      radio.type = 'radio';
      radio.name = `question_${qIdx}`;
      radio.value = cIdx;
      radio.onchange = updateProgress;

      label.appendChild(radio);
      label.appendChild(document.createTextNode(choiceText));
      optionsDiv.appendChild(label);
    });

    qCard.appendChild(optionsDiv);

    const feedback = document.createElement('div');
    feedback.className = 'feedback';
    feedback.id = `feedback-${qIdx}`;
    qCard.appendChild(feedback);

    container.appendChild(qCard);
  });
}

function updateProgress() {
  let answered = 0;
  activeQuestions.forEach((_, idx) => {
    const selected = document.querySelector(`input[name="question_${idx}"]:checked`);
    if (selected) answered++;
  });
  document.getElementById('progress-tracker').textContent = `Answered: ${answered} / ${activeQuestions.length}`;
}

function submitQuiz() {
  let score = 0;
  
  activeQuestions.forEach((qItem, idx) => {
    const card = document.getElementById(`q-card-${idx}`);
    const feedback = document.getElementById(`feedback-${idx}`);
    const selected = document.querySelector(`input[name="question_${idx}"]:checked`);
    
    card.classList.remove('correct', 'incorrect');
    
    if (selected) {
      const userChoiceIndex = parseInt(selected.value, 10);
      if (userChoiceIndex === qItem.answerIndex) {
        score++;
        card.classList.add('correct');
        feedback.className = 'feedback correct-text';
        feedback.textContent = '✓ Correct';
      } else {
        card.classList.add('incorrect');
        feedback.className = 'feedback incorrect-text';
        feedback.textContent = `✗ Incorrect. Correct Answer: ${qItem.choices[qItem.answerIndex]}`;
      }
    } else {
      card.classList.add('incorrect');
      feedback.className = 'feedback incorrect-text';
      feedback.textContent = `Unanswered. Correct Answer: ${qItem.choices[qItem.answerIndex]}`;
    }
  });

  const percentage = Math.round((score / activeQuestions.length) * 100);
  document.getElementById('score-text').textContent = `${score} / ${activeQuestions.length} (${percentage}%)`;
  document.getElementById('score-summary').textContent = percentage >= 75 ? 'Excellent performance! You are well-prepared for the exam.' : 'Keep practicing to reinforce the concepts.';
  
  const resultsPanel = document.getElementById('results-panel');
  resultsPanel.style.display = 'block';
  resultsPanel.scrollIntoView({ behavior: 'smooth' });
}

// Initialize quiz on page load
window.onload = () => resetQuiz(false);
</script>

</body>
</html>
Editor is loading...
Leave a Comment