From 39827ec91edf1297871a66e6b43ecedf73cc181c Mon Sep 17 00:00:00 2001 From: Chris Hirsch Date: Sun, 15 Nov 2026 10:17:06 -0700 Subject: [PATCH] feat: drive team gate and the 2026 REBUILT rules test The 2026 Driver's Test form, answered from the game manual with each why citing its rule; a new Drive gate quiz on rules every season shares. Quizzes gain kind: rules; both pass at 100%, and the robot cone course now requires the gate. --- content/raptacon/quizzes/README.md | 13 +- content/raptacon/quizzes/drive-gate.yml | 177 ++++++++++++++++ content/raptacon/quizzes/game-2026.yml | 264 ++++++++++++++++++++++++ content/raptacon/trees/strategy.yml | 24 ++- generators/checklist.py | 9 +- generators/common.py | 6 +- generators/quiz.py | 5 +- generators/site.py | 3 +- generators/templates/overview.html.j2 | 2 +- generators/templates/quiz.html.j2 | 11 +- generators/templates/site_index.html.j2 | 11 +- 11 files changed, 503 insertions(+), 22 deletions(-) create mode 100644 content/raptacon/quizzes/drive-gate.yml create mode 100644 content/raptacon/quizzes/game-2026.yml diff --git a/content/raptacon/quizzes/README.md b/content/raptacon/quizzes/README.md index 075893f..3a6694c 100644 --- a/content/raptacon/quizzes/README.md +++ b/content/raptacon/quizzes/README.md @@ -1,24 +1,29 @@ -# Safety quizzes +# Quizzes -One file per quiz. Each quiz is the written half of a safety sign-off: you pass the quiz, then a mentor -watches you use the tool and signs you off on the skill (`item`). The quiz never replaces the sign-off. +One file per quiz. A safety quiz is the written half of a tool sign-off: you pass the quiz, then a mentor +watches you use the tool and signs you off on the skill (`item`). A rules test (`kind: rules`) covers a +game manual; a mentor signs you off once you pass. The quiz never replaces the sign-off. ```yaml quiz: id: band-saw # file name without .yml name: Band saw safety quiz + kind: safety # safety (default) or rules item: tool-band-saw # the skill this quiz is for pass: 100 # percent needed to pass; retakes are unlimited authored_by: [{name, github?}] source: where the original questions came from + intro: rules tests only - one line on what it covers + reference: {label, url} # rules tests only - the manual the answers come from questions: - q: The question. choices: [A, B, C, D] # shown shuffled answer: B # the correct choice, word for word # or answers: [A, C] # "check all that apply": every listed choice, and only those why: One line on why, shown after a wrong answer. - origin: schoology | new # ported from the Schoology test, or added for this bank + origin: schoology | form | new # ported from Schoology or a team Google Form, or added for this bank review: true # new or changed: a mentor should read it before it counts ``` +A rules test's `why` cites the manual section or rule, so a mentor can check the answer. Choices never refer to each other by letter ("both a and b"): the quiz shuffles them. diff --git a/content/raptacon/quizzes/drive-gate.yml b/content/raptacon/quizzes/drive-gate.yml new file mode 100644 index 0000000..328e01a --- /dev/null +++ b/content/raptacon/quizzes/drive-gate.yml @@ -0,0 +1,177 @@ +# Drive team gate: the written half of strat-drive-gate. Rules that carry over from +# year to year (drive team roles, field safety, cards, the question box, E-stop) plus +# how our drive team works. Last season's game is the other half: the gate requires +# strat-game-rules-test (quizzes/game-2026.yml until the 2027 kickoff). Rule +# numbers cite the 2026 Game Manual; check them against each new manual. + +quiz: + id: drive-gate + name: Drive team gate quiz + kind: rules + item: strat-drive-gate + pass: 100 + intro: The rules every FRC season shares, and how our drive team works. Pass this and last season's rules test to try out for the drive team. + reference: {label: the 2026 Game Manual, url: "https://firstfrc.blob.core.windows.net/frc2026/Manual/2026GameManual.pdf"} + authored_by: + - {name: Chris Hirsch, github: ChrisHirsch} + source: New for the skill tree, from the 2026 Game Manual sections 5-7 + +questions: + # ---- The drive team + - q: How many people can be on a drive team for a match? + choices: [Up to 3, Up to 4, Up to 5 - and at most 1 can be an adult, As many as fit in the driver station] + answer: "Up to 5 - and at most 1 can be an adult" + why: A DRIVE TEAM is up to 5 people from one team, and no more than 1 non-student (manual section 6, DRIVE TEAM). + origin: new + review: true + + - q: Who may operate the robot during a match? + choices: [The drivers (and human players where the game allows), The drive coach, Anyone on the drive team, A driver from a partner team] + answer: "The drivers (and human players where the game allows)" + why: "G422: the coach never touches the controls - only their E-stop or A-stop. Greater than momentary is a red card." + origin: new + review: true + + - q: What is the drive coach's main job during a match? + choices: [Watch the whole field and call strategy so the drivers can focus on driving, Drive when the driver gets tired, Hold the controller as a backup, Talk to the referees during the match] + answer: "Watch the whole field and call strategy so the drivers can focus on driving" + why: The drivers watch the robot. The coach watches everything else - opponents, time, the score - and makes the calls. + origin: new + review: true + + - q: During Auto, what may the drive team do? + choices: [Stay in their staged areas and keep hands off the controls, Drive if the auto routine fails, Tell the robot what to do by voice, Walk to the other end of the driver station] + answer: "Stay in their staged areas and keep hands off the controls" + why: "G401 and G402: in Auto the robot runs on its own. Touching the controls is a foul; the A-stop is the only exception." + origin: new + review: true + + # ---- Before and after the match + - q: "Before the match starts, what do you check? (check all that apply)" + choices: [A fresh battery is in and strapped down, Bumpers are the right alliance color, The robot is connected to the driver station, The right auto routine is selected] + answers: [A fresh battery is in and strapped down, Bumpers are the right alliance color, The robot is connected to the driver station, The right auto routine is selected] + why: All four, every match. Each one has lost teams a match. + origin: new + review: true + + - q: What can you leave on the field when the match starts? + choices: [Only your robot, Your robot and a spare battery, Your robot and a tool bag, Anything not touching the robot] + answer: "Only your robot" + why: "G303 F: the robot must be the only team item left on the field." + origin: new + review: true + + - q: Your robot's bumpers must... + choices: [match your alliance color and show your team number, be any color, be removed for climbing, only be on the front] + answer: "match your alliance color and show your team number" + why: "G409 D: a robot whose team number or alliance color can't be told is unsafe and gets disabled." + origin: new + review: true + + - q: The field lights after a match are purple. Can you go get your robot? + choices: ["No - purple is for field staff only. Wait for green", "Yes", "Yes, if you are quick", "Only the coach can"] + answer: "No - purple is for field staff only. Wait for green" + why: Green means the field is safe for everyone; purple is field staff only (Table 5-3). + origin: new + review: true + + - q: How do you get onto the field? + choices: [Only through an open gate, Step over the guardrail where it is closest, Reach over the wall, Climb the driver station] + answer: "Only through an open gate" + why: "G102: never step over the guardrail. G101: never reach into the field." + origin: new + review: true + + - q: Queuing calls your match. What happens if the drive team is late? + choices: [The match can start without you - and causing delays is a rule violation, They wait as long as you need, Nothing, You get a free time-out] + answer: "The match can start without you - and causing delays is a rule violation" + why: "G301: be prompt. Know the schedule and be in queue early." + origin: new + review: true + + - q: When does the drive team go through the pre-match checklist? + choices: ["Every match, in queue, before the robot goes on the field", "Only before the first match of the day", "Only after something breaks", "When there's time"] + answer: "Every match, in queue, before the robot goes on the field" + why: Every match, top to bottom, out loud. The match you skip it is the one the battery falls out. + origin: new + review: true # point to the team's own checklist once it is written up + + - q: Going through the checklist in queue, you find the battery strap loose. What do you do? + choices: ["Fix it (or get the technician to) before the robot goes on the field", "Leave it - there's no time", "Tell the pit crew after the match", "Drive gently so it holds"] + answer: "Fix it (or get the technician to) before the robot goes on the field" + why: A loose battery browns out or disconnects the robot mid-match. Queue is the last chance to fix it. + origin: new + review: true + + # ---- The operator console + - q: "Which of these can you use to drive the robot? (check all that apply)" + choices: ["A wired Xbox controller", "A Dance Dance Revolution (DDR) mat on USB", "A flight stick", "A Nintendo Power Glove on a USB adapter", "A Microsoft Kinect", "A Bluetooth Xbox controller", "A phone app over Wi-Fi"] + answers: ["A wired Xbox controller", "A Dance Dance Revolution (DDR) mat on USB", "A flight stick", "A Nintendo Power Glove on a USB adapter", "A Microsoft Kinect"] + why: "Any wired input the Driver Station software reads is fine. R905: no wireless or Bluetooth in the operator console - though it names the Kinect as allowed, since motion sensing isn't wireless communication." + origin: new + review: true + + - q: "Which of these are NOT allowed in the driver station during a match? (check all that apply)" + choices: ["A mech suit that makes the driver 9 feet tall", "A laser pointer to show the driver where to go", "Fake AprilTags held up to confuse other robots", "A walkie-talkie to talk to the scouts in the stands", "A team hat"] + answers: ["A mech suit that makes the driver 9 feet tall", "A laser pointer to show the driver where to go", "Fake AprilTags held up to confuse other robots", "A walkie-talkie to talk to the scouts in the stands"] + why: "G302: nothing over 78 inches tall (hats are an exception), no talking to anyone outside the arena, and no lasers or fake AprilTags that jam other robots' sensors. R906: nothing unsafe." + origin: new + review: true + + # ---- Stops, cards and questions + - q: When does the drive team press the E-stop? + choices: [When the robot is unsafe or out of control, When you are losing, To restart the robot, To pause the match] + answer: "When the robot is unsafe or out of control" + why: The E-stop disables the robot for the rest of the match. It's a safety button, not a reset. + origin: new + review: true + + - q: What does the A-stop do? + choices: [Disables the robot for the rest of Auto, Disables the robot for the whole match, Restarts the auto routine, Stops the match clock] + answer: "Disables the robot for the rest of Auto" + why: The A-stop stops a bad auto routine; the robot comes back in Teleop. The E-stop is for the whole match (manual 5, driver station lights). + origin: new + review: true + + - q: What happens if your team gets a second yellow card? + choices: [It becomes a red card, Nothing until a third, The robot is disabled for one match, You lose 5 points] + answer: "It becomes a red card" + why: Yellow cards add up; a second one turns into a red card (manual 6.6). + origin: new + review: true + + - q: What does a red card mean in a qualification match? + choices: [Your team is disqualified - 0 match points and 0 ranking points, The opponent gets 15 points, A warning, The robot is disabled for the next match] + answer: "Your team is disqualified - 0 match points and 0 ranking points" + why: DISQUALIFIED means 0 match points and 0 ranking points (Table 6-6). + origin: new + review: true + + - q: You disagree with a call. What do you do? + choices: [Up to 2 drive team members go to the question box and talk to the head referee after the match, Shout at the referee during the match, Bang on the driver station glass, Argue with the other alliance] + answer: "Up to 2 drive team members go to the question box and talk to the head referee after the match" + why: "Question box, after the field turns green, calmly (manual 6.7.1). G201: be civil. G202: never hit the glass." + origin: new + review: true + + - q: Your robot lost connection during a match. Who do you talk to about it? + choices: [The FTA (field technical advisor), The head referee during the match, The other alliance, Nobody] + answer: "The FTA (field technical advisor)" + why: Technical questions about the field or robot go to the FTA, who can help find the cause (manual 6.7.1). + origin: new + review: true + + # ---- Behavior + - q: An opponent's robot breaks down in the middle of the field. What do you do? + choices: ["Drive around it - deliberately damaging, tipping or pinning a disabled robot is a foul", "Push it out of the way as hard as you can", "Pin it so it can't recover", "Take its game pieces"] + answer: "Drive around it - deliberately damaging, tipping or pinning a disabled robot is a foul" + why: "G416, G417 and G418 protect every robot, broken or not. This isn't combat robotics." + origin: new + review: true + + - q: After a match, what does the drive team do? + choices: [Check the robot and report any damage to the pit crew, Debrief with the strategy lead and scouts, Swap in a charged battery, All of these] + answer: "All of these" + why: The next match may be minutes away. Fix what broke, learn what happened, and start charged. + origin: new + review: true diff --git a/content/raptacon/quizzes/game-2026.yml b/content/raptacon/quizzes/game-2026.yml new file mode 100644 index 0000000..9d5f2d5 --- /dev/null +++ b/content/raptacon/quizzes/game-2026.yml @@ -0,0 +1,264 @@ +# 2026 REBUILT rules test: strat-game-rules-test until the 2027 kickoff, and the +# "last season's game" half of the drive team gate (strat-drive-gate requires it). +# Questions are from the team's "2026 FRC Driver's Test" Google Form, which had no +# answer key: the answers and whys come from the 2026 Game Manual (TU22), with the +# section or rule cited so a mentor can check each one. The form's duplicate +# Autonomous question is merged, and its two point grids are split into one +# question per row. + +quiz: + id: game-2026 + name: 2026 REBUILT rules test + kind: rules + item: strat-game-rules-test + pass: 100 + intro: The 2026 game, REBUILT - how a match runs, scoring, ranking points, fouls and the rules drivers break most. + reference: {label: the 2026 Game Manual, url: "https://firstfrc.blob.core.windows.net/frc2026/Manual/2026GameManual.pdf"} + authored_by: # questions from the team's 2026 Driver's Test form; Chris added the answers from the manual + - {name: Chris Hirsch, github: ChrisHirsch} + source: Raptacon "2026 FRC Driver's Test" (Google Form), answered from the 2026 Game Manual TU22 + +questions: + # ---- Match timing (Table 6-2, Table 6-3) + - q: How long is the Autonomous period? + choices: [10 seconds, 15 seconds, 20 seconds, 30 seconds] + answer: "20 seconds" + why: AUTO runs 0:20 to 0:00 (manual 6.4, Table 6-3). + origin: form + review: true + + - q: How long is the Teleop period? + choices: [2 minutes, 2 minutes and 15 seconds, 2 minutes and 20 seconds, 2 minutes and 30 seconds] + answer: "2 minutes and 20 seconds" + why: "TELEOP runs 2:20 to 0:00: the transition shift, four alliance shifts and END GAME (manual 6.4, Table 6-3)." + origin: form + review: true + + - q: How long is the Transition Shift? + choices: [5 seconds, 10 seconds, 15 seconds, 20 seconds] + answer: "10 seconds" + why: The TRANSITION SHIFT runs 2:20 to 2:10, and both hubs are active (Table 6-3). + origin: form + review: true + + - q: How long is each alliance shift? + choices: [10 seconds, 15 seconds, 20 seconds, 25 seconds] + answer: "25 seconds" + why: Shifts 1-4 run 2:10-1:45, 1:45-1:20, 1:20-0:55 and 0:55-0:30, 25 seconds each (Table 6-3). + origin: form + review: true + + - q: How long is the End Game? + choices: [15 seconds, 20 seconds, 25 seconds, 30 seconds] + answer: "30 seconds" + why: END GAME runs 0:30 to 0:00, and both hubs are active again (Table 6-3). + origin: form + review: true + + - q: "Which hub is active in Shift 1? (check all that apply)" + choices: [The alliance that scored the least points in Auto, The alliance that scored the least fuel in Auto, The alliance that scored the least climb points in Auto, Chosen by FMS if the score is tied after Auto, Chosen by FMS if climb points are tied in Auto, Chosen by FMS if the fuel scored in Auto is tied] + answers: [The alliance that scored the least fuel in Auto, Chosen by FMS if the fuel scored in Auto is tied] + why: The alliance that scored the MOST fuel in Auto has its hub inactive in Shift 1, so the other hub is active. A fuel tie is broken randomly by FMS. Points and climbs don't count (manual 6.4.1). + origin: form + review: true + + # ---- Hub lights (Table 5-3) + - q: The hub shows its alliance color at 100% brightness. What does that mean? + choices: [The alliance hub is active, The alliance hub deactivates in 5 seconds, The alliance hub is inactive, The alliance hub deactivates in 3 seconds] + answer: "The alliance hub is active" + why: Solid alliance color at full brightness means the hub is active. Off means inactive (Table 5-3). + origin: form + review: true + + - q: The hub is pulsing its alliance color. What does that mean? + choices: [The alliance hub is active, The alliance hub deactivates in 5 seconds, The alliance hub is inactive, The alliance hub deactivates in 3 seconds] + answer: "The alliance hub deactivates in 3 seconds" + why: The pulse is the deactivation warning. It starts 3 seconds before the hub turns off (Table 5-3). + origin: form + review: true + + - q: How long after a hub deactivates (or the period ends) does fuel still count? + choices: [1 second, 2 seconds, 3 seconds, 4 seconds, 5 seconds] + answer: "3 seconds" + why: Scoring keeps counting for 3 seconds to cover fuel still being processed through the hub (manual 6.5). + origin: form + review: true + + # ---- Fuel (6.3.4) + - q: How much fuel is staged in each Depot? + choices: ["24", "28", "32", "36"] + answer: "24" + why: 24 fuel per depot, not always in a neat layout (manual 6.3.4 A). + origin: form + review: true + + - q: How much fuel is staged in each Outpost Chute? + choices: ["24", "28", "32", "36"] + answer: "24" + why: 24 fuel per outpost chute (manual 6.3.4 B). + origin: form + review: true + + - q: How much fuel starts in the Neutral Zone? + choices: [350-458, 360-408, 320-368, 420-458] + answer: "360-408" + why: All 504 fuel minus the depots, chutes and up to 8 preloaded per robot leaves 360 to 408 (manual 6.3.4 D). + origin: form + review: true + + # ---- Points (Table 6-4) + - q: How many points is a fuel in the active hub worth in Auto? + choices: ["0", "1", "10", "15", "20", "30"] + answer: "1" + why: One point per fuel in an active hub, in Auto and Teleop. Fuel in an inactive hub scores nothing (Table 6-4). + origin: form + review: true + + - q: How many points does a robot get in Auto just for moving (leaving its starting line)? + choices: ["0", "1", "10", "15", "20", "30"] + answer: "0" + why: REBUILT has no points for moving in Auto - Table 6-4 only scores fuel and the tower. + origin: form + review: true + + - q: How many points is a Level 1 tower climb worth in Auto? + choices: ["0", "1", "10", "15", "20", "30"] + answer: "15" + why: 15 points each, for at most 2 robots in Auto (Table 6-4). + origin: form + review: true + + - q: How many points is a Level 2 or Level 3 tower climb worth in Auto? + choices: ["0", "1", "10", "15", "20", "30"] + answer: "0" + why: Only Level 1 can score in Auto (manual 6.5.2, Table 6-4). + origin: form + review: true + + - q: How many points is a fuel in the active hub worth in Teleop? + choices: ["0", "1", "10", "20", "30"] + answer: "1" + why: One point per fuel in an active hub (Table 6-4). + origin: form + review: true + + - q: How many points is a Level 1 tower climb worth in Teleop? + choices: ["0", "1", "10", "20", "30"] + answer: "10" + why: Level 1 is 10 in Teleop (15 in Auto) (Table 6-4). + origin: form + review: true + + - q: How many points is a Level 2 tower climb worth in Teleop? + choices: ["0", "1", "10", "20", "30"] + answer: "20" + why: Level 2 is 20 points, bumpers completely above the low rung (Table 6-4, 6.5.2). + origin: form + review: true + + - q: How many points is a Level 3 tower climb worth in Teleop? + choices: ["0", "1", "10", "20", "30"] + answer: "30" + why: Level 3 is 30 points, bumpers completely above the mid rung (Table 6-4, 6.5.2). + origin: form + review: true + + # ---- Ranking points (Table 6-5) and fouls (Table 6-6) + - q: At a district or regional event, how much fuel earns the Energized RP? + choices: ["50", "100", "240", "360"] + answer: "100" + why: 100 fuel in an active hub. District Championships raise it to 240 and Championship to 360 (Table 6-5). + origin: form + review: true + + - q: At a district or regional event, how much fuel earns the Supercharged RP? + choices: ["50", "100", "240", "360"] + answer: "360" + why: 360 fuel in an active hub (500 at Championship) (Table 6-5). + origin: form + review: true + + - q: How many tower points earn the Traversal RP? + choices: ["50", "100", "240", "360"] + answer: "50" + why: 50 tower points across the match, at every event level (Table 6-5). + origin: form + review: true + + - q: How many ranking points does a win earn in a 2026 qualification match? + choices: ["3", "2", "1", "0"] + answer: "3" + why: A win is 3 RP and a tie is 1, plus up to 3 bonus RPs (Table 6-4). It changes by season - it was 2 RP for a win before 2025. + origin: new + review: true + + - q: A minor foul gives the opponent how many points? + choices: ["3", "5", "10", "15"] + answer: "5" + why: A minor foul credits 5 points to the opponent (Table 6-6). + origin: form + review: true + + - q: A major foul gives the opponent how many points? + choices: ["3", "5", "10", "15"] + answer: "15" + why: A major foul credits 15 points to the opponent (Table 6-6). + origin: form + review: true + + # ---- Rules (section 7) + - q: In Auto, a robot may drive completely across the center line. + choices: ["True", "False"] + answer: "False" + why: "G403: completely across (bumpers fully over the line) is a major foul, plus another major foul for each contact with an opponent." + origin: form + review: true + + - q: A robot may only shoot fuel into its hub from its own alliance zone. + choices: ["True", "False"] + answer: "True" + why: "G407: bumpers must be at least partly in your alliance zone when you launch. Otherwise it's a major foul." + origin: form + review: true + + - q: "What may a robot do with fuel coming out of the hub? (check all that apply)" + choices: [Direct it towards a desired area, Catch it, Gain control of it after it hits the ground or another robot] + answers: [Gain control of it after it hits the ground or another robot] + why: "G408: no catching and no steering fuel the hub releases, until it touches something other than your robot." + origin: form + review: true + + - q: A robot may intentionally extend past its frame perimeter in more than one direction at a time. + choices: ["True", "False"] + answer: "False" + why: "R106 and G413: one direction (one side) at a time, and no more than 12 inches (R105)." + origin: form + review: true + + - q: A robot may climb on (be fully held up by) a partner robot for tower points. + choices: ["True", "False"] + answer: "False" + why: "G414: a robot fully supported by a partner can't earn tower points for the rest of the match." + origin: form + review: true + + - q: How long may a robot pin an opponent? + choices: [1 second, 2 seconds, 3 seconds, 4 seconds, 5 seconds] + answer: "3 seconds" + why: "G418: a 3-count. Back off 6 feet (72 in) for 3 seconds to end the pin." + origin: form + review: true + + - q: "What may an alliance block? (check all that apply)" + choices: [One trench, One bump, Both trenches, Both bumps] + answers: [One trench, One bump] + why: "G419: blocking both trenches or both bumps to stop traversal is a major foul, repeated every 3 seconds. One robot blocking one area is normal play." + origin: form + review: true + + - q: "When does touching an opponent at their tower give them Level 3 climb points? (check all that apply)" + choices: [During Auto, Any time during Teleop, During the opponent's scoring shift, During the End Game] + answers: [During the End Game] + why: "G420: in the last 30 seconds, touching an opponent robot that is touching its tower is a major foul, and Level 3 points if it's off the ground - whoever started the contact." + origin: form + review: true diff --git a/content/raptacon/trees/strategy.yml b/content/raptacon/trees/strategy.yml index 99c0d2c..c184a14 100644 --- a/content/raptacon/trees/strategy.yml +++ b/content/raptacon/trees/strategy.yml @@ -12,7 +12,7 @@ tree: authored_by: - {name: Chris Hirsch, github: ChrisHirsch} created_at: 2026-10-20 - updated_at: 2026-10-30 + updated_at: 2026-11-15 description: >- Know the game better than anyone, scout every team at an event, and drive our robot. Three tracks - Strategy, Scouting and Drive. Drive Team seats @@ -31,10 +31,10 @@ items: kickoff it covers last season's game. roles: [student] kind: score - pass_score: null # TODO the team's rules test and its pass mark + pass_score: 100 # quizzes/game-2026.yml until the 2027 kickoff verify: {method: signoff, claim: true, by: {any_of: [{role: subteam-lead, tree: strategy}, {role: subteam-mentor, tree: strategy}]}} training: - - {type: doc, label: This season's game manual} # TODO link after kickoff + - {type: doc, label: The 2026 Game Manual (REBUILT), url: "https://firstfrc.blob.core.windows.net/frc2026/Manual/2026GameManual.pdf"} renews: season visibility: public @@ -87,6 +87,22 @@ items: renews: season visibility: public + - id: strat-drive-gate + tier: 1 + track: Drive + name: Drive team gate + description: >- + Pass the drive team gate quiz - the rules every season shares, field + safety, cards and how our drive team works. Together with last season's + game rules test, it's the way in to driving. + roles: [student] + kind: score + pass_score: 100 + requires: [strat-game-rules-test] + verify: {method: signoff, by: {any_of: [{role: subteam-lead, tree: strategy}, {role: subteam-mentor, tree: strategy}]}} + renews: season + visibility: public + - id: strat-robot-knowledge tier: 1 track: Drive @@ -140,7 +156,7 @@ items: roles: [student] kind: timed runs: 3 - requires: [strat-rc-cone-course, strat-robot-knowledge, strat-game-rules-test] + requires: [strat-rc-cone-course, strat-robot-knowledge, strat-drive-gate] verify: method: signoff by: {any_of: [{role: subteam-lead, tree: strategy}, {role: subteam-mentor, tree: strategy}, {role: lead-mentor}]} diff --git a/generators/checklist.py b/generators/checklist.py index ab97fac..c5aa0b7 100644 --- a/generators/checklist.py +++ b/generators/checklist.py @@ -17,6 +17,12 @@ PRIVATE = {"self": "Private", "mentors": "Mentors only"} +def quiz_entry(q): + """The training entry for a skill's quiz page.""" + what = "Safety quiz" if q["kind"] == "safety" else "Rules test" + return {"type": "quiz", "label": f"{what} (pass at {q['pass']}%, then a mentor signs you off)", "url": q["page"]} + + def describe_by(by, ctx): """verify.by -> ["Manufacturing Subteam Lead (Sasha Crouse, Snort Hirsch)", ...]""" if not by: @@ -129,8 +135,7 @@ def build_item(item, roles, conditions, ctx): "bonus": item.get("bonus", []), "signoff": common.signoff_link(item, ctx["trees"], ctx["team_doc"]), "training": [r for r in item.get("training", []) if not r.get("roles") or set(r["roles"]) & set(roles)] + - ([{"type": "quiz", "label": "Safety quiz (pass at 100%, then a mentor signs you off)", "url": ctx["quizzes"][item["id"]]}] - if item["id"] in ctx["quizzes"] else []), + ([quiz_entry(ctx["quizzes"][item["id"]])] if item["id"] in ctx["quizzes"] else []), "parts": [{"name": p["name"], "who": " or ".join(describe_by(p.get("by"), ctx))} for p in item.get("parts", [])], } diff --git a/generators/common.py b/generators/common.py index 8475826..2466186 100644 --- a/generators/common.py +++ b/generators/common.py @@ -80,8 +80,10 @@ def load_quizzes(): def quiz_pages(): - """{item_id: quiz page file name}: the skills that have a written safety quiz.""" - return {q["quiz"]["item"]: f"quiz-{qid}.html" for qid, q in load_quizzes().items()} + """{item_id: {page, pass, kind}}: the skills that have a written quiz. kind is + safety (the written half of a tool sign-off) or rules (a game rules test).""" + return {q["quiz"]["item"]: {"page": f"quiz-{qid}.html", "pass": q["quiz"].get("pass", 100), "kind": q["quiz"].get("kind", "safety")} + for qid, q in load_quizzes().items()} def signoff_link(item, trees, team): diff --git a/generators/quiz.py b/generators/quiz.py index 3e425c7..f71d469 100644 --- a/generators/quiz.py +++ b/generators/quiz.py @@ -1,5 +1,6 @@ #!/usr/bin/env python3 -"""Render a page per safety quiz (content//quizzes/*.yml) as quiz-.html: +"""Render a page per quiz (content//quizzes/*.yml: safety quizzes and game +rules tests) as quiz-.html: questions and choices shuffled on every attempt, retakes until the pass mark, the "why" for each miss, and on a pass a QR code for that skill's pre-filled sign-off form - the mentor watches the practical and signs off. The quiz never @@ -28,7 +29,7 @@ def main(): questions = [{"q": x["q"], "choices": x["choices"], "answers": x.get("answers") or [x["answer"]], "why": x["why"]} for x in doc["questions"]] common.write_html( env, "quiz.html.j2", f"quiz-{qid}.html", - team=team["team"], season=ctx["season"], quiz=q, item=item, count=len(questions), + team=team["team"], season=ctx["season"], quiz=q, item=item, count=len(questions), safety=q.get("kind", "safety") == "safety", data=json.dumps({"pass": q.get("pass", 100), "questions": questions}).replace(" {% if c.description %}{{ c.description }}{% endif %} {% for b in c.bonus %}

