<div class="layui-tab layui-tab-brief">
  <ul class="layui-tab-title">
    <?php include(__DIR__ ."/../basic/menu.php"); ?>
  </ul>
  <div class="layui-tab-content">
    <div class="layui-tab-item layui-show">

<form class="layui-form" id="detail_form" method="post" style="margin-top:15px;">

  <?php foreach ($rules as $onerule) { ?>
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">得分区间</label>
      <div class="layui-input-inline" style="width: 100px;">
        <input type="text" name="score_lower[]" class="layui-input" maxlength="4" value="<?php echo $onerule->score_lower; ?>">
      </div>
      <div class="layui-form-mid">-</div>
      <div class="layui-input-inline" style="width: 100px;">
        <input type="text" name="score_upper[]" class="layui-input" maxlength="4" value="<?php echo $onerule->score_upper; ?>">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">评语</label>
      <div class="layui-input-inline" style="width: 400px;">
        <input type="text" name="remark[]" class="layui-input" value="<?php echo $onerule->remark; ?>">
      </div>
    </div>
  </div>
  <?php } ?>

  <div class="layui-form-item" id="addordelbuttonbox">
    <label class="layui-form-label"></label>
    <div class="layui-input-block">
      <a class="layui-btn layui-btn-sm" onclick="javascript:optionAdded();"><i class="layui-icon layui-icon-add-circle"></i> 增加规则</a>
      <a class="layui-btn layui-btn-sm" onclick="javascript:optionDelete();"><i class="fa fa-minus-circle"></i> 减少规则</a>
    </div>
  </div>

  <div class="layui-form-item">
    <div class="layui-input-block">
      <button type="button" class="layui-btn" id="finished_button">提交</button>
      <button type="button" class="layui-btn layui-btn-primary" onclick="javascript:window.history.back();">取消</button>
    </div>
  </div>

  <div class="layui-form-item">
    <label class="layui-form-label"></label>
    <div class="layui-input-block" style="color:#f00;">
      <span>友情提示：一键批改仅适用于纯客观题试卷</span>
    </div>
  </div>

  <input type="hidden" name="examid" value="<?php echo $exam->id; ?>">
  <input type="hidden" name="courseid" value="<?php echo $exam->courseid; ?>">
</form>

    </div>
  </div>
</div>

<div id="add_rule_example" style="display:none;">
  <div class="layui-form-item">
    <div class="layui-inline">
      <label class="layui-form-label">得分区间</label>
      <div class="layui-input-inline" style="width: 100px;">
        <input type="text" name="score_lower[]" class="layui-input" maxlength="4" value="">
      </div>
      <div class="layui-form-mid">-</div>
      <div class="layui-input-inline" style="width: 100px;">
        <input type="text" name="score_upper[]" class="layui-input" maxlength="4" value="">
      </div>
    </div>
    <div class="layui-inline">
      <label class="layui-form-label">评语</label>
      <div class="layui-input-inline" style="width: 400px;">
        <input type="text" name="remark[]" class="layui-input" value="">
      </div>
    </div>
  </div>
</div>

<script src="/public/modules/glexam/onekeyrule/index.js"></script>