|
2 | 2 |
|
3 | 3 | author: André Dietrich |
4 | 4 | email: LiaScript@web.de |
5 | | -date: 09/07/2026 |
6 | | -version: 34.0.5 |
| 5 | +date: 09/09/2026 |
| 6 | +version: 35.0.0 |
7 | 7 | language: en |
8 | 8 | narrator: UK English Female |
9 | 9 |
|
@@ -3334,6 +3334,68 @@ and they will be preserved if your document is in version 1 or greater. |
3334 | 3334 |
|
3335 | 3335 | ******************************************************************************** |
3336 | 3336 |
|
| 3337 | + {{2}} |
| 3338 | +<section> |
| 3339 | + |
| 3340 | + --{{2}}-- |
| 3341 | +Since version 2, LiaScript also supports more complex tasks, quizzes, and |
| 3342 | +surveys, by letting you attach an **indented block** to any list-item. This |
| 3343 | +works exactly like a normal Markdown list: simply indent the following lines so |
| 3344 | +that they line up with the text right after the checkbox, and you can add |
| 3345 | +almost anything to it, additional paragraphs, images, code, or even a nested |
| 3346 | +task-list to track finer-grained sub-goals. |
| 3347 | + |
| 3348 | +<!-- class="translate" --> |
| 3349 | +```` markdown |
| 3350 | +**Which topics did you master so far?** |
| 3351 | + |
| 3352 | +- [ ] __Biology__ |
| 3353 | + |
| 3354 | + Photosynthesis, cell division, genetics, ... check this box once you feel |
| 3355 | + confident, no matter how many details you still mix up. |
| 3356 | + |
| 3357 | +- [ ] __Chemistry__ |
| 3358 | + |
| 3359 | + Split into a few sub-goals: |
| 3360 | + |
| 3361 | + - [ ] Balancing equations |
| 3362 | + - [ ] The periodic table |
| 3363 | + - [X] Acids and bases |
| 3364 | + |
| 3365 | +- [X] __Computer Science__ |
| 3366 | + |
| 3367 | + ``` js |
| 3368 | + console.log("Hello, LiaScript!") |
| 3369 | + ``` |
| 3370 | + |
| 3371 | + Already ticked off, since you are reading this in a LiaScript course ;-) |
| 3372 | +```` |
| 3373 | + |
| 3374 | +**Which topics did you master so far?** |
| 3375 | + |
| 3376 | +- [ ] __Biology__ |
| 3377 | + |
| 3378 | + Photosynthesis, cell division, genetics, ... check this box once you feel |
| 3379 | + confident, no matter how many details you still mix up. |
| 3380 | + |
| 3381 | +- [ ] __Chemistry__ |
| 3382 | + |
| 3383 | + Split into a few sub-goals: |
| 3384 | + |
| 3385 | + - [ ] Balancing equations |
| 3386 | + - [ ] The periodic table |
| 3387 | + - [X] Acids and bases |
| 3388 | + |
| 3389 | +- [X] __Computer Science__ |
| 3390 | + |
| 3391 | + ``` js |
| 3392 | + console.log("Hello, LiaScript!") |
| 3393 | + ``` |
| 3394 | + |
| 3395 | + Already ticked off, since you are reading this in a LiaScript course ;-) |
| 3396 | + |
| 3397 | +</section> |
| 3398 | + |
3337 | 3399 | ### Tasks and Scripting |
3338 | 3400 |
|
3339 | 3401 | --{{0}}-- |
@@ -3578,6 +3640,90 @@ With indentation of at least 4 spaces (code): |
3578 | 3640 | [[ ]] **as defined in the first line** ... |
3579 | 3641 | ``` |
3580 | 3642 |
|
| 3643 | +##### 1.1 Multiple-Choice Blocks |
| 3644 | + |
| 3645 | + --{{0}}-- |
| 3646 | +Exactly as with [tasks](#tasks), every option of a multiple-choice quiz can |
| 3647 | +also carry an **indented block**. This comes in handy whenever an option needs |
| 3648 | +more than a single line, for example to let the user compare different |
| 3649 | +snippets of code and decide which of them is written in valid LiaScript syntax. |
| 3650 | + |
| 3651 | +<!-- class="translate" --> |
| 3652 | +```` markdown |
| 3653 | +**Which of the following snippets define a valid multiple-choice quiz?** |
| 3654 | + |
| 3655 | +- [[X]] Using dashes, this is correct syntax |
| 3656 | + |
| 3657 | + ``` markdown |
| 3658 | + - [[X]] Yes |
| 3659 | + - [[ ]] No |
| 3660 | + ``` |
| 3661 | + |
| 3662 | +- [[ ]] Mixing brackets and parentheses |
| 3663 | + |
| 3664 | + ``` markdown |
| 3665 | + - [[X)] Yes |
| 3666 | + - [[ )] No |
| 3667 | + ``` |
| 3668 | + |
| 3669 | +- [[X]] Omitting the dashes and indenting the block as code instead |
| 3670 | + |
| 3671 | + ``` markdown |
| 3672 | + [[X]] Yes |
| 3673 | + [[ ]] No |
| 3674 | + ``` |
| 3675 | + |
| 3676 | +- [[ ]] Forgetting the outer, double brackets |
| 3677 | + |
| 3678 | + ``` markdown |
| 3679 | + - (X) Yes |
| 3680 | + - ( ) No |
| 3681 | + ``` |
| 3682 | +```` |
| 3683 | + |
| 3684 | + --{{1}}-- |
| 3685 | +Each option now consists of a short label, followed by its own indented |
| 3686 | +code-block, exactly the same way as a paragraph or a nested list would be |
| 3687 | +attached to a task. Just keep in mind that the marker `- [[X]] ` is two |
| 3688 | +characters longer than a task's `- [ ] `, so here the block has to be indented |
| 3689 | +by 8 spaces instead of 6, always line it up with the text right after the |
| 3690 | +checkbox. |
| 3691 | + |
| 3692 | + {{1}} |
| 3693 | +******************************************************************************** |
| 3694 | + |
| 3695 | +**Which of the following snippets define a valid multiple-choice quiz?** |
| 3696 | + |
| 3697 | +- [[X]] Using dashes, this is correct syntax |
| 3698 | + |
| 3699 | + ``` markdown |
| 3700 | + - [[X]] Yes |
| 3701 | + - [[ ]] No |
| 3702 | + ``` |
| 3703 | + |
| 3704 | +- [[ ]] Mixing brackets and parentheses |
| 3705 | + |
| 3706 | + ``` markdown |
| 3707 | + - [[X)] Yes |
| 3708 | + - [[ )] No |
| 3709 | + ``` |
| 3710 | + |
| 3711 | +- [[X]] Omitting the dashes and indenting the block as code instead |
| 3712 | + |
| 3713 | + ``` markdown |
| 3714 | + [[X]] Yes |
| 3715 | + [[ ]] No |
| 3716 | + ``` |
| 3717 | + |
| 3718 | +- [[ ]] Forgetting the outer, double brackets |
| 3719 | + |
| 3720 | + ``` markdown |
| 3721 | + - (X) Yes |
| 3722 | + - ( ) No |
| 3723 | + ``` |
| 3724 | + |
| 3725 | +******************************************************************************** |
| 3726 | + |
3581 | 3727 | #### 2. Single-Choice |
3582 | 3728 |
|
3583 | 3729 | --{{0}}-- |
@@ -3641,11 +3787,92 @@ as solved, or if the user clicks onto the "show solution" button, both options |
3641 | 3787 | will be presented. |
3642 | 3788 |
|
3643 | 3789 |
|
| 3790 | +##### 2.1 Single-Choice Blocks |
3644 | 3791 |
|
3645 | | - {{4}} |
| 3792 | + --{{0}}-- |
| 3793 | +Just like [multiple-choice quizzes](#11-multiple-choice-blocks), every option |
| 3794 | +of a single-choice quiz can carry its own indented block. Since only one |
| 3795 | +option can ever be the solution, this is a good place to attach a code-snippet |
| 3796 | +per option and let the user spot the single correct one, everything else in |
| 3797 | +the list still has to obey the "only one `X`" rule of a radio-button quiz. |
| 3798 | + |
| 3799 | +<!-- class="translate" --> |
| 3800 | +```` markdown |
| 3801 | +**Which of the following snippets defines a valid single-choice quiz?** |
| 3802 | + |
| 3803 | +- [(X)] Using dashes together with parentheses |
| 3804 | + |
| 3805 | + ``` markdown |
| 3806 | + - [(X)] Yes |
| 3807 | + - [( )] No |
| 3808 | + ``` |
| 3809 | + |
| 3810 | +- [( )] Using square brackets instead of parentheses |
| 3811 | + |
| 3812 | + ``` markdown |
| 3813 | + - [X] Yes |
| 3814 | + - [ ] No |
| 3815 | + ``` |
| 3816 | + |
| 3817 | +- [( )] Mixing brackets and parentheses |
| 3818 | + |
| 3819 | + ``` markdown |
| 3820 | + - [(X]] Yes |
| 3821 | + - [( ]] No |
| 3822 | + ``` |
| 3823 | + |
| 3824 | +- [( )] Forgetting the closing parenthesis |
| 3825 | + |
| 3826 | + ``` markdown |
| 3827 | + - [(X] Yes |
| 3828 | + - [( ] No |
| 3829 | + ``` |
| 3830 | +```` |
| 3831 | + |
| 3832 | + {{1}} |
| 3833 | +******************************************************************************** |
| 3834 | + |
| 3835 | +**Which of the following snippets defines a valid single-choice quiz?** |
| 3836 | + |
| 3837 | +- [(X)] Using dashes together with parentheses |
| 3838 | + |
| 3839 | + ``` markdown |
| 3840 | + - [(X)] Yes |
| 3841 | + - [( )] No |
| 3842 | + ``` |
| 3843 | + |
| 3844 | +- [( )] Using square brackets instead of parentheses |
| 3845 | + |
| 3846 | + ``` markdown |
| 3847 | + - [X] Yes |
| 3848 | + - [ ] No |
| 3849 | + ``` |
| 3850 | + |
| 3851 | +- [( )] Mixing brackets and parentheses |
| 3852 | + |
| 3853 | + ``` markdown |
| 3854 | + - [(X]] Yes |
| 3855 | + - [( ]] No |
| 3856 | + ``` |
| 3857 | + |
| 3858 | +- [( )] Forgetting the closing parenthesis |
| 3859 | + |
| 3860 | + ``` markdown |
| 3861 | + - [(X] Yes |
| 3862 | + - [( ] No |
| 3863 | + ``` |
| 3864 | + |
| 3865 | +******************************************************************************** |
| 3866 | + |
| 3867 | + --{{1}}-- |
| 3868 | +As with multiple-choice blocks, the marker `- [(X)] ` is 8 characters wide, so |
| 3869 | +the indented block always has to line up with 8 spaces, exactly the same rule, |
| 3870 | +just applied to a single-choice radio-button list. |
| 3871 | + |
| 3872 | + {{2}} |
3646 | 3873 | > ## How to create a true/false quiz? |
3647 | 3874 | > |
3648 | | -> --{{4}}-- |
| 3875 | +> --{{2}}-- |
3649 | 3876 | > Using single-choice quizzes, it is also possible to define something simple as |
3650 | 3877 | > a True or False quiz. |
3651 | 3878 | > |
|
0 commit comments