Questions FAQ: Difference between revisions

From MoodleDocs
(Added ==Is it posible to deactivate question versioning in Moodle 4.0 and newer?==)
m (https://moodle.org/mod/forum/discuss.php?d=463018)
 
Line 99: Line 99:
The above script can be adapted to most question types of in which there are answer boxes. You can try examples at [https://moodleformulas.org/course/view.php?id=95&section=8 moodleformulas.org].
The above script can be adapted to most question types of in which there are answer boxes. You can try examples at [https://moodleformulas.org/course/view.php?id=95&section=8 moodleformulas.org].


==Is it posible to deactivate question versioning in Moodle 4.0 and newer?==
==Is it posible to deactivate question versioning?==
Yes. In your server go on the following page : /admin/settings.php?section=manageqbanks and desactivate "Question history".
Yes. In your server go on the following page : /admin/settings.php?section=manageqbanks and desactivate "Question history".
The behavior is then the same as in Moodle 3.9
If you want changes to show up in in-progress quiz attempts, you need to regrade them.
 
==See also==
==See also==



Latest revision as of 19:57, 20 October 2024


How can questions be shared between courses?

See How to let teachers share questions between courses.

If I change a question in the question bank, will it be changed in all the quizzes it appears?

Yes. See Tim Hunt's forum post https://moodle.org/mod/forum/discuss.php?d=234011&parent=1016542#p1016558

Is there a way to set the default for essay questions on our site to allow uploading of one attachment?

The only way to change this at the moment is by editing the code.

In question/type/essay/edit_essay_form.php, find where it sets the default for 'attachments' to 0, and change that to 1.

Note that, after changing the data in the DB, you will need to go to admin -> plugins -> caching and purge the Question definitions cache. Or just purge all caches.

Why do some students correctly guess the answers for questions with images in them?

Example where top image gives the answer (amyloidosis), bottom image has non-descriptive title (img1)

When you insert an image in a question, make sure that the image title doesn't give away the answer, as it is displayed when mousing over the image.

Is there a way to more quickly and efficiently create quiz questions in Moodle?

You can try the Question Bank Quick Builder - a free Google Sheet Add-on created to reduce the labor for instructors creating digital course materials. The instructor can write their questions and answers in plain text, all visible and editable on a single page. (QB)² transforms this content to an XML document, which the instructor can easily import into the Moodle Question Bank.

How do I create system-wide question categories?

  1. As an administrator or user with system permissions, go to Question bank > Categories in any course.
  2. Using the "Add category form" at the bottom of the page, set the parent of the new category to be the system context.

How can students upload images to an Essay question?

When creating the question, in the section Response format, choose "HTML editor + uploaded files."

Is there a way to auto-grade answers to Essay questions?

The H5P essay will auto-grade the answers.

Have a look at the following additional plugins:

Can I use questions (from the question bank) anywhere else besides a quiz?

Yes. See the Embed questions filter - A Moodle text filter plugin that displays questions from the question bank embedded in the page

Is it possible to make existing and future Third-party question types work in the Mobile app?

What is the purpose of the Save button when previewing a question?

The Save button is not very useful for a teacher previewing a question. What it does is to simulate what happens on a multi-page quiz, when the student moves to the next page, and then moves back. Any work-in-progress of the student should be automatically saved, which is why the button should appear to do nothing (unless you look very closely at the Response history table). However, for people developing a new question type, it is important that you can test that works, and that is why the save button was added here.

Is it possible to know in which quiz is one question being used?

According to this post, it is not easy at the moment (November 2021), but this feature is being added to Moodle 4.0. For example, see https://qa.moodledemo.net/question/edit.php?courseid=2&category=22%2C25&qbshowtext=0&recurse=0&recurse=1&showhidden=0 - the Usage column over on the right.

Can I resize the answer boxes while the user is typing?

Yes. Marc Bernat Martínez and Dominique Bauer wrote this code that takes into account the exact width of the input, regardless of its length, font size and family used:

<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
/*
actualWidth    width of the input
checkWidth     width at which the box becomes wider
defaultWidth   default width of the box
c, ctx         see https://www.w3schools.com/tags/canvas_measuretext.asp
size           size of the font w/ px, e.g. '14 px'
               note that the size of the font can be defined in any units,
               e.g. small, medium, xx-large, 150%, 1.25cm, 22px
               since it is always transformed into px units
sizeN          size of the font w/o px, e.g. '14'
family         family of the font, eg. "Times New Roman", Times, serif
txt            text of the input, e.g. '123456'
*/
var defaultWidth = 100;
document.write('<canvas id="canvas_1" style="display: none;"></canvas>');
function newWidth() {
    var txt = $(".formulas_number").val();
    var size = $(".formulas_number").css('font-size');
    var sizeN = Number(size.substring(0, size.length-2));
    var family= $(".formulas_number").css('font-family');
    var c = document.getElementById("canvas_1");
    var ctx = c.getContext("2d");
    ctx.font = size + " " + family;
    var actualWidth = ctx.measureText(txt).width;
    var checkWidth = defaultWidth - sizeN;
    if (actualWidth >= checkWidth) {
        $(".formulas_number").width(actualWidth + sizeN);
    } else {
        $(".formulas_number").width(defaultWidth);
    }
}
$(document).ready(function(){
    $(".formulas_number").css("padding-left","10px");
    newWidth();
    $(".formulas_number").keyup(function() {
        newWidth();
    });
});
</script>

The above script can be adapted to most question types of in which there are answer boxes. You can try examples at moodleformulas.org.

Is it posible to deactivate question versioning?

Yes. In your server go on the following page : /admin/settings.php?section=manageqbanks and desactivate "Question history". If you want changes to show up in in-progress quiz attempts, you need to regrade them.

See also


Any further questions?

Please post in the Quiz forum on moodle.org.