Show timer without time limit

Show timer without time limit

by Michael Ko -
Number of replies: 3

Hi, I have been playing around with the settings for a long time.

We want to set a time limit of 3 hours and have the timer count down the 3 hours. But when the time is up, we want the student to still be able to continue working on the quiz.

Removing the time limit causes the timer not to be shown.

If I set the time limit as 3 hours, and then give the permission mod/quiz:ignoretimelimits, then the timer is not displayed at all.

When we used Moodle 2.1, we could have the countdown timer and still continue the quiz when the limit is reached.

We are now using Moodle 2.8.

Any suggestions?

Thanks in advance.

Average of ratings: -
In reply to Michael Ko

Re: Show timer without time limit

by Tim Hunt -
Picture of Core developers Picture of Documentation writers Picture of Particularly helpful Moodlers Picture of Peer reviewers Picture of Plugin developers

The fact you could continue after the time-limit in 2.1 was a bug. It was fixed.

The only way I can think of to display at time-limit that has no meaning is to make a new block plugin to display a clock, an use it.

In reply to Tim Hunt

Re: Show timer without time limit

by Michael Ko -

Making a new block is what I'll be doing then. Thanks.

In reply to Tim Hunt

Re: Show timer without time limit

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

Several websites offer clocks and countdown timers that can be used for free. Set the parameters and copy the HTML code, usually just an iframe, into an HTML block.

For example, the following code gives the HTML block 'ANALOG CLOCK' shown below. The iframe was obtained from timeanddate.com.


<div style="text-align:center;">
  <iframe src="https://freesecure.timeanddate.com/clock/i5etbz0j/n165/szw160/szh160/hoc0070a8/hbw0/hfcebebeb/cf100/hgr0/fiv0/fas34/fac888/fdi72/mqv0/mhc888/mhs3/mhl20/mhw2/mhd84/mmv0/hhc888/hhb10/hhw11/hmc888/hml75/hmb10/hmw8/hsv0" frameborder="0" width="160" height="160">
  </iframe>
</div>


By adding a few properties as follows, the position of clock can be fixed relative to the browser window, i.e. the clock will not scroll. Here, it would always stay positioned at the lower right corner.


<div style="width:200px;background-color:#f5f5f5;border:1px solid #cccccc;border-radius:0.3em;text-align:center;padding:20px 0px;position:fixed;right:20px;bottom:15px;">
  <iframe src="https://freesecure.timeanddate.com/clock/i5etbz0j/n165/szw160/szh160/hoc0070a8/hbw0/hfcebebeb/cf100/hgr0/fiv0/fas34/fac888/fdi72/mqv0/mhc888/mhs3/mhl20/mhw2/mhd84/mmv0/hhc888/hhb10/hhw11/hmc888/hml75/hmb10/hmw8/hsv0" frameborder="0" width="160" height="160">
  </iframe>
</div>

Average of ratings: Useful (3)