Skip to content

Commit 314cbaa

Browse files
feat: adds quiz for Hummad (#129)
* Created new branch * Hummad lesson 3 questions * changed my answers to "unanswered" * adding missing comma * Created new branch * Hummad lesson 3 questions * changed my answers to "unanswered" * delete duplicates * deleted duplicate name in yaml * deleted duplicate * fix: syntax error --------- Co-authored-by: htanweer244 <[email protected]>
1 parent ddcf9f2 commit 314cbaa

File tree

3 files changed

+69
-1
lines changed

3 files changed

+69
-1
lines changed

lesson_03/quiz/quiz.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -68,7 +68,11 @@ quiz:
6868
- $2y$10$dkWnar/ZXMr9ndtRDcbTbe/HN3DhuULPoZhTx/xATi.UYQ0DUIx1W
6969
- $2y$10$.Cw9Sjf6Pf9K8EsThegQ5e8BMoJdLl40CCuJ2FKHLar1k8hVfR9fu
7070
- $2y$10$.pmOuTs0Oqjfhn9mMIQCQu7Fbe1ZOZmZIbTGqqul.hnVLqIV6bn/W
71+
hummadtanweer:
72+
- $2y$10$r.JmLYmaAWLZPwv6LLFWB.W823BWj7CsDaPdi5hxv4ExQyCjDq.l.
73+
- $2y$10$DcSjwFSOP.120fEp1zJgEe9J3qZiWPa0i/ofYQS6p3sG93jwCi3ci
74+
- $2y$10$O0Xy3FSVwWM3Tqeh3dP.tuv6E3OHN10siHbgJ4.iPIaZLJ1kVheC6
7175
pablolimonparedes:
7276
- $2y$10$Oj.VjaxLuCk3H3XGRLH99.y5LnVkVqEAS30eopxFsNfL6FQ0RRdbC
7377
- $2y$10$cs9lhS.nLe6Ym1nkgvr89Oa6Se5DafERs6MJm0t6plQ76zGlTj9JC
74-
- $2y$10$ftCSIQi1kpbWf9CYsrmjCe1H/i/NWzqTX3Jfuqi0TAPcqoCdxrk3O
78+
- $2y$10$ftCSIQi1kpbWf9CYsrmjCe1H/i/NWzqTX3Jfuqi0TAPcqoCdxrk3O
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
import {
2+
AnswerChoice,
3+
MultipleChoiceQuizQuestion,
4+
QuizQuestion,
5+
QuizQuestionProvider,
6+
} from 'codedifferently-instructional';
7+
8+
export class HummadTanweerQuiz implements QuizQuestionProvider {
9+
getProviderName(): string {
10+
return 'hummadtanweer';
11+
}
12+
13+
makeQuizQuestions(): QuizQuestion[] {
14+
return [
15+
HummadTanweerQuiz.makeQuestion0(),
16+
HummadTanweerQuiz.makeQuestion1(),
17+
HummadTanweerQuiz.makeQuestion2(),
18+
];
19+
}
20+
21+
private static makeQuestion0(): QuizQuestion {
22+
return new MultipleChoiceQuizQuestion(
23+
0,
24+
'Who is attributed with inventing GIT?',
25+
new Map<AnswerChoice, string>([
26+
[AnswerChoice.A, 'Linus Torvalds'],
27+
[AnswerChoice.B, 'James Gosling'],
28+
[AnswerChoice.C, 'Koska Kawaguchi'],
29+
[AnswerChoice.D, 'Junio C. Hamano'],
30+
]),
31+
AnswerChoice.UNANSWERED,
32+
); // Replace `UNANSWERED` with the correct answer.
33+
}
34+
35+
private static makeQuestion1(): QuizQuestion {
36+
return new MultipleChoiceQuizQuestion(
37+
1,
38+
'What is the opposite of a GIT clone?',
39+
new Map<AnswerChoice, string>([
40+
[AnswerChoice.A, 'GIT add'],
41+
[AnswerChoice.B, 'GIT push'],
42+
[AnswerChoice.C, 'GIT upload'],
43+
[AnswerChoice.D, 'GIT status'],
44+
]),
45+
AnswerChoice.UNANSWERED,
46+
); // Replace `UNANSWERED` with the correct answer.
47+
}
48+
49+
private static makeQuestion2(): QuizQuestion {
50+
return new MultipleChoiceQuizQuestion(
51+
2,
52+
'How do you check the state of your local git repository since your last commit?',
53+
new Map<AnswerChoice, string>([
54+
[AnswerChoice.A, 'GIT diff'],
55+
[AnswerChoice.B, 'GIT commit'],
56+
[AnswerChoice.C, 'GIT status'],
57+
[AnswerChoice.D, 'GIT check'],
58+
]),
59+
AnswerChoice.UNANSWERED,
60+
); // Replace `UNANSWERED` with the correct answer.
61+
}
62+
}

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ import { AnthonyMaysQuiz } from './anthony_mays_quiz.js';
66
import { ChelseaOgbonniaQuiz } from './chelsea_ogbonnia_quiz.js';
77
import { ChigazoGrahamsQuiz } from './chigazo_graham_quiz.js';
88
import { DasiaEnglishQuiz } from './dasia_english_quiz.js';
9+
import { HummadTanweerQuiz } from './hummad_tanweer_quiz.js';
910
import { JamesCapparellQuiz } from './james_capparell_quiz.js';
1011
import { JosephCaballeroQuiz } from './joseph_caballero_quiz.js';
1112
import { KimberleeHaldaneQuiz } from './kimberlee_haldane_quiz.js';
@@ -39,6 +40,7 @@ const QUIZ_PROVIDERS = [
3940
ZionBuchananQuiz,
4041
ChelseaOgbonniaQuiz,
4142
TommyTranQuiz,
43+
HummadTanweerQuiz,
4244
PabloLimonParedesQuiz,
4345
];
4446

0 commit comments

Comments
 (0)