123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>试题编辑</title>
- <link rel="stylesheet" type="text/css" href="/css/base.css">
- <!-- bootstrap & fontawesome -->
- <link rel="stylesheet" href="/css/bootstrap.min.css" />
- <link rel="stylesheet" href="/css/font-awesome/4.2.0/css/font-awesome.min.css" />
- <!-- page specific plugin styles -->
- <!-- text fonts -->
- <link rel="stylesheet" href="/css/fonts/fonts.googleapis.com.css" />
- <!-- ace styles -->
- <link rel="stylesheet" href="/css/ace.min.css" class="ace-main-stylesheet" id="main-ace-style" />
- <link rel="stylesheet" href="/css/style.css" />
- <script type="text/javascript" src="/js/jquery.min.js"></script>
- <script src="/js/layer/layer.js"></script>
- <style>
- .header-top{
- font-size:16px;
- height:30px;
- line-height: 30px;
- padding:15px;
- }
- .operate-menu{margin:15px 0;}
- .operate-menu li{
- width:90px;
- font-weight: bold;
- font-size:14px;
- float:left;
- padding:5px 15px;
- }
- .topic-list{
- clear: both;
- padding:15px;
- width: 90%;
- }
- .hide{display: none;}
- .show{display: block}
- .menu-active{color:#2977ff}
- .answer-list,.rule-list{
- width:35px;
- height:30px;
- line-height: 30px;
- background:#fff;
- color:#555;
- border:1px solid #555;
- display: inline-block;
- text-align: center;
- margin:3px;
- cursor: pointer;
- }
- .rule-list{
- width:70px;
- }
- .answer-active,.rule-active{
- background:#2977ff;
- color:#fff;
- }
- .topic-operate{float: right;width:300px;margin-right: 20px;}
- .confirmbox-mask {
- background: rgba(0, 0, 0, .7);
- left: 0;
- right: 0;
- top: 0;
- bottom: 0;
- z-index: 99;
- position: fixed;
- }
- button {
- border: none;
- background: #2977ff;
- width: 80px;
- height: 26px;
- border-radius: 3px;
- font-size: 14px;
- color: #fff;
- outline: none;
- cursor: pointer;
- }
- button.save {
- display: block;
- margin: 40px auto;
- }
- .confirmbox .confirmbox-btns {
- margin-top: 40px;
- }
- .class-modal {
- width: 500px;
- min-height: 400px;
- background: #fff;
- // border-radius: 5px;
- position: absolute;
- top: 50%;
- left: 50%;
- transform: translate(-50%, -50%);
- }
- .class-modal-head {
- font-size: 14px;
- background:#2977ff;
- color:#fff;
- height:35px;
- line-height: 35px;
- padding: 0 0 0 15px;
- }
- .class-modal-body {
- margin-top: 20px;
- max-height: 300px;
- overflow: auto;
- margin-left:50px;
- }
- .class-modal-body .classes {
- margin-bottom: 20px;
- }
- .class-modal-body .classes > div {
- display: inline-block;
- max-width: 640px;
- vertical-align: top;
- }
- .class-modal-body .classes a {
- text-decoration: none;
- display: inline-block;
- margin: 0 5px 5px;
- color: #136bfb;
- font-size: 14px;
- }
- .class-modal-body .classes a.active {
- color: #fc091b
- }
- .class-modal .icon-close{
- position: absolute;
- right: 20px;
- top: 2px;
- color:#fff;
- }
- .c-red {
- color: #CC3300
- }
- .avg{
- margin:0 10px;
- }
- .class_btn{
- text-align: center;
- }
- .confirmbox-mask p{
- word-wrap : break-word ;
- }
- .class-modal-body p{margin:10px 0;}
- .class-modal-body p span{display: inline-block;width:60px;}
- .answerList td{text-align: center;padding:3px 0;border-bottom: 1px dotted #ccc;}
- .answerShow{border-collapse:separate;background: #666;width:190px;}
- .answerShow td{text-align: center;background:#fff;cursor: pointer}
- .answerShow td.active{background:#50d2c2;color:#000}
- .answerShow td.active_gray{background:#ccc;color:#fff}
- .new_half_score{width:50px;}
- .icon-close{cursor:pointer;font-size:20px;line-height: 35px;}
- .class_btn{position: fixed;bottom: 2%;text-align: center;width:500px;}
- .red-tig{color:red;}
- .topic a.c-red{ color: #CC3300}
- .fr{margin-right:10px;}
- .rule-why{
- width:15px;height:15px;display: inline-block;border-radius: 10px;border:1px solid #ccc;line-height: 15px;font-size:10px;margin-top:5px;padding-bottom:5px;
- }
- </style>
- </head>
- <body>
- <div class="header-top">
- <a href="#" onclick="javascript:history.go(-1)" class="">返回</a>
- <?php echo $exam_name;?>
- <input type="hidden" name="exam_id" value="<?php echo $exam_id?>">
- <input type="hidden" name="paper_id" value="<?php echo $paper_id?>">
- </div>
- <div>
- <div>
- <ul class="operate-menu">
- <?php foreach ($menu as $k =>$v):?>
- <li class="topic-menu" id="<?php echo $k; ?>"><?php echo $v;?></li>
- <?php endforeach;?>
- </ul>
- <div class="topic-operate">
- <button class="label-primary-s bth-s topic-edit">编辑</button>
- <button class="label-primary-s bth-s topic-edit-cancel " style="display: none">取消</button>
- <button class="label-primary-s bth-s topic-edit-save " style="display: none">保存</button>
- <?php if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)) {?>
- <button class="label-primary-s bth-s topic-send-point" style="display: ">特殊分值设置</button>
- <?php }?>
- <input type="hidden" name="select-tab" value="0">
- </div>
- </div>
- <?php
- $multipleKongAlias=array('①','②','③','④','⑤','⑥','⑦','⑧','⑨','⑩');
- $multipleWenAlias=array('(1)','(2)','(3)','(4)','(5)','(6)','(7)','(8)','(9)','(10)');
- if(isset($topic[1])):?>
- <div class="topic-list list-type-1 hide">
- <p class="red">提示:客观题特殊分值设置请在学生答卷全部上传完后联系技术支持设置,设置后无法撤销且不可再更改分值或答案,请谨慎操作!</p>
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <th>题号</th>
- <th>答案</th>
- <th>初始答案</th>
- <th>分值</th>
- <th class="send-control" style="display: none">特殊分值设置</th>
- </tr>
- <?php
- foreach ($topic[1] as $item){
- $sendPointArr=array();
- $sendPointArr[1]='';
- $sendPointArr[2]='';
- $isSend=0;
- if(isset($item['send_points_type'])){
- if($item['send_points_type']==1){
- $sendPointArr[1]='fr c-red';
- $sendPointArr[2]='fr ';
- $isSend=1;
- }elseif($item['send_points_type']==2){
- $sendPointArr[2]='fr c-red';
- $sendPointArr[1]='fr ';
- $isSend=1;
- }elseif ($item['send_points_type']==3){
- $sendPointArr[1]='fr c-red';
- $sendPointArr[2]='fr ';
- $isSend=1;
- }
- }else{
- $sendPointArr[1]='fr sendPoints';
- $sendPointArr[2]='fr sendPoints';
- }
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias']?></td>
- <td>
- <?php
- if(isset($item['update_answer']) && $item['update_answer']){
- $rightAnswer=$item['update_answer'];
- }else{
- $rightAnswer=$item['answer'];
- }
- for($i=1;$i<=$item['option_count'];$i++){
- $answer=numToLetter($i);
- if($answer==$rightAnswer){
- echo '<span class="answer-list answer-active">'.numToLetter($i).'</span>';
- }else{
- echo '<span class="answer-list">'.numToLetter($i).'</span>';
- }
- }
- ?>
- </td>
- <td><?php echo $item['answer']?></td>
- <td>
- <input type="text" disabled old-score="<?php echo $item['score']?>" value="<?php echo $item['score']?>" class="topic-score" issend="<?php echo $isSend?>">
- <input type="hidden" name="old-answer" value="<?php echo $rightAnswer?>">
- <input type="hidden" name="new-answer" class="new-answer" value="">
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id']?>">
- </td>
- <td class="send-control" style="display:none ">
- <a href="javascript:;" option_count="<?php echo $item['option_count'] ?>" topic_id="<?php echo $item['id']?>" paper_id="<?php echo $paper_id?>" class="<?php echo $sendPointArr[1]?>" action_type="1" type="1" >送分题</a>
- <a href="javascript:;" topic_id="<?php echo $item['id']?>" paper_id="<?php echo $paper_id?>" class="<?php echo $sendPointArr[2]?>" action_type="2" type="1" >0分题</a>
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- <?php endif;?>
- <?php if(isset($topic[2])):?>
- <div class="topic-list list-type-2 hide">
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <th>题号</th>
- <th>答案</th>
- <th>初始答案</th>
- <th>满分</th>
- <th>半对分</th>
- <th>判分规则</th>
- </tr>
- <?php
- foreach ($topic[2] as $item){
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias']?></td>
- <td>
- <?php
- if(isset($item['rule_answer']) && $item['rule_answer']){
- $rightAnswer=explode(',',$item['rule_answer']);
- }else{
- $rightAnswer=explode(',',$item['answer']);
- }
- for($i=1;$i<=$item['option_count'];$i++){
- $answer=numToLetter($i);
- if(in_array($answer,$rightAnswer)){
- echo '<span class="answer-list answer-active answer-multi">'.numToLetter($i).'</span>';
- }else{
- echo '<span class="answer-list answer-multi">'.numToLetter($i).'</span>';
- }
- }
- ?>
- </td>
- <td><?php echo $item['answer']?></td>
- <td>
- <?php
- $score=$item['score'];
- $halfScore=0;
- if(isset($item['rule_score']) && $item['rule_score']){
- $score=$item['rule_score'];
- }
- if(isset($item['rule_score_half']) && $item['rule_score_half']){
- $halfScore=$item['rule_score_half'];
- }
- ?>
- <input type="text" disabled old-score="<?php echo $score?>" value="<?php echo $score ?>" name="topic-score" class="topic-score">
- </td>
- <td>
- <input type="text" disabled old-score="<?php echo $halfScore?>" value="<?php echo $halfScore ?>" name="topic-half-score" class="topic-score">
-
- </td>
- <td>
- <?php
- $rule=2;
- if(isset($item['rule_type']) && $item['rule_type']){
- $rule= $item['rule_type'];
- }
- ?>
- <span class="rule-list <?php if($rule==1) echo 'rule-active' ?>" rule="1" title="全选对为全对;错选漏选为0分">规则A <span class="rule-why">?</span></span>
- <span class="rule-list <?php if($rule==2) echo 'rule-active' ?>" rule="2" title="全选对为全对;错选为0分;没有全部选对且没有错选为半对">规则B <span class="rule-why">?</span></span>
- <span class="rule-list <?php if($rule==3) echo 'rule-active' ?>" rule="3" title="全选对为全对;答案数量不超过正确答案数量情况下,部分选对为半对;答案数量超过正确答案数量或全选错为0分">规则C <span class="rule-why">?</span></span>
- <?php if($subject_id==9){?>
- <span class="rule-list <?php if($rule==4) echo 'rule-active' ?>" rule="4" title="全选对为全对;答对一个1分;答对两个2分;错选0分。">规则D <span class="rule-why">?</span></span>
- <span class="rule-list <?php if($rule==5) echo 'rule-active' ?>" rule="5" title="全选对为全对;答对一个1分;答对两个2分;错选不扣分但全选错0分;超出答案个数0分。">规则E <span class="rule-why">?</span></span>
- <?php }?>
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id']?>">
- <input type="hidden" name="old-rule" class="old-rule" value="<?php echo $rule?>">
- <input type="hidden" name="old-answer" class="old-answer" value="<?php echo implode(',',$rightAnswer)?>">
- <input type="hidden" name="new-answer" class="new-answer" value="<?php echo implode(',',$rightAnswer)?>">
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- <?php endif;?>
- <?php if(isset($topic[3])):?>
- <div class="topic-list list-type-3 hide">
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <th>题号</th>
- <th>答案</th>
- <th>初始答案</th>
- <th>分值</th>
- </tr>
- <?php
- foreach ($topic[3] as $item){
- if($subject_id==8){
- $T='T';
- $F='F';
- }else{
- $T='√';
- $F='×';
- }
- if(isset($item['update_answer']) && $item['update_answer']){
- $rightAnswer=$item['update_answer'];
- }else{
- $rightAnswer=$item['answer'];
- }
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias']?></td>
- <td>
- <span class="answer-list <?php if($rightAnswer=='T' || $rightAnswer=='√') echo 'answer-active'?>"><?php echo $T;?></span>
- <span class="answer-list <?php if($rightAnswer=='F' || $rightAnswer=='×') echo 'answer-active'?>"><?php echo $F;?></span>
- </td>
- <td><?php if($item['answer']=='T' || $rightAnswer=='√'){echo $T;}else{ echo $F;}?></td>
- <td>
- <input type="text" disabled old-score="<?php echo $item['score']?>" value="<?php echo $item['score']?>" class="topic-score">
- <input type="hidden" name="old-answer" value="<?php echo $item['answer']?>">
- <input type="hidden" name="new-answer" class="new-answer" value="">
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id']?>">
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- <?php endif;?>
- <?php if(isset($topic[5])):?>
- <div class="topic-list list-type-5 hide">
- <!-- <p class="red">提示:主观题分值更改请联系技术支持!</p>-->
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <th>题号</th>
- <th>分值</th>
- </tr>
- <?php
- foreach ($topic[5] as $item){
- if(isset($multiple_blank[(string)$item['id']])){
- foreach ($multiple_blank[(string)$item['id']] as $k =>$v){
- if(isset($scores_type[(string)$item['id']]) && $scores_type[(string)$item['id']]==2){
- $signAlias=$multipleKongAlias[$k];
- }else{
- $signAlias=$multipleWenAlias[$k];
- }
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias'].$signAlias?></td>
- <td>
- <input type="text" disabled topic-id="<?php echo $item['id']?>" order="<?php echo $item['order']?>" old-score="<?php echo $v?>" value="<?php echo $v?>" class="topic-score multiple multiple-<?php echo $item['id']?>">
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id']?>">
- </td>
- </tr>
- <?php
- }
- }else{
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias']?></td>
- <td>
- <input type="text" disabled order="<?php echo $item['order']?>" old-score="<?php echo $item['score']?>" value="<?php echo $item['score']?>" class="topic-score">
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id']?>">
- </td>
- </tr>
- <?php
- }
- ?>
- <?php
- }
- ?>
- </table>
- </div>
- <?php endif;?>
- <?php if(isset($topic[7])):?>
- <div class="topic-list list-type-7 hide">
- <!--<p class="red">提示:主观题分值更改请联系技术支持!</p>-->
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <th>题号</th>
- <th>分值</th>
- </tr>
- <?php
- foreach ($topic[7] as $item){
- if(isset($multiple_blank[(string)$item['id']])){
- foreach ($multiple_blank[(string)$item['id']] as $k =>$v){
- if(isset($scores_type[(string)$item['id']]) && $scores_type[(string)$item['id']]==2){
- $signAlias=$multipleKongAlias[$k];
- }else{
- $signAlias=$multipleWenAlias[$k];
- }
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias'].$signAlias?></td>
- <td>
- <input type="text" disabled topic-id="<?php echo $item['id']?>" order="<?php echo $item['order']?>" old-score="<?php echo $v?>" value="<?php echo $v?>" class="topic-score multiple multiple-<?php echo $item['id']?>">
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id']?>">
- </td>
- </tr>
- <?php
- }
- }else {
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias'] ?></td>
- <td>
- <input type="text" disabled order="<?php echo $item['order'] ?>"
- old-score="<?php echo $item['score'] ?>" value="<?php echo $item['score'] ?>"
- class="topic-score">
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id'] ?>">
- </td>
- </tr>
- <?php
- }
- }
- ?>
- </table>
- </div>
- <?php endif;?>
- <?php if(isset($topic[17])):?>
- <div class="topic-list list-type-17 hide">
- <!--<p class="red">提示:主观题分值更改请联系技术支持!</p>-->
- <table class="table table-striped table-bordered table-hover dataTable no-footer DTTT_selectable">
- <tr>
- <th>题号</th>
- <th>分值</th>
- </tr>
- <?php
- foreach ($topic[17] as $item){
- ?>
- <tr class="operate-tr">
- <td><?php echo $item['alias']?></td>
- <td>
- <input type="text" disabled order="<?php echo $item['order']?>" old-score="<?php echo $item['score']?>" value="<?php echo $item['score']?>" class="topic-score">
- <input type="hidden" name="topic-id" class="topic-id" value="<?php echo $item['id']?>">
- </td>
- </tr>
- <?php
- }
- ?>
- </table>
- </div>
- <?php endif;?>
- </div>
- <!--送分题选择答案弹窗-->
- <div class="confirmbox-mask" style="display: none" id="sendScore">
- <div class="class-modal">
- <i class="icon icon-close">×</i>
- <div class="class-modal-head">设置送分题</div>
- <div class="class-modal-body">
- <table width="100%" border="0" cellspacing="0" cellpadding="0" class="answerList">
- <thead>
- <tr>
- <td colspan="4">请选择需要送分的选项,学生选择以下任意选项均得分</td>
- </tr>
- </thead>
- <tbody>
- <tr>
- <td >
- <table width="100%" border="0" cellspacing="1" cellpadding="1" class="answerShow" align="center" id="sendPointAnswer">
- <tr>
- <td class="answer_3">A</td>
- <td class="answer_3">B</td>
- <td class="answer_3">C</td>
- <td class="answer_3">D</td>
- </tr>
- </table>
- </td>
- </tr>
- <tr>
- <td >注意:一旦设置,不可取消,且不能再修改试题分值与答案,请谨慎操作!</td>
- </tr>
- </tbody>
- </table>
- </div>
- <div class="class_btn">
- <button type="button" class="saveSendScoreBtn">确定</button>
- <input type="hidden" name="sendScoreAnswer" value="">
- <input type="hidden" name="paperId" value="">
- <input type="hidden" name="topicId" value="">
- </div>
- </div>
- </div>
- <?php require_once "_operate.php" ?>
- </body>
- </html>
|