def send_beta_role_email(action, user, email_params):
 if (action == 'add'):
  email_params['message'] = 'add_beta_tester'
  email_params['email_address'] = user.email
  email_params['full_name'] = user.profile.name
 elif (action == 'remove'):
  email_params['message'] = 'remove_beta_tester'
  email_params['email_address'] = user.email
  email_params['full_name'] = user.profile.name
 else:
  raise ValueError("Unexpected action received '{}' - expected 'add' or 'remove'".format(action))
 send_mail_to_student(user.email, email_params, language=get_user_email_language(user))

def send_beta_role_email ( action , user , email_params ) : if ( action == 'add' ) : email_params [ 'message' ] = 'add_beta_tester' email_params [ 'email_address' ] = user . email email_params [ 'full_name' ] = user . profile . name elif ( action == 'remove' ) : email_params [ 'message' ] = 'remove_beta_tester' email_params [ 'email_address' ] = user . email email_params [ 'full_name' ] = user . profile . name else : raise ValueError ( "Unexpected action received '{}' - expected 'add' or 'remove'" . format ( action ) ) send_mail_to_student ( user . email , email_params , language = get_user_email_language ( user ) )
send an email to a user added or removed as a beta tester .