What to do instead of randomizing descriptions

What to do instead of randomizing descriptions

by Steven Kirstukas -
Number of replies: 8

I want to set up a quiz where students get different randomly selected problems. All work will be done outside of the moodle quiz and submitted via a single file. Grading will be done manually. I tried to accomplish this with randomized descriptions but now understand that that won't work in moodle. Other people were content with the essay option. But I don't want to provide text boxes, or have students upload separate files for each problem.

A previous response to a similar question (https://moodle.org/mod/forum/discuss.php?d=344523) said that "in places where you just want to randomise a bit of content, there are other ways to do that in Moodle, so there is no need for the quiz to be able to do this."

But how to do that? Please provide links or examples.

Average of ratings: -
In reply to Steven Kirstukas

Re: What to do instead of randomizing descriptions

by Steven Kirstukas -
I've been using moodle for nine years but have only been experimenting with the quiz feature since the pandemic. I was only able to accomplish what I wanted (display randomized descriptions as problems to be hand-graded later) by a silly workaround. For example, I could make a true/false question that displayed my randomized description and then ask, "Is it raining today?". This accomplished what I wanted at the expense of possibly confusing students. How can I do what I want without resorting to silly workarounds? Thanks.
In reply to Steven Kirstukas

Re: What to do instead of randomizing descriptions

by Emma Richardson -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers
Just put the description in the question text and create multiple true false questions....
Average of ratings: Useful (1)
In reply to Emma Richardson

Re: What to do instead of randomizing descriptions

by Steven Kirstukas -
Emma - thanks for the idea, but I think that this is exactly what I'm doing as a workaround. I don't want any T/F questions as I want them to solve open-ended problems that I will manually grade later.
In reply to Steven Kirstukas

Re: What to do instead of randomizing descriptions

by Dominique Bauer -
Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Plugin developers

Hello Stephen,


<h3 style="margin-top:5px;">General information</h3>
<p>
This is a Description question. It contains a little JavaScript which hides the blocks of info, navigation, etc. Place general information about the quiz here.</p>
<br><br>
<p>
Modify the return address of the "Return to course" button to the course page from which the quiz is launched.</p>
<button type="button" class="btn btn-default" onclick="window.location.href = 'https://moodle.org/mod/forum/discuss.php?d=411912'">Return to course</button>


<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script>
    $(document).ready(function() {
        // Hide answer, navigation and info blocks
        $(".ablock").css("display", "none");
        $(".d-print-none").css("display", "none");
        $(".info").css("display", "none");
        // Hide activity navigation and "Finish attempt" button
        $(".activity-navigation").css("display", "none");
        $(".submitbtns").css("display", "none");
    });
</script>
Average of ratings: Useful (2)
In reply to Dominique Bauer

Re: What to do instead of randomizing descriptions

by Steven Kirstukas -
Hi Dominque, I have a simple test quiz with two descriptive questions, set up as you describe above. When I just add them to my quiz with page breaks, the preview works fine. I get one on each page, but they are of course not randomized.

If I activate the shuffle button, the descriptive questions do present in a random order, although the page break is lost (even though it still is present on the editing quiz page).

But when I try to add the descriptive questions as random questions, I get errors such as,
"There are not enough questions in category 8772 to create the question Random (Exam 3) (156481)." This is even though I have two questions in the category, and I'm only trying to pull one into my quiz.

Any ideas? Thanks

PS: I'm using moodle 3.1
In reply to Dominique Bauer

Re: What to do instead of randomizing descriptions

by Steven Kirstukas -
Sorry, my misunderstanding.

I now create T/F questions and paste the JavaScript block in each question.

I can list all questions in the same section separated by page breaks and click "Shuffle". On preview, the questions within the shuffled section display as expected.

Or I can put the questions in a subcategory and pull a random one out. That is exactly what I wanted to do.

The only tiny issue is that the T/F radio buttons flash on, then stay off. I can live with that.

I have found that I could comment out most of the JavaScript block, except for the line containing "ablock". Then I don't need to add my own navigation buttons -- the default ones work fine.

Thank you Dominique for pointing me to an acceptable workaround for presenting randomized problem descriptions in a quiz to be manually graded later. Much thanks!
Average of ratings: Useful (1)
In reply to Steven Kirstukas

Re: What to do instead of randomizing descriptions

by Timothy Takemoto -
Thank you very much Dominique Bauer and Steven Kirstukas

I am having a bit of difficult importing that script via GIFT to my true false questions. Perhaps I should do as Dominique Baue suggested and have one non random description containing the script and random true false questions which are used as descriptions. Yes. I will try that.

I would be grateful of random description question myself.
In reply to Steven Kirstukas

Re: What to do instead of randomizing descriptions

by Timothy Takemoto -
Thank you that worked. I used a description question like the above which just contains a "message" and the script, without a button, non-shuffled before the random true false question . The true false question did not seem to be displayed at all.