<div class="markPopup" id="popbox02">
  <span class="uploadText">评分设置</span>
  <div class="mt15">
    <span class="f14 fontGrey3 mr10">迟交扣分</span>
    <input type="text" name="late_penalty" id="late_penalty_num" placeholder="请输入0-50数值" class=" markInput"  value="<%= homework.late_penalty%>" onkeyup="check_late_penalty('late_penalty_num')"/>
  </div>
  <% if homework.anonymous_comment == 0 %>
      <div>
        <span class="f14 fontGrey3 mr10">缺评扣分</span>
        <input type="text" name="absence_penalty" id="absence_penalty_num" placeholder="请输入0-50数值" class="markInput" value="<%= homework.homework_detail_manual.absence_penalty%>" onkeyup="check_late_penalty('absence_penalty_num')"/>
      </div>
  <% end %>

  <% if homework.homework_type == 2%>
      <div>
        <span class="f14 fontGrey3 mr10">系统评分</span>
        <%= select_tag :sy_proportion,options_for_select(ta_proportion_option,homework.homework_detail_programing.ta_proportion), {:class => "markPercentage"}  %>
      </div>

      <script>
          $("#sy_proportion").change(function(){
              var ta_proportion = 100 - parseInt(parseFloat($("#sy_proportion").val()) * 100);
              $("#ta_proportion").replaceWith(build_selector(ta_proportion));
              $("#student_proportion").val("0%");
          });

          $("#ta_proportion").live("change",function(){
              var ta_proportion = 100 - parseInt(parseFloat($("#sy_proportion").val()) * 100) - parseInt(parseFloat($("#ta_proportion").val()) * 100);
              $("#student_proportion").val(ta_proportion  + "%");
          });
      </script>
  <% else%>
      <script>
          $("#ta_proportion").change(function(){
              var ta_proportion = parseFloat($("#ta_proportion").val());
              $("#student_proportion").val((100 - parseFloat(parseInt(ta_proportion * 100))) + "%");
          });
      </script>
  <% end%>

  <div>
    <span class="f14 fontGrey3 mr10">教辅评分</span>
    <%= select_tag :ta_proportion,options_for_select(ta_proportion_option_to(100-(homework.homework_detail_programing ? homework.homework_detail_programing.ta_proportion * 100 : 0).to_i),homework.homework_detail_manual.ta_proportion), {:class => "markPercentage"}  %>
  </div>
  <% if homework.anonymous_comment == 0 %>
      <div>
        <span class="f14 fontGrey3 mr10">学生匿评</span>
        <input type="text" id="student_proportion" value="<%= (100 - homework.homework_detail_manual.ta_proportion * 100).to_i - (homework.homework_detail_programing ? homework.homework_detail_programing.ta_proportion * 100 : 0).to_i%>%" class="markPercentage" readonly>
      </div>
  <% end %>
  <div class="mb20">
    <span class="f14 fontGrey3 mr10">教师优先</span>
    <input type="checkbox" name="teacher_priority" <%= homework.teacher_priority == 1 ? 'checked' : ''%>/>
    <span class="f12 c_red ml10">教师评分为最终评分</span>
  </div>
  <div>
    <div class="courseSendSubmit">
      <a href="javascript:void(0);" class="sendSourceText" onclick="$('#ajax-modal').find('form').submit();clickCanel();">确定</a>
    </div>
    <div class="courseSendCancel">
      <a href="javascript:void(0);" class="sendSourceText linkGrey6" onclick="hideModal();">取消</a>
    </div>
  </div>
  <div class="cl"></div>
</div>