time limit for image page before question page

time limit for image page before question page

by Bop Giessen -
Number of replies: 12

Hi,

In my quiz I show on a page (with no question) an image. I want this to be shown for only 30 sec (with countdown) and than go automatically to the next page with the question about the picture. Buttons previous en next page can remain on the picture page.

Has anybody done this before?

Thnx,

Bob


Average of ratings: -
In reply to Bop Giessen

Re: time limit for image page before question page

by Beatriz Rojo -
Hi Bop,
I've used it but combining 2 different quizzes, not in a single quiz.
  1. Create a quiz containing the image (A) and a quiz containing the question(s) (B).
  2. Quiz A includes a question-type Description. Settings: timing and completion activity: See the quiz.
  3. Quiz B includes the question(s). Settings: available only if quiz A has been completed.

Average of ratings: Useful (1)
In reply to Beatriz Rojo

Re: time limit for image page before question page

by Bop Giessen -
Thank you Beatriz,
Since I have 5 of these questions divided over a quiz with 40 questions, I hope there is a more simple solution.
Bob
In reply to Bop Giessen

Re: time limit for image page before question page

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

Although several users have expressed a wish to have such a feature, I believe it does not exist. You should still look in the Moodle plugins directory to see if a plugin might be right for you.

I had developped user-side scripts to meet a similar request. You can find them at https://moodleformulas.org/course/view.php?id=77&section=19 ↗ and https://moodleformulas.org/course/view.php?id=77&section=20 ↗. Looking back, these scripts seem somewhat complex to me. There would probably be a way to do something simpler.

Client-side scripts are only workarounds. They have the advantage of not requiring installation or updates, and can be easily modified to meet your specific needs. They have the downside that they require basic knowledge of HTML and JavaScript to edit.

They should not be used when the security of answers is at stake because a savvy student could remove the script while inspecting the code. In the case of timed questions, the use of client-side scripts is questionable because indeed an informed student could delete the script and thus remove the time limits, although setting a time limit for the quiz, which cannot be tampered with, may not give a student enough time to edit the code.

Anyway, hopefully someone someday will write a plugin for timed questions.
Average of ratings: Useful (2)
In reply to Dominique Bauer

Re: time limit for image page before question page

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
To add to the comments by Dominique, it is tempting to think that few students would have the technical knowledge to get around such code. In reality once one student anywhere knows how to do such a thing, the internet and social media mean that very soon, almost every student everywhere will know about it. Plus there is the issue that typically every student normally carries a camera with them (known as a smartphone).
Average of ratings: Useful (2)
In reply to Marcus Green

Re: time limit for image page before question page

by Bop Giessen -
Thanks Marcus and Dominique,
for attending me on this issue. But in this case it will be quiz with no grades or whatsoever. It's just training material for them, so if they want to cheat, they can, they will not learn anything.
Bob
In reply to Bop Giessen

Re: time limit for image page before question page

by Marcus Green -
Picture of Core developers Picture of Particularly helpful Moodlers Picture of Plugin developers Picture of Testers
Quizzing for Learning: awesome. In that case it would be programmable in javascript.
In reply to Marcus Green

Re: time limit for image page before question page

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

Hello Bop and Marcus,

Well, if it's quizzing for learning, maybe it's worth a little script. I wrote one for Bop.

The script is entirely contained in an HTML block. You just have to add it to your quiz. Before you put the script in the "Content" of the HTML block, make sure your editor is in "Plain text area" mode.

To keep it simple, the script only works if the quiz is set as follows:

  • Navigation method: Sequential
  • Question behaviour: Deferred feedback
  • Show blocks during quiz attempts: Yes
  • Browser security: Full screen pop-up with some JavaScript security

The block must be set as follows:

  • Display on page types: Attempt quiz page

Since the quizzes should also be challenging, students can adjust, at the beginning of the quiz, how long photos are displayed and how long questions are displayed.

You will find the required settings for the quiz and the block, the script to include in the HTML block and an example at https://moodleformulas.org/course/view.php?id=77&section=22 ↗.

Average of ratings: Useful (1)
In reply to Dominique Bauer

Re: time limit for image page before question page

by Bop Giessen -

Hi Dominique,

thank you for your input. It looks great and functions well, but.....  it's not exactly what I am looking for, helas, and so  I feel somewhat embarrased for the work you have done for me.

Probably my question was not clear enough.

In my quiz I need this proceure only 4 or 5 times: description page[photo] shown for specific amount of time instantly followed by a question page [includiing check and feedback]). These 4 or 5 occasions are spread over the whole quiz, so not sequentially.

