javascript issue with moodle 2.6.2