We need to determine specific role parameter for LMS only. self.system.get_real_user exists in LMS only. We can determine LMS by checking  if self.system.get_real_user is present. Changed to this.