<commit_before>module SectionAssignment

  def assigned_to_section?
    if self.is_a?(Assignment) || self.is_a?(DiscussionTopic) #|| Quizzes::Quiz.class_names.include?(self.class_name)
      self.course_section_id.present?
    else
      false
    end
  end

end
<commit_msg>Add extra validations for assignments with no course section<commit_after>module SectionAssignment

  def assigned_to_section?
    if (self.is_a?(Assignment) || self.is_a?(DiscussionTopic)) && self[:course_section_id] #|| Quizzes::Quiz.class_names.include?(self.class_name)
      self.course_section_id.present?
    else
      false
    end
  end

end

{'fraction_non_alphanumeric': 0.10047846889952153, 'fraction_numerical': 0.0, 'mean_word_length': 4.367521367521367, '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': '781918', 'n_tokens_mistral': 204, 'n_tokens_neox': 209, 'n_words': 37}