Update course.php

Uses the regular expression matching to check the given course ID