Skip to content

Commit c565a4f

Browse files
AmiyahJoAmiyahJo
andauthored
feat: adds Amiyah Jones custom quiz (#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]>
1 parent aa38a08 commit c565a4f

File tree

3 files changed

+70
-1
lines changed

3 files changed

+70
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,7 @@ quiz:
2222
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
2323
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
2424
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
25+
amiyahjones:
26+
- $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw.
27+
- $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq
28+
- $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class AmiyahJonesQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'amiyahjones';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
AmiyahJonesQuiz.makeQuestion0(),
16+
AmiyahJonesQuiz.makeQuestion1(),
17+
AmiyahJonesQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What two computer parts get mixed up often?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Power supply and mother board'],
27+
[AnswerChoice.B, 'Graphics card and ram'],
28+
[AnswerChoice.C, 'Ram and hard drive'],
29+
[AnswerChoice.D, 'None of them get mixed up'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'Which computer part figures out how everything is supposed to look on your screen?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'Graphics card'],
41+
[AnswerChoice.B, 'CPU'],
42+
[AnswerChoice.C, 'Mother board'],
43+
[AnswerChoice.D, 'Ram'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'Which computer part houses everything?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'Hard drive'],
55+
[AnswerChoice.B, 'Case'],
56+
[AnswerChoice.C, 'CPU'],
57+
[AnswerChoice.D, 'Power supply'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

lesson_03/quiz/src/quizzes/quizzes.module.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
55
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
66
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
77
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
8+
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';
89

910
export const Quizzes = Symbol.for('Quizzes');
1011

@@ -16,7 +17,9 @@ const QUIZ_PROVIDERS = [
1617
AnotherQuiz,
1718
JosephCaballeroQuiz,
1819
OyeyemiJimohQuiz,
19-
ChigazoGrahamsQuiz];
20+
ChigazoGrahamsQuiz,
21+
AmiyahJonesQuiz
22+
];
2023

2124
@Module({
2225
providers: [

0 commit comments

Comments
 (0)