 
 
   reset_section_title: ->
-    console.log 'reset_section_title'
     @$el.find('.sections .section:not(.hidden)').each (index)->
       $this1 = jQuery(this)
-      console.log index
-      console.log $this1
       $this1.find('h3').html("第#{index+1}大题")
       
   reset_question_positions: ($question)->

        origin_index = $section.data('origin-index')
        $id = $section.parent().find("#test_paper_sections_attributes_#{origin_index}_id")
        $id.prop 'name', $id.prop('name').replace(/(sections_attributes\]\[)\d+\]/g, "$1#{index}]") if $id.length > 0
      #$this1.val(index)
      #$this1.html $this1.html().replace(/(section_questions_attributes\]\[)\d+(\])/g , "$1#{index}$2")
      #$this1.find('.question_position').val(index)
      #console.log $this1.find('.question_position')
      #console.log index

jQuery(document).on 'ready page:load', ->
  new NewTestPaper(jQuery('.form-test_paper'), {}) if jQuery('.form-test_paper').length > 0


      section_index = @$el.find('.sections .section').length

      str_template = $section.html().replace /{{section_index_plus}}/g , section_index + 1

      str_template = str_template.replace /{{section_index}}/g , section_index

      $template = jQuery(str_template).removeClass('hidden')
      @$el.find('.sections').append($template)
