Reformat code.

Signed-off-by: tungpham31 <tungpham31@gmail.com>
Fix bug: can't get course list when one of the course media
directory is broken.

Signed-off-by: tungpham31 <tungpham31@gmail.com>