Revert "MDL-39876 update_course_record function to update global COURSE"

This reverts commit c290ac5510ca06b3eae557c2165c2f106dde46aa.

Conflicts:
	course/lib.php