In the more current code, get_or_create_enrollment is a class method that *only* makes courseenrollments, and update_enrollment lets you modify extant enrollments.  But update_enrollment's not a class method, so alas, I don't think something like this would work :/