Skip to content

Commit

Permalink
Docs: Correct typos
Browse files Browse the repository at this point in the history
  • Loading branch information
georgestagg committed Sep 13, 2024
1 parent fb1acf2 commit 1008d89
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions docs/interactive/dynamic.qmd
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,15 @@ webr:

{{< include ../_extensions/live/_knitr.qmd >}}

The `quarto-live` extension's OJS integration allows an instructor to write dynamic exercises with parameterised questions and solution code. Such questions would provide a different experience for each learner, or the same learner over time, creating long-term value.
The `quarto-live` extension's OJS integration allows an instructor to write dynamic exercises with parametrised questions and solution code. Such questions would provide a different experience for each learner, or the same learner over time, creating long-term value.

## Parameterised Exercises
## Parametrised Exercises

To create a parameterised exercise, first define some input variables in OJS for each parameter you wish to create. Then, use those parameters throughout your exercise.
To create a parametrised exercise, first define some input variables in OJS for each parameter you wish to create. Then, use those parameters throughout your exercise.

#### Example: Write an R function

First, create a "hidden" randomised varaible using an `ojs` cell with the cell option `echo: false`.
First, create a "hidden" randomised variable using an `ojs` cell with the cell option `echo: false`.

````{.markdown filename="param_ex.qmd"}
```{{ojs}}
Expand All @@ -39,7 +39,7 @@ rand_int = Math.floor(Math.random() * 10000);

Next, write your [exercise](../exercises/exercises.qmd) using the randomised parameter as an input variable.

You can use the value of OJS variables in your question text and tempalte solution using string interpolation. For example, in this question the string `${rand_int}` becomes ${rand_int}.
You can use the value of OJS variables in your question text and template solution using string interpolation. For example, in this question the string `${rand_int}` becomes ${rand_int}.

#### Source

Expand Down

0 comments on commit 1008d89

Please sign in to comment.