def create_new_course_in_store(store, user, org, number, run, fields):
 fields.update({'language': getattr(settings, 'DEFAULT_COURSE_LANGUAGE', 'en'), 'cert_html_view_enabled': True})
 with modulestore().default_store(store):
  new_course = modulestore().create_course(org, number, run, user.id, fields=fields)
 add_instructor(new_course.id, user, user)
 initialize_permissions(new_course.id, user)
 return new_course

def create_new_course_in_store ( store , user , org , number , run , fields ) : fields . update ( { 'language' : getattr ( settings , 'DEFAULT_COURSE_LANGUAGE' , 'en' ) , 'cert_html_view_enabled' : True } ) with modulestore ( ) . default_store ( store ) : new_course = modulestore ( ) . create_course ( org , number , run , user . id , fields = fields ) add_instructor ( new_course . id , user , user ) initialize_permissions ( new_course . id , user ) return new_course
create course in store w/ handling instructor enrollment .