clock block

clock block

by nana OPONG -
Number of replies: 38
How do I add a 'time' or 'clock' block to my moodle site? I am new to moodle and will be gratefull for your help. Thanks.

Average of ratings: -
In reply to nana OPONG

Re: clock block

by Jan Dierckx -

Download the analog clock from the blocks for 1.5 section of this page

Install instructions are the same as with any block and are included in the zip file.

Basically...

  1. Unzip the zipfile

  2. Place the directory 'time' inside the directory 'moodle/blocks/'

  3. Copy the file lang/en/block_time.php to the directory 'moodle/lang/en/' even if you are not using English language on your site.

  4. Visit the admin page of your moodle site for the changes to take effect

  5. The block should now show up in the dropdown menu when you have editing turned on in a course

HTH

In reply to Jan Dierckx

Re: clock block

by N Hansen -
Can I ask a really silly question? Why on earth would anyone want a clock block? Doesn't every computer today have a clock on the screen at all times?
In reply to N Hansen

Re: clock block

by Julian Ridden -
Clock blocks can be very useful, especially if they show server time.

We are a college here and use the block to show official "College" time. Useful for making sure students are on time by our understanding of it and not theirs. This also helps for when activities are time based (chat sessions, quizzes, assignment due times) to make sure no-one misses out on activities due to slow or fast watches.

With pure e-learning sites with international clientele, a server time displayed on the site also allows for removing any possible confusions when time is referred too.
In reply to Julian Ridden

Re: clock block

by Genner Cerna -
I too wanted a clock block that is server time or the official school time to the javascript.
In reply to Genner Cerna

Re: clock block

by Simon Bryan -
Yeah bummer this one reads the local workstation time - not much help. WIll have to delete it again, hopefully something in 1.6
In reply to Simon Bryan

Re: clock block

by Jan Dierckx -

I looked at the parameters passed to the Flash movie. None of them contained anything about the time. I guess the Flash script reads the local workstation time and then displays it. I don't know anything about Flash so I can't pass a servertime to the Flash movie.

Would this be any good?

In reply to Jan Dierckx

Re: clock block

by Simon Bryan -
That seems to work better for what I want. although I wonderd why the time was 23.2.06 for a while!  DOH!
In reply to Simon Bryan

Re: clock block

by Julian Ridden -
This is the block we use. It can show both workstation or server time. On our site I just disabled the showing of workstation time as I saw little point.
In reply to Julian Ridden

Re: clock block

by Genner Cerna -
is the clock realtime? what i mean live...
In reply to Genner Cerna

Re: clock block

by Julian Ridden -
You can see the clock block in action here: http://montenet.monte.nsw.edu.au/index.php

It is on the bottom right hand corner of the page. I have hidden the local "user" time and am curerntly having the block show the time as it stands on the server.
In reply to Julian Ridden

Re: clock block

by Sean S -
I have hidden the local "user" time

How did you do this?
In reply to Sean S

Re: clock block

by Genner Cerna -
here, here how would you hide the localtime showing only the server? what script to comment?
In reply to Julian Ridden

回應: Re: clock block

by Chiu Charlie -
It is working fine.  However, I think you may want to add this lang file into the distribution zip.

The name should be: block_dual_clock.php and put into lang/en/ location.  But I did the name to previent the same name in a single zip file.

There may be other text option that I don't know but the file work on my site.
In reply to Chiu Charlie

Re: 回應: Re: clock block

by Sean S -
in the blocks setting this shows up as daul time - someone made a typo
In reply to Jan Dierckx

Re: clock block

by MOHD RAFI ABU BAKAR -
hi there..

i have follow all the steps above but the clock block still doesn't appear in my block menu. Currently i'm using moodle 1.5.3 on Linux.
where else should i troubleshoot to make this successfull??


In reply to MOHD RAFI ABU BAKAR

Re: clock block

by Simon Bryan -
If you are talking about the clock in the beginning of this thread then note that you are looking for a block called 'Time' in the list. If it is not there, describe the steps in detail that you have taken as this was one of the easiest blocks to install
In reply to Simon Bryan

Re: clock block

by Roberto Azar -

Hi!

