question_true_false_form.php 1.4 KB

123456789101112131415161718192021222324252627282930313233343536
  1. <main>
  2. <?php
  3. $chapter = $_SESSION['chapterPanel'];
  4. $subject = $_SESSION['subjectPanel'];
  5. echo "<center><h1>" . $subject . ": " . $chapter . "</div></h1></center>";
  6. ?>
  7. <div class="form">
  8. <form action="/teacher/teacher.php" method="POST">
  9. <p>Question type</p>
  10. <label class="switch">
  11. <input type="checkbox" name="questionTypeMultiple" <?php if (isset($_POST['questionTypeMultiple'])) echo "checked ='checked'"; ?> onclick="this.form.submit()">
  12. <span class="slider round"></span>
  13. </label><br><br>
  14. </form>
  15. </div>
  16. <div class="form">
  17. <form action="/teacher/formLogic.php" method="POST">
  18. <label for="question">Question</label>
  19. <input type="text" id="question" name="question" placeholder="question text.." required>
  20. <label for="addPoints">Points for correct answer (0-10)</label>
  21. <input type="number" id="addPoints" name="addPoints" step="0.01" min="0" max="10" required><br>
  22. <label for="cutPoints">Minus points for wrong answer (0-10)</label>
  23. <input type="number" id="cutPoints" name="cutPoints" step="0.01" min="0" max="10" required><br><br>
  24. <input type="radio" name="answerTrueFalse" value="T" id="true" checked />
  25. <label for="true">True</label>
  26. <input type="radio" name="answerTrueFalse" value="F" id="false" />
  27. <label for="false">False</label>
  28. <input type="submit" value="Submit">
  29. </form>
  30. </div>
  31. </main>