Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
5 changes: 5 additions & 0 deletions lesson_03/quiz/quiz.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,11 @@ quiz:
anotherone:
- $2y$10$8eHSzy3aCu4Ry3LzO9nWCeGpofSxsNVbnF.wCfn3ZADwQ6MEtN/KK
- $2y$10$dGB0CGv7.XQC5OqfyY6iXOiJsdVyxU3ve5YE0gt4m2I8P8H13lNXa
trinitiejackson:
- $2y$10$rAjBDhSg9FX0aHDGy4cSlO76bdyy9p5P6ibEOO.AHbxPhUJ9xCcu.
- $2y$10$0nfjyM6HZyKq6To4sQ/Uvuv37qt0l6sI1hrS7EW3orVhzTwTZLLuq
- $2y$10$vtxCd52gGV0lAjsP0Ox3DexP2nNKZfaClM66aRU9f1FosxjZUMkUW
- $2y$10$5aphEGmaoeTKA0ojlYYYCuw8Wx9UTDAG3pVHNHYPMSwNqONcFKh/W
tyranrices:
- $2y$10$INlO9x6lp5oQ/tAeAwfh6e3rqn3n0sLsZNTDdZQAA16Z8QCvlfhYy
- $2y$10$80z8O5yb/IFhHAc0zsJ/J.dwj/mOex0kXvPxIsSEyIh4d8EA/UyJ2
Expand Down
10 changes: 9 additions & 1 deletion lesson_03/quiz/src/quizzes/quizzes.module.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,21 @@
import { Module } from '@nestjs/common';
import { AnotherQuiz } from './another_quiz.js';
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
import { TrinitieJacksonQuiz } from './trinitie_jackson_quiz.js';
import { TyranRicesQuiz } from './tyran_rices_quiz.js';
import { BrooklynHardenQuiz } from './brooklyn_harden_quiz.js';
export const Quizzes = Symbol.for('Quizzes');

// Add your quiz provider here.

const QUIZ_PROVIDERS = [AnthonyMaysQuiz, AnotherQuiz, TyranRicesQuiz, BrooklynHardenQuiz];
const QUIZ_PROVIDERS = [
AnthonyMaysQuiz,
TrinitieJacksonQuiz,
BrooklynHardenQuiz,
TyranRicesQuiz,
AnotherQuiz,

];

@Module({
providers: [
Expand Down
77 changes: 77 additions & 0 deletions lesson_03/quiz/src/quizzes/trinitie_jackson_quiz.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
import {
AnswerChoice,
MultipleChoiceQuizQuestion,
QuizQuestion,
QuizQuestionProvider,
} from 'codedifferently-instructional';

export class TrinitieJacksonQuiz implements QuizQuestionProvider {
getProviderName(): string {
return 'trinitiejackson';
}

makeQuizQuestions(): QuizQuestion[] {
return [
TrinitieJacksonQuiz.makeQuestion0(),
TrinitieJacksonQuiz.makeQuestion1(),
TrinitieJacksonQuiz.makeQuestion2(),
TrinitieJacksonQuiz.makeQuestion3(),
];
}

private static makeQuestion0(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
0,
'Where was the term "fork" coined from?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'GitHub'],
[AnswerChoice.B, 'Eclipse'],
[AnswerChoice.C, 'XCode'],
[AnswerChoice.D, 'NetBeans'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion1(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
1,
'In the desk analogy, what is the CPU?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'motherboard'],
[AnswerChoice.B, 'power supply'],
[AnswerChoice.C, 'software'],
[AnswerChoice.D, 'calculator'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion2(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
2,
'What does the "cat" command do in a terminal?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'copy a file or directory'],
[AnswerChoice.B, 'dumps contents of a file'],
[AnswerChoice.C, 'run any command'],
[AnswerChoice.D, 'view the last several lines of a file'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}

private static makeQuestion3(): QuizQuestion {
return new MultipleChoiceQuizQuestion(
3,
'Which is NOT a void element in HTML?',
new Map<AnswerChoice, string>([
[AnswerChoice.A, 'img'],
[AnswerChoice.B, 'input'],
[AnswerChoice.C, 'br'],
[AnswerChoice.D, 'p'],
]),
AnswerChoice.UNANSWERED,
); // Replace `UNANSWERED` with the correct answer.
}
}