Skip to content

Commit

Permalink
content: add some explanations to 737 questions (#96)
Browse files Browse the repository at this point in the history
  • Loading branch information
PupoSDC authored Jan 24, 2024
1 parent 6c9a332 commit b23ecb9
Show file tree
Hide file tree
Showing 21 changed files with 288 additions and 170 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ const Page: NextPage<PageProps> = ({ questionBank }) => {
] as Breadcrumbs;

return (
<LayoutModule questionBank={questionBank} breadcrumbs={crumbs} fixedHeight>
<LayoutModule questionBank={questionBank} breadcrumbs={crumbs}>
<AppHead />
<UserSettings />
</LayoutModule>
Expand Down
37 changes: 1 addition & 36 deletions libs/content/question-bank-type/__old__/737.json
Original file line number Diff line number Diff line change
Expand Up @@ -9324,42 +9324,7 @@
"id": "jjjb95",
"explanation": "",
"learningObjectives": ["B737"],
"variants": {
"as0oz": {
"id": "as0oz",
"type": "simple",
"question": "The purpose of the landing gear transfer unit is to:",
"options": [
{
"id": "uafie7",
"text": "Automatically use hydraulic system B for landing gear retraction if hydraulic system A engine driven pump fails and the landing gear lever is positioned up",
"correct": false,
"why": ""
},
{
"id": "9co2f",
"text": "Automatically use hydraulic system B for gear retraction if No 1 engine is lost and the landing gear lever is positioned up",
"correct": true,
"why": ""
},
{
"id": "665xz",
"text": "Allow the use of nose wheel steering in the event of hydraulic system A fails",
"correct": false,
"why": ""
},
{
"id": "obpl2w",
"text": "Allow landing gear retraction if hydraulic system B is lost during takeoff",
"correct": false,
"why": ""
}
],
"explanation": "> ## Landing Gear Transfer Unit\n> \n> The purpose of the landing gear transfer unit is to supply the volume of hydraulic\n> fluid needed to raise the landing gear at the normal rate when system A\n> engine–driven pump volume is lost. The system B engine–driven pump supplies\n> the volume of hydraulic fluid needed to operate the landing gear transfer unit\n> when all of the following conditions exist:\n> - airborne\n> - No. 1 engine RPM drops below a limit value\n> - landing gear lever is positioned UP\n> - either main landing gear is not up and locked.",
"annexes": [],
"externalIds": []
}
}
"variants": {}
},
{
"id": "80pwx8",
Expand Down
97 changes: 54 additions & 43 deletions libs/content/question-bank-type/questions/B737/737.02.json
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@
},
{
"id": "h3ia",
"explanation": "",
"explanation": "### TRIP RESET Switch\n\n- resets BLEED TRIP OFF, PACK or ZONE TEMP lights\n\n- related engine bleed air valve opens, or related pack valve opens, or related trim air modulating valve opens",
"learningObjectives": ["B737.02"],
"variants": {
"hmkql": {
Expand Down Expand Up @@ -450,7 +450,7 @@
},
{
"id": "np5w1",
"explanation": "",
"explanation": "Bleed air is taken from **stage 5** from the **low pressure** compressor and **stage 9** of the **high pressure compressor**.",
"learningObjectives": ["B737.02"],
"variants": {
"f4zwnj": {
Expand All @@ -461,6 +461,58 @@
"explanation": "",
"annexes": [],
"externalIds": []
},
"f4zwng": {
"id": "f4zwng",
"type": "true-or-false",
"question": "Bleed air is taken from stage 5 and stage 9 of the high pressure compressor.",
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
},
"f4zWnb": {
"id": "f4zWnb",
"type": "true-or-false",
"question": "Bleed air is taken from stage 5 from the low pressure compressor and stage 9 of the high pressure compressor.",
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
},
"i8bbqh": {
"id": "i8bbqh",
"type": "simple",
"question": "Which statement is correct:",
"options": [
{
"id": "4ha3ff",
"text": "Bleed air is constantly provided from stage 5 and stage 9 of the compressor.",
"correct": false,
"why": ""
},
{
"id": "bc8lm",
"text": "Bleed air is only supplied from the 9th stage when the valve modulates open if bleed air requirement is greater than the 5th stage alone can supply.",
"correct": true,
"why": ""
},
{
"id": "m6ni5i",
"text": "Bleed air is only supplied from the 5th stage when the valve modulates open if bleed air requirement is greater than the 9th stage alone can supply.",
"correct": false,
"why": ""
},
{
"id": "mljcp",
"text": "----",
"correct": false,
"why": ""
}
],
"explanation": "",
"annexes": [],
"externalIds": []
}
}
},
Expand Down Expand Up @@ -546,47 +598,6 @@
}
}
},
{
"id": "412mv",
"explanation": "",
"learningObjectives": ["B737.02"],
"variants": {
"i8bbqh": {
"id": "i8bbqh",
"type": "simple",
"question": "Which statement is correct:",
"options": [
{
"id": "4ha3ff",
"text": "Bleed air is constantly provided from stage 5 and stage 9 of the compressor.",
"correct": false,
"why": ""
},
{
"id": "bc8lm",
"text": "Bleed air is only supplied from the 9th stage when the valve modulates open if bleed air requirement is greater than the 5th stage alone can supply.",
"correct": true,
"why": ""
},
{
"id": "m6ni5i",
"text": "Bleed air is only supplied from the 5th stage when the valve modulates open if bleed air requirement is greater than the 9th stage alone can supply.",
"correct": false,
"why": ""
},
{
"id": "mljcp",
"text": "----",
"correct": false,
"why": ""
}
],
"explanation": "",
"annexes": [],
"externalIds": []
}
}
},
{
"id": "fym5q",
"explanation": "",
Expand Down
38 changes: 36 additions & 2 deletions libs/content/question-bank-type/questions/B737/737.06.json
Original file line number Diff line number Diff line change
Expand Up @@ -304,7 +304,7 @@
},
{
"id": "kkksb",
"explanation": "",
"explanation": "In–flight, an amber TR UNIT light illuminates if TR1, or TR2 and TR3 has failed.\n\nOn the ground, any TR fault causes the light to illuminate",
"learningObjectives": ["B737.06"],
"variants": {
"f183a": {
Expand Down Expand Up @@ -340,6 +340,40 @@
"explanation": "",
"annexes": [],
"externalIds": []
},
"fg83b": {
"id": "fg83b",
"type": "simple",
"question": "The amber TR UNIT light illuminated while on the ground indicates if?",
"options": [
{
"id": "qkd9u",
"text": "TR1 and TR2 have failed, or TR3 has failed.",
"correct": false,
"why": ""
},
{
"id": "41jw4",
"text": "One TR has failed.",
"correct": true,
"why": ""
},
{
"id": "7gq6w",
"text": "TR1 has failed, or TR2 and TR3 have failed.",
"correct": false,
"why": ""
},
{
"id": "scgr5",
"text": "All three TRs have failed.",
"correct": false,
"why": ""
}
],
"explanation": "",
"annexes": [],
"externalIds": []
}
}
},
Expand Down Expand Up @@ -746,7 +780,7 @@
},
{
"id": "ifs1zk",
"explanation": "",
"explanation": "Generator Drive Disconnect (DISCONNECT) Switches (guarded)\n\nDisconnects IDG if electrical power is available and engine start lever is in IDLE. IDG cannot be reconnected in the air.",
"learningObjectives": ["B737.06"],
"variants": {
"6x6cs": {
Expand Down
58 changes: 55 additions & 3 deletions libs/content/question-bank-type/questions/B737/737.13.json
Original file line number Diff line number Diff line change
Expand Up @@ -582,9 +582,43 @@
},
{
"id": "9jghi",
"explanation": "",
"explanation": "> ## Landing Gear Transfer Unit\n> \n> The purpose of the landing gear transfer unit is to supply the volume of hydraulic\n> fluid needed to raise the landing gear at the normal rate when system A\n> engine–driven pump volume is lost. The system B engine–driven pump supplies\n> the volume of hydraulic fluid needed to operate the landing gear transfer unit\n> when all of the following conditions exist:\n> - airborne\n> - No. 1 engine RPM drops below a limit value\n> - landing gear lever is positioned UP\n> - either main landing gear is not up and locked.",
"learningObjectives": ["B737.13"],
"variants": {
"as0oz": {
"id": "as0oz",
"type": "simple",
"question": "The purpose of the landing gear transfer unit is to:",
"options": [
{
"id": "uafie7",
"text": "Automatically use hydraulic system B for landing gear retraction if hydraulic system A engine driven pump fails and the landing gear lever is positioned up",
"correct": false,
"why": ""
},
{
"id": "9co2f",
"text": "Automatically use hydraulic system B for gear retraction if No 1 engine is lost and the landing gear lever is positioned up",
"correct": true,
"why": ""
},
{
"id": "665xz",
"text": "Allow the use of nose wheel steering in the event of hydraulic system A fails",
"correct": false,
"why": ""
},
{
"id": "obpl2w",
"text": "Allow landing gear retraction if hydraulic system B is lost during takeoff",
"correct": false,
"why": ""
}
],
"explanation": "",
"annexes": [],
"externalIds": []
},
"oubsui": {
"id": "oubsui",
"type": "simple",
Expand Down Expand Up @@ -705,13 +739,31 @@
},
{
"id": "9gdph",
"explanation": "",
"explanation": "The hydraulic system quantity is displayed on the **lower DU** by digital indication from 0 to **106%.**",
"learningObjectives": ["B737.13"],
"variants": {
"m1sd1f": {
"id": "m1sd1f",
"type": "true-or-false",
"question": "The hydraulic system quantity is displayed on the lower DU by digital indication from 0 to 100%.",
"question": "The hydraulic system quantity is displayed on the upper DU by digital indication from 0 to 106%.",
"answer": false,
"explanation": "",
"annexes": [],
"externalIds": []
},
"m1sd1g": {
"id": "m1sd1g",
"type": "true-or-false",
"question": "The hydraulic system quantity is displayed on the lower DU by digital indication from 0 to 106%.",
"answer": true,
"explanation": "",
"annexes": [],
"externalIds": []
},
"m1sdhf": {
"id": "m1sdhf",
"type": "true-or-false",
"question": "The hydraulic system quantity is displayed on the upper DU by digital indication from 0 to 100%.",
"answer": false,
"explanation": "",
"annexes": [],
Expand Down
4 changes: 2 additions & 2 deletions libs/content/question-bank-type/questions/B737/737.14.json
Original file line number Diff line number Diff line change
Expand Up @@ -254,7 +254,7 @@
},
{
"id": "1d0wxi",
"explanation": "",
"explanation": "> **Autobrake – Disarm**\n\n>\n\n> The pilots may disarm the autobrake system by moving the selector switch to the\n\n> OFF position. This action does not cause the AUTO BRAKE DISARM light to\n\n> illuminate. After braking has started, any of the following pilot actions disarm the\n\n> system immediately and illuminate the AUTO BRAKE DISARM light:\n\n> • moving the SPEED BRAKE lever to the down detent\n\n> • advancing the forward thrust lever(s), except during the first 3 seconds after touchdown for landing\n\n> • applying manual brakes.",
"learningObjectives": ["B737.14"],
"variants": {
"thzm2": {
Expand All @@ -266,7 +266,7 @@
"id": "xcdlc",
"text": "Applying manual brakes, Moving Speed Brake lever to DOWN detent or Advancing forward thrust levers immediately after touchdown.",
"correct": false,
"why": ""
"why": "Immediately applying thrust will not cancel autobrake. Only after 3 seconds."
},
{
"id": "5tm1j",
Expand Down
1 change: 1 addition & 0 deletions libs/core/app/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ export * from "./questions/get-question-preview";
export * from "./random/random";
export * from "./tests/create-test";
export * from "./tests/process-test";
export * from "./tests/get-number-of-available-questions";
3 changes: 3 additions & 0 deletions libs/core/app/src/tests/create-test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,12 @@ export type NewTestConfiguration = {
mode: "study" | "exam";
questionBank: QuestionBankName;
subject: string;

numberOfQuestions: number;
learningObjectiveIds: string[];
seed?: string;
title?: string;
sortQuestionsByChapter?: boolean;
};

export const newTestConfigurationSchema: z.ZodType<NewTestConfiguration> =
Expand All @@ -31,6 +33,7 @@ export const newTestConfigurationSchema: z.ZodType<NewTestConfiguration> =
numberOfQuestions: z.number().min(1).max(200),
seed: z.string().optional(),
title: z.string().optional(),
sortQuestionsByChapter: z.boolean().optional(),
});

export const createTest = async ({
Expand Down
26 changes: 26 additions & 0 deletions libs/core/app/src/tests/get-number-of-available-questions.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import type { LearningObjectiveId } from "@chair-flight/base/types";

export const getNumberOfAvailableQuestions = (
subject: {
learningObjectives: Array<{
id: LearningObjectiveId;
numberOfQuestions: number;
learningObjectives: Array<{
id: LearningObjectiveId;
numberOfQuestions: number;
}>;
}>;
},
selectedLearningObjectives: LearningObjectiveId[],
) => {
return subject.learningObjectives.reduce((sum, lo) => {
if (selectedLearningObjectives.includes(lo.id)) {
return sum + lo.numberOfQuestions;
}
lo.learningObjectives.forEach((lo2) => {
if (!selectedLearningObjectives.includes(lo2.id)) return;
sum += lo2.numberOfQuestions;
});
return sum;
}, 0);
};
Loading

1 comment on commit b23ecb9

@vercel
Copy link

@vercel vercel bot commented on b23ecb9 Jan 24, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.