GapFill with Latex

GapFill with Latex

por Elena Safiulina -
Número de respostas: 29

Gapfill question is not working with Latex 

ptJl6s8eFq4kRsf2PNYXFz8cEah-ueOCgS3wKVGdBNiXZAF8nj3I0on1Hsevt5_7bu-4Awz2ZqcI8PN_4aLF5wT0qVV8ElwvRzg3hGK2hGS2bwCqy2KnZDqSGpwhe1SHlFOQssV6ZSV-SA

Preview before

VMZQybDbXshuh3Yi_itHF4uPA6UtVVh9S5yZVGeW1q523lwuES-Fvqn6Iq8rjxy2vnJRkcBYVC8R7gwYDaIa_g-RQ5U-fwoAWNYzP3oKRfMQE4Kdjj4WKjiJhPhoq4KZM_8rp-zr9Py-nA

Preview After

06X-YcYT35I6LXx90JwWwjGRQMP0CbXjCIff9IS9VHhxV8dZQuRSl-d98_HFG3W2ythfVi6BSh-Z0LNenAf5NdRjjcjvH9FaaiTEICzAkjn7sYlRB7uWmvBRlLenz1_lornX8BCf4KOxDw

Média das avaliações:  -
Em resposta à Elena Safiulina

Vastus: GapFill with Latex

por Elena Safiulina -
We used this type of question for a long time. It about 3000 questions, which depends not only with our school Moodle but our Erasmus partners, too. Is is possible to restore the prevoius version of this question or change the settings in the present version?

Em resposta à Elena Safiulina

Vastus: GapFill with Latex

por Elena Safiulina -
In Gapfill's "General feedback" still works in LaTeX
Em resposta à Elena Safiulina

Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Hi Elena, thank you for posting here. Can you confirm where the Laytex is not rendering, is it in one or more of the feedback fields. I will set something up on on of my own machines when I get a chance . Also if you can export some questions to xml that are not working and attache to a post here that would be helpful.
Em resposta à Marcus Green

Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -

So, it not work in a "Question text" field and works in a "General feedback" field

Em resposta à Elena Safiulina

Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Em resposta à Elena Safiulina

Re: Vastus: Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Received
Em resposta à Marcus Green

Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Just in case, in our Moodle we see it like this
Gapfill with Latex in TTK UAS Moodle
Média das avaliações: Useful (1)
Em resposta à Elena Safiulina

Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Hi Elena, I have reproduced what you are seeing, and It looks like a bug crept into the code in the last update. I will work on getting a fix available as soon as I can.
Em resposta à Marcus Green

Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Hi Marcus! This is just great news! Thanks so much for taking the time and effort to help us!
Em resposta à Elena Safiulina

Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Hi Elena I have imported your questions into an instance of Moodle 3.9 with a fix for this issue. You can see it as a student here
https://vledevelop.co.uk/mdl39/course/view.php?id=3
Login. as
username
s1
Password
Password1!
Em resposta à Marcus Green

Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Hi Marcus!

Yes, I saw them. They work great! How now to achieve the same effect in our Moodle?
Em resposta à Elena Safiulina

Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Hi Elena, I assume you have logged in OK now sorriso
The idea is that other people will try the questions out and then I will release a new version to the plugins database and you will be able to update from within your Moodle.
Em resposta à Marcus Green

Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Yes, I tried them from the student's point of view. Is it important to start every formula from a new line? In this case, the question seems very cumbersome.
Em resposta à Elena Safiulina

Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
There are good reasons not to use this question type with MathJax. It was designed to be very simple to use and it depends on single characters for the delimiters. This defaults to the square braces. Because square braces have a special meaning in MathJax it can easily break how it displays. By contrast other question types, including some in core Moodle depend on double delimiters, i.e
The cat [ [1 ] ]on the mat, which means they are unlikely to break if MathJax is included. This was a trade off decision by me to make it very easy to learn for the largest number of people, but it may not suit everyone.

Having said that Here is a screenshot showing multiple formulas on the same line.

formula
I would strongly recommend looking at question types that are dedicated to Maths, especially formulas.
and

And for the most powerful maths question type of all investigate the STACK question type.

You can experiment with the question type as a teacher with the credentials I sent, make sure you use the password exactly as given.

Em resposta à Marcus Green

Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Yes, we use the STACK question type for the last two years. At present they are about 16% of our question bank. But the most part of our questions is Gapfill question type, especially in step-by-step questions (the oldest versions we did through the Embedded answers, but their grammer is harder). 

Em resposta à Elena Safiulina

Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Ahh, it sounds like I am dealing with an expert on Moodle question types for Maths sorriso.
There is a plugin for Core Cloze that makes it easier to use, but if Gapfill has worked for you so far that makes me very happy. I will add a question containing MathJax to the examples that ship with the question type so it gets viewed during testing.
Em resposta à Marcus Green

Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
No, expert = developer, I'm just an experienced user with many years of experience.

The collective decision when choosing Emdedded answer vs. Gapfill was in favor of Gapfill. And we are very grateful for the development of this type of questions. This is about 46% of all open-ended questions in our math courses.
Em resposta à Elena Safiulina

Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Hurray! Now this works in our Moodle, too. Many thanks on behalf of our team (and all the mathematicians, I think) for your excellent work!
Média das avaliações: Useful (1)
Em resposta à Elena Safiulina

Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Excellent. Would you do me a favour and post here a little about your organisation as I am always interested to see who uses my plugins. From your email address it looks like you are in Estonia, a place I have never been to. Perhaps one day when the world has settled down I might visit there.
Média das avaliações: Useful (1)
Em resposta à Marcus Green

Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: Re: Vastus: GapFill with Latex

