chiark / gitweb /
Move quiz question text and entry field into quiz.pl
authorIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 6 Jun 2023 19:41:00 +0000 (20:41 +0100)
committerIan Jackson <ijackson@chiark.greenend.org.uk>
Tue, 6 Jun 2023 19:52:13 +0000 (20:52 +0100)
Ideally this would be configurable perhaps.

quiz.pl
template.html

diff --git a/quiz.pl b/quiz.pl
index 7737ebdb3889c8c863d460c9fccb3dcd983bf3e0..5a63d49927734f113c562740c69f1959eb71e318 100644 (file)
--- a/quiz.pl
+++ b/quiz.pl
@@ -8,4 +8,15 @@ sub quiz_check_answer () {
     }
 }
 
+$quiz_question_input = <<END;
+Quiz question vs. stupid robots:
+<br>
+Q. Which IETF document,
+titled "Address Allocation for Private Internets",
+does the G-RIN help implement?
+<br>
+A. <input type=text name="quiz" length=10>
+<br>
+END
+
 1;
index a6236c036e9b49d86550e2ca1138275de5f8223f..f70e63e7e270dd9c8960aad5202b86cd309ddb9c 100644 (file)
@@ -405,14 +405,7 @@ a recent notification of your password, you should request a current
 password:
 <p>
 
-Quiz question vs. stupid robots:
-<br>
-Q. Which IETF document,
-titled "Address Allocation for Private Internets",
-does the G-RIN help implement?
-<br>
-A. <input type=text name="quiz" length=10>
-<br>
+@@@quiz_question_input@@@
 <input type=submit name="mailpasswd" value="Mail password."><br>
 (The password will be sent to the registered email address for the
 entry.)