Skip to content

Commit

Permalink
Merge pull request #1 from virtual-labs/dev
Browse files Browse the repository at this point in the history
new upload
  • Loading branch information
jnipun1994 authored Aug 21, 2023
2 parents f58a1ca + 47e30ca commit 08d70a3
Show file tree
Hide file tree
Showing 59 changed files with 19,223 additions and 1,119 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/deployment-script.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- name: Setup node
uses: actions/setup-node@v2
with:
node-version: '16'
node-version: '12'
check-latest: true
- run: |
git clone --depth=1 https://github.com/virtual-labs/ph3-lab-mgmt
Expand Down
33 changes: 33 additions & 0 deletions .github/workflows/labels.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: labels

on:
push:
branches:
- main
paths:
- '.github/labels.yml'
- '.github/workflows/labels.yml'

jobs:
labeler:
runs-on: ubuntu-latest
steps:
-
name: Checkout
uses: actions/checkout@v2
-
name: Run Labeler
uses: crazy-max/ghaction-github-labeler@v3
# The following job will delete the script that creates dev and testing branches
- uses: actions/checkout@v2
- run: |
git config --local user.email "[email protected]"
git config --local user.name "vleadadmin"
git checkout main
git rm -rf .github/workflows/labels.yml
git commit -m "Label script is deleted."
- uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.ORG_OWNER_GITHUB_TOKEN }}
force: true
branch: main
2 changes: 2 additions & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
{
}
661 changes: 0 additions & 661 deletions LICENSE

This file was deleted.

33 changes: 20 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,24 +1,31 @@
## Introduction
## Introduction (Round 0)

<br>

<b>Discipline | <b>Fill your discipline name here
<b>Discipline | <b> Electronics and Communication Engineering
:--|:--|
<b> Lab | <b> Fill your lab name here
<b> Experiment| <b> Fill your experiment name and number here
<b> Lab | <b> Optical Communication
<b> Experiment| <b> 6. Measurement of losses in plastic fiber.

### About the Experiment
<h5> About the Experiment : </h5> <br>

Fill a brief description of this experiment here
Measurement of Propagation or Attenuation Loss in the optical fiber.

<b>Name of Developer | <b> Fill the name of experiment owner here
Objectives:- Measurement of Propagation or Attenuation Loss in the optical fiber.

<b>Name of Developer | <b> Prof. RS Anand
:--|:--|
<b> Institute | <b>
<b> Email id| <b>
<b> Department |
<b> Institute | <b> IIT Roorkee
<b> Email id| <b> [email protected]
<b> Department | Electrical Engineering

### Contributors List
#### Contributors List

SrNo | Name | Faculty or Student | Department| Institute | Email id
:--|:--|:--|:--|:--|:--|
1 | . | . | . | . | .
2 | . | . | . | . | .
1 | Prof. RS Anand | Faculty | Electrical Engineering | IIT Roorkee, Roorkee | [email protected]
2 | Rajeev Kumar | Research Fellow | Electrical Engineering | IIT Roorkee, Roorkee | [email protected]
3 | Nipun Jain | Project Associate | Electrical Engineering | IIT Roorkee, Roorkee | [email protected]
4 | Pragya Daksh | Project Associate | Electrical Engineering | IIT Roorkee, Roorkee | [email protected]

<br>
197 changes: 7 additions & 190 deletions experiment/README.md
Original file line number Diff line number Diff line change
@@ -1,190 +1,7 @@
## README

## Quiz
### 1. Introduction
This part of the experiment is specifically for assessment purposes. This allows for the creation of a quiz with multiple choice single answer questions.
These can be
* Pretest - Pre requisite quizzes
* Posttest - Testing the learning
* Learning Unit Quizzes - Quizzes to test the section's learning.
The format for the same is discussed below.

### 2. Target Audience
This guide is meant for anyone creating a virtual lab and wanting to have a quiz section.

### 3. Structure of quiz
The data for the quiz needs to be added to a json file pertaining the following specifications.
1. The quiz needs to have an array of objects, each object representing a question. As shown below
```
"questions" : [
{
"question" : "What is 1+2 ?",
"answers" :
{
"a" : 1,
"b" : 2,
"c" : 3,
"d" : 4
},
"correctAnswer" : c
}
]
```
### 4. Quiz V2.0 (Enhancements done)
The new format of quiz has multiple new additions. The details for which have been described below.
The format of json would be as linked [here](./pretest.json)

First we will look at the additional fields added

