public function toExternalForm()
 {
     $data = ["profile" => $this->profile->toExternalForm()];
     $questions = [];
     foreach ($this->questions as $question) {
         $questions[] = $question;
     }
     uasort($questions, [$this, "sort_questions"]);
     $data["questions"] = [];
     foreach ($questions as $question) {
         unset($question["answer"]);
         $data["questions"][] = $question;
     }
     return $data;
 }
 public static function delete_question(AssessmentProfile $profile, Token $id)
 {
     $query = Database::generate_query("assessment_question_delete", [$profile->getAssessmentId()->toString(), $id->toString()]);
     $query->execute();
 }