Checks for duplicate idnumber and shortname in update_course, improves edit_form validation to check for duplicate idnumber, removes checks from externallib.php and adds a new unit test test_update_course that checks duplicate id and shortname update attempts fail
tests now check that duplicate id/shortname errors do not fire when the id and shortname were ours originally