forked from code-differently/code-differently-24-q4
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: adds Amiyah Jones custom quiz (code-differently#108)
* Create README.md Accidentally removed my work the 1st time by merging * Delete lesson_00/amiyahjones/README.md * Good as new!! * deleted the quiz feature installation in lesson_03 folder. meant to do that in quiz * test runs on fixing my issue * resubmitted encrypted answers * tests run works!!! I'm free * Forgot to put unanswered from my last commit * Good as new!! * deleted the quiz feature installation in lesson_03 folder. meant to do that in quiz * test runs on fixing my issue * resubmitted encrypted answers * tests run works!!! I'm free * Forgot to put unanswered from my last commit * fixed merge conflict --------- Co-authored-by: AmiyahJo <[email protected]>
- Loading branch information
Showing
3 changed files
with
70 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
import { | ||
AnswerChoice, | ||
MultipleChoiceQuizQuestion, | ||
QuizQuestion, | ||
QuizQuestionProvider, | ||
} from 'codedifferently-instructional'; | ||
|
||
export class AmiyahJonesQuiz implements QuizQuestionProvider { | ||
getProviderName(): string { | ||
return 'amiyahjones'; | ||
} | ||
|
||
makeQuizQuestions(): QuizQuestion[] { | ||
return [ | ||
AmiyahJonesQuiz.makeQuestion0(), | ||
AmiyahJonesQuiz.makeQuestion1(), | ||
AmiyahJonesQuiz.makeQuestion2(), | ||
]; | ||
} | ||
|
||
private static makeQuestion0(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
0, | ||
'What two computer parts get mixed up often?', | ||
new Map<AnswerChoice, string>([ | ||
[AnswerChoice.A, 'Power supply and mother board'], | ||
[AnswerChoice.B, 'Graphics card and ram'], | ||
[AnswerChoice.C, 'Ram and hard drive'], | ||
[AnswerChoice.D, 'None of them get mixed up'], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
|
||
private static makeQuestion1(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
1, | ||
'Which computer part figures out how everything is supposed to look on your screen?', | ||
new Map<AnswerChoice, string>([ | ||
[AnswerChoice.A, 'Graphics card'], | ||
[AnswerChoice.B, 'CPU'], | ||
[AnswerChoice.C, 'Mother board'], | ||
[AnswerChoice.D, 'Ram'], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
|
||
private static makeQuestion2(): QuizQuestion { | ||
return new MultipleChoiceQuizQuestion( | ||
2, | ||
'Which computer part houses everything?', | ||
new Map<AnswerChoice, string>([ | ||
[AnswerChoice.A, 'Hard drive'], | ||
[AnswerChoice.B, 'Case'], | ||
[AnswerChoice.C, 'CPU'], | ||
[AnswerChoice.D, 'Power supply'], | ||
]), | ||
AnswerChoice.UNANSWERED, | ||
); // Replace `UNANSWERED` with the correct answer. | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters