Fixed JavaScript bugs
CSS fixes
Merge pull request #1416 from benjamij/moodle

Fixed JavaScript bugs