<commit_before>module ApplicationHelper
	def logged_in?
    session[:user_id] != nil
  end

  def current_user
     User.find(session[:user_id])
  end

  def is_professor?
  	Professor.all.include?(current_user)
  end

  def is_student?
  	Student.all.include?(current_user)
  end

  def is_admin?
  	Professor.where(is_admin: true).include?(current_user)
  end
end
<commit_msg>change current_user, is_professor and is_student<commit_after>module ApplicationHelper
	def logged_in?
    current_user != nil
  end

  def current_user
    if is_professor?
      Professor.find(session[:professor_id])
    elsif is_student?
      Student.find(session[:student_id])
    else
      nil
    end
  end

  def is_professor?
  	session[:professor_id] != nil
  end

  def is_student?
    session[:student_id] != nil
  end

  def is_admin?
  	Professor.where(is_admin: true).include?(current_user)
  end
end

{'fraction_non_alphanumeric': 0.08715083798882682, 'fraction_numerical': 0.0, 'mean_word_length': 3.6666666666666665, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '951360', 'n_tokens_mistral': 329, 'n_tokens_neox': 309, 'n_words': 64}