<commit_before>.topic
  .row
    .span8.offset2
      - @contents.each do |content|
        %h1.beta.topic-title
          = @topic.title
        %section.topic
          .row
            .audio
              =audio_tag content.topic_content, autoplay: false, controls: true
        %br
        .row
          .tabbable.tabs-left.topic-details.colored-block{:id => "tabpanel", :role => "application"}
            %ul.nav.nav-tabs{:role => "tablist"}
              %li.tab.active{:id => "t_tab", :role => "tab", "aria-owns" => "t_#{content.id.to_s}", "aria-selected" => "true", "aria-controls" => "t_#{content.id.to_s}"}
                %a{"data-toggle" => "tab", :href => "#t_#{content.id.to_s}"} Transcript
              %li.tab{:id => "s_tab", :role => "tab", "aria-owns" => "s_#{content.id.to_s}", "aria-controls" => "s_#{content.id.to_s}"}
                %a{"data-toggle" => "tab", :href => "#s_#{content.id.to_s}"} Summary
              %li.tab{:id => "test_tab", :role => "tab", "aria-owns" => "test_#{content.id.to_s}", "aria-controls" => "test_#{content.id.to_s}"}
                %a{"data-toggle" => "tab", :href => "#test_#{content.id.to_s}"} Take test
            .tab-content
              .tab-pane.transcript.active{:id => "t_#{content.id.to_s}", :role => "tabpanel", "aria-labelledby" => "t_tab"}
                %h3{"tabindex" => "0"}
                  Transcript
                  %p
                    = content.transcript
              .tab-pane.summary{ :id => "s_#{content.id.to_s}", :role => "tabpanel", "aria-labelledby" => "s_tab"}
                %h3{"tabindex" => "0"} Summary
                = raw content.content_body
              .tab-pane.test{:id => "test_#{content.id.to_s}", :role => "tabpanel", "aria-labelledby" => "test_tab"}
                %h3{"tabindex" => "0"} Take test
                %p 
                  - content.questions.each_index do |index|
                    - question = content.questions[index]
                    - attempt = Attempt.where(:question => question, :user => current_user).first if current_user.attempts.count > 0
                    - flag = false
                    - if attempt != nil
                      - flag = true if attempt.solved == true
                    - if flag == false
                      .span.question{:id => "q_#{question.id}"}
                        = question.query
                        %br
                        %br
                        = simple_form_for question, :url => attempt_question_path(question), remote: true do |f|
                          .control-group
                            .controls
                              = f.collection_radio_buttons :options, question.options.collect{|opt| [opt.id, opt.label]}, :first, :last
                              = f.submit 'Submit', :class => 'btn'
                    %p{:id => "answer_#{question.id}"}
  = render_shareable :url => request.url<commit_msg>Show of questions after attempt<commit_after>.topic
  .row
    .span8.offset2
      - @contents.each do |content|
        %h1.beta.topic-title
          = @topic.title
        %section.topic
          .row
            .audio
              =audio_tag content.topic_content, autoplay: false, controls: true
        %br
        .row
          .tabbable.tabs-left.topic-details.colored-block{:id => "tabpanel", :role => "application"}
            %ul.nav.nav-tabs{:role => "tablist"}
              %li.tab.active{:id => "t_tab", :role => "tab", "aria-owns" => "t_#{content.id.to_s}", "aria-selected" => "true", "aria-controls" => "t_#{content.id.to_s}"}
                %a{"data-toggle" => "tab", :href => "#t_#{content.id.to_s}"} Transcript
              %li.tab{:id => "s_tab", :role => "tab", "aria-owns" => "s_#{content.id.to_s}", "aria-controls" => "s_#{content.id.to_s}"}
                %a{"data-toggle" => "tab", :href => "#s_#{content.id.to_s}"} Summary
              %li.tab{:id => "test_tab", :role => "tab", "aria-owns" => "test_#{content.id.to_s}", "aria-controls" => "test_#{content.id.to_s}"}
                %a{"data-toggle" => "tab", :href => "#test_#{content.id.to_s}"} Take test
            .tab-content
              .tab-pane.transcript.active{:id => "t_#{content.id.to_s}", :role => "tabpanel", "aria-labelledby" => "t_tab"}
                %h3{"tabindex" => "0"}
                  Transcript
                  %p
                    = content.transcript
              .tab-pane.summary{ :id => "s_#{content.id.to_s}", :role => "tabpanel", "aria-labelledby" => "s_tab"}
                %h3{"tabindex" => "0"} Summary
                = raw content.content_body
              .tab-pane.test{:id => "test_#{content.id.to_s}", :role => "tabpanel", "aria-labelledby" => "test_tab"}
                %h3{"tabindex" => "0"} Take test
                %p 
                  - content.questions.each_index do |index|
                    - question = content.questions[index]
                    .span.question{:id => "q_#{question.id}"}
                      = question.query
                    - attempt = Attempt.where(:question => question, :user => current_user).first if current_user.attempts.count > 0
                    = simple_form_for question, :url => attempt_question_path(question), remote: true do |f|
                      .control-group
                        .controls
                          %br
                          %br
                          - if attempt == nil or attempt.solved == false
                            = f.collection_radio_buttons :options, question.options.collect{|opt| [opt.id, opt.label]}, :first, :last
                            = f.submit 'Submit', :class => 'btn'
                            %p{:id => "answer_#{question.id}"}
                          - else
                            - question.options.each do |option|
                              = f.label option.label

  = render_shareable :url => request.url
{'fraction_non_alphanumeric': 0.16931933626820184, 'fraction_numerical': 0.0033863867253640365, 'mean_word_length': 1.6079470198675496, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 87, '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': '947681', 'n_tokens_mistral': 1840, 'n_tokens_neox': 1799, 'n_words': 320}