🍿 Bonus: {{ b.label }}

{% endfor %} - {% if c.quiz %}

📝 Take the safety quiz →

{% endif %} + {% if c.quiz %}

📝 Take the {{ 'safety quiz' if c.quiz.kind == 'safety' else 'rules test' }} →

{% endif %} {% if c.detail %}

Full details, training and test →

{% endif %} {% if c.signoff %}

✅ Leads & mentors: sign off this skill

{% endif %} diff --git a/generators/templates/quiz.html.j2 b/generators/templates/quiz.html.j2 index ea10419..09fddba 100644 --- a/generators/templates/quiz.html.j2 +++ b/generators/templates/quiz.html.j2 @@ -12,6 +12,7 @@ h1 { font-size: clamp(24px, 4.5vw, 34px); margin: 16px 0 4px; border-bottom: 5px solid var(--green); display: inline-block; } .meta { color: var(--muted); font-size: 13px; margin-bottom: 10px; } .intro { font-size: 16px; line-height: 1.5; background: var(--link-bg); border: 2px solid var(--link); border-radius: 10px; padding: 10px 14px; } + .intro a { color: var(--link); } .q { border: 2px solid var(--line-strong); border-radius: 10px; padding: 12px 14px; margin: 14px 0; background: var(--card); } .q.wrong { border-color: var(--danger-strong); background: var(--danger-bg); } .q.right { border-color: var(--ok); } @@ -40,12 +41,18 @@ {{ theme_toggle() }}
{{ team.name }} {{ team.number }}{{ team.name }} {{ team.number }} - ← All safety quizzes + {% if safety %}← All safety quizzes{% else %}← All rules tests{% endif %}