On the Moodle forum

https://moodle.org/mod/forum/discuss.php?d=391916#p1650248

Is the most close to what I need. But It ends with showing a button to go to the next page, where I would like to go directly to the next page when time is up. I am trying to program it myself, but I have never done that, so no succes until now.



In reply to Bop Giessen

Re: time limit for image page before question page

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

Hello Bop,

Thanks for confirming that this little script works great. It may be useful to other people.

To do things in a more conventional way, creating a new type of question should be considered. In fact, it would simply be a modified Description question, which could be called "Timed description", to which the following features would be added:

  • A timer is added while the content (photo, text, etc.) is displayed.
  • The duration of the display is a setting of the question, i.e. it is set by the teacher.
  • The display can be automatic, as soon as the question is loaded, or triggered by the student.
  • The counter continues to run even if the student reloads the page or leaves and returns to the page.
  • When the time is up, the content of the question is hidden and remains hidden even if the student reloads the page or leaves and returns to the page.
  • Going to the next page is automatic or triggered by clicking on the Next page button.
  • The content of the question must be displayed in the quiz review.
  • There may be other things to consider.

There are obviously many variations of this sort of timed question. The actual questions, that is, other than Description, could also be timed.

The display of pages could also be timed. It would then be more of a new quiz settings, that is, a display time could be set by the teacher for any given page of the quiz. That would involve modifications to the quiz module itself.

Let's return to the proposed "Timed description" question. Based on Tim's advice in the thread you are referring to, if I understood correctly, it would be acceptable and fairly straightforward to just inject some JavaScript into the DOM of the quiz pages. There is not too much of a problem for the JavaScript part, especially if the use of jQuery is tolerated, which makes programming a bit easier. As for the plugin itself, it would be the first one I would try to do. Maybe a little later.

In reply to Dominique Bauer

Re: time limit for image page before question page

by Bop Giessen -
Hi Dominique,
Your proposal for a 'timed description' looks goods, but I am not sure whether you also propose a timed despription page (with no question) and an instantly following question page. (that was what I had in mind) By the way, You might also consider the possibility for a student to do the quiz again a later moment.
This plugin-to-be would certainly fix my 'problem'. But at the moment some javascript into the DOM of the quiz page would do for me. And I thought is was Shiva K's thread (https://moodle.org/mod/forum/discuss.php?d=391916#p1650248) that showed what I need, except for that he shows a 'next page'-button (after finishing the countdown) which I would delete and go directly to the next page when time is up.
In reply to Bop Giessen

Re: time limit for image page before question page

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

Hello Bop,

Writing a plugin seems a bit difficult to me because I am not a programmer and because I have never done it before, but I think I will get there one day.

As for making a timed page, it falls under the quiz module and I will not have time to acquire enough knowledge to tackle this before my death, more or less soon. I just mentioned the idea discreetly so that it might go to a programmer's ear.

Setting up a timer and automatically moving to the next page isn't hard to do in JavaScript. What is sometimes more difficult is understanding what another person wants.smileFor example, I misread you and thought you had 40 questions with photos in your quizzes, which explains my first suggestion.

So you will have to make a timer and automatically go to the next page when the time is up. Students do not need to be able to skip to the next page before the time runs out, right? Even if the navigation is free, when the time is up students will no longer be able to access the image, during the current quiz, since an automatic passage to the next page is set.

Store the timer state in a sessionStorage and clear it on the review page so that the photo is available in the review and for future attempts. 

Is that right?

In reply to Dominique Bauer

Re: time limit for image page before question page

by Bop Giessen -
Hello Dominique,

Sorry for being not clear enough until now.
Some background: My quiz will be an elearning tool on perception and memory, theory on description pages and some questions in between. (Questions are like showing a photo on the description page, and memory-question about it on the question page) No grading or whatsoever! Students will be allowed to do the elarning as many times as they want, although the questions wil not be that interesting anymore after one or two tries. Naviation will be set on sequential. And I would like to leave out the navgation pane in this quiz. ( but that is another issue!)
So I want a few (description) pages (spread over the quiz) be shown for a specific time span (15 to 30 seconds), preferably with countdown shown, after which automatically the question page is shown.

In short:
I need a timer and automatically go to the next page when the time is up.
It would be nice if the countdown is visible on the screen.
The standard 'previous page' and 'next page' buttons may stay in place on every page.
That would do!

So if students want to cheat, to look again on the description page before answering the question, I don't mind so much. Of course some students want to view the description page again after they have received their feeback. So I let them free in going forward and backward between pages.

I hope this makes sense! And let me know if it does not