123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279 |
- <style>
- /*切换选择*/
- .tab-con{
- position: relative;
- height: 30px;
- width: 200px;
- background: #F2F2F2;
- border: 1px solid #01B677;
- border-radius: 15px;
- }
- .has-sel{
- background: #01B677;
- color: #fff;
- width: 50%;
- height: 30px;
- border-top-left-radius: 15px;
- border-bottom-left-radius: 15px;
- text-align: center;
- line-height: 30px;
- }
- .sel-opt{
- width: 50%;
- position: relative;
- color: #01B677;
- line-height: 30px;
- text-indent: 6px;
- cursor: pointer;
- }
- .sel-opt:after{
- content: '';
- border-left: 6px solid transparent;
- border-right: 6px solid transparent;
- border-top: 8px solid #01B677;
- position: absolute;
- right: 12px;
- top: 12px;
- }
- // .sel-opt select{
- // width: 100%;
- // height: 30px;
- // background: #F2F2F2;
- // color: #01B677;
- // text-indent: 6px;
- // font-size: inherit;
- // border-top-right-radius: 15px;
- // border-bottom-right-radius: 15px;
- // cursor: pointer;
- // }
- // .sel-opt select option{
- // position: relative;
- // }
- .points{
- position: absolute;
- top: -2px;
- right: 0;
- width: 10px;
- height: 10px;
- background: #F01516;
- border-radius: 50%;
- }
- .sel-cons{
- border: 1px solid #01B677;
- width: 50%;
- position: absolute;
- right: 0;
- top: 30px;
- text-indent: 10px;
- display: none;
- }
- .sc-lis{
- line-height: 30px;
- cursor: pointer;
- }
- .sc-lis span{
- position: relative;
- }
- .sc-lis .points{
- top: 2px;
- right: -16px;
- }
- .click-sc:focus {
- color: #fff;
- }
- .click-sc:hover {
- color: #fff;
- }
- .table-select{text-align: center;}
- .table-select .circle{display: inline-block;width: 30px;height: 30px;border: 1px solid #e4e4e4;border-radius: 50%;margin: 6px;background: #e4e4e4;}
- .circle.select{background: #9966FF;}
- </style>
- <link rel="stylesheet" href="/fonts/fpdf/iconfont.css" />
- <div class="main-content-inner">
- <ul class="clearfix main-content-inner-ul">
- <?php if((isset(Yii::app()->session['session_subject_id']) && Yii::app()->session['session_subject_id']==3) || (isset(Yii::app()->session['session_subject_id']) && Yii::app()->session['session_subject_id']==6)){?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'wtb'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载错题本</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'isp'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载个性化学习方案</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/sub_index",array('type'=>'studytrend'));?>"' class="button button_normal button_group button_arrow " data-button="red">下载个性化学习宝</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/student_product");?>"' class="button button_normal button_group button_arrow " data-button="red">阶段复习个性化学习宝</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("third/index");?>"' class="button button_normal button_group button_arrow button_active" data-button="red">第三方试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow " data-button="red">导出报告</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("upload/index");?>"' class="button button_normal button_group button_arrow" data-button="red">上传试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php if(isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)){
- ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/restore");?>"' class="button button_normal button_group button_arrow" data-button="red">还原考试</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php
- }?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("record/importscore"); ?>"'
- class="button button_normal button_group button_arrow " data-button="red">导入成绩
- </button>
- <img src="/images/line.jpg" style="height:45px;"/>
- </li>
- <?php }else{ ?>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/index",array('type'=>'wp'));?>"' class="button button_normal button_group button_arrow " data-button="red">打印试卷</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("export/index");?>"' class="button button_normal button_group button_arrow " data-button="red">导出报告</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("print/do_ruanyun_pdf");?>"' class="button button_normal button_group button_arrow" data-button="red">下载PDF</button>
- <img src="/images/line.jpg" style="height:45px;" />
- </li>
- <?php }?>
- <!--<div class="tab-con clearfix pull-right" style="margin:8px 11px 0 0">
- <div class="has-sel fl"><?php /*echo isset(Yii::app()->params["subjectId"][Yii::app()->session['session_subject_id']])?Yii::app()->params["subjectId"][Yii::app()->session['session_subject_id']]:'数学'*/?></div>
- <div class="sel-opt fl">
- 切换学科
- <?php /*if($subject){*/?>
- <div class="points"></div>
- <?php /*}*/?>
- </div>
- <div class="sel-cons" style="z-index:6;background-color: #fff;">
- <div class="sc-lis" val="3"><span>数学<?php /*if($subject && isset($subject[3]) && !empty($subject[3])){*/?><div class="points"></div><?php /*}*/?></span></div>
- <div class="sc-lis" val="12"><span>物理<?php /*if($subject && isset($subject[12]) && !empty($subject[12])){*/?><div class="points"></div><?php /*}*/?></span></div>
- <div class="sc-lis" val="13"><span>化学<?php /*if($subject && isset($subject[13]) && !empty($subject[13])){*/?><div class="points"></div><?php /*}*/?></span></div>
- <div class="sc-lis" val="14"><span>生物<?php /*if($subject && isset($subject[14]) && !empty($subject[14])){*/?><div class="points"></div><?php /*}*/?></span></div>
- </div>
- </div>-->
- <li class="pull-left">
- <button onclick='location.href="<?php echo $this->createUrl("cylet/index");?>"' class="button button_normal button_group button_arrow" data-button="red">全学科统考</button>
- </li>
- </ul>
- <div class="page-content">
- <div class="row" style="margin:0px;">
- <div class="col-xs-12">
- <!-- PAGE CONTENT BEGINS -->
- <form method="post" id="form1" action="<?php echo $this->createUrl("third/save_answer");?>">
- <div id="dynamic-table_wrapper" class="dataTables_wrapper form-inline no-footer">
- <div class="row">
- <div class="col-xs-8" style="font-weight:bold;padding:0px 15px;margin: 30px 0 0 0 ; ">
- <?php echo $exam_data->name;?>
- </div>
- <div class="col-xs-3" style="float: left;">
- <div class="dataTables_filter" id="dynamic-table_filter" style="padding-top:15px;text-align: right;">
- <a href="javascript:void(0);" class="btn label-primary-green btn-sm" id="saveAnswer">
- <i style="font-style: normal;" ></i>确定
- </a>
- </div>
- </div>
- </div>
- <table id="dynamic-table" class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable table-select" style="font-size:12px">
- <thead>
- <tr>
- <th>题号</th>
- <th >A</th>
- <th>B</th>
- <th >C</th>
- <th >D</th>
- <th >分数</th>
- </tr>
- </thead>
- <tbody>
- <?php if(isset($paper_topic)){
- foreach($paper_topic as $v){
- ?>
- <tr class="single">
- <th ><?php echo $v->order?></th>
- <td><span class="circle <?php if(isset($exam_answer_data[$v->order]) && !empty($exam_answer_data[$v->order])){
- if($exam_answer_data[$v->order] == 'A'){echo 'select';}
- }?>" answer = "A"></span></td>
- <td><span class="circle <?php if(isset($exam_answer_data[$v->order]) && !empty($exam_answer_data[$v->order])){
- if($exam_answer_data[$v->order] == 'B'){echo 'select';}
- }?>" answer = "B"></span></td>
- <td><span class="circle <?php if(isset($exam_answer_data[$v->order]) && !empty($exam_answer_data[$v->order])){
- if($exam_answer_data[$v->order] == 'C'){echo 'select';}
- }?>" answer = "C"></span></td>
- <td><span class="circle <?php if(isset($exam_answer_data[$v->order]) && !empty($exam_answer_data[$v->order])){
- if($exam_answer_data[$v->order] == 'D'){echo 'select';}
- }?>" answer = "D"></span></td>
- <th><?php echo $v->score?>分</th>
- <input type="hidden" name="answer[]" value="<?php if(isset($exam_answer_data[$v->order]) && !empty($exam_answer_data[$v->order])){
- echo $exam_answer_data[$v->order];
- }?>">
- </tr>
- <?php }}?>
- </tbody>
- </table>
- </div>
- <input type="hidden" name="exam_group_id" value="<?php echo $exam_group_id?>">
- <input type="hidden" name="paper_id" value="<?php echo $paper_data->paper_id?>">
- </form>
- <!--上传模板弹窗-->
- <!-- PAGE CONTENT ENDS -->
- </div>
- </div>
- </div>
- </div>
- <script>
- $(document).ready(function(){
- $('.circle').click(function(){
- $(this).addClass('select').parent().siblings().find('.circle').removeClass('select');
- var answer = $(this).attr("answer");
- $(this).closest('.single').find('input').val(answer);
- })
- $('#saveAnswer').click(function(){
- alert($("input[name=answer]").val());return;
- $('form').submit();
- });
- });
- </script>
|