Dymanic Timetable - My very simple solution

Dymanic Timetable - My very simple solution

by Balu Ertl -
Number of replies: 0

Hi Dear Moodlers,

Although I have been using Moodle for more than a year ago, but this is the very time of posting to the forum. Not only reading from it, as I did continuously during the process of installing LMS for two of my schools. I came from Drupal's thriving community, where I learned how important to give back to the shared common, even the smallest bit you can.

In my case this little JavaScript snippet, which we use to display the name of the current student group in the main headline of our Moodle. All the 20 computers runs Firefox in fullscreen mode with Moodle as the default homepage, so the Frontpage course is used as a digital billboard.

How can I use it in Moodle?
Please keep in mind that this is only a piece of JavaScript code, nothing specific to Moodle (yet, see the future plans below). Generally you can insert the code in any HTML-formatting enabled textfields, for example create an HTML-block on the Frontpage, edit its content, switch the text editor to source-code mode (the < > icon on Atto editor), then paste the code together with the opening <script> and closing </script> tags. Save the block, open or refresh the Frontpage. As an other option save it into a standalone .html file somewhere in your computer, then open from your browser through a file:/// URL. You can also copy to your webserver's docroot directory with the name of index.html, but probably Moodle's index.php is already there :]

Where is it?
Instead of popular codesharing sites like GitHub, I published (actually composed also) this script on Mozilla Thimble. The reason behind my decision is also pedagogical: I found this platform (together with Mozilla's other educational tools) extremely useful to encourage students to play (literally) around with the fundamental basics of web programming. If a modern school utilizes a web-based LMS like Moodle, then teaching their pupils to understand how Internet works should also have priority. I also extensively commented almost every line of code: in one hand help you, who wants to implement it on your own. Also by educational intention to allow any teacher to show it up to their students -- at least as a negative example of a working, but not elegant solution :]

https://baluertl.makes.org/thimble/MjA3ODIxMjA5Ng==/dynamic-timetable-v001/remix

In the future
As novadays open-source developers usually do, I quickly looked around to see if others already made something similar. On moodle.org (and sister domains) I did not stumbled upon any related efforts, but it does not necessarily means that we can not develop it further into an easily installable Moodle-plugin. To do this would have dozens of benefits:

  • Relying on server-time
    By the nature of JavaScript, now it runs on client-side, which means uses the local time of the student's computer, not Moodle's remote server time.

  • Central configuration
    The timetable now needs to be edited directly in the code (although in a visually clear way)

  • Connecting more deeply with Moodle
    It could display a list of the avatar pictures of students in the current group, or send insite/email/SMS/push notification to the teacher before their lesson starts.
Attachment moodle-frontpage-in-mobile-sized-window.png
Average of ratings: -