      $question = $qa["question"];
      $sql_insert_question = "INSERT INTO question(test_id, question) values($topic_last_id, '$question')";
      if ($conn->query($sql_insert_question) === TRUE) {
        $question_last_id = $conn->insert_id;
        $answers = $qa["choices"];
        foreach ($answers as $ch) {
          $correct = isset($ch["correct"]) ? 1 : 0;
          $ans = $ch["answer"];