<?php use app\components\ExamHelper; ?>
<?php foreach($exams as $oneexam){ ?>
    <tr>
      <td><input type="checkbox" name="examid[]" lay-skin="primary" value="<?php echo $oneexam->id; ?>"></td>
      <td><?php echo $oneexam->title; ?></td>
      <td><?php echo ExamHelper::showCourseName($oneexam->courseid); ?></td>
      <td><?php echo $oneexam->begintime; ?></td>
      <td><?php echo $oneexam->endtime; ?></td>
      <td><?php echo $oneexam->points; ?></td>
      <td><div class="layui-btn-group">
      <a class="layui-btn layui-btn-sm" title="编辑" href="/glexam/basic/<?php echo $oneexam->id; ?>">编辑</a>
      <?php if($oneexam->questway!=2){ ?>
      <a class="layui-btn layui-btn-sm" title="预览" onclick="javascript:return showExamPreviewBox(<?php echo $oneexam->id; ?>);">预览</a>
      <?php } ?>
      <?php if($oneexam->questway==2){ ?>
      <a class="layui-btn layui-btn-sm" title="导出试卷" onclick="exportPaperPerson(<?php echo $oneexam->id; ?>)">导出试卷</a>
      <?php }else{ ?>
      <a class="layui-btn layui-btn-sm" title="导出试卷" target="_blank" href="/glexam/exportpaper/<?php echo $oneexam->id; ?>">导出试卷</a>
      <?php } ?>
      <?php if($oneexam->ispublish==1){ ?>
      <a class="layui-btn layui-btn-sm" title="批改" href="/glexam/pigai/<?php echo $oneexam->id; ?>">批改</a>
      <a class="layui-btn layui-btn-sm" title="统计" onclick="showExamTongjiBox(<?php echo $oneexam->id; ?>);">统计</a>
      <a class="layui-btn layui-btn-sm" title="导出成绩" target="_blank" href="/glexam/export/<?php echo $oneexam->id; ?>">导出成绩</a>
      <?php } ?>
      </div></td>
      <td><?php if($oneexam->ispublish==1){echo '已发布';}else{ ?><input type="checkbox" name="ispublish[]" lay-skin="switch" lay-filter="changeOpenType" value="<?php echo $oneexam->id; ?>"><?php } ?></td>
      <td><?php if($oneexam->isfreed==1){echo '已释放';}else{ ?><input type="checkbox" name="isfreed[]" lay-skin="switch" lay-filter="changeFreeType" value="<?php echo $oneexam->id; ?>"><?php } ?></td>
    </tr>
<?php } ?>