Skip to content

Commit db099e8

Browse files
authored
feat: adds Tyrans quiz to the quizzes folder with correct bcrypt hashing (#105)
1 parent 3d65265 commit db099e8

File tree

3 files changed

+57
-2
lines changed

3 files changed

+57
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,11 @@ quiz:
66
anotherone:
77
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
88
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
9+
tyranrices:
10+
- $2y$10$INlO9x6lp5oQ/tAeAwfh6e3rqn3n0sLsZNTDdZQAA16Z8QCvlfhYy
11+
- $2y$10$80z8O5yb/IFhHAc0zsJ/J.dwj/mOex0kXvPxIsSEyIh4d8EA/UyJ2
12+
- $2y$10$yd2QnCgk1ocCb.B03hcW..Qx6dHhg/T6CBd1SBQn8WSVo/CxxbvJe
913
brooklynharden:
1014
- $2y$10$FMRsdjEhIG0anbZOIcVvSOy4e4eFTZGIYYyATChwc.QRMpWuomR5C
1115
- $2y$10$0AQW/94c4pPxp8xIhJUIs.qoLnUuQg/Hwe1vd4975K96EKGEPz.H6
12-
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W
16+
- $2y$10$ibNpd6ZjWh/yRXafaN8R5.vxbBw7KVZ7r4IsFv4Uy3naXqagr2B5W

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4+
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
45
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
56
export const Quizzes = Symbol.for('Quizzes');
67

78
// Add your quiz provider here.
89

9-
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, BrooklynHardenQuiz];
10+
const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, TyranRicesQuiz, BrooklynHardenQuiz];
1011

1112
@Module({
1213
providers: [
Lines changed: 50 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,50 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class TyranRicesQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'tyranrices';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
TyranRicesQuiz.makeQuestion0(),
16+
TyranRicesQuiz.makeQuestion1(),
17+
TyranRicesQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'What keyword do you use for introducing a new feature in comment name conventions?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'chore:'],
27+
[AnswerChoice.B, 'doc:'],
28+
[AnswerChoice.C, 'feat:'],
29+
[AnswerChoice.D, 'fix:'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new QuizQuestion(
37+
1,
38+
'What does GPU stand for?',
39+
'Graphics Processing Unit.',
40+
); // Provide an answer.
41+
}
42+
43+
private static makeQuestion2(): QuizQuestion {
44+
return new QuizQuestion(
45+
2,
46+
'What does PR stand for in the context of software development?',
47+
'Pull Request.',
48+
); // Provide an answer.
49+
}
50+
}

0 commit comments

Comments
 (0)