Fix for truncating error bug.

refs #15927
Merge branch 'bug/15927' into develop
controllers: Fixed type on current_app.

refs #16215
install_course: Added missing vars/funcs.

Was missing install_course_to_site from util.py and the filtered courses list,
which was probably lost somewhere in some merge conflicts.

refs #16215
celery: use the app_context

refs #16215
celery: fixed out of context issue

refs #16215
Switched from using courses to course_details.

Next fix is on the moodle end; dml_missing_record_exception
is being raised for a course install.

refs #16215