numbas / numbas/editor

For JME parts where the answer is an equation, ask the author for an expression giving a value of some free variable that satisfies the equation

Open
#598 0 comments 0 reactions 0 assignees View on GitHub
interface
Dominant language
JavaScript
Stars
60
Forks
62
PR merge metrics
No merged PRs in 30d

Description

Suppose you have a mathematical expression part whose correct answer is an equation like `x^2+y^2=5`.

At the moment, the recommended way to mark this is to set up a variable generator expression for one of the variables that picks a value that satisfies the equation half of the time, e.g. `random(random(vrange), y = sqrt(5-x^2))`.

A colleague rightly pointed out that it would be easier to just give an expression that always produces the correct value. We could then assume that a value picked uniformly at random would not satisfy the equation.

So when the answer to a mathematical expression part is an equation, show a field underneath "correct answer" of the form "expression for satisfying the equation". This would fill out the variable generator field for that variable.

Contributor guide

No contributing guide indexed for this repository

Research direction

Start by locating the editor UI for mathematical expression parts and the existing variable generator field. Trace how equation answers and generated variables are represented, then verify that an expression for the first variable can be entered and populates the corresponding generator field when the answer is an equation.

Written by the indexing model from the issue text.

Assessment

Tech stack
javascript
Domain
frontend
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.