Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Amiyah Jones, Feature/lesson03 : Brand new branch custom quiz #108

Merged
merged 32 commits into from
Oct 1, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
8cc92d0
Create README.md
AmiyahJo Sep 24, 2024
50b1861
Delete lesson_00/amiyahjones/README.md
AmiyahJo Sep 24, 2024
27d57c0
Merge branch 'code-differently:main' into main
AmiyahJo Sep 25, 2024
fa3c700
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
7c2d053
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
faedd1b
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
19a4187
Merge branch 'code-differently:main' into main
AmiyahJo Sep 26, 2024
7711266
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
9a10c4c
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
3ea50c4
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
d7b772d
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
de46b67
Merge branch 'code-differently:main' into main
AmiyahJo Sep 27, 2024
b891561
Merge branch 'code-differently:main' into main
AmiyahJo Sep 28, 2024
7c9f2db
Merge branch 'code-differently:main' into main
AmiyahJo Sep 30, 2024
ff3ba35
Merge branch 'code-differently:main' into main
AmiyahJo Sep 30, 2024
457feea
Merge branch 'code-differently:main' into main
AmiyahJo Sep 30, 2024
5868f9d
Merge branch 'code-differently:main' into main
AmiyahJo Oct 1, 2024
586d835
Good as new!!
Oct 1, 2024
61e296b
deleted the quiz feature installation in lesson_03 folder. meant to d…
AmiyahJo Oct 1, 2024
a69be37
test runs on fixing my issue
Oct 1, 2024
82e5a1d
resubmitted encrypted answers
Oct 1, 2024
d2c74de
tests run works!!! I'm free
Oct 1, 2024
f62af07
Forgot to put unanswered from my last commit
Oct 1, 2024
28eacd4
Merge branch 'code-differently:main' into main
AmiyahJo Oct 1, 2024
c0652be
Good as new!!
Oct 1, 2024
116c485
deleted the quiz feature installation in lesson_03 folder. meant to d…
AmiyahJo Oct 1, 2024
6883537
test runs on fixing my issue
Oct 1, 2024
6ade587
resubmitted encrypted answers
Oct 1, 2024
e3a4079
tests run works!!! I'm free
Oct 1, 2024
51a4442
Forgot to put unanswered from my last commit
Oct 1, 2024
c408518
Merge branch 'feature/lesson03' of https://github.com/AmiyahJo/code-d…
Oct 1, 2024
67710a0
fixed merge conflict
Oct 1, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ quiz:
- $2y$10$XcsVuO66KZiUiN75NtssdOkKvHKhuBo91JgE/TJEnSrrzbhjxuql.
- $2y$10$9fZs867NHxoPQ/VWMeLyj.us5Kg3SLPcbt9O5ki/FdJ37TbhgFMFC
- $2y$10$GfjcKvtzr6n8553Mdr1RJOOYDfzOudlW.3i8otsH0HiW52CU7tUAW
amiyahjones:
- $2y$10$QsN9VkjWORsKgZRiBT46VOUgc5HVnswKAT4uDbs7JYbTF7DdKbsw.
- $2y$10$sqXEOL0L8o0kRyiAb.2s4u0RlBC2.LmOGDbGWXHj5IfBNwinkv2yq
- $2y$10$HaWueXgrIzd7z8yf39HfVeTjjyr.Kgx0GFBqwCRSzW3zRSreN19yi
62 changes: 62 additions & 0 deletions lesson_03/quiz/src/quizzes/amiyah_jones_quiz.ts
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.
}
}
5 changes: 4 additions & 1 deletion lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
import { YafiahAbdullahQuiz } from './yafiah_abdullah_quiz.js';
import { AmiyahJonesQuiz } from './amiyah_jones_quiz.js';

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

Expand All @@ -16,7 +17,9 @@ const QUIZ_PROVIDERS = [
AnotherQuiz,
JosephCaballeroQuiz,
OyeyemiJimohQuiz,
ChigazoGrahamsQuiz];
ChigazoGrahamsQuiz,
AmiyahJonesQuiz
];

@Module({
providers: [
Expand Down