<commit_before>json.learner_id session[:learner_id]
json.topics do
  json.array! @topics do |topic|
    json.num               topic.num
    json.nickname          topic.nickname
    json.under_contruction topic.under_construction
    json.title             topic.title
    json.title_html        topic.title_html
    json.num_completed do
      %w[purple yellow blue red green].each do |color|
        key = [topic.id, color]
        if @topic_id_color_next_path[key]
          json.set! color, (@topic_id_color_num_completions[key] || {}).size
        end
      end
    end
  end
end
<commit_msg>Menu api should include the next_path for each exercise.<commit_after>json.learner_id session[:learner_id]
json.topics do
  json.array! @topics do |topic|
    json.num               topic.num
    json.nickname          topic.nickname
    json.under_contruction topic.under_construction
    json.title             topic.title
    json.title_html        topic.title_html
    json.level             topic.level
    json.completed do
      %w[purple yellow blue red green].each do |color|
        key = [topic.id, color]
        if @topic_id_color_next_path[key]
          num = (@topic_id_color_num_completions[key] || {}).size
          next_path = @topic_id_color_next_path[key]
          json.set! color, { num: num, next: next_path }
        end
      end
    end
  end
end

{'fraction_non_alphanumeric': 0.08375819373634377, 'fraction_numerical': 0.0, 'mean_word_length': 2.24822695035461, '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': '103771', 'n_tokens_mistral': 432, 'n_tokens_neox': 427, 'n_words': 99}