Enforce sesskey checking on course settings page via ajax.
Update SQL queries to use params array for data handling.