<commit_before>- if item.time_for(course_user).is_a? Course::PersonalTime and item.time_for(course_user).fixed?
  span title=t('course.lesson_plan.items.fixed_desc')
    = fa_icon 'lock'
=< format_datetime(item.time_for(course_user)[attribute], datetime_format)
- if item.time_for(course_user)[attribute] != item.reference_time_for(course_user)[attribute]
  br
  strike
    = t('course.lesson_plan.items.ref')
    = format_datetime(item.reference_time_for(course_user)[attribute], datetime_format)<commit_msg>Store query result in variables to reduce N+1<commit_after>- effective_time = item.time_for(course_user)
- reference_time = item.reference_time_for(course_user)
- if effective_time.is_a? Course::PersonalTime and effective_time.fixed?
  span title=t('course.lesson_plan.items.fixed_desc')
    = fa_icon 'lock'
=< format_datetime(effective_time[attribute], datetime_format)
- if effective_time[attribute] != reference_time[attribute]
  br
  strike
    = t('course.lesson_plan.items.ref')
    = format_datetime(reference_time[attribute], datetime_format)
{'fraction_non_alphanumeric': 0.11981132075471698, 'fraction_numerical': 0.0009433962264150943, 'mean_word_length': 7.037878787878788, 'pattern_counts': {'":': 0, '<': 5, '<?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': '2404386', 'n_tokens_mistral': 346, 'n_tokens_neox': 342, 'n_words': 50}