You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: DEVELOPING_TUTORIALS.md
+30-16Lines changed: 30 additions & 16 deletions
Original file line number
Diff line number
Diff line change
@@ -79,7 +79,7 @@ There are four lesson formats available, which you may mix and match within your
79
79
80
80
To build any of these lesson types, you'll need to use Markdown, a fairly simple way to style text on the web. [Learn more about Markdown formatting here.](https://guides.github.com/features/mastering-markdown/)
81
81
82
-
To create text-based or multiple-choice lessons, no prior coding knowledge is required. Our text-only lessons are written exclusively in Markdown, and you'll only need to do some simple text replacements in our JavaScript boilerplate to set up questions and answers for multiple-choice quizzes.
82
+
To create text-based or multiple-choice lessons, no prior coding knowledge is required, as the content of these lessons is written in Markdown. To create the question and answer choices for a multiple-choice quiz, you can either use the ProtoWizard or make some text edits to the provided JavaScript template.
83
83
84
84
However, if you want to create code challenges (with or without file upload), you'll need to use JavaScript extensively to set up your default and solution code and validation. JavaScript is a scripting language for building interactive web pages, and you should have a solid understanding of JavaScript before building a code challenge for ProtoSchool.
85
85
@@ -124,7 +124,7 @@ $ npm install
124
124
5. Run the dev server locally:
125
125
126
126
```sh
127
-
$ npm run serve
127
+
$ npm start
128
128
```
129
129
130
130
6. Open a web browser to the following address to preview your work: http://localhost:3000
@@ -140,7 +140,7 @@ We've included instructions in this guide for doing all of this manually (in cas
140
140
141
141
#### Using the ProtoWizard CLI (recommended)
142
142
143
-
The ProtoWizard is a CLI (Command-Line Interface) that makes it easy to create the starter files and metadata needed for a new tutorial. You can build your full tutorial at once, creating your tutorial metadata (URL, description, etc.), lesson files, and resources in one go. Alternatively, you can create your tutorial framework and then come back to add lessons and resources as you're ready.
143
+
The ProtoWizard is a CLI (Command-Line Interface) that makes it easy to create the starter files and metadata needed for a new tutorial. You can build your full tutorial at once, creating your tutorial metadata (URL, description, etc.), lesson files, and resources in one go. Alternatively, you can create your tutorial framework and then come back to add lessons and resources as you're ready. You can even summon the ProtoWizard to build the quizzes for your multiple-choice lessons.
144
144
145
145
It's easy to use the ProtoWizard even if you're not familiar with the command line. It will ask you a few questions and let you type your answers or select options using arrow keys. Based on your answers, the ProtoWizard will build the directory, files, and metadata you'll need to create your tutorial.
146
146
@@ -157,12 +157,12 @@ First, install the wizard:
157
157
$ npm run install-protowizard
158
158
```
159
159
160
-
Once the wizard is installed, you'll be able to launch it repeatedly with the shortcut command:
160
+
Once the wizard is installed, you'll be able to summon it repeatedly with the shortcut command:
161
161
```sh
162
162
$ protowizard
163
163
```
164
164
165
-
If you choose not to install it, you'll need to use this longer command to run the ProtoWizard:
165
+
If you choose not to install it, you'll need to use this longer command to summon the ProtoWizard:
166
166
```sh
167
167
$ npm run scripts:wizard
168
168
```
@@ -176,7 +176,7 @@ When you run either of the commands above to start the CLI, our friendly little
176
176
177
177

178
178
179
-
If you're creating a new tutorial from scratch, you'll need to create a tutorial before adding lessons or resources to it. You can either add your lessons and resources immediately after creating the tutorial or exit the ProtoWizard and run it again later to create those items.
179
+
If you're creating a new tutorial from scratch, you'll need to create a tutorial before adding lessons or resources to it. You can either add your lessons and resources immediately after creating the tutorial or exit the ProtoWizard and run it again later to create those items. To create a multiple-choice quiz, you'll need to have first created your tutorial and lesson files.
180
180
181
181
By keeping your server running, you can preview your new tutorial in a web browser while using the ProtoWizard to add content.
182
182
@@ -190,16 +190,22 @@ While the ProtoWizard only supports the initial creation of this data, you can e
190
190
191
191
Tell the ProtoWizard the name of your lesson and its type (text-only, multiple-choice, coding challenge with or without file upload) and it will create all the starter files you need inside your tutorial's directory. ([Learn more about the files required for each lesson type.](#create-lesson-files)) The ProtoWizard will provide you with the names of the files it's created so you'll know where to go to make your edits.
192
192
193
-
If you have a solid outline, you can create these files all at once before editing them to create your content. Alternatively, you can set up just the files for your first lesson, build out that content to get familiar with the process, and return to the ProtoWizard later to create your next set of files. It's up to you.
193
+
If you have a solid outline, you can create these files all at once before editing them to create your content. Alternatively, you can set up just the files for your first lesson, build out that content to get familiar with the process, and summon the ProtoWizard again later to create your next set of files. It's up to you.
194
194
195
195
This guide includes detailed instructions on how to work within those files to [create your lesson content](#create-your-lesson-content) when you're ready.
196
196
197
197
**Resources**
198
198
199
-
Each ProtoSchool tutorial ends with a resources page where you can share suggestions of other learning materials relevant to your learners. The ProtoWizard will ask you a few quick questions about each resource in order to add the necessary details your tutorial's metadata. You can add all of your entries in the ProtoWizard at once or come back to it as you think of more resources.
199
+
Each ProtoSchool tutorial ends with a resources page where you can share suggestions of other learning materials relevant to your learners. The ProtoWizard will ask you a few quick questions about each resource in order to add the necessary details your tutorial's metadata. You can add all of your entries at once or come summon the ProtoWizard repeatedly as you think of more resources.
200
200
201
201
If you'd like to make edits to the resources you've created through the ProtoWizard, you can edit the details later in `src/static/tutorials.json`. [Learn how to create or edit resources manually.](#manage-your-tutorials-metadata)
202
202
203
+
**Multiple-choice quizzes**
204
+
205
+
Each multiple-choice lesson ends with a quiz to reinforce the lesson content. With the help of the ProtoWizard, you'll draft the question the learner needs to answer, then provide answer choices and feedback positive or negative feedback to display when each option is selected.
206
+
207
+
The ProtoWizard will provide you with a link to the updated quiz file so you can make further edits as needed, or you can summon the ProtoWizard again to start from scratch and overwrite the quiz content. [Learn how to create or edit quizzes manually.](#create-multiple-choice-quizzes-skip-for-coding-challenges-and-text-only-lessons)
208
+
203
209
#### Manually
204
210
205
211
This section describes how to build the directory, lesson files, and metadata for your tutorial manually if you've chosen not to use the recommended ProtoWizard. If you've used the [ProtoWizard](#using-the-protowizard-cli-recommended) to create your tutorial, lesson files, and resources, please skip to [Create Your Lesson Content](#create-your-lesson-content).
@@ -432,7 +438,15 @@ Then in your lesson Markdown file, you can either add the image with regular Mar
432
438
433
439
#### Create multiple-choice quizzes (skip for coding challenges and text-only lessons)
434
440
435
-
When creating a multiple-choice lesson, you'll use your JavaScript (eg `01.js`) file to define the question and its answer choices.
441
+
We recommend that you [use the ProtoWizard to create your multiple-choice quizzes](#using-the-protowizard-cli-recommended).
442
+
443
+
However, you may instead choose to edit your JavaScript (eg `01.js`) file directly to define the question and its answer choices, as described below.
444
+
445
+
When editing manually, please be sure to remove the following line of code:
446
+
```
447
+
// #PRISTINE# This file was auto-generated. Please remove this line when updating the file manually.
448
+
```
449
+
This will allow the ProtoWizard to identify the file as having been edited, so that it can warn you if you later ask to overwrite existing content.
436
450
437
451
The `question` value must be a string:
438
452
@@ -448,26 +462,26 @@ const question = "What's the meaning of life, the universe, and everything?"
448
462
```js
449
463
constchoices= [
450
464
{
451
-
answer:'An incorrect answer',
465
+
answer:"An incorrect answer",
452
466
correct:false,
453
-
feedback:'Oops. Here\'s some clue about why that answer is wrong.'
467
+
feedback:"Oops. Here's some clue about why that answer is wrong."
454
468
},
455
469
{
456
-
answer:'A correct answer.',
470
+
answer:"A correct answer.",
457
471
correct:true,
458
-
feedback:'Great job!'
472
+
feedback:"Great job!"
459
473
},
460
474
{
461
-
answer:'A different incorrect answer',
475
+
answer:"A different incorrect answer",
462
476
correct:false,
463
-
feedback:'Sorry, here\'s some clue about why this choice is wrong.'
477
+
feedback:"Sorry, here's some clue about why this choice is wrong."
464
478
}
465
479
]
466
480
```
467
481
468
482
Please provide 3-5 answer choices per question. **You may only provide _one_ correct choice.**
469
483
470
-
The answer choices will be presented in the order in which you list them. Be sure to vary the position of the correct answer from lesson to lesson.
484
+
If you create the quiz manually, the answer choices will be presented in the order in which you list them. Be sure to vary the position of the correct answer from lesson to lesson. (When using the ProtoWizard, your choices will be shuffled automatically.)
471
485
472
486
The `feedback` provided for each choice will be shown highlighted in red if incorrect or in green if correct, and the user will be able to advance to next lesson once they've made the right selection.
View the site on localhost at: http://localhost:3000
42
42
43
43
## Testing without affecting site analytics in Countly
44
44
45
-
Only actions taken at the https://proto.school domain affect our main ProtoSchool analytics in Countly.
45
+
Only actions taken at the https://proto.school domain affect our main ProtoSchool analytics in Countly.
46
46
47
-
You can safely experiment with any of the following to send stats to our TEST ProtoSchool dashboard in Countly instead:
47
+
You can safely experiment with any of the following to send stats to our TEST ProtoSchool dashboard in Countly instead:
48
48
- served locally: http://localhost:3000
49
49
- live site accessed directly through Fleek: https://protoschool.on.fleek.co/
50
50
- preview for a specific PR via link found in PR testing section (e.g. https://bafybeihebd2p64xghtqjuewonkfm4l5n2lkvrllviz7nb33qtyir5q5fau.on.fleek.co/)
51
51
52
+
## Testing suites
53
+
54
+
We use Cypress and Jest for testing. Please check the documentation [here](scripts/README.md) for further details.
55
+
52
56
## Managing remote data
53
57
54
58
Some data, such as the events list, is pulled at build-time from remote sources using Node.js scripts. Please check the documentation [here](scripts/README.md) for further details.
0 commit comments