Embedded answers (Cloze)

Embedded answers (Cloze)

by Ubongabasi Inyang -
Number of replies: 12
Is it possible to embed and essay as a sub-question in Cloze?
Average of ratings: -
In reply to Ubongabasi Inyang

Re: Embedded answers (Cloze)

by Itamar Tzadok -
No but you should be able to get close (enough?) by adding an HTML textarea and some javascript for copying the content of the textarea into a Cloze shortanswer field (I'm not sure what the size limit on the shortanswer input is). This way, however, the "essay" question will be marked automatically, either correct or incorrect depending on how you set the shortanswer correct answer, and you will have to override this mark. smile
In reply to Ubongabasi Inyang

Re: Embedded answers (Cloze)

by Stefan Eberhard -
We deloped a Javascript with several subquestions. The combined answers can be copied and transfered to the Moodle Cloze.

Todo:
  • a separate path in your domain . .../special/
  • an xyz.html containing the Javscript with the subquestion in this path
  • calling the subquestion within the Cloze-question with

    <object width="100%" height="280" data="http://.../special/xyz.html" type="text/html" id="embeddedhtml"></object>
use object, iFrame will fail in Moodle 2




In reply to Ubongabasi Inyang

Re: Embedded answers (Cloze)

by Ubongabasi Inyang -
Thanks Itamar & Stefan for the response.

Just wondering, is ther a way to eliminate the quiz page numbers and replace it with only Previous and Next?
In reply to Ubongabasi Inyang

Re: Embedded answers (Cloze)

by Itamar Tzadok -
There is always a way. Should be quite simple by javascript and a bit more tricky by only css. The point of the latter is to hide the <a> tags of div.pagingbar and then reveal the first and last <a> tags which in all pages but the first and last are the previous and next links (respectively). There remains the problem of the first and last pages in which you have to reveal only the last and first <a> tags (respectively) and I'm not sure that can be done by css only. Whether you go by javascript or css you need to put this code somewhere and if you don't have access to the theme's files you will have to add it to each and every quiz page in, say, an otherwise empty description question. If you can and want to hack the php code you could probably just modify the way the paging bar is rendered in the quiz page. hth smile
In reply to Itamar Tzadok

Re: Embedded answers (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Itamar "... and I'm not sure that can be done by css only"

Always ready to take up a CSS challenge. wink

Adding the following rules at the end of one of your theme's CSS files:

.paging.pagingbar {font-size:0px;}
.paging.pagingbar a.next, .paging.pagingbar a.previous, .paging.pagingbar span.thispage {font-size:small;}
.paging.pagingbar span.thispage {margin-left:5px; margin-right:5px;}

will hide the links to the individual pages. The font-size:small rule may have to be adapted to reflect your theme's current value.

Joseph

Attachment image00.jpg
Average of ratings: Useful (1)
In reply to Joseph Rézeau

Re: Embedded answers (Cloze)

by Ubongabasi Inyang -
That's very ingenious Joseph. I added it and it works like magic.

I know this might sound crazy. I have a mixture of Embedded answers (Cloze), Multiple Choice and Short Answer in my quiz. Instead of it graded with correct or wrong answer, is it possible to just display the inputes in the grades display. What I am trying to achieve is this: say a student commit to reading 3 articles in month, he will input 3 and on the grade report it should show under articles to read -3.
In reply to Ubongabasi Inyang

Re: Embedded answers (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

I'm glad it worked for you. Apparently needs the latest version of Moodle 1.9.x. See Itamar's post.

As for your last question, please re-post it in a new post. There are already too many different topics in this thread.

Joseph

In reply to Joseph Rézeau

Re: Embedded answers (Cloze)

by Itamar Tzadok -
"Always ready to take up a CSS challenge. wink"

For sure, but try to take this challenge on version 1.9.4+ (which I was inspecting for answering the query (don't ask smile)) and you'll find that the convenient class='next' and class='previous' in current versions is there title='next' and title='previous' "... and I'm not sure that can be done by css only" with these titles. wink Not that this is an excuse for anything. With production on 1.9.4 and development/test on 2.0 I definitely need to consult moodle demo more often.

Thanks! smile
In reply to Itamar Tzadok

Re: Embedded answers (Cloze)

by Joseph Rézeau -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers Picture of Translators

Hi Itamar, I always work on Moodle's latest available version and tend to forget that many moodle installations are not up-to-date.black eye

Anyway, I tracked the introduction of those next and previous class names in bug MDL-17525 (about a year ago).

Joseph

In reply to Joseph Rézeau

Re: Embedded answers (Cloze)

by Ubongabasi Inyang -
Thanks. I am also wondering if it is possible to have the quiz page on top while the bottom shows "previous and next".

Regards