Skip to content

Commit 8cf96e4

Browse files
chore: adds Khyla's custom quiz (code-differently#120)
* Updated Less01 KS * Restored deleted styles and finalized assignment * lesson03quiz * Khayla Saunders fixed classname * feat: add a new quiz question to KhaylaSaundersQuiz * fix: rename KhaylaSaundersQuiz to khaylasaunders in quiz.yaml * fix: update answer choices to UNANSWERED in KhaylaSaundersQuiz * Corrected quiz yaml * feat: removed lesson 01 * chore: removed extra line break. * chore: restore mistakenly deleted files --------- Co-authored-by: Anthony D. Mays <[email protected]>
1 parent d7940e1 commit 8cf96e4

File tree

3 files changed

+81
-2
lines changed

3 files changed

+81
-2
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,10 @@ quiz:
1010
- $2y$10$AD1YHmrZZivus7DoM91UMuErNnpi63ueluFs7DcSQSrZbXwDycAOi
1111
- $2y$10$KvnxAYKh3A151RyOOFtOv.wfImRzZMgbBgKy3gyLd1uUSSjHaN.4u
1212
- $2y$10$qJDpo1X1kFXRD1M6Kpi8WeKg.a8dgzd8RawXX/3RuMqM82biBc6iK
13+
khaylasaunders:
14+
- $2y$10$GLR8QrgP55Rjj5Ljf/JgQuyemzq2HzMysMbk6W.m0OkBSJbVHBdxC
15+
- $2y$10$PnjXjW6fUxWSQyFZzy8gDunAxwzHjSHbILe3QW5TRimFeXIqs6tym
16+
- $2y$10$JbCDPrCLcwYFlOzPdXsQS.l4DYQgjaW3AeGqs4PDYRUbMDszhK.Gq
1317
computerparts:
1418
- $2y$10$7TUXmYaJlWnRZTzYR..CsefgVcOZJMGt7ctxyAf.G3obBBFEAB342
1519
- $2y$10$0ghuTDegle177q8VjCgQ2OhManKjotYXrcDT3SLyUF8KvI152Wd0.
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class KhaylaSaundersQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'khaylasaunders';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
KhaylaSaundersQuiz.makeQuestion0(),
16+
KhaylaSaundersQuiz.makeQuestion1(),
17+
KhaylaSaundersQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'Your team is working on a shared Git repository. Which of the following is not the best practice to follow for smooth collaboration?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Always pull before pushing to avoid conflicts.'],
27+
[
28+
AnswerChoice.B,
29+
'Work directly on the main branch to keep the workflow simple.',
30+
],
31+
[AnswerChoice.C, 'Use branches for separate work streams.'],
32+
[
33+
AnswerChoice.D,
34+
'Use Git stash to temporarily save uncommitted changes. ',
35+
],
36+
]),
37+
AnswerChoice.UNANSWERED,
38+
); // Replace `UNANSWERED` with the correct answer.
39+
}
40+
41+
private static makeQuestion1(): QuizQuestion {
42+
return new MultipleChoiceQuizQuestion(
43+
1,
44+
'When should you use git rebase --skip while resolving conflicts in Git?',
45+
new Map<AnswerChoice, string>([
46+
[
47+
AnswerChoice.A,
48+
' When you want to discard the conflicted commit during a rebase.',
49+
],
50+
[AnswerChoice.B, 'When resolving conflicts during a merge.'],
51+
[
52+
AnswerChoice.C,
53+
'When you want to keep the changes from the conflicted commit.',
54+
],
55+
[AnswerChoice.D, 'When you need to undo the last commit '],
56+
]),
57+
AnswerChoice.UNANSWERED,
58+
); // Replace `UNANSWERED` with the correct answer.
59+
}
60+
private static makeQuestion2(): QuizQuestion {
61+
return new MultipleChoiceQuizQuestion(
62+
2,
63+
'What languge is best to communiate with computers ',
64+
new Map<AnswerChoice, string>([
65+
[AnswerChoice.A, '0s & 1s '],
66+
[AnswerChoice.B, 'JavaScript'],
67+
[AnswerChoice.C, 'Supersets'],
68+
[AnswerChoice.D, 'Git'],
69+
]),
70+
AnswerChoice.UNANSWERED,
71+
); // Replace `UNANSWERED` with the correct answer.
72+
}
73+
}

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,11 @@
11
import { Module } from '@nestjs/common';
22
import { AnotherQuiz } from './another_quiz.js';
33
import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
4-
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
4+
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
55
import { Jbeyquiz } from './jbeyquiz.js';
6+
import { KhaylaSaundersQuiz } from './khayla_quiz.js';
7+
import { MeikoStephensQuiz } from './meiko_stephens_quiz.js';
68
import { MercedesMathewsQuiz } from './mercedes_mathews_quiz.js';
7-
import { DavidAdenaikeQuiz } from './david_adenaike_quiz.js';
89
import { RasheedMillerQuiz } from './rasheed_miller_quiz.js';
910

1011
export const Quizzes = Symbol.for('Quizzes');
@@ -17,6 +18,7 @@ const QUIZ_PROVIDERS = [
1718
MercedesMathewsQuiz,
1819
Jbeyquiz,
1920
DavidAdenaikeQuiz,
21+
KhaylaSaundersQuiz,
2022
RasheedMillerQuiz,
2123
];
2224

0 commit comments

Comments
 (0)