1
1
import {
2
2
AnswerChoice ,
3
3
MultipleChoiceQuizQuestion ,
4
- MultipleQuestionnaireProvider ,
5
4
QuizQuestion ,
5
+ QuizQuestionProvider ,
6
6
} from 'codedifferently-instructional' ;
7
7
8
- export class ChanelHuttQuiz implements MultipleQuestionnaireProvider {
8
+ export class ChanelHuttQuiz implements QuizQuestionProvider {
9
9
getProviderName ( ) : string {
10
- return 'multiplequestionnaire ' ;
10
+ return 'chanelhutt ' ;
11
11
}
12
12
13
13
makeQuizQuestions ( ) : QuizQuestion [ ] {
14
- return [ ChanelHuttQuiz . makeQuestion0 ( ) , ChanelHuttQuiz . makeQuestion1 ( ) ] ;
14
+ return [ ChanelHuttQuiz . makeQuestion0 ( ) , ChanelHuttQuiz . makeQuestion1 ( ) , ChanelHuttQuiz . makeQuestion2 ( ) , ] ;
15
15
}
16
16
17
- private static makeQuestion0 ( ) : MultipleQuestionnaire {
17
+ private static makeQuestion0 ( ) : QuizQuestion {
18
18
return new MultipleChoiceQuizQuestion (
19
19
0 ,
20
20
'Which one is not a purpose for git commit?' ,
21
21
new Map < AnswerChoice , string > ( [
22
22
[ AnswerChoice . A , 'To save changes to your local repository' ] ,
23
- [ AnswerChoice . B , 'To provide a clear, descriptive message for the changes made' ] ,
24
23
[
25
- AnswerChoice . C ,
26
- 'To clear the terminal and re-type the command ' ,
24
+ AnswerChoice . B ,
25
+ 'To provide a clear, descriptive message for the changes made ' ,
27
26
] ,
27
+ [ AnswerChoice . C , 'To clear the terminal and re-type the command' ] ,
28
28
[ AnswerChoice . D , 'Keeps track of changes made to your code' ] ,
29
29
] ) ,
30
30
AnswerChoice . UNANSWERED ,
31
31
) ; // Replace `UNANSWERED` with the correct answer.
32
32
}
33
33
34
- private static makeQuestion1 ( ) : MultipleQuestionnaire {
34
+ private static makeQuestion1 ( ) : QuizQuestion {
35
35
return new MultipleChoiceQuizQuestion (
36
36
1 ,
37
37
'Which answer best fits the command git push?' ,
@@ -41,27 +41,21 @@ export class ChanelHuttQuiz implements MultipleQuestionnaireProvider {
41
41
AnswerChoice . B ,
42
42
'To transfer files from the local repository to remote repository hosting services' ,
43
43
] ,
44
- [
45
- AnswerChoice . C ,
46
- 'To add comments to the code' ,
47
- ] ,
44
+ [ AnswerChoice . C , 'To add comments to the code' ] ,
48
45
[ AnswerChoice . D , 'To merge several branches into one branch' ] ,
49
46
] ) ,
50
47
AnswerChoice . UNANSWERED ,
51
48
) ; // Replace `UNANSWERED` with the correct answer.
52
49
}
53
50
54
- private static makeQuestion2 ( ) : MultipleQuestionnaire {
51
+ private static makeQuestion2 ( ) : QuizQuestion {
55
52
return new MultipleChoiceQuizQuestion (
56
53
2 ,
57
- 'Which command is used to update the your local repository with changes from your remote repository?' ,
54
+ 'Which command is used to update the yourlocal repository with changes from your remote repository?' ,
58
55
new Map < AnswerChoice , string > ( [
59
56
[ AnswerChoice . A , 'git fetch upstream' ] ,
60
57
[ AnswerChoice . B , 'git pull' ] ,
61
- [
62
- AnswerChoice . C ,
63
- 'git commit' ,
64
- ] ,
58
+ [ AnswerChoice . C , 'git commit' ] ,
65
59
[ AnswerChoice . D , 'git checkout main' ] ,
66
60
] ) ,
67
61
AnswerChoice . UNANSWERED ,
0 commit comments