I installed the clock with success with your indications, but i am looking for a GMT hour clock because it is a international course, and any other clock from this forum i tried to install pasting the code in a html block was not possible (sure because my error, i don't know very much about this...):

1- is there some way to to make the clock GMT, means London hour, and not read the computer hour ?

or 2- may i receive a sugerence how to insert another type of clock with GMT hour at my moodle ?

thanks in advance !

Roberto Azar

http://eba-stats.com

http://eba-stats.com/moodle

In reply to MOHD RAFI ABU BAKAR

Re: clock block

by Pádraic Ó Leanacháin -
Hi Rafi!

I have noticed that the (analog) clock block is not visible on Mozilla v 1.0.7 (but seems to work on Opera and IE).

Try using a different browser.

In reply to Pádraic Ó Leanacháin

Re: clock block

by Genner Cerna -
anyone has an updated version of clock block for moodle 1.6?
In reply to Genner Cerna

Re: clock block

by Genner Cerna -
where can i find a newer version of clock block?
In reply to Genner Cerna

Re: clock block

by Jan Dierckx -

I am surprised to hear that it doesn't work in 1.6. Does it need updating (again)?

In reply to Jan Dierckx

Re: clock block

by Genner Cerna -
header is title inside the brackets... i think it needs to update
In reply to Genner Cerna

Re: clock block

by Jan Dierckx -

That means the language strings are missing. Where did you put the language file for this block? I believe it should be in en_utf8.

In reply to Jan Dierckx

Re: clock block

by Genner Cerna -
thanks its working fine now...

how can i change the time format to normal time not the military time?
In reply to Jan Dierckx

Re: clock block & random picture block

by mandy honeyman -
Hi Jan,
I've just upgraded my site to v1.6 and the upgrade process threw out both my time block and random picture block.

I'd love to get them back on because the kids like them (and so do the staff big grin ). Any idea when you might be able to get them upgraded for 1.6?

(I realise from recent messages that you believe they should be working for 1.6 but it's the upgrade process that threw them out, with quite a lot of errors, so I thought I'd just keep it clean and delete them.)

cheers
Mandy
In reply to mandy honeyman

Re: clock block & random picture block

by Jan Dierckx -
Oops, I guess I just have to live with changing blocks code everytime there is a new version of Moodle? 1.4 > 1.5 > 1.6 > ...

Genner Cerna posted an issue about the language strings being in the wrong place, but I thought Genner reported it was working now?

I postponed upgrading my site because of the mysql version my hosting provider uses being too low, so I hadn't noticed this. Can you tell me what errors show up during the upgrade?

In reply to Jan Dierckx

Re: clock block & random picture block

by mandy honeyman -
Hi Jan,
Basically it was a string of php errors saying the blocks, or a particular file in the block directory, not found and then there's a rather nice new thing that comes up in the blocks admin section (I think) which prompts you to delete the blocks.
So I'm sorry but I didn't copy them out because I was just trying to get up and running.
cheers
Mandy
In reply to nana OPONG

Re: clock block

by Greg Gernhart -
Has anyone found a way to have the time display in non-military format? Any help would be much appreciated.
In reply to nana OPONG

Re: clock block

by Lyubomir Zhivkov -
Hi to all of You!

I´ve installed moodle 1,6 and I'm expecting difficulties with the analogue_clock_block. When I use Firefox or Mozilla the clock does NOT appear sad. With Opera and IE is everything OK.
Does someone know what change should I do in order to be able to see the clock with firefox?

Thanks in advise
In reply to Lyubomir Zhivkov

Re: clock block

by Jan Dierckx -

The clock is built using Flash. Do you have the Flash plugin installed?

What difficulties do you have? did they start showing up after upgrading to Moodle 1.6?

In reply to Jan Dierckx

Re: clock block

by Lyubomir Zhivkov -
Hi, Jan!
Yes I have flash plug-in installed (for IE and mozilla) and yes it started showing up after upgrading to Moodle 1.6.

Its funny, but sometimes the Flash-clock does show up and sometimes not... surprise . clearing the coockeis and the cache normaly helps for the clock to be shown. smile

LZ.
In reply to nana OPONG

Re: clock block

by Adma Lim -
Is there a digital clock block available to download? that would show the server/local time
In reply to Adma Lim

Re: clock block

by Hartmut Scherer -
I use an HTML block and added a clock from this page.

With kind regards,

Hartmut
In reply to Hartmut Scherer

Re: clock block

by Adma Lim -
Thanks Hartmut.

Pretty easy to do!

All i need to do is to add the generated HTML code into the html editor.
In reply to nana OPONG

Re: clock block

by Olivia Duryea -

It is to easy to add the clock on your moodle site just visit the site and follow the instructions to add the clock on your profile.