Fixing query adding real_id
Fixing PHP notice
Using c_id instead of course code
Minor adding class to button
Fixing PHP notices