por Elena Safiulina -
Yes, Marcus, you're right! I'm from Estonia and present Tallinn University of Applied Sciences. This year, our school organized the 3rd STACK conference, unfortunately, it was online, and next year we are planning the 4th (I hope in fact) https://sites.google.com/tktk.ee/27-28april2020tallinnestonia/. If you are interested, welcome.  In any case, if you decide to come to Estonia, we can arrange it sorriso

Em resposta à Elena Safiulina

Re: GapFill with Latex

por Laurie Huber -
Hi All

Can I ask a question about more elementary math using Gapfill?

We are trying to set up simple vertical, multi-digit addition/subtraction and multiplication questions for K-5 students.

I have tried to do this with Gapfill, but when I preview the questions, the answers (or intermediate steps in multiplication come out stacked rather than properly aligned horizontally.

Suggestions??

Thanks
Em resposta à Laurie Huber

Re: GapFill with Latex

por AL Rachels -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers

Hi Laurie,

It would help if you show us what you have done with Gapfill so far.

Média das avaliações: Useful (1)
Em resposta à AL Rachels

Re: GapFill with Latex

por Laurie Huber -
Hi AL

Here are a couple of images. The exact same alignment problem occurs with cloze (regular or WIRIS). Perhaps, I just have some setting wrongsmile  We have tried WIRIS - great for our advanced math, but challenging for younger learners to work with.



Em resposta à Laurie Huber

Re: GapFill with Latex

por Dominique Bauer -
Imagem de Documentation writers Imagem de Particularly helpful Moodlers Imagem de Plugin developers
Hello Laurie,

It seems to me that you need the input values to be right justified.

In most question types, the format of the input boxes is simple. The alignment is on the left and the width of the boxes is not adjustable. This is fine in most cases, but not in all.

A quick way to format the input boxes is to insert a small JavaScript code into the HTML of the question text. In this way, their attributes can easily be changed: dimensions, position, background color, etc. Here is an example with the Gap Fill question:




<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
    $(document).ready(function() {

        /* FORMAT THE INPUT BOXES */

        /* All boxes (set here by default) */
        $(".typetext").css("text-align", "right");              // The text of all input boxes (no index) is aligned to the right

        /* First box - Note that the indices start at zero */
        $(".typetext:eq(0)").css("width", "40px");              // The width of the first input box is 40 pixels

        /* Second box */
        $(".typetext:eq(1)").css("width", "70px");              // The width of the second input box is 70 pixels
        $(".typetext:eq(1)").css("transform", "rotate(20deg)"); // The second box is rotated 20 degrees
        $(".typetext:eq(1)").css("vertical-align", "40px");     // The second box is moved up 40 pixels

        /* Third box */
        $(".typetext:eq(2)").css("width", "20px");              // The width of the third input box is 20 pixels
        $(".typetext:eq(2)").css("text-align", "center");       // The text of the third boxe is centered
    });
</script>

<p>The [cat] sat on the [mat]</p>
<br>
<p>Big <span style="font-size:30px;">[1]</span></p>

Of course, if you don't want to rotate or change the vertical position of an input box, just delete the corresponding lines in the code.

For a Cloze question, the code should be slightly different.

Média das avaliações: Useful (2)
Em resposta à Dominique Bauer

Re: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Doesn't the js get stripped during the save/render?
Em resposta à Marcus Green

Re: GapFill with Latex

por Dominique Bauer -
Imagem de Documentation writers Imagem de Particularly helpful Moodlers Imagem de Plugin developers
Hello Marcus,

If I'm not mistaken, you wrote the Gapfill qtype. It would therefore seem important that you know the answer to your question. sorriso

With the Gapfill, Formulas and, I guess, other question types, the JavaScript code is preserved. This is great because it allows, among other things*, to make some small adjustments as I explained in my previous post.

So I recommend you leave things as they are and not strip the js code in the Gapfill question.


* More elaborate things can be done with JavaScript code. For example, it is possible to transfer the values ​​from the sliders of a JXSGraph chart (which, by the way, is only JavaScript) to the input boxes of a Formulas question, which can be claimed as the full integration of a JSXGraph into a Formulas question (see this post ↗).
Média das avaliações: Useful (1)
Em resposta à Dominique Bauer

Re: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
I tried your code and it seemed to be stripped, which might be a call to a core function I make. I was most impressed with it as an idea because I am planning on introducing more potential for customisation and 'canned' customisations at some point in the future.

The idea is that it would ship with some named collections of CSS that could be selected when creating a question and customised in some way by an admin. So many ideas so little time to develop them.
Em resposta à Marcus Green

Re: GapFill with Latex

por Dominique Bauer -
Imagem de Documentation writers Imagem de Particularly helpful Moodlers Imagem de Plugin developers
Hello Marcus,

I'm sorry, I thought you were kidding. This is a bit beyond me, but I would be very curious as to why the JavaScript code is stripped on your system.

Sure, JavaScript is allowed on your browser, isn't it? This is also not a JavaScript cache issue in Moodle. Is there a setting in Site administration that stripes the code or is this due to some setting during Moodle installation? Tim, please help! sorriso

For me, it's also so much to learn, so little time.
Média das avaliações: Useful (1)
Em resposta à Dominique Bauer

Re: GapFill with Latex

por Marcus Green -
Imagem de Core developers Imagem de Particularly helpful Moodlers Imagem de Plugin developers Imagem de Testers
Ignore me, I just tried a simple alert("hello") and it popped up as you would expect. I really appreciate your post on this Dominique, it illustrates how easy it is to get tunnel vision when working on something. I had always vaguely assumed that js would be stripped in question text and so saw what I expected when I did the first test. This has given me some ideas for future development. I really am rather excited at the possibilities.

If Moodle had medals I would nominate Dominique Bauer for Question Type Hero (First Class).