<?php foreach($courses as $onecourse){ ?>
    <tr>
      <td><input type="checkbox" name="courseid[]" lay-skin="primary" value="<?php echo $onecourse->id; ?>"></td>
      <td><?php echo $onecourse->name; ?></td>
      <td><span class="layui-badge"><?php echo $onecourse->questinum; ?></span></td>
      <td><div class="layui-btn-group">
      <a class="layui-btn layui-btn-sm" href="/glquesti/tree/<?php echo $onecourse->id; ?>" title="知识树模式">知识树模式</a>
      <a class="layui-btn layui-btn-sm" href="/glquesti/list/<?php echo $onecourse->id; ?>" title="列表模式">列表模式</a>
      <a class="layui-btn layui-btn-sm" title="重新统计题目数量" onclick="javascript:return calcQuestinumAgain(<?php echo $onecourse->specialid; ?>, <?php echo $onecourse->id; ?>);">统计题目数量</a>
      </div></td>
      <td><input type="checkbox" name="isopen[]" lay-skin="switch" lay-filter="changeOpenType" value="<?php echo $onecourse->id; ?>" <?php if($onecourse->isopen==1){echo ' checked';} ?><?php if($onecourse->meleader->leadertype!=1){echo ' disabled';} ?>></td>
      <td><input type="text" name="reusage[]" class="layui-input" style="width:80px; display:inline;" maxlength="8" value="<?php echo $onecourse->reusage; ?>"> 次</td>
    </tr>
<?php } ?>