Allow students to enter interval

22 views
Skip to first unread message

Alexander Holvoet

unread,
Oct 30, 2023, 8:54:47 AM10/30/23
to Numbas Users
Dear All

Is there any known extension for allowing students to enter an interval? We found out we could program this ourselves by combining different gaps, like in this demo: https://numbas.mathcentre.ac.uk/question/66237/numbas-demo-custom-marking-algorithms/preview/, but were wondering if there was a cleaner way.

Kind regards,
Alexander

Ben Brawn

unread,
Oct 30, 2023, 7:28:31 PM10/30/23
to Numbas Users
Well, there's no problem with closed intervals (just use mathematical expression gap and get them to enter say [1,2] which JME will interpret as a list) but in general, I can't see a nicer way than writing your owning extension or marking algorithm. 

If it were me, I'd probably do something easy and ugly like drop-down menu for open or closed bracket, gap 1 for number, a comma, gap 2 for number, and another drop-down menu for open or closed bracket. 

Christian Lawson-Perfect

unread,
Nov 1, 2023, 11:44:12 AM11/1/23
to numbas...@googlegroups.com
There isn't anything which would let the student write interval notation at the moment. There's an issue about this on GitHub at https://github.com/numbas/Numbas/issues/879 (most of the comments in that thread are about a separate request for a page showing help with notation, though). There's a big issue at https://github.com/numbas/Numbas/issues/677 about different kinds of notation that we want to support.

A parser that takes an opening square or round bracket, a number, a comma, another number, then a closing square or round bracket would be quite easy to make. But I haven't done it yet because I know that someone will then ask for something like [x, x+1], and then we have to decide what kinds of expressions you can write for the numbers.

I suppose you have to decide how you want to mark these intervals, as well: is it all-or-nothing, or do you give partial marks for each of the four components: two brackets, and two numbers?

--
You received this message because you are subscribed to the Google Groups "Numbas Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to numbas-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/numbas-users/8afe4083-bf4b-45ce-b2b4-65bfd39d5cf5n%40googlegroups.com.

Alexander Holvoet

unread,
Nov 2, 2023, 10:21:07 AM11/2/23
to numbas...@googlegroups.com
Dear Christian

Thanks for the response! We'll have to experiment with a custom marking algorithm to solve this ad-hoc.

Kind regards,
Alexander

Op wo 1 nov 2023 om 16:44 schreef Christian Lawson-Perfect <christia...@gmail.com>:
You received this message because you are subscribed to a topic in the Google Groups "Numbas Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/numbas-users/4_1NKDyDBU4/unsubscribe.
To unsubscribe from this group and all its topics, send an email to numbas-users...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/numbas-users/CAEMHSOir4tNUgKwiQVtte%2BqyR%2BC-vNykr0f8HzuX5HT0cfVBTQ%40mail.gmail.com.
Reply all
Reply to author
Forward
0 new messages