EQ-1450 find_usage_for_item performance improvements
EQ-1444 Improve list_courses_for_user()
Check if coursemodule exists
coding style fix
EQ-1450 improve find_all_usage
Add EQUELLA views to moodle logs when using LTI

When LTI authentication is enabled, viewing an EQUELLA resource set to open in a new window did not add an entry to the moodle logs. Log entry added just before the redirect (similar to view.php).