Skip to content

Commit

Permalink
feat: adds Amiyah Jones custom quiz (code-differently#108)
Browse files Browse the repository at this point in the history
* 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
AmiyahJo and AmiyahJo authored Oct 1, 2024
1 parent aa38a08 commit c565a4f
Show file tree
Hide file tree
Showing 3 changed files with 70 additions and 1 deletion.
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

0 comments on commit c565a4f

Please sign in to comment.