Minor - format code.
Preventing inserting 2 documents in the same course with the same name.

See BT#8852
Minor - format code.