all_subject.php 39 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>试题编辑</title>
  6. <link rel="stylesheet" type="text/css" href="/css/base.css">
  7. <script type="text/javascript" src="/js/jquery.min.js"></script>
  8. <script src="/js/layer/layer.js"></script>
  9. <style type="text/css">
  10. /*.topic-content*/
  11. .choose-topic{padding:10px;margin:5px;}
  12. .choose-topic h3,.filling-topic h3,.answer-topic h3{font-weight: 700;font-size: 14px;line-height: 34px;}
  13. .topic{font-size:14px;text-align: justify;line-height: 22px;}
  14. .topic a{margin:0 5px; color: #4395ff}
  15. .topic p{display: inline;}
  16. /*.topic .score{color: #f00;}*/
  17. .score input,.right-answer{width: 30px;text-align: center; background: #fff;border:0;color: #50d2c2}
  18. .score input:focus,.right-answer:focus{border:1px solid #50d2c2;outline: none;}
  19. /*.right-answer{color: #f40;}*/
  20. .topic-answer input{width: 60px;}
  21. .words{position: relative;padding-left: 25px; width: 70%;box-sizing: border-box;cursor:pointer;}
  22. .controls{width: 30%;}
  23. .options{padding-left: 35px;}
  24. .options li{margin-top: 10px; list-style:upper-latin;}
  25. .listType_1{width: 25%;}
  26. .topic-answer,.topic-explain{padding-left: 20px;margin:10px 0;background:#eee;}
  27. .topic-detail{padding-left:20px;}
  28. .topic-detail ul {padding:0;margin:0;padding-left:40px;}
  29. .topic-detail ul li{list-style:upper-latin;width:100%}
  30. h3{font-weight: bold;margin-top:15px;clear:both;}
  31. .batch_topic{padding-left: 30px; font-size:14px;text-align: justify;line-height: 22px;}
  32. .batch_topic a{margin:0 5px; color: #4395ff}
  33. .batch_topic p{display: inline;}
  34. .answer-tit{
  35. background-color: #eee;
  36. padding:15px 10px;
  37. }
  38. .score_l{display: inline-block;float: left;width:5%;margin-top:5px;}
  39. .div_hide{display:none;}
  40. .div_hide_has_slave{display:none;}
  41. .c-red{color:red !important;}
  42. .gray{background:#ccc;color:#fff}
  43. </style>
  44. <script>
  45. $(function () {
  46. /* 点击展开试题解析*/
  47. $("body").delegate('.topic-content', 'click', function(event) {
  48. $(this).closest(".choose-topic").find('.div_hide').slideToggle();
  49. });
  50. $("body").delegate('.topic_content_large', 'click', function(event) {
  51. $(this).closest(".topic-large").find('.div_hide_has_slave').slideToggle();
  52. });
  53. $('.operate').click(function(){
  54. window.location.href='<?php echo $this->createUrl('allSubject/operate?eid='.$exam_id)?>'
  55. });
  56. })
  57. </script>
  58. </head>
  59. <body>
  60. <a href="<?php echo Yii::app()->createUrl('paper/recover',array('exam_id'=>$exam_id))?>" class="<?php if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)) {
  61. }else{ echo 'dn';}?>"><h3 style="color:#ff7800">恢复考试状态</h3></a>
  62. <input type="hidden" name="exam_id" value="<?php echo $exam_id?>">
  63. <input type="hidden" name="paper_id" value="<?php echo $paper_id?>">
  64. <button type="button" class="operate" style="width: 100px;float: right">修改答案分值</button>
  65. <?php
  66. if(!$topic) exit();
  67. foreach ($topic as $item){ ?>
  68. <!--题型说明-->
  69. <div class="large_title">
  70. <h3><?php echo $item['questionNumber'].'、'.$item['type_name']?>(<?php echo $item['tips']?>)</h3>
  71. </div>
  72. <div class="topic_list">
  73. <!--循环大题列表-->
  74. <?php foreach ($item['topic'] as $value){ ?>
  75. <div class="choose-topic">
  76. <!--试题开始-->
  77. <?php if(isset($value['slave']) && $value['slave']){ ?>
  78. <!--有二级子题-->
  79. <?php
  80. $answers=array();
  81. $parses=array();
  82. $updateAnswers=array();
  83. ?>
  84. <div class="topic-large">
  85. <?php if($value['title']){?>
  86. <div class="topic-content topic_content_large clearfix">
  87. <div class="words fl">
  88. <span style="display: inline-block;float: left;margin-right:10px;">[<?php echo $value['id']?>]</span> <?php echo ''.$value['title']?>
  89. </div>
  90. </div>
  91. <?php }?>
  92. <!--循环子题开始-->
  93. <?php foreach ($value['slave'] as $slave){ ?>
  94. <?php if(isset($slave['slave']) && $slave['slave']){?>
  95. <?php if($slave['title']){?>
  96. <div class="topic-content topic_content_large clearfix">
  97. <div class="words fl">
  98. <?php echo ''.$slave['title']?>
  99. </div>
  100. </div>
  101. <?php }?>
  102. <!--三级子题循环开始-->
  103. <?php foreach ($slave['slave'] as $thirdSlave){ ?>
  104. <?php
  105. if(isset($thirdSlave['alias'])){
  106. $answers[$thirdSlave['alias']]=$thirdSlave['answer'];
  107. if(isset($thirdSlave['parse_content'])){
  108. $parses[$thirdSlave['alias']]=$thirdSlave['parse_content'];
  109. }
  110. $order=$thirdSlave['alias'];
  111. }else{
  112. $answers[$thirdSlave['order']]=$thirdSlave['answer'];
  113. if(isset($thirdSlave['parse_content'])){
  114. $parses[$thirdSlave['order']]=$thirdSlave['parse_content'];
  115. }
  116. $order=$thirdSlave['order'];
  117. }
  118. if(isset($update_answer[$thirdSlave['order']])){
  119. $updateAnswers[$thirdSlave['order']]=$update_answer[$thirdSlave['order']]['update_answer'];
  120. }
  121. if(isset($new_rules[$thirdSlave['order']]) && $new_rules[$thirdSlave['order']]['rule_answer']){
  122. $updateAnswers[$thirdSlave['order']]=$new_rules[$thirdSlave['order']]['rule_answer'];
  123. }
  124. ?>
  125. <div class="topic" id="<?php echo $thirdSlave['topic_slave_id']?>">
  126. <div class="topic-content clearfix <?php if(!in_array($value['basic_type_id'],$multipleChoices) && !in_array($value['basic_type_id'],$multipleChoices)) echo " topic_content_large" ?>">
  127. <?php if($thirdSlave['is_show']){?>
  128. <?php if($value['slave_stem_editor']){?>
  129. <div class="words fl">
  130. <?php if($thirdSlave['title']): ?>
  131. <span class="order" order_id="<?php echo $order?>"> <?php echo $order?></span>. (<span class="green"> <?php echo $thirdSlave['score']?></span>分 ) <?php echo $thirdSlave['title']?>
  132. <?php else:?>
  133. <span class="order" order_id="<?php echo $order?>"> <?php echo $order?></span>.
  134. <?php endif;?>
  135. </div>
  136. <?php }elseif($value['slave_option_editor']){?>
  137. <span class="order" order_id="<?php echo $order?>"> <?php echo $order?></span>.
  138. <?php }?>
  139. <?php }?>
  140. <!--操作区-->
  141. <!--
  142. <div class="controls fr clearfix ">
  143. <?php
  144. if($thirdSlave['answer_type_id']==1 && $thirdSlave['is_checkbox']==0){
  145. $sendPointArr=array();
  146. $sendPointArr[1]='';
  147. $sendPointArr[2]='';
  148. $isSend=false;
  149. if(isset($send_points[$thirdSlave['order']])){
  150. if($send_points[$thirdSlave['order']]['actionType']==1){
  151. $sendPointArr[1]='fr c-red';
  152. $sendPointArr[2]='fr ';
  153. }elseif($send_points[$thirdSlave['order']]['actionType']==2){
  154. $sendPointArr[2]='fr c-red';
  155. $sendPointArr[1]='fr ';
  156. }
  157. }else{
  158. $sendPointArr[1]='fr sendPoints';
  159. $sendPointArr[2]='fr sendPoints';
  160. }
  161. if(!$isSend){
  162. ?>
  163. <a href="javascript:;" score="0" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="1" class="fr change-score">更改分值</a>
  164. <a href="javascript:;" score="0" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="<?php if($value['basic_type_id']==12){echo 12;}else{echo 1;}?>" class="fr change-answer">更改答案</a>
  165. <?php }
  166. if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)) {
  167. ?>
  168. <a href="javascript:;" class="<?php echo $sendPointArr[1]?>" action_type="1" paper_id="<?php echo $paper_id ?>" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="1" >送分题</a>
  169. <a href="javascript:;" class="<?php echo $sendPointArr[2]?>" action_type="2" paper_id="<?php echo $paper_id ?>" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="1" >0分题</a>
  170. <?php
  171. }
  172. }elseif($thirdSlave['answer_type_id']==1 && $thirdSlave['is_checkbox']==1){
  173. ?>
  174. <a href="javascript:;" score="<?php echo $thirdSlave['score']?>" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="2" class="fr change_multi_answer" step="1">更改判分规则</a>
  175. <a href="javascript:;" score="<?php echo $thirdSlave['score']?>" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="2" class="fr change_multi_answer" step="3">更改分值</a>
  176. <a href="javascript:;" score="<?php echo $thirdSlave['score']?>" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="2" class="fr change_multi_answer" step="2">更改答案</a>
  177. <?php
  178. }else{
  179. ?>
  180. <a href="javascript:;" class="fr change-score" paper_id="<?php echo $paper_id ?>" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="5" >更改分值</a>
  181. <?php if(in_array($subject,array(18,19))):?>
  182. <a href="javascript:;" class="fr change-topic-subject" subject-name="<?php if(isset($topic_subject_data[$thirdSlave['order']]) && isset($subjects[$topic_subject_data[$thirdSlave['order']]])){echo $subjects[$topic_subject_data[$thirdSlave['order']]];}?>" subject="<?php if(isset($topic_subject_data[$thirdSlave['order']])){echo $topic_subject_data[$thirdSlave['order']];}?>" paper_id="<?php echo $paper_id ?>" topic="<?php echo $thirdSlave['topic_slave_id']?>" type="1" >更改试题科目</a>
  183. <?php endif;?>
  184. <?php
  185. }
  186. ?>
  187. </div>
  188. -->
  189. <!--操作区end-->
  190. <?php if($thirdSlave['is_show']){?>
  191. <!--选项-->
  192. <?php
  193. if($thirdSlave['answer_type_id']==1 && $thirdSlave['is_checkbox']==1){
  194. $ruleAnswer='';
  195. $ruleType=2; //默认规则
  196. $ruleScoreHalf=0;
  197. if(isset($new_rules[$thirdSlave['order']])){
  198. $ruleAnswer=$new_rules[$thirdSlave['order']]['rule_answer'];
  199. if($new_rules[$thirdSlave['order']]['rule_type']){
  200. $ruleType=$new_rules[$thirdSlave['order']]['rule_type'];
  201. }
  202. $ruleScoreHalf=$new_rules[$thirdSlave['order']]['rule_score_half'];
  203. }
  204. echo '<input type="hidden" name="rule_answer" class="rule_answer" value="'.$ruleAnswer.'">';
  205. echo '<input type="hidden" name="rule_type" class="rule_type" value="'.$ruleType.'">';
  206. echo '<input type="hidden" name="rule_score_half" class="rule_score_half" value="'.$ruleScoreHalf.'">';
  207. echo '<input type="hidden" name="right-answer" class="right-answer" value="'.$thirdSlave['answer'].'">';
  208. }
  209. ?>
  210. <?php if($thirdSlave['answer_type_id']==1){ ?>
  211. <div class="topic-detail div_hide_has_slave">
  212. <ul class="options clearfix">
  213. <?php
  214. if($thirdSlave['items']){
  215. foreach ($thirdSlave['items'] as $v){
  216. echo '<li class="listType_1 fl">'.$v['content'].'</li>';
  217. }
  218. }
  219. $allAnswer[$order]="【".$order."】".$thirdSlave['answer'];
  220. $allParseContent[$order]="【".$order."】".$thirdSlave['parse_content'];
  221. ?>
  222. </ul>
  223. </div>
  224. <?php }?>
  225. <!--选项end-->
  226. <?php }?>
  227. </div>
  228. </div>
  229. <?php } ?>
  230. <!--三级子题end-->
  231. <?php }else{ ?>
  232. <?php
  233. if(isset($slave['alias'])){
  234. $answers[$slave['alias']]=$slave['answer'];
  235. $parses[$slave['alias']]=$slave['parse_content'];
  236. $order=$slave['alias'];
  237. }else{
  238. $answers[$slave['order']]=$slave['answer'];
  239. $parses[$slave['order']]=$slave['parse_content'];
  240. $order=$slave['order'];
  241. }
  242. if(isset($update_answer[$slave['order']])){
  243. $updateAnswers[$slave['order']]=$update_answer[$slave['order']]['update_answer'];
  244. }
  245. if(isset($new_rules[$slave['order']]) && $new_rules[$slave['order']]['rule_answer']){
  246. $updateAnswers[$slave['order']]=$new_rules[$slave['order']]['rule_answer'];
  247. }
  248. ?>
  249. <div class="topic" id="<?php echo $slave['topic_slave_id']?>">
  250. <div class="topic-content clearfix <?php if(!in_array($value['basic_type_id'],$multipleChoices) && !in_array($value['basic_type_id'],$multipleChoices)) echo " topic_content_large" ?>">
  251. <?php if($slave['is_show']){?>
  252. <?php if($value['slave_stem_editor']){?>
  253. <div class="words fl">
  254. <?php if($slave['title']): ?>
  255. <span class="order" order_id="<?php echo $order?>"> <?php echo $order?></span>. (<span class="green"> <?php echo $slave['score']?></span>分 ) <?php echo $slave['title']?>
  256. <?php else:?>
  257. <span class="order" order_id="<?php echo $order?>"> <?php echo $order?></span>.
  258. <?php endif;?>
  259. </div>
  260. <?php }elseif($value['slave_option_editor']){?>
  261. <span class="order" order_id="<?php echo $order?>"> <?php echo $order?></span>.
  262. <?php }?>
  263. <?php }?>
  264. <!--二级子题操作区-->
  265. <!--
  266. <div class="controls fr clearfix ">
  267. <?php
  268. if(in_array($value['basic_type_id'],$singleChoice) || ($slave['answer_type_id']==1 && $slave['is_checkbox']==0) ){
  269. $sendPointArr=array();
  270. $sendPointArr[1]='';
  271. $sendPointArr[2]='';
  272. if(isset($send_points[$slave['order']])){
  273. if($send_points[$slave['order']]['actionType']==1){
  274. $sendPointArr[1]='fr c-red';
  275. $sendPointArr[2]='fr ';
  276. }elseif($send_points[$slave['order']]['actionType']==2){
  277. $sendPointArr[2]='fr c-red';
  278. $sendPointArr[1]='fr ';
  279. }
  280. }else{
  281. $sendPointArr[1]='fr sendPoints';
  282. $sendPointArr[2]='fr sendPoints';
  283. }
  284. if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)) {
  285. ?>
  286. <a href="javascript:;" class="<?php echo $sendPointArr[1]?>" action_type="1" paper_id="<?php echo $paper_id ?>" topic="<?php echo $slave['topic_slave_id']?>" type="1" >送分题</a>
  287. <a href="javascript:;" class="<?php echo $sendPointArr[2]?>" action_type="2" paper_id="<?php echo $paper_id ?>" topic="<?php echo $slave['topic_slave_id']?>" type="1" >0分题</a>
  288. <?php
  289. }
  290. }elseif(in_array($value['basic_type_id'],$multipleChoices) || ($slave['answer_type_id']==1 && $slave['is_checkbox']==1)){
  291. ?>
  292. <a href="javascript:;" score="<?php echo $slave['score']?>" topic="<?php echo $slave['topic_slave_id']?>" type="2" class="fr change_multi_answer" step="1">更改判分规则</a>
  293. <a href="javascript:;" score="<?php echo $slave['score']?>" topic="<?php echo $slave['topic_slave_id']?>" type="2" class="fr change_multi_answer" step="3">更改分值</a>
  294. <a href="javascript:;" score="<?php echo $slave['score']?>" topic="<?php echo $slave['topic_slave_id']?>" type="2" class="fr change_multi_answer" step="2">更改答案</a>
  295. <?php
  296. }else{
  297. ?>
  298. <?php if(in_array($subject,array(18,19))):?>
  299. <a href="javascript:;" class="fr change-topic-subject" subject-name="<?php if(isset($topic_subject_data[$slave['order']]) && isset($subjects[$topic_subject_data[$slave['order']]])){echo $subjects[$topic_subject_data[$slave['order']]];}?>" subject="<?php if(isset($topic_subject_data[$slave['order']])){echo $topic_subject_data[$slave['order']];}?>" paper_id="<?php echo $paper_id ?>" topic="<?php echo $slave['topic_slave_id']?>" type="1" >更改试题科目</a>
  300. <?php endif;?>
  301. <a href="javascript:;" class="fr change-score" paper_id="<?php echo $paper_id ?>" topic="<?php echo $slave['topic_slave_id']?>" type="5" >更改分值</a>
  302. <?php } ?>
  303. </div>
  304. -->
  305. <!--二级子题操作区end-->
  306. </div>
  307. <!--选项-->
  308. <?php if($slave['is_show']){?>
  309. <?php
  310. if(in_array($value['basic_type_id'],$multipleChoices) || ($slave['answer_type_id']==1 && $slave['is_checkbox']=1) ){
  311. $ruleAnswer='';
  312. $ruleType=2; //默认规则
  313. $ruleScoreHalf=0;
  314. if(isset($new_rules[$slave['order']])){
  315. $ruleAnswer=$new_rules[$slave['order']]['rule_answer'];
  316. if($new_rules[$slave['order']]['rule_type']){
  317. $ruleType=$new_rules[$slave['order']]['rule_type'];
  318. }
  319. $ruleScoreHalf=$new_rules[$slave['order']]['rule_score_half'];
  320. }
  321. echo '<input type="hidden" name="rule_answer" class="rule_answer" value="'.$ruleAnswer.'">';
  322. echo '<input type="hidden" name="rule_type" class="rule_type" value="'.$ruleType.'">';
  323. echo '<input type="hidden" name="rule_score_half" class="rule_score_half" value="'.$ruleScoreHalf.'">';
  324. echo '<input type="hidden" name="right-answer" class="right-answer" value="'.$slave['answer'].'">';
  325. }
  326. ?>
  327. <?php if((in_array($value['basic_type_id'],$multipleChoices) || in_array($value['basic_type_id'],$singleChoice) || $slave['answer_type_id']==1) && $value['slave_option_editor']){ ?>
  328. <div class="topic-detail div_hide_has_slave">
  329. <ul class="options clearfix">
  330. <?php
  331. if($slave['items'] && $value['slave_option_editor']){
  332. foreach ($slave['items'] as $v){
  333. echo '<li class="listType_1 fl">'.$v['content'].'</li>';
  334. }
  335. }
  336. $allAnswer[$order]="【".$order."】".$slave['answer'];
  337. $allParseContent[$order]="【".$order."】".$slave['parse_content'];
  338. ?>
  339. </ul>
  340. </div>
  341. <?php }?>
  342. <!--选项end-->
  343. <?php } ?>
  344. </div>
  345. <?php } ?>
  346. <?php } ?>
  347. <!--循环子题end-->
  348. <!--答案解析显示-->
  349. <div class='div_hide_has_slave'>
  350. <?php
  351. if($answers){
  352. echo '<div class="topic-explain">';
  353. echo '试题答案';
  354. foreach ($answers as $k =>$v){
  355. echo '【'.$k.'】'.$v;
  356. }
  357. echo '</div>';
  358. }
  359. if($updateAnswers){
  360. echo '<div class="topic-explain">';
  361. echo '更新答案';
  362. foreach ($updateAnswers as $k =>$v){
  363. echo '【'.$alias[$k].'】'.$v;
  364. }
  365. echo '</div>';
  366. }
  367. if($parses){
  368. echo '<div class="topic-explain">';
  369. echo '试题解析';
  370. foreach ($parses as $k =>$v){
  371. if($v){
  372. echo '【'.$k.'】'.$v.'<br>';
  373. }
  374. }
  375. echo '</div>';
  376. }
  377. ?>
  378. <?php if(isset($value['parse_content']) && $value['parse_content'] ):?>
  379. <div class="topic-explain">
  380. 大题解析:<?php echo $value['parse_content']?>
  381. </div>
  382. <?php endif;?>
  383. </div>
  384. <!--答案解析显示end-->
  385. </div>
  386. <?php }else{ ?>
  387. <!--没有子题-->
  388. <?php
  389. if(isset($value['alias'])){
  390. $order=$value['alias'];
  391. }else{
  392. $order=$value['order'];
  393. }
  394. ?>
  395. <div class="topic" id="<?php echo $value['id']?>">
  396. <div class="topic-content clearfix">
  397. <div class="words fl">
  398. <span class="order" order_id="<?php echo $order?>"> <?php echo $order?></span>. (<span class="green"><?php echo $value['score']?></span>分)[ID:<?php echo $value['id']?>] <?php echo $value['title']?>
  399. </div>
  400. <!--
  401. <div class="controls fr clearfix ">
  402. <?php
  403. if(in_array($value['basic_type_id'],$singleChoice) || ($value['answer_type_id']==1 && $value['is_checkbox']==0)){
  404. $sendPointArr=array();
  405. $sendPointArr[1]='';
  406. $sendPointArr[2]='';
  407. if(isset($send_points[$value['order']])){
  408. if($send_points[$value['order']]['actionType']==1){
  409. $sendPointArr[1]='fr c-red';
  410. $sendPointArr[2]='fr ';
  411. }elseif($send_points[$value['order']]['actionType']==2){
  412. $sendPointArr[2]='fr c-red';
  413. $sendPointArr[1]='fr ';
  414. }
  415. }else{
  416. $sendPointArr[1]='fr sendPoints';
  417. $sendPointArr[2]='fr sendPoints';
  418. }
  419. if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)) {
  420. ?>
  421. <a href="javascript:;" class="<?php echo $sendPointArr[1]?>" action_type="1" paper_id="<?php echo $paper_id ?>" topic="<?php echo $value['id']?>" type="1" >送分题</a>
  422. <a href="javascript:;" class="<?php echo $sendPointArr[2]?>" action_type="2" paper_id="<?php echo $paper_id ?>" topic="<?php echo $value['id']?>" type="1" >0分题</a>
  423. <?php
  424. }
  425. }elseif(in_array($value['basic_type_id'],$multipleChoices) || ($value['answer_type_id']==1 && $value['is_checkbox']==1)){
  426. ?>
  427. <a href="javascript:;" score="<?php echo $value['score']?>" topic="<?php echo $value['id']?>" type="2" class="fr change_multi_answer" step="1">更改判分规则</a>
  428. <a href="javascript:;" score="<?php echo $value['score']?>" topic="<?php echo $value['id']?>" type="2" class="fr change_multi_answer" step="3">更改分值</a>
  429. <a href="javascript:;" score="<?php echo $value['score']?>" topic="<?php echo $value['id']?>" type="2" class="fr change_multi_answer" step="2">更改答案</a>
  430. <?php
  431. }else{
  432. ?>
  433. <?php if( isset(Yii::app()->session['testFlag'])&&(Yii::app()->session['testFlag']==1)) { ?>
  434. <a href="javascript:;" class="fr change-score" paper_id="<?php echo $paper_id ?>" topic="<?php echo $value['id']?>" type="5" >更改分值</a>
  435. <?php }?>
  436. <?php
  437. }
  438. ?>
  439. </div>
  440. -->
  441. </div>
  442. <div class="topic-detail div_hide">
  443. <?php
  444. if($value['basic_type_id']==13 || (in_array($value['basic_type_id'],$singleChoice) || in_array($value['basic_type_id'],$multipleChoices))){
  445. ?>
  446. <!--选项答案解析-->
  447. <ul class="options clearfix">
  448. <?php
  449. $ruleAnswer='';
  450. $ruleType=2; //默认规则
  451. $ruleScoreHalf=0;
  452. if(isset($new_rules[$value['order']])){
  453. $ruleAnswer=$new_rules[$value['order']]['rule_answer'];
  454. if($new_rules[$value['order']]['rule_type']){
  455. $ruleType=$new_rules[$value['order']]['rule_type'];
  456. }
  457. $ruleScoreHalf=$new_rules[$value['order']]['rule_score_half'];
  458. }
  459. echo '<input type="hidden" name="rule_answer" class="rule_answer" value="'.$ruleAnswer.'">';
  460. echo '<input type="hidden" name="rule_type" class="rule_type" value="'.$ruleType.'">';
  461. echo '<input type="hidden" name="rule_score_half" class="rule_score_half" value="'.$ruleScoreHalf.'">';
  462. if($value['items'] && $value['basic_type_id']!=12){
  463. foreach ($value['items'] as $v){
  464. echo '<li class="listType_1 fl">'.$v['content'].'</li>';
  465. }
  466. }
  467. ?>
  468. </ul>
  469. <div class="topic-answer clearfix">
  470. <div class=" answer-tit">
  471. 试题答案 :<?php
  472. if($subject!=8){
  473. if($value['answer']=='T'){
  474. echo '√';
  475. }elseif($value['answer']=='F'){
  476. echo '×';
  477. }else{
  478. echo $value['answer'] ;
  479. }
  480. }else{
  481. echo $value['answer'];
  482. }
  483. ?>
  484. <input type="hidden" value="<?php echo $value['answer'] ?>" class="right-answer" disabled="">
  485. </div>
  486. </div>
  487. <?php
  488. $updateAnswer='';
  489. if(isset($update_answer[$value['order']])){
  490. $updateAnswer=$update_answer[$value['order']]['update_answer'];
  491. }elseif(isset($new_rules[$value['order']])){
  492. $updateAnswer=$new_rules[$value['order']]['rule_answer'];
  493. }
  494. if($updateAnswer):
  495. ?>
  496. <div class="topic-answer clearfix">
  497. <div class=" answer-tit">
  498. 更新答案 :<?php
  499. if($subject!=8){
  500. if($updateAnswer=='T'){
  501. echo '√';
  502. }elseif($updateAnswer=='F'){
  503. echo '×';
  504. }else{
  505. echo $updateAnswer ;
  506. }
  507. }else{
  508. echo $updateAnswer;
  509. }
  510. ?>
  511. <input type="hidden" value="<?php echo $updateAnswer ?>" class="right-answer" disabled="">
  512. </div>
  513. </div>
  514. <?php endif;?>
  515. <div class="topic-explain">
  516. <div class="answer-tit">
  517. 试题解析:
  518. <?php echo $value['parse_content']?>
  519. </div>
  520. </div>
  521. <?php
  522. }else{
  523. ?>
  524. <div class="topic-answer clearfix">
  525. <div class="answer-tit">
  526. 试题答案:<?php echo $value['answer'] ?>
  527. </div>
  528. </div>
  529. <div class="topic-explain">
  530. <div class="answer-tit">
  531. 试题解析:
  532. <?php echo $value['parse_content']?>
  533. </div>
  534. </div>
  535. <?php
  536. }
  537. ?>
  538. </div>
  539. </div>
  540. <?php } ?>
  541. <!--试题内容结束-->
  542. </div>
  543. <?php } ?>
  544. <!--循环大题列表end-->
  545. </div>
  546. <?php } ?>
  547. <?php include_once '_popup.php'?>
  548. </body>
  549. </html>