<commit_before>.panel.panel-default
  .panel-heading
    %h4.panel-title 
      %i.fa.fa-certificate.fa-fw
      Badges
  .panel-body
    - if badges[:moodle].present?
      - if Settings.home_page == "progress"
        - badge_list = badges[:all]
      - else
        - badge_list = badges[:moodle].last.all_in_course      
      - if badge_list.present?
        - badge_list.each do |badge|
          .col-xs-2.ppd_badge
            = link_to badge.link_url, :title => badge[:title], "data-toggle" => "popover", "data-content" => badge[:description] do
              = image_tag badge.image_url, :class => "img-responsive"
    - if Settings.home_page != "progress"
      - if badges[:course].present?
        - badges[:course].each do |badge|
          .col-xs-2.ppd_badge
            = link_to badge.eventable.link_url, :title => badge.eventable[:title], "data-toggle" => "popover", "data-content" => badge.eventable[:description] do
              = image_tag badge.eventable.image_url, :class => "img-responsive"
    - if !badges[:moodle].present? && !badges[:course].present?
      Once achieved, your badges will appear here
    - else
      :coffeescript
        $('.ppd_badge').mouseover ->
          $('#current_badge').html($(this).find('a').attr("title"))<commit_msg>corrected check for badges shown<commit_after>.panel.panel-default
  .panel-heading
    %h4.panel-title 
      %i.fa.fa-certificate.fa-fw
      Badges
  .panel-body
    - badges_shown = 0
    - if Settings.home_page == "progress"
      - badge_list = badges[:all]
    - else
      - badge_list = badges[:moodle].last.all_in_course      
    - if badge_list.present?
      - badge_list.each do |badge|
        - badges_shown += 1
        .col-xs-2.ppd_badge
          = link_to badge.link_url, :title => badge[:title], "data-toggle" => "popover", "data-content" => badge[:description] do
            = image_tag badge.image_url, :class => "img-responsive"
    - if Settings.home_page != "progress"
      - if badges[:course].present?
        - badges[:course].each do |badge|
          - badges_shown += 1
          .col-xs-2.ppd_badge
            = link_to badge.eventable.link_url, :title => badge.eventable[:title], "data-toggle" => "popover", "data-content" => badge.eventable[:description] do
              = image_tag badge.eventable.image_url, :class => "img-responsive"
    - if badges_shown == 0
      Once achieved, your badges will appear here
    - else
      :coffeescript
        $('.ppd_badge').mouseover ->
          $('#current_badge').html($(this).find('a').attr("title"))
{'fraction_non_alphanumeric': 0.1527074405921309, 'fraction_numerical': 0.0038955979742890533, 'mean_word_length': 2.4469798657718123, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 21, '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': '6593365', 'n_tokens_mistral': 881, 'n_tokens_neox': 842, 'n_words': 149}