### 4.1 Fields
* Mandatory Fields
* [version](#42-version) - Without which the enhanced quiz will not be rendered.
* [levels](#44-levels) - Adds difficulty level to each question (Allows for filtering)

* Optional Fields
* [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.

### 4.2 Version
The very first field is absolutely necessary. This ensures that the quiz supports the new features.
```
"version": 2.0
```

### 4.3 Explanations
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):

1. All answers have explanations
```
"explanations": {
"a" : "Explanation 1,
"b" : "Explanation 2"
"c" : "Explanation 3"
"d" : "Explanation 4"
},
```
2. Some answers have explanations
```
"explanations": {
"a" : "Explanation 1,
"d" : "Explanation 4"
},
```

3. No answers have explanations
```
/* Can be excluded from json */
```


### 4.4 Levels
Adds an ability to filter questions based on difficulty levels. This is mandatory and has to be mentioned for each question.
The three available difficulty levels are:
```
['beginner', 'intermediate', 'advanced']
```
Using any other will not work. The format for the same:
```
"difficulty" : "beginner"
```

### 5. Tips
1. An extra functionality of explanation is the ability to add an Rich Text (HTML Formatted). It will work just like in html.
This could be used for
a. Adding hyper links
b. Formatting text etc.
```
"explanations": {
"a" : "Explanation 1 <a href='www.google.com'>here</a>",
"b" : "Explanation 2"
},
```
> This can be done in either of explanation, answer and the question.
An example for the same can be found here: source | website

2. Multi Correct
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 :
```
"answers" :
{
"a" : "both i and ii",
"b" : "All i, ii, iii, iv",
"c" : "Only i",
"d" : "None of the above"
}
```
An example for the same can be found here: source | website

3. Image Support
You can add images to both question and answers, there can be multiple cases of the same. The following examples can be followed.
* **Image in question** : Add img tag in question.
```
"questions" : [
{
"question" : "<img src="./images/example.png" alt="question image">",
"answers" :
{
"a" : 1,
"b" : 2,
"c" : 3,
"d" : 4
},
"correctAnswer" : c
}
]
```

* **Image and Text in question** : Add br tag and img tag in question after text.
```
"questions" : [
{
"question" : "This is an example question <br><img src="./images/example.png" alt="question image">",
"answers" :
{
"a" : 1,
"b" : 2,
"c" : 3,
"d" : 4
},
"correctAnswer" : c
}
]
```
> The same two cases apply for answers too.
**Make sure the image aspect ratio remains constant and good to maintain the structure**

### 6. Manual Validation of Quiz Json (wrt version 2.0)
This is till the automatic validation is set up.
* The first field has to be version with 2 or 2.0 as value.
* The questions needs to be an array of objects containing questions.
* Each question object should hav a question field, answers field, difficulty field and correctAnswer field.
* question : Should be a string
* answer : Should be an object containing options, and each option should be a string.
* difficulty : should be a string and should have values from ["beginner", "intermerdiate", "advanced"]
* correctAnswer : Should be a string and it's value should be present in keys of one of the answer.
* If explanation is present it has to be an object and needs to follow the description of answer object.

### 7. Test Cases
- [x] Using the mentioned quiz format
- [x] Using the old quiz json format
- [ ] Not including the version in json
- [ ] Including incorrect version in json
- [ ] Including correct version but following old format
- [x] Difficulty not mentioned
- [x] Incorrect difficulty level mentioned
- [x] explanation not provided for all options
- [x] explanation empty
- [x] explanation object not defined
- [x] HTML in quuestion (tags like hyper links, bold etc)
- [x] HTML in answer (tags like hyper links, bold etc)
- [x] HTML in explanation (tags like hyper links, bold etc)
- [x] On wrong annswer only wrong answer is colored red
- [x] On correct answer all red color resets
- [x] Combination of filters working properly
- [x] If all questions have same difficulty, filter option should be hidden.
- [x] When questions are answered after filtering, marks should be counted out of filtewred questions, not total.
- [x] On wrong answer only explanation of wrong answer is shown
- [x] On correct answer all available explanations are shown

### 8. TODO
* Add automatic schema validation
* Link to source files implementing the above tips.
This folder has
### Aim
### Theory
### Procedure
### Pre Test
### Post Test
### References
3 changes: 2 additions & 1 deletion experiment/aim.md
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
### Aim of the experiment

#### Measurement of Propagation or Attenuation Loss in the optical fiber.
18 changes: 10 additions & 8 deletions experiment/contributors.md
Original file line number Diff line number Diff line change
@@ -1,11 +1,13 @@
EMPTY

<!-- Remove all lines above this line before making changes to the file -->
### Subject Matter Experts
| SNo. | Name | Email | Institute | ID |
### Lab Proposer/Subject Matter Experts
| SNo. | Name | Email | Institute | Position |
| :---: | :---: | :---: | :---: | :---: |
| 1 | name | email | institute | id |
| 1 | Prof. RS Anand | [email protected] | IIT Roorkee | Professor |

### Developers
| SNo. | Name | Email | Institute | ID |
| :---: | :---: | :---: | :---: | :---: |
| 1 | name | email | institute | id |
### Person Associated in the Lab Developement
| SNo. | Name | Email | Institute | Position |
| :--- | :--- | :--- | :--- | :--- |
| 1 | Rajeev Kumar | [email protected] | IIT Roorkee | Senior Research Fellow |
| 2 | Pragya Daksh | [email protected] | IIT Roorkee | Project Associate |
| 3 | Nipun jain | [email protected] | IIT Roorkee | Project Associate |
47 changes: 47 additions & 0 deletions experiment/details.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
{

"details": [
{
"Experiment": "Measurement of Losses in Plastic Fiber.",
"Lab": "Optical Communications Lab",
"Discipline": "Electronics and Communication Engineering",
"Technology": "HTML, JavaScript, CSS"
}
],

"developer": [
{
"Developer": "Prof. RS Anand",
"Institute": "Indian Institute of Technology Roorkee, Roorkee",
"InstituteAcronym": "IITR"
}
],

"contributer": [

{
"Contributer": "Rajeev Kumar",
"Institute": "Indian Institute of Technology Roorkee, Roorkee",
"InstituteAcronym": "IITR"
},

{
"Contributer": "Nipun Jain",
"Institute": "Indian Institute of Technology Roorkee, Roorkee",
"InstituteAcronym": "IITR"
},

{
"Contributer": "Piyush Rawat",
"Institute": "Indian Institute of Technology Roorkee, Roorkee",
"InstituteAcronym": "IITR"
},

{
"Contributer": "Pragya Daksh",
"Institute": "Indian Institute of Technology Roorkee, Roorkee",
"InstituteAcronym": "IITR"
}
]

}
2 changes: 1 addition & 1 deletion experiment/experiment-name.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
## Experiment name
## Measurement of Losses in Plastic Fiber.
1 change: 0 additions & 1 deletion experiment/images/README.md

This file was deleted.

Binary file added experiment/images/b.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 08d70a3

Please sign in to comment.