Fractions. Again ;-) Or, more generally, numerators and denominators...

49 views
Skip to first unread message

Rob Cade

unread,
May 27, 2015, 11:30:38 AM5/27/15
to numbas...@googlegroups.com
Hi Christian

I think I already know the answer to this, but...

We need to help students practise very basic operations on fractions: for example, filling in the gaps in ?/2 = ?/10 = 20/40 = ?/50 = ?/100.  I've been trying to fake this model of data-entry with a table (with 0px borders and no cell-padding or margins) so I can have (in the first example given) a gap-fill on the top row, a dash in the same cell on the row below and the 2 in the same cell in the row below that (IYSWIM).  I suspect the default padding for a gap-fill is kiboshing this idea, and it would look a bit half-baked if it did work: the dash is way too small.

Is there any way I can have a gap-fill-above-a-horizontal-line-above-a-second-gap-fill-block, please?  I've seen some people asking users to enter a value in a "numerator" gap-fill, and a second value in a "denominator" gap-fill, but this is unhelpful when you're trying to reinforce a visual pattern.  I strikes me that such a block would be useful in other situations, too.  Simplifying algebraic fractions, differentiating quotients, as an intermediate stage in drug-dosage calculations etc.

The Matrix-entry widget is tantalisingly close to what I'm after..;-)

Yours hopefully

Rob



Christian Perfect

unread,
May 28, 2015, 5:50:57 AM5/28/15
to numbas...@googlegroups.com
Hi Rob,
That's a good suggestion, and the way you described it told me exactly what I need to do :)
I've hacked together a question at https://numbas.mathcentre.ac.uk/question/8269/fraction-input-with-custom-css/ which uses custom CSS to change the look of the matrix input. That looks OK, but it's not nice to author - you'd have to include the custom CSS in every question (or create an extension), and the "correct answer" is a matrix, when it should ideally be a simple number.
I've created an issue on GitHub describing what should happen - https://github.com/numbas/Numbas/issues/375 - keep an eye on that. It's a fairly simple idea, so I should get it done at some point. That's just for number entry parts though, so wouldn't work for things like algebraic fractions.

The idea of having "blocks" of gapfills is interesting. You want to say something like "render a fraction input, with gap 0 and gap 1 as numerator and denominator". If we can come up with a few more cases where you might want the ability to have that kind of repeated pattern, I could look into how to implement it. I'm struggling to think of any at the moment - most of the things on my wishlist involve preprocessing the student's input or the rendered preview (for example, set inputs).

cp

--
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.
For more options, visit https://groups.google.com/d/optout.

Rob Cade

unread,
May 28, 2015, 11:47:11 AM5/28/15
to numbas...@googlegroups.com

Hi Christian

 

TVM for the speedy response.  ‘Course, my example only needed a gap-fill for the *numerator*: being able to enter both numerator & denominator is a bonus, but for full(?) functionality we’d need to be able have one *or* 2 gap-fills.  Your example looks exactly what I had  in mind  (thanks again), but I’d need to be able to force students to use a particular denominator/numerator.

 

>> You want to say something like "render a fraction input, with gap 0 and gap 1 as numerator and denominator".

I’d like that to be possible ;-)  I s’pose I’m after a “formatting” block which allows the author to position *either* a number or a  gap-fill above (or below) a second number or gap-fill.  With the matrix-entry widget, is it possible to have some “pre-filled” entries, with the others as  gap-fills?    How about a denominator class and a numerator class?  Is that even tenable? ;-)

 

I’ll try to think of more uses for this… It’s just a bit frustrating to have a really useful suite of NUMBAS-based practice materials (in this case for a pre-term numeracy-boosting course which we’ve run for the last couple of years) sitting on Moodle, but to have to zip up a couple of .net exes for students to download, unzip and run, just  to practise fractions.   Cancelling a fraction in the format “24/32” seems weird to me, possibly because there’s no “top” or “bottom”, though that’s the terminology we generally use…

 

Rob

Rob Cade

Academic Tutor

Learning Centre

Millennium Point

331 7479

 

To book a tutorial:

Email me, phone me (331 7479), drop into the office on Level 4 at Millennium Point, or go to http://bcu.iinsight.org iCity page: https://icity.bcu.ac.uk/library-and-learning-resources/centre-for-academic-success

 

Our workshops: https://icity.bcu.ac.uk/library-and-learning-resources/centre-for-academic-success/Workshops-and-Resources

 

My Resources: https://icity.bcu.ac.uk/library-and-learning-resources/centre-for-academic-success/workshops-and-resources/Rob-Resources/Index

Rob Cade

unread,
Jun 1, 2015, 11:28:16 AM6/1/15
to numbas...@googlegroups.com

Hi Christian

 

I now seem to have something very close to what I was after (https://numbas.mathcentre.ac.uk/question/8287/equivalent-fractions-002/)  Thanks for the hint about using the bottom-border as the separator. 

 

Mildly cumbersome, but now I’ve got a pattern I can extend.  (I’ll tidy up the CSS preamble tomorrow, and give things more sensible names.)

 

Thanks again

Christian Perfect

unread,
Jun 4, 2015, 10:32:27 AM6/4/15
to numbas...@googlegroups.com
That's good, Rob, but we can do better!
Ideally, the fraction should be an independent element that can fit inline with other stuff. Your table layout means that the equals signs don't line up with the vincula (excellent word, that), and if you wanted to have a couple of separate fraction equations on the same line, they might not line up.
I've made a copy of your question which does something different - it defines some new elements `fraction`, `numerator` and `denominator`, and specifies how to lay them out. They sit inline with text, aligned with the middle of the line. My copy is at https://numbas.mathcentre.ac.uk/question/8363/christians-copy-of-equivalent-fractions-002/

--

Rob Cade

unread,
Jun 4, 2015, 11:53:34 AM6/4/15
to numbas...@googlegroups.com

TVM for that. 

 

JavaScript. Eh?  Never touched it, but I suppose I should ;-)

 

*We* think that your version, with the operator-symbols aligned with the vincula (a fine word, which I’ll try to drop into conversation) is clearly more correct, but is slightly  *less* legible ;-)   Maybe because the elements are too close, though that‘s probably fixable with padding/margins?

 

What would happen if you wanted to use a division symbol ( or “obelus”, I believe ;-) )?  Wouldn’t it look like a continuation of the vincula (see, I’m using it already…)

 

I’ll play around with your ideas, and thanks again.

Reply all
Reply to author
Forward
0 new messages