Skip to content

Commit

Permalink
refactor: make the API a bit simpler
Browse files Browse the repository at this point in the history
  • Loading branch information
PupoSDC committed Dec 16, 2023
1 parent 6e8e87d commit c57da41
Show file tree
Hide file tree
Showing 18 changed files with 101 additions and 855 deletions.
5 changes: 1 addition & 4 deletions libs/base/types/src/lib/question-templates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,7 @@ export type QuestionVariantSimple = QuestionVariantGeneric<"simple"> & {
export type QuestionVariantTrueOrFalse =
QuestionVariantGeneric<"true-or-false"> & {
question: string;
options: [
{ id: "true"; correct: boolean },
{ id: "false"; correct: boolean },
];
answer: boolean;
explanation: string;
};

Expand Down
88 changes: 8 additions & 80 deletions libs/content/question-bank-737/content/737.01.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,7 @@
"id": "s6dz6",
"type": "true-or-false",
"question": "In an emergency, the Emergency Lights and Forward Airstairs can be operated from the Aft Attendant's panel.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand All @@ -74,16 +65,7 @@
"id": "28x45f",
"type": "true-or-false",
"question": "Some B737-800 aircraft have no Taxi light mounted on the nose landing gear.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -140,16 +122,7 @@
"id": "w5hoxh",
"type": "true-or-false",
"question": "The Aircraft battery need to be selected ON for STANDBY operation of the Forward Airstairs from the FWD Attendant's Panel?",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -452,16 +425,7 @@
"id": "tu1e5f",
"type": "true-or-false",
"question": "Prior to discharging a Halon fire extinguisher on the flight deck, both recirculation fans must be selected to ON and at least one flight deck number 2 window must be unlocked.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand All @@ -477,16 +441,7 @@
"id": "qo4c1i",
"type": "true-or-false",
"question": "Can the Flight Deck No2 windows be opened both on the ground and in flight?",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand All @@ -502,16 +457,7 @@
"id": "m7aew",
"type": "true-or-false",
"question": "When operating the Airstairs from outside the aircraft - moving the AIRSTAIRS switch to Extend requires both AC and DC power for the airstairs to extend.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -568,16 +514,7 @@
"id": "i875q",
"type": "true-or-false",
"question": "The flight deck door has one decompression panel that automatically opens during an aircraft rapid decompression, and one emergency egress panel that flight deck crew can manually remove to exit if the door is jammed.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -839,16 +776,7 @@
"id": "eg5iy",
"type": "true-or-false",
"question": "The water supply in the Lavatories can be manually selected to supply only the toilet or only the sink taps.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down
77 changes: 7 additions & 70 deletions libs/content/question-bank-737/content/737.02.json
Original file line number Diff line number Diff line change
Expand Up @@ -90,16 +90,7 @@
"id": "hmkql",
"type": "true-or-false",
"question": "The TRIP RESET switch is pushed to reset a PACK, WING-BODY OVERHEAT and BLEED TRIP OFF, it isolates the associated valve and extinguishes the alert.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -156,16 +147,7 @@
"id": "ho68d",
"type": "true-or-false",
"question": "The APU is capable of supplying bleed air for two packs on the ground, or one pack in flight.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -222,16 +204,7 @@
"id": "u24a1",
"type": "true-or-false",
"question": "Engine bleed air pressure is controlled by means of the bleed air valve which acts as both a shutoff and pressure regulating valve.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -288,16 +261,7 @@
"id": "y1wpo",
"type": "true-or-false",
"question": "Conditioned air from the left hand pack flows directly to the Flight Deck from the Mix Manifold.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand All @@ -313,16 +277,7 @@
"id": "wd9mb",
"type": "true-or-false",
"question": "The packs produce the coolest temperature selected in any of the zones, with the other zones temperature controlled by adding hot trim air to produce the required temperature.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -502,16 +457,7 @@
"id": "f4zwnj",
"type": "true-or-false",
"question": "Bleed air is taken from stage 4 and stage 10 of the high pressure compressor.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -650,16 +596,7 @@
"id": "dmky7",
"type": "true-or-false",
"question": "Cabin pressurisation is controlled by the position of the Outflow Valve, but some air is also exhausted through the toilet and galley vents.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down
44 changes: 4 additions & 40 deletions libs/content/question-bank-737/content/737.03.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,7 @@
"id": "cdr6pi",
"type": "true-or-false",
"question": "The engine Cowl Anti-Ice valve is located UPSTREAM of the Engine Bleed Air Valve.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand All @@ -33,16 +24,7 @@
"id": "isx62",
"type": "true-or-false",
"question": "If the cowl anti-ice valve fails to move to the position indicated by the ENG ANTI-ICE switch, the COWL VALVE OPEN light remains illuminated bright blue and an amber TAI indication immediately illuminates on the CDS.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down Expand Up @@ -99,16 +81,7 @@
"id": "uomna",
"type": "true-or-false",
"question": "When operating on standby power only the Captain's pitot probe is still heated - if the Captain's pitot probe heating fails in this condition, there is no CAPT PITOT alert given.",
"options": [
{
"id": "true",
"correct": true
},
{
"id": "false",
"correct": false
}
],
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
Expand All @@ -124,16 +97,7 @@
"id": "7un63",
"type": "true-or-false",
"question": "On the ground and in flight, the wing anti-ice valves close if the forward thrust levers are advanced above the takeoff warning setting.",
"options": [
{
"id": "true",
"correct": false
},
{
"id": "false",
"correct": true
}
],
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
Expand Down
Loading

0 comments on commit c57da41

Please sign in to comment.