A Simple Clock

A Simple Clock

by Michael de Raadt -
Number of replies: 9
Hi All,

Looking for a clock to inform students of the time difference between their computer and your Moodle server? Check out this simple clock block...

http://moodle.org/mod/data/view.php?d=13&rid=3642

Michael;
Average of ratings: -
In reply to Michael de Raadt

Re: A Simple Clock

by Michael de Raadt -
Hi All,

If you're using the Simple Clock block, please update to the latest version.

Michael;
In reply to Michael de Raadt

Re: A Simple Clock

by David Quintal -

Greetings Michael

Install the block and the installation is correct, the only detail that does not appear when only says "Loading ..." and shows no time

Saludos Michael

Instale el bloque y la instalacion es correcta el unico detalle que no aparece la hora solo dice "Loading..." y no muestra ninguna hora

Mi moodle es v1.9.5

In reply to David Quintal

Re: A Simple Clock

by Michael de Raadt -
Hi David,

This would happen if the JavaScript for the clock is not working. If JavaScript is turned off it should also have a message saying that JavaScript needs to be turned on for the block to work.

If you have JavaScript turned on and this problem is still happening, could you please let me know the details of your browser, OS and your server. Also, if you have a JavaScript debugger in your browser, perhaps you could check if it is reporting any problems.

Michael;
In reply to Michael de Raadt

Re: A Simple Clock

by David Quintal -

Ingles:

Hi Michael I have wind 7 and I tested with mozilla internet explorer 8 and the block and I see that internet explorer keeps saying loadling ... mozilla and if there is time, I attached a link to see the block

Español:

Hola Michael Tengo wind 7 y he probado con internet explorer 8 y mozilla el bloque y veo que en internet explorer se queda diciendo loadling... y en mozilla si aparece la hora, te anexo un link para que veas el bloque

Link: http://www.redinnove.com/eduvirtual/

In reply to David Quintal

Re: A Simple Clock

by Rocky Cardwell -

Hi David,

I had the same problem with the clocks not loading in Internet Explorer 7.  I was able to fix it by changing line 110 from "serverTime = new Date();" to "var serverTime = new Date();" in the block_simple_clock.php file.

In reply to Rocky Cardwell

Re: A Simple Clock

by David Quintal -

Hi Rocky I worked perfectly thank you very much what you mention, is added in Spanish what comets because they do not need people having the same problem and not know English

Tuve el mismo problema con el reloj no se carga en Internet Explorer 7. Tuve la oportunidad de solucionarlo cambiando la línea 110 de " serverTime = new Date(); " a " var serverTime = new Date(); " en el archivo block_simple_clock.php

In reply to Rocky Cardwell

Re: A Simple Clock

by Michael de Raadt -

Hi Rocky,

Thanks for pointing this out. I personally blame Microsoft.

I've added the variable and that had the same effect.

I will upload this fix to CVS.

Michael;

In reply to Michael de Raadt

Re: A Simple Clock

by Rob Woof -

Hi Michael, I'm glad I found this thread. I'm preparing for a migration to 2.0 from 1.9, and one showstopper was that the Server Clock module we are using in 1.9 doesn't have a 2.0 update.

Thanks for making it available.

Our current server clock displays the date (not just the day of the week), and has the time in 24-hour notation. I managed to tweak your JavaScript to do this, as shown in the picture below.

Since I am still a beginner at coding blocks and JavaScript, I was not able to figure out how to add these as configuration options, so my code simply replaces the day of the week, removes the am/pm and leaves the hours part of the time in 24-hour mode. If you're interested, I can post the additional code for the date.

Updated 'Clock' block with date and 24-hour time

In reply to Rob Woof

Re: A Simple Clock

by Allan Morris -

Hi. I've just downloaded and installed your block for Moodle 1.9. Worked first time but I wasn't too keen on the way it used text input fields to display the changing clock values. (1) the input box pushed out the rhs column (2) my users would probably try and input something :-o  I've just changed to use div's in the html layout and innerHTML in the js update code and looks better (in my eyes at least) as is just text after the colon now. To do this place a <div id="xx">with the same id as current within the <td> (make sure you close with </div> and change the .value= with .innerHTML= in the update line(s). Thanks for the block. Allan.