Fixing copy course with the new field iid
Fixing PHP notices
Fixing copy course due the recent changes in the exercise tool (iid field added) see BT#5638
Minor - updating comments