{{ quiz.name }}

For the skill {{ item.name }} · {{ count }} questions · pass at {{ quiz.pass }}%
+{% if safety %}

This is the written half of your sign-off. Answer every question; you can retake it as many times as you need, and it shows why for anything you miss. Pass it, then show the pass screen to a mentor: they watch you use the tool safely and sign you off.

+{% else %} +

{% if quiz.intro %}{{ quiz.intro }} {% endif %}Answer every question; you can retake it as many times as you need, and it shows + why for anything you miss. Pass it, then show the pass screen to a mentor to sign you off.{% if quiz.reference %} + Everything here is in {{ quiz.reference.label }}.{% endif %}

+{% endif %}
Questions by {{ authors }}. {{ season }} season.
@@ -92,7 +99,7 @@ const when = new Date().toLocaleString(); form.innerHTML = ''; result.innerHTML = `

✅ Passed: ${right} of ${order.length}

-
Now show this screen to a mentor. They watch you use the tool safely, then sign you off.
+
{{ 'Now show this screen to a mentor. They watch you use the tool safely, then sign you off.' if safety else 'Now show this screen to a mentor, who signs you off.' }}
Your name:
Passed ${esc(when)}
${SIGNOFF ? `
QR code for the sign-off form diff --git a/generators/templates/site_index.html.j2 b/generators/templates/site_index.html.j2 index 8bf9cad..82a8ed1 100644 --- a/generators/templates/site_index.html.j2 +++ b/generators/templates/site_index.html.j2 @@ -62,15 +62,18 @@ {% endfor %}
- {% if quizzes %} -

Safety quizzes

+ {% for kind, title, anchor in [('safety', 'Safety quizzes', 'quizzes'), ('rules', 'Game rules tests', 'rules-tests')] %} + {% set list = quizzes | selectattr('kind', 'equalto', kind) | list %} + {% if list %} +

{{ title }}

{% endif %} + {% endfor %}

Subteam trees

{% for t in subteams %}