issues #1 and #2 from barryspace:
https://github.com/barrysspace/moodle-repository_kaltura/commits/MDL26_UON_FIXES