def add_enrollment(student_id, course_id, is_active=True, mode='honor'):
 enrollment = {'created': datetime.datetime.now(), 'mode': mode, 'is_active': is_active, 'course': _get_fake_course_info(course_id), 'student': student_id}
 _ENROLLMENTS.append(enrollment)
 return enrollment

def add_enrollment ( student_id , course_id , is_active = True , mode = 'honor' ) : enrollment = { 'created' : datetime . datetime . now ( ) , 'mode' : mode , 'is_active' : is_active , 'course' : _get_fake_course_info ( course_id ) , 'student' : student_id } _ENROLLMENTS . append ( enrollment ) return enrollment
enrolls a user in a course .