Cleaning white spaces.
Fixing course creation due new visibility added see BT#6585
If the session does not have any content hide it! see BT#6687
Minor - format code