From 55426454ec404d3d52eb58b02dafbb4224b99e4b Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Thu, 6 Nov 2025 11:52:55 +0000 Subject: [PATCH 1/8] Deprecated Expression --- docs/teacher/reference/response_area_components/Expression.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/docs/teacher/reference/response_area_components/Expression.md b/docs/teacher/reference/response_area_components/Expression.md index d2f5b89d4..7aa2d4a10 100644 --- a/docs/teacher/reference/response_area_components/Expression.md +++ b/docs/teacher/reference/response_area_components/Expression.md @@ -1,5 +1,7 @@ # Expression +> **⚠️ DEPRECATED:** This feature is deprecated and will be removed in a future version. Please use [Math_Single_Line](Math_Single_Line.md) instead. + This response area is very similar to [Text](Text.md), differing in that it can display how the user's response was interpreted back to them through the 'live preview' feature. This works using the grading function, providing a `feedback.response_latex` field, which gets rendered. ## Evaluation Function Options From 8417094f5f39513fcab643e96afe0f1ff01ff02f Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Thu, 6 Nov 2025 11:57:58 +0000 Subject: [PATCH 2/8] Added math single line --- .../Math_Single_Line.md | 68 +++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 docs/teacher/reference/response_area_components/Math_Single_Line.md diff --git a/docs/teacher/reference/response_area_components/Math_Single_Line.md b/docs/teacher/reference/response_area_components/Math_Single_Line.md new file mode 100644 index 000000000..290d4074a --- /dev/null +++ b/docs/teacher/reference/response_area_components/Math_Single_Line.md @@ -0,0 +1,68 @@ +# Math_Single_Line + +This response area is very similar to [Text](Text.md), differing in that it can display how the user's response was interpreted back to them through the 'live preview' feature. This works using the grading function, providing a `feedback.response_latex` field, which gets rendered. + +## compareExpressions +**Input Symbols** + +This is a powerful feature for defining a dictionary of accepted symbols. For each symbol, you define: + +* **Symbol:** The LaTeX-rendered symbol (e.g., `$f(x)$`). +* **Code:** The machine-readable variable name (e.g., `fx`). This is what your students will type and what the evaluation function sees. +* **Alternatives:** A list of other codes you want to accept for the same symbol (e.g., `f_x`, `f(x)`, `f`). This allows you to anticipate different ways students might type the same thing. +* **Visibility:** A `TRUE`/`FALSE` toggle. If "Display input symbols" is enabled in the Input tab, this setting determines whether a specific symbol is shown to the student. This allows you to show students common symbols while still accepting less common or alternative ones in the background. + +![example](screenshots/input_symbols.png) +![example](screenshots/input_symbols_preview.png) + +Tolerances can also be added. These will apply to the numerical parts of the answer (e.g. the $10$ in $10x$). + +This is done using the `atol` and `rtol` fields under the Evaluation Function Parameters section. + +## Component Parameters + +### `post_response_text` (optional) + +Text block to be displayed to the left of the input field. Markdown and LaTeX are allowed following the usual syntax. + +### `pre_response_text` (optional) + +Text block to be displayed to the left of the input field. Markdown and LaTeX are allowed following the usual syntax. + +### Enable Handwriting Input + +Enables a handwriting canvas in the browser, which allows a student to draw their expression, rather than type using Sympy's syntax. + +### Enable Photo Upload + +Allows a student to upload their expression as an image, as an alternative to handwriting if the student isn't using a phone or tablet. + +### Handwriting and Image Handling +Handwriting and students photo uploads are handled with [MathPix](https://docs.mathpix.com/#request-parameters). + +Our default parameters include: +- **formats**: `['text']` - Returns Mathpix Markdown text with math inside delimiters +- **include_line_data**: `true` - Adds line-by-line data with geometric information about detected elements +- **rm_spaces**: `true` - Omits spaces around LaTeX groups and other places where spaces are superfluous +- **rm_fonts**: `true` - Omits `mathbb`, `mathbf`, `mathcal`, and `mathrm` font commands +- **idiomatic_braces**: `true` - Returns more compact LaTeX (e.g., `x^2` instead of `x^{2}`) +- **numbers_default_to_math**: `false` - Standalone numbers are treated as text, not automatically wrapped in math mode +- **math_fonts_default_to_math**: `false` - Text with math fonts is not automatically converted to math mode +- **math_inline_delimiters**: `['$', '$']` - Delimiters for inline math mode in text output +- **math_display_delimiters**: `['$$', '$$']` - Delimiters for display/block math mode in text output + +## Setting The Answer + +Type the correct answer into the 'Response Area Answer' using standard syntax. As the student enters the answer, this will be rendered using the 'live preview' feature, to ensure the correct expression has been entered. + +Use the 'Response Area Preview' to check the answer has been set correctly. + +![Screenshot](screenshots/ExpressionResponseAreaAnswer.JPG) + +## Example Student Response area + +Correct response given +![Screenshot](screenshots/ExpressionCorrect.JPG) + +Incorrect response given +![Screenshot](screenshots/ExpressionIncorrect.JPG) From 25e23cbca01955dc533671417836c5d2e661f0b6 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Thu, 6 Nov 2025 12:05:20 +0000 Subject: [PATCH 3/8] Removed old images references from math single line --- .../response_area_components/Math_Single_Line.md | 16 ---------------- 1 file changed, 16 deletions(-) diff --git a/docs/teacher/reference/response_area_components/Math_Single_Line.md b/docs/teacher/reference/response_area_components/Math_Single_Line.md index 290d4074a..b2a5731d5 100644 --- a/docs/teacher/reference/response_area_components/Math_Single_Line.md +++ b/docs/teacher/reference/response_area_components/Math_Single_Line.md @@ -50,19 +50,3 @@ Our default parameters include: - **math_fonts_default_to_math**: `false` - Text with math fonts is not automatically converted to math mode - **math_inline_delimiters**: `['$', '$']` - Delimiters for inline math mode in text output - **math_display_delimiters**: `['$$', '$$']` - Delimiters for display/block math mode in text output - -## Setting The Answer - -Type the correct answer into the 'Response Area Answer' using standard syntax. As the student enters the answer, this will be rendered using the 'live preview' feature, to ensure the correct expression has been entered. - -Use the 'Response Area Preview' to check the answer has been set correctly. - -![Screenshot](screenshots/ExpressionResponseAreaAnswer.JPG) - -## Example Student Response area - -Correct response given -![Screenshot](screenshots/ExpressionCorrect.JPG) - -Incorrect response given -![Screenshot](screenshots/ExpressionIncorrect.JPG) From 2b99a33512b31215b083671508040d3e4ffe8692 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Thu, 6 Nov 2025 12:07:49 +0000 Subject: [PATCH 4/8] Added math multiline --- .../reference/response_area_components/Math_Multi_Line.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 docs/teacher/reference/response_area_components/Math_Multi_Line.md diff --git a/docs/teacher/reference/response_area_components/Math_Multi_Line.md b/docs/teacher/reference/response_area_components/Math_Multi_Line.md new file mode 100644 index 000000000..0ad2a1a6d --- /dev/null +++ b/docs/teacher/reference/response_area_components/Math_Multi_Line.md @@ -0,0 +1,8 @@ +# Math_Multi_Line + +This response area is an extension of [Math_Single_Line](Math_Single_Line.md), and provided multi-line math support. For example, when writing mathematical proofs. + +Currently this response area support the following evaluation functions: +- chatGPT (experimental) - allows teachers to prompt GPT to provide feedback. +- evaluateProof (experimental) - a GPT-based approach with tailored prompts to proof feedback on mathematical proofs. +- GCSEenglish - a GPT-based approach with tailored prompts to provide feedback on GCSE English creative writing. From e2c7fc2006267c6d2f028722b8193f0747f2f47a Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Thu, 6 Nov 2025 15:47:29 +0000 Subject: [PATCH 5/8] Changed math single line intro paragraph --- .../reference/response_area_components/Math_Single_Line.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/teacher/reference/response_area_components/Math_Single_Line.md b/docs/teacher/reference/response_area_components/Math_Single_Line.md index b2a5731d5..99c99bd73 100644 --- a/docs/teacher/reference/response_area_components/Math_Single_Line.md +++ b/docs/teacher/reference/response_area_components/Math_Single_Line.md @@ -1,6 +1,6 @@ # Math_Single_Line -This response area is very similar to [Text](Text.md), differing in that it can display how the user's response was interpreted back to them through the 'live preview' feature. This works using the grading function, providing a `feedback.response_latex` field, which gets rendered. +This response area allows users to type, write or upload mathematics, and then displays how the user's response was interpreted back to them through the 'live preview' feature. This works using the evaluation function, providing a `feedback.response_latex` field, which gets rendered. ## compareExpressions **Input Symbols** From 42eacf57a51772c129abc8840c55a9313c698fe2 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Mon, 24 Nov 2025 17:03:31 +0000 Subject: [PATCH 6/8] Added math RAs to the navigation --- mkdocs.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mkdocs.yml b/mkdocs.yml index 949ab4959..fa681b44c 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -54,6 +54,8 @@ nav: - Boolean: "teacher/reference/response_area_components/Boolean.md" - NumericUnits: "teacher/reference/response_area_components/NumericUnits.md" - Expression: "teacher/reference/response_area_components/Expression.md" + - Math Single Line: "teacher/reference/response_area_components/Math_Single_Line.md" + - Math Multi Line: "teacher/reference/response_area_components/Math_Multi_Line.md" - MultipleChoice: "teacher/reference/response_area_components/MultipleChoice.md" - Matrix: "teacher/reference/response_area_components/Matrix.md" - Table: "teacher/reference/response_area_components/Table.md" From 87a0d1efcf253ada28115855f3049e7a109ac2be Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Mon, 24 Nov 2025 17:40:15 +0000 Subject: [PATCH 7/8] Switched to new standard of referencing evaluation functions --- .../response_area_components/Math_Multi_Line.md | 9 +++++---- .../Math_Single_Line.md | 17 ++--------------- 2 files changed, 7 insertions(+), 19 deletions(-) diff --git a/docs/teacher/reference/response_area_components/Math_Multi_Line.md b/docs/teacher/reference/response_area_components/Math_Multi_Line.md index 0ad2a1a6d..56a4612ab 100644 --- a/docs/teacher/reference/response_area_components/Math_Multi_Line.md +++ b/docs/teacher/reference/response_area_components/Math_Multi_Line.md @@ -2,7 +2,8 @@ This response area is an extension of [Math_Single_Line](Math_Single_Line.md), and provided multi-line math support. For example, when writing mathematical proofs. -Currently this response area support the following evaluation functions: -- chatGPT (experimental) - allows teachers to prompt GPT to provide feedback. -- evaluateProof (experimental) - a GPT-based approach with tailored prompts to proof feedback on mathematical proofs. -- GCSEenglish - a GPT-based approach with tailored prompts to provide feedback on GCSE English creative writing. +## Evaluation Function Options + +### [chatGPT (experimental)](https://github.com/lambda-feedback/chatGPT/blob/main/app/docs/user.md) + +### [evaluateProof (experimental)](https://github.com/lambda-feedback/evaluateProof/blob/main/app/docs/user.md) \ No newline at end of file diff --git a/docs/teacher/reference/response_area_components/Math_Single_Line.md b/docs/teacher/reference/response_area_components/Math_Single_Line.md index 99c99bd73..421976c32 100644 --- a/docs/teacher/reference/response_area_components/Math_Single_Line.md +++ b/docs/teacher/reference/response_area_components/Math_Single_Line.md @@ -2,22 +2,9 @@ This response area allows users to type, write or upload mathematics, and then displays how the user's response was interpreted back to them through the 'live preview' feature. This works using the evaluation function, providing a `feedback.response_latex` field, which gets rendered. -## compareExpressions -**Input Symbols** +## Evaluation Function Options -This is a powerful feature for defining a dictionary of accepted symbols. For each symbol, you define: - -* **Symbol:** The LaTeX-rendered symbol (e.g., `$f(x)$`). -* **Code:** The machine-readable variable name (e.g., `fx`). This is what your students will type and what the evaluation function sees. -* **Alternatives:** A list of other codes you want to accept for the same symbol (e.g., `f_x`, `f(x)`, `f`). This allows you to anticipate different ways students might type the same thing. -* **Visibility:** A `TRUE`/`FALSE` toggle. If "Display input symbols" is enabled in the Input tab, this setting determines whether a specific symbol is shown to the student. This allows you to show students common symbols while still accepting less common or alternative ones in the background. - -![example](screenshots/input_symbols.png) -![example](screenshots/input_symbols_preview.png) - -Tolerances can also be added. These will apply to the numerical parts of the answer (e.g. the $10$ in $10x$). - -This is done using the `atol` and `rtol` fields under the Evaluation Function Parameters section. +### [compareExpressions](https://lambda-feedback.github.io/user-documentation/user_eval_function_docs/compareExpressions/) ## Component Parameters From fddf3e3121667244e7d3cd052164315e5d3a80e6 Mon Sep 17 00:00:00 2001 From: Marcus Messer Date: Mon, 24 Nov 2025 17:56:38 +0000 Subject: [PATCH 8/8] Actioned PJ comments --- docs/teacher/reference/response_area_components/Expression.md | 2 -- .../reference/response_area_components/Math_Multi_Line.md | 2 +- .../reference/response_area_components/Math_Single_Line.md | 2 +- 3 files changed, 2 insertions(+), 4 deletions(-) diff --git a/docs/teacher/reference/response_area_components/Expression.md b/docs/teacher/reference/response_area_components/Expression.md index 1ca0055ed..8b5e627cf 100644 --- a/docs/teacher/reference/response_area_components/Expression.md +++ b/docs/teacher/reference/response_area_components/Expression.md @@ -2,8 +2,6 @@ > **⚠️ DEPRECATED:** This feature is deprecated and will be removed in a future version. Please use [Math_Single_Line](Math_Single_Line.md) instead. -This response area is very similar to [Text](Text.md), differing in that it can display how the user's response was interpreted back to them through the 'live preview' feature. This works using the grading function, providing a `feedback.response_latex` field, which gets rendered. - ## Evaluation Function Options ### [isSimilar](https://lambda-feedback.github.io/user-documentation/user_eval_function_docs/isSimilar/) diff --git a/docs/teacher/reference/response_area_components/Math_Multi_Line.md b/docs/teacher/reference/response_area_components/Math_Multi_Line.md index 56a4612ab..b6eefbefc 100644 --- a/docs/teacher/reference/response_area_components/Math_Multi_Line.md +++ b/docs/teacher/reference/response_area_components/Math_Multi_Line.md @@ -1,6 +1,6 @@ # Math_Multi_Line -This response area is an extension of [Math_Single_Line](Math_Single_Line.md), and provided multi-line math support. For example, when writing mathematical proofs. +This response area is a general handwriting input that produces markdown output. Uses the MathPix API, which includes mathematics as dollar-delimited LaTeX. ## Evaluation Function Options diff --git a/docs/teacher/reference/response_area_components/Math_Single_Line.md b/docs/teacher/reference/response_area_components/Math_Single_Line.md index 421976c32..a99fbbd51 100644 --- a/docs/teacher/reference/response_area_components/Math_Single_Line.md +++ b/docs/teacher/reference/response_area_components/Math_Single_Line.md @@ -1,6 +1,6 @@ # Math_Single_Line -This response area allows users to type, write or upload mathematics, and then displays how the user's response was interpreted back to them through the 'live preview' feature. This works using the evaluation function, providing a `feedback.response_latex` field, which gets rendered. +This response area allows users to type, write or upload mathematics, and then displays how the user's response was interpreted back to them through the 'live preview' feature. ## Evaluation Function Options