MDL-42663 mod_lesson: Move definitions to show_clock()

Seems that the required data is not always set
before timer.js is included.