Since you're digging into CourseMode for this information (which is in common) and you need it in student/views.py (also in common), maybe this logic could just become a method on CourseEnrollment? So you could do something like `enrollment.refundable()` ?