Skip to content

Commit aa0e117

Browse files
committed
0 parents  commit aa0e117

File tree

274 files changed

+33268
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

274 files changed

+33268
-0
lines changed

README.md

Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
## README
2+
3+
## Quiz
4+
### 1. Introduction
5+
This part of the experiment is specifically for assessment purposes. This allows for the creation of a quiz with multiple choice single answer questions.
6+
These can be
7+
* Pretest - Pre requisite quizzes
8+
* Posttest - Testing the learning
9+
* Learning Unit Quizzes - Quizzes to test the section's learning.
10+
The format for the same is discussed below.
11+
12+
### 2. Target Audience
13+
This guide is meant for anyone creating a virtual lab and wanting to have a quiz section.
14+
15+
### 3. Structure of quiz
16+
The data for the quiz needs to be added to a json file pertaining the following specifications.
17+
1. The quiz needs to have an array of objects, each object representing a question. As shown below
18+
```
19+
"questions" : [
20+
{
21+
"question" : "What is 1+2 ?",
22+
"answers" :
23+
{
24+
"a" : 1,
25+
"b" : 2,
26+
"c" : 3,
27+
"d" : 4
28+
},
29+
"correctAnswer" : c
30+
}
31+
]
32+
```
33+
### 4. Quiz V2.0 (Enhancements done)
34+
The new format of quiz has multiple new additions. The details for which have been described below.
35+
The format of json would be as linked [here](./pretest.json)
36+
37+
First we will look at the additional fields added
38+
39+
### 4.1 Fields
40+
* Mandatory Fields
41+
* [version](#42-version) - Without which the enhanced quiz will not be rendered.
42+
* [levels](#44-levels) - Adds difficulty level to each question (Allows for filtering)
43+
44+
* Optional Fields
45+
* [explanations](#43-explanations) - Adds an explanation to each answer. If wrong answer is choosen, only it's explanation pops up. If correct answer is choosen, all available explanations pop up.
46+
47+
### 4.2 Version
48+
The very first field is absolutely necessary. This ensures that the quiz supports the new features.
49+
```
50+
"version": 2.0
51+
```
52+
53+
### 4.3 Explanations
54+
Just like we mention answers, we can have a section for explanation so that they show up after an answer is marked. This is optional and can completely be left out. The three ways of defining (Assuming there are 4 answers a, b, c, d):
55+
56+
1. All answers have explanations
57+
```
58+
"explanations": {
59+
"a" : "Explanation 1,
60+
"b" : "Explanation 2"
61+
"c" : "Explanation 3"
62+
"d" : "Explanation 4"
63+
},
64+
```
65+
2. Some answers have explanations
66+
```
67+
"explanations": {
68+
"a" : "Explanation 1,
69+
"d" : "Explanation 4"
70+
},
71+
```
72+
73+
3. No answers have explanations
74+
```
75+
/* Can be excluded from json */
76+
```
77+
78+
79+
### 4.4 Levels
80+
Adds an ability to filter questions based on difficulty levels. This is mandatory and has to be mentioned for each question.
81+
The three available difficulty levels are:
82+
```
83+
['beginner', 'intermediate', 'advanced']
84+
```
85+
Using any other will not work. The format for the same:
86+
```
87+
"difficulty" : "beginner"
88+
```
89+
90+
### 5. Tips
91+
1. An extra functionality of explanation is the ability to add an Rich Text (HTML Formatted). It will work just like in html.
92+
This could be used for
93+
a. Adding hyper links
94+
b. Formatting text etc.
95+
```
96+
"explanations": {
97+
"a" : "Explanation 1 <a href='www.google.com'>here</a>",
98+
"b" : "Explanation 2"
99+
},
100+
```
101+
> This can be done in either of explanation, answer and the question.
102+
An example for the same can be found here: source | website
103+
104+
2. Multi Correct
105+
To mimic the functionality of multi correct questions, one can add options as part of the question itself, and the actual answer options can be like :
106+
```
107+
"answers" :
108+
{
109+
"a" : "both i and ii",
110+
"b" : "All i, ii, iii, iv",
111+
"c" : "Only i",
112+
"d" : "None of the above"
113+
}
114+
```
115+
An example for the same can be found here: source | website
116+
117+
### 6. Manual Validation of Quiz Json (wrt version 2.0)
118+
This is till the automatic validation is set up.
119+
* The first field has to be version with 2 or 2.0 as value.
120+
* The questions needs to be an array of objects containing questions.
121+
* Each question object should hav a question field, answers field, difficulty field and correctAnswer field.
122+
* question : Should be a string
123+
* answer : Should be an object containing options, and each option should be a string.
124+
* difficulty : should be a string and should have values from ["beginner", "intermerdiate", "advanced"]
125+
* correctAnswer : Should be a string and it's value should be present in keys of one of the answer.
126+
* If explanation is present it has to be an object and needs to follow the description of answer object.
127+
128+
### 7. Test Cases
129+
- [x] Using the mentioned quiz format
130+
- [x] Using the old quiz json format
131+
- [ ] Not including the version in json
132+
- [ ] Including incorrect version in json
133+
- [ ] Including correct version but following old format
134+
- [x] Difficulty not mentioned
135+
- [x] Incorrect difficulty level mentioned
136+
- [x] explanation not provided for all options
137+
- [x] explanation empty
138+
- [x] explanation object not defined
139+
- [x] HTML in quuestion (tags like hyper links, bold etc)
140+
- [x] HTML in answer (tags like hyper links, bold etc)
141+
- [x] HTML in explanation (tags like hyper links, bold etc)
142+
- [x] On wrong annswer only wrong answer is colored red
143+
- [x] On correct answer all red color resets
144+
- [x] Combination of filters working properly
145+
- [x] If all questions have same difficulty, filter option should be hidden.
146+
- [x] When questions are answered after filtering, marks should be counted out of filtewred questions, not total.
147+
- [x] On wrong answer only explanation of wrong answer is shown
148+
- [x] On correct answer all available explanations are shown
149+
150+
### 8. TODO
151+
* Add automatic schema validation
152+
* Link to source files implementing the above tips.

aim.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
## The aim of this experiment is to
2+
***
3+
1. understand linear and time invariant (LTI) systems in time domain
4+
5+
2. understand impulse response and step response of LTI sytems
6+
7+
3. study some common LTI systems
8+
9+
4. build desired LTI systems using basic blocks

assesment.log

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
=/pretest.json
2+
{
3+
_: [],
4+
f: [
5+
'/home/runner/work/exp-impulse-and-response-iiith/exp-impulse-and-response-iiith/experiment/pretest.json'
6+
],
7+
files: [
8+
'/home/runner/work/exp-impulse-and-response-iiith/exp-impulse-and-response-iiith/experiment/pretest.json'
9+
],
10+
c: 'assessment',
11+
contentTypes: 'assessment',
12+
'content-types': 'assessment',
13+
'$0': 'validate'
14+
}
15+
Validated true
16+
=/posttest.json
17+
{
18+
_: [],
19+
f: [
20+
'/home/runner/work/exp-impulse-and-response-iiith/exp-impulse-and-response-iiith/experiment/posttest.json'
21+
],
22+
files: [
23+
'/home/runner/work/exp-impulse-and-response-iiith/exp-impulse-and-response-iiith/experiment/posttest.json'
24+
],
25+
c: 'assessment',
26+
contentTypes: 'assessment',
27+
'content-types': 'assessment',
28+
'$0': 'validate'
29+
}
30+
/questions/0/difficulty: Difficulty can only be: beginner, intermediate or advanced
31+
32+
/questions/1/difficulty: Difficulty can only be: beginner, intermediate or advanced
33+
34+
/questions/2/difficulty: Difficulty can only be: beginner, intermediate or advanced
35+
36+
/questions/3/difficulty: Difficulty can only be: beginner, intermediate or advanced
37+
38+
Json Error: must match "then" schema
39+
Json Error: must match "then" schema
40+
Failed while validating /home/runner/work/exp-impulse-and-response-iiith/exp-impulse-and-response-iiith/experiment/posttest.json
41+
Error: Schema is Invalid

assets/css/bootstrap.min.css

Lines changed: 7 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 97 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,97 @@
1+
.slidecontainer {
2+
text-align: center;
3+
}
4+
5+
.slider {
6+
width: 10%;
7+
}
8+
9+
.text-box {
10+
padding: 7px 20px;
11+
margin: 8px 0;
12+
box-sizing: border-box;
13+
width: 14%;
14+
}
15+
16+
.legend { list-style: none; }
17+
.legend li { padding-bottom : 1.5vw; width: 20vw; }
18+
.legend span { border: 0.1vw solid black; float: left; border-radius: 50%;}
19+
.legend .grey { background-color: grey; }
20+
.legend .green { background-color: #a4c652; }
21+
.legend .black { background-color: black; }
22+
23+
.button-input {
24+
border-radius: 50vw;
25+
background-color: #288ec8;
26+
border: none;
27+
color: white;
28+
padding: 1%;
29+
margin-left: 1%;
30+
margin-right: 1%;
31+
padding-bottom: 1%;
32+
padding-top: 1%;
33+
padding-left: 2%;
34+
padding-right: 2%;
35+
}
36+
37+
.button-input:hover {
38+
background-color:gray;
39+
cursor:pointer;
40+
}
41+
42+
.comment-box {
43+
position: relative;
44+
padding: 1vw;
45+
width: 30vw;
46+
text-align: center;
47+
}
48+
49+
.instruction-box {
50+
position: relative;
51+
width: 100%;
52+
transition: width 0.2s ease-out;
53+
border: 0.1vw solid grey;
54+
z-index : 10;
55+
}
56+
57+
.collapsible {
58+
background-color: Transparent;
59+
color: "grey";
60+
cursor: pointer;
61+
width: 100%;
62+
border: none;
63+
text-align: center;
64+
outline: none;
65+
font-weight: bold;
66+
padding-top: 1%;
67+
padding-bottom: 1%;
68+
}
69+
70+
.collapsible::-moz-focus-inner {
71+
border: 0;
72+
}
73+
74+
.active, .collapsible:hover {
75+
background-color: "white";
76+
}
77+
78+
/*The unicode \25BE is for ▾ (Dropdown arrow) */
79+
.collapsible:after {
80+
content: "\25BE";
81+
color: "grey";
82+
font-weight: bold;
83+
float: right;
84+
margin-left: 5px;
85+
}
86+
87+
.active:after {
88+
content: "\25B4";
89+
}
90+
91+
.content {
92+
padding: 0 1.8vw;
93+
max-height: 0;
94+
overflow: hidden;
95+
transition: max-height 0.2s ease-out;
96+
background-color: "white";
97+
}

0 commit comments

Comments
 (0)