Skip to content

Commit

Permalink
added multiple choice part
Browse files Browse the repository at this point in the history
  • Loading branch information
hfboyce authored Feb 12, 2020
1 parent 26513a8 commit eb203f6
Showing 1 changed file with 57 additions and 13 deletions.
70 changes: 57 additions & 13 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,9 @@ Ines Montani has created this framework using Gatsby and Reveal.js in the front-
This project is under active development and there are possibilities of changes. If you would like to contribute or point out corrections, please create a new issue addressing your concern, suggestions or contribution.
[![](https://user-images.githubusercontent.com/13643239/56341448-68fe9380-61b5-11e9-816f-5c71ae71b94f.png)](https://course-starter-python.netlify.com)

🔆This symbol will be used in this guide for helpful tips/recomendations and suggestions when building your course.
🛑
⚠️ Testing emoji
🚨
🔆Hot Tips: This symbol will be used in this guide for helpful tips/recomendations and suggestions when building your course.
⚠️ Warning: This symbol will give you preventative tips to avoid debugging or issues that I definitely ran into.


## What To Expect

Expand Down Expand Up @@ -131,7 +130,7 @@ This should a single command to complete this and will install Gatsby globally o
```
npm install -g gatsby-cli
```
***NOTE: you will not need to update your dependencies here.***
***⚠️ Warning: Do not update your dependencies here.***

### Clone or Install the Repository

Expand All @@ -151,7 +150,7 @@ Next, we must install all relevant dependencies by running the following:
npm install
```

***NOTE: you will be prompted to `run "npm audit fix" to fix them`.
***⚠️ Warning: You will be prompted to `run "npm audit fix" to fix them`.
I do not recommend doing this as it will burn your site down.***

The output below will still build your course:
Expand Down Expand Up @@ -475,7 +474,7 @@ You'll also notice we are calling a source file to display our slides. These sli

[Ines explaines](https://github.com/ines/course-starter-python#slides) how your slide mardown document should be structured.

***WARNING: Be wary of trailing spaces 😵😱!! Although ```---``` may appear to be the same as ```--- ``` they are not and any information placed after the latter will break your slides.***
***⚠️ Warning: Be wary of trailing spaces 😵😱!! Although ```---``` may appear to be the same as ```--- ``` they are not and any information placed after the latter will break your slides.***

#### Enbedding Video and Audio

Expand Down Expand Up @@ -504,7 +503,7 @@ _`audio-file-name.mp3` should be living in the `static` folder._

### Multiple choice questions:

In a similar style to slide you will have code that looks like the following
In a similar style to slides you will have code for questions that looks like the following:

```
<exercise id="10" title="Fit or Predict">
Expand All @@ -514,26 +513,71 @@ Insert questions here.
<choice>
<opt text="Solution 1" correct="true">
Great job! Training on training data must be done before predicting on new data.
Great job!
</opt>
<opt text="Solution 2" >
How can the model predict without education first?
Try again! This is incorrect.
</opt>
</choice>
</exercise>
```
- Your question text will live in the `<exercise>`.
- You can then specify the solution options that correspond to this question using `<choice>`.
- Each option will live in `<opt>`. If you want to specify a solution option as correct you can give it an argument `correct="true"` otherwise if it's wrong, no argument is needed. 🔆***You may have multiple right answers in a question***
- Each option will live in `<opt>`. If you want to specify a solution option as correct you can give it an argument `correct="true"` otherwise if it's wrong, no argument is needed. ***🔆You can have multiple right answers in a question***


***⚠️ Warning: You must have padding (empty lines) above and below your question text as well as your answer feedback text as shown above._

#### 🔆You can have several questions in one exercise container

![](img/multi-q-exercise.png)
<font size="1" color="grey"> Source: Hayley Boyce @ UBC MDS from https://mcl-dsci-571-intro-machine-learning.netlify.com/module1 </font>


The key to having several questions in one exercise container is to give `<choice>` an id.
```
exercise id="18" title= "Mutiple questions in one exercise">
Question 1 here.
<choice id="1">
<opt text= "Solution 1" >
Incorrect.
</opt>
<opt text="Solution 2" correct="true">
Great!
</opt>
</choice>
Question 2 here
<choice id="2">
<opt text= "Solution 1" >
Incorrect.
</opt>
_Note: You must have padding (empty lines) above and below your question text as well as your answer feedback text as shown above._
<opt text="Solution 2" correct="true">
If you wish to specify the correct answers
Great!
</opt>
</choice>
</exercise>
```

### Codeblock Exercises:

Expand Down

0 comments on commit eb203f6

Please sign in to comment.