teach_method.php 26 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8">
  5. <meta http-equiv="X-UA-Compatible" content="IE=edge">
  6. <meta name="viewport" content="width=device-width, initial-scale=1.0">
  7. <!-- <meta http-equiv="refresh" content="30"> -->
  8. <title>高中数学教学宝</title>
  9. <link rel="stylesheet" href="<?php echo $zsyas2Url;?>/css/product_exam/base.css" />
  10. <link rel="stylesheet" href="<?php echo $zsyas2Url;?>/css/product_exam/reset.css" />
  11. <link rel="stylesheet" href="<?php echo $zsyas2Url;?>/css/product_exam/MethodTeaching.css" />
  12. <?php echo $topicCss;?>
  13. </head>
  14. <body>
  15. <div class="pdf">
  16. <!-- 封面 -->
  17. <div class="cover">
  18. <img src="<?php echo $zsyas2Url;?>/images/product_exam/cover.png" alt="" />
  19. <div class="info">
  20. <div class="class"><?php echo $className;?></div>
  21. <div class="exam"><?php echo $examInfo['exam_name'];?></div>
  22. </div>
  23. </div>
  24. <div style="page-break-after: always;"></div>
  25. <?php
  26. $ch = array('零','一','二','三','四','五','六','七','八','九');
  27. $order=1;
  28. ?>
  29. <div class="heading tac">
  30. <p><?php echo $examInfo['exam_name'];?></p>
  31. </div>
  32. <div class="first-part">
  33. <div class="title tac">
  34. <p>第一部分:学情分析</p>
  35. </div>
  36. <div class="topic">
  37. <div class="topic-one-title">
  38. <span><?php echo $ch[$order];++$order;?>、班级情况分析</span>
  39. <img src="<?php echo $zsyas2Url;?>/images/product_exam/class-situation.png" alt="">
  40. </div>
  41. <!-- 班级情况分析 -->
  42. <div class="class-analysis">
  43. <div class="class-info">
  44. <table cellspacing="0" cellpadding="0">
  45. <tbody>
  46. <tr>
  47. <td>
  48. <div class="info-block">
  49. <div>
  50. <p>参加考试人数:<span class="bold"><?php echo $classAnalyseArr['exam_stu_num'];?></span></p>
  51. <p><span class="bold"><?php echo $classAnalyseArr['miss_stu_num'];?></span>人缺考
  52. </p>
  53. </div>
  54. </div>
  55. </td>
  56. <td>
  57. <div class="info-block">
  58. <div>
  59. <p>平均得分率:<span class="bold"><?php echo $classAnalyseArr['avg_score_rate'];?>%</span></p>
  60. <?php if(!empty($classAnalyseArr['pre_avg_rate_diff'])):?>
  61. <p>较上次考试<span class="bold"><?php echo $classAnalyseArr['pre_avg_rate_diff']>=0?'提升':'下降';?><?php echo abs($classAnalyseArr['pre_avg_rate_diff']);?>%</span></p>
  62. <?php else:?>
  63. <p>&nbsp;</p>
  64. <?php endif;?>
  65. <!-- <p>&nbsp</p> -->
  66. </div>
  67. </div>
  68. </td>
  69. <td>
  70. <div class="info-block">
  71. <div>
  72. <p>平均分<span class="bold"><?php echo $classAnalyseArr['avg_scoring'];?></span></p>
  73. <p>最高分<span class="bold"><?php echo $classAnalyseArr['max_scoring'];?></span>,最低分<span class="bold"><?php echo $classAnalyseArr['min_scoring'];?></span>, 满分<span class="bold"><?php echo $classAnalyseArr['full_scoring'];?></span></p>
  74. </div>
  75. </div>
  76. </td>
  77. <td>
  78. <div class="info-block">
  79. <div>
  80. <p>及格率<span class="bold"><?php echo $classAnalyseArr['pass_rate'];?>%</span></p>
  81. <p>其中得分率<span class="bold">90%</span>以上的有<span class="bold"><?php echo $classAnalyseArr['pass_rate_gt_90'];?></span>人</p>
  82. </div>
  83. </div>
  84. </td>
  85. </tr>
  86. </tbody>
  87. </table>
  88. </div>
  89. <div class="class-table">
  90. <table class="pro">
  91. <tbody>
  92. <tr>
  93. <td colspan="3" class="table-title">大幅进步</td>
  94. </tr>
  95. <tr>
  96. <td>姓名</td>
  97. <td>排名</td>
  98. <td>排名提升</td>
  99. </tr>
  100. <?php foreach ($largeOrderArr['increase_stu'] as $key => $stuId):
  101. $stu_order = isset($largeOrderArr['stu_order'][$stuId])?$largeOrderArr['stu_order'][$stuId]:'';
  102. ?>
  103. <tr>
  104. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:''; ?></td>
  105. <td><?php echo $stu_order; ?></td>
  106. <td>
  107. <?php
  108. if(isset($largeOrderArr['stu_diff_order'][$stuId]) && $largeOrderArr['stu_diff_order'][$stuId] > 0){
  109. echo abs($largeOrderArr['stu_diff_order'][$stuId]);
  110. }else{
  111. echo $stu_order?'-':'&nbsp;';
  112. }
  113. ?>
  114. </td>
  115. </tr>
  116. <?php endforeach; ?>
  117. <?php for($i = 0;$i < (5-count($largeOrderArr['increase_stu']));$i++):?>
  118. <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
  119. <?php endfor;?>
  120. </tbody>
  121. </table>
  122. <table class="back">
  123. <tbody>
  124. <tr>
  125. <td colspan="3" class="table-title">大幅退步</td>
  126. </tr>
  127. <tr>
  128. <td>姓名</td>
  129. <td>排名</td>
  130. <td>排名下降</td>
  131. </tr>
  132. <?php foreach ($largeOrderArr['reduce_stu'] as $key => $stuId): ?>
  133. <tr>
  134. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:''; ?></td>
  135. <td><?php echo isset($largeOrderArr['stu_order'][$stuId])?$largeOrderArr['stu_order'][$stuId]:0; ?></td>
  136. <td>
  137. <?php
  138. if(isset($largeOrderArr['stu_diff_order'][$stuId]) && abs($largeOrderArr['stu_diff_order'][$stuId]) > 0){
  139. echo abs($largeOrderArr['stu_diff_order'][$stuId]);
  140. }else{
  141. echo '-';
  142. }
  143. ?>
  144. </td>
  145. </tr>
  146. <?php endforeach; ?>
  147. <?php for($i = 0;$i < (5-count($largeOrderArr['reduce_stu']));$i++):?>
  148. <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
  149. <?php endfor;?>
  150. </tbody>
  151. </table>
  152. <table class="first">
  153. <tbody>
  154. <tr>
  155. <td colspan="2" class="table-title">班级前五名</td>
  156. </tr>
  157. <tr>
  158. <td>姓名</td>
  159. <td>班级排名</td>
  160. </tr>
  161. <?php if(isset($largeOrderArr['font_five'])):?>
  162. <?php foreach ($largeOrderArr['font_five'] as $stuId =>$rank):?>
  163. <tr>
  164. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:'';?></td>
  165. <td><?php echo $rank;?></td>
  166. </tr>
  167. <?php endforeach;?>
  168. <?php for($i = 0;$i < (5-count($largeOrderArr['font_five']));$i++):?>
  169. <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
  170. <?php endfor;?>
  171. <?php endif;?>
  172. </tbody>
  173. </table>
  174. <table class="last">
  175. <tbody>
  176. <tr>
  177. <td colspan="2" class="table-title">班级后五名</td>
  178. </tr>
  179. <tr>
  180. <td>姓名</td>
  181. <td>班级排名</td>
  182. </tr>
  183. <?php if(isset($largeOrderArr['back_five'])):?>
  184. <?php foreach ($largeOrderArr['back_five'] as $stuId =>$rank):?>
  185. <tr>
  186. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:'';?></td>
  187. <td><?php echo $rank;?></td>
  188. </tr>
  189. <?php endforeach;?>
  190. <?php for($i = 0;$i < (5-count($largeOrderArr['back_five']));$i++):?>
  191. <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
  192. <?php endfor;?>
  193. <?php endif;?>
  194. </tbody>
  195. </table>
  196. </div>
  197. </div>
  198. </div>
  199. <div class="topic">
  200. <div class="topic-one-title">
  201. <span><?php echo $ch[$order];++$order;?>、考试情况分析</span>
  202. <img src="<?php echo $zsyas2Url;?>/images/product_exam/class-situation.png" alt="">
  203. </div>
  204. <!-- 考试情况分析 -->
  205. <?php if($paperAnalyseArr):?>
  206. <div class="exam-analysis">
  207. <div class="exam-table">
  208. <?php $columnNum = count($paperAnalyseArr)>= 8 ? 8 :count($paperAnalyseArr);?>
  209. <?php foreach (array_chunk($paperAnalyseArr,$columnNum) as $_paperAnalyseArr):?>
  210. <table>
  211. <tbody>
  212. <tr>
  213. <td style="width: 25mm">题号</td>
  214. <?php foreach ($_paperAnalyseArr as $analyseArr):?>
  215. <td><?php echo $analyseArr['no'];?></td>
  216. <?php endforeach;?>
  217. <?php for($i = 0;$i < ($columnNum-count($_paperAnalyseArr));$i++):?>
  218. <td>&nbsp;</td>
  219. <?php endfor;?>
  220. </tr>
  221. <tr>
  222. <td>答错人数</td>
  223. <?php foreach ($_paperAnalyseArr as $analyseArr):?>
  224. <td><?php echo $analyseArr['wrong_num'];?></td>
  225. <?php endforeach;?>
  226. <?php for($i = 0;$i < ($columnNum-count($_paperAnalyseArr));$i++):?>
  227. <td>&nbsp;</td>
  228. <?php endfor;?>
  229. </tr>
  230. <tr>
  231. <td>错误率</td>
  232. <?php foreach ($_paperAnalyseArr as $analyseArr):?>
  233. <td><?php echo $analyseArr['wrong_rate'];?>%</td>
  234. <?php endforeach;?>
  235. <?php for($i = 0;$i < ($columnNum-count($_paperAnalyseArr));$i++):?>
  236. <td>&nbsp;</td>
  237. <?php endfor;?>
  238. </tr>
  239. </tbody>
  240. </table>
  241. <?php endforeach;?>
  242. </div>
  243. </div>
  244. <?php endif;?>
  245. </div>
  246. <?php if(isset($answer_score_details) && $answer_score_details):?>
  247. <div class="topic">
  248. <div class="topic-one-title">
  249. <span><?php echo $ch[$order];++$order;?>、客观题得分</span>
  250. <img src="<?php echo $zsyas2Url;?>/images/product_exam/class-situation.png" alt="">
  251. </div>
  252. <!-- 考试情况分析 -->
  253. <div class="exam-analysis">
  254. <div class="exam-table">
  255. <?php $tr_size = 16;?>
  256. <?php $topic_count = count($answer_score_details);?>
  257. <?php $p = ceil($topic_count / $tr_size); ?>
  258. <?php for ($i = 0; $i < $p; $i++): ?>
  259. <?php $tr_data = array_slice($answer_score_details,$i*$tr_size,$tr_size);?>
  260. <table>
  261. <tbody>
  262. <tr>
  263. <td>题号(答案)</td>
  264. <?php
  265. $temp_tr_data = array();
  266. $option_answer_html = '';
  267. $option_html = '';
  268. $option_count_html = '';
  269. foreach($tr_data as $k=>$v){
  270. if(!isset($temp_tr_data[$v['id']])){
  271. $temp_tr_data[$v['id']]['answer'] = $v['answer'];
  272. $temp_tr_data[$v['id']]['order'] = $v['order'];
  273. $temp_tr_data[$v['id']]['count'] = 1;
  274. }else{
  275. $temp_tr_data[$v['id']]['count']++;
  276. }
  277. $option_html.='<td>'.$v['option'].'</td>';
  278. $option_count_html.='<td>'.$v['option_count'].'</td>';
  279. }
  280. if($temp_tr_data){
  281. foreach($temp_tr_data as $k=>$v){
  282. $option_answer_html.= '<td colspan="'.$v['count'].'">'.$v['order'].'('.$v['answer'].')</td>';
  283. }
  284. }
  285. echo $option_answer_html;
  286. ?>
  287. </tr>
  288. <tr>
  289. <td>选项</td><?php echo $option_html;?>
  290. </tr>
  291. <tr>
  292. <td>选择人数</td><?php echo $option_count_html;?>
  293. </tr>
  294. </tbody>
  295. </table>
  296. <?php endfor;?>
  297. </div>
  298. </div>
  299. </div>
  300. <?php endif;?>
  301. <div class="topic">
  302. <div class="topic-one-title">
  303. <span><?php echo $ch[$order];++$order;?>、方法掌握情况</span>
  304. <img src="<?php echo $zsyas2Url;?>/images/product_exam/class-situation.png" alt="">
  305. </div>
  306. <!-- 考试情况分析 -->
  307. <div class="exam-analysis">
  308. <div class="exam-table">
  309. <table>
  310. <tbody class="method">
  311. <tr>
  312. <td>方法名称</td>
  313. <td>方法掌握水平</td>
  314. <td>班级得分率</td>
  315. <td>对应题号(答错人数)</td>
  316. </tr>
  317. <?php foreach ($methodAnalyseArr as $item):?>
  318. <tr>
  319. <td><?php echo $item['name'];?></td>
  320. <td>
  321. <span style="color: #f26100;">
  322. <?php for ($i = 0; $i < $item['star']; $i++): ?>
  323. <?php endfor;?>
  324. </span><span>
  325. <?php for ($i = 0;$i< (5-$item['star']); $i++):?>
  326. <?php endfor;?>
  327. </span>
  328. </td>
  329. <td><?php echo $item['rate'];?>%</td>
  330. <td>
  331. <?php $methodTopicStr = array();?>
  332. <?php foreach ($item['topicRs'] as $rs):?>
  333. <?php array_push($methodTopicStr, sprintf('<i class="yu">%s</i>(%s人)',$rs['topic_no'],$rs['wrong_stu_num']));?>
  334. <?php endforeach;?>
  335. <?php echo implode('、',$methodTopicStr);?>
  336. </tr>
  337. <?php endforeach;?>
  338. </tbody>
  339. </table>
  340. </div>
  341. </div>
  342. </div>
  343. </div>
  344. <div class="second-part">
  345. <div class="title tac">
  346. <p>第二部分:共性问题精讲</p>
  347. </div>
  348. <div class="wrong-student-lable">
  349. <img class="wrong-lable-icon" src="<?php echo $zsyas2Url;?>/images/product_exam/commentary-suggestion.png" alt="">
  350. <div class="wrong-lable-txt">讲评建议</div>
  351. </div>
  352. <div class="wrong-studen-block">
  353. <p class="★">本次考试<?php echo $className; ?>在
  354. <?php $mistakeNo = array(); ?>
  355. <?php foreach ($commonTopics as $item): ?>
  356. <?php array_push($mistakeNo, sprintf('第<b style="color: #f26100">%s</b>题', $item['topic_no'])); ?>
  357. <?php endforeach; ?>
  358. <?php echo implode('、', $mistakeNo); ?>
  359. 失分最多,涉及到的方法是:<?php $methodStr = array(); ?>
  360. <?php foreach ($commonTopics as $topicId => $item): ?>
  361. <?php if (!empty($methodOfTopic[$topicId])): ?>
  362. <?php foreach ($methodOfTopic[$topicId] as $methodId): ?>
  363. <?php if (isset($methodAnalyseArr[$methodId]['name'])) {
  364. array_push($methodStr, $methodAnalyseArr[$methodId]['name']);
  365. } ?>
  366. <?php endforeach; ?>
  367. <?php endif; ?>
  368. <?php endforeach; ?>
  369. <?php echo implode('、', array_unique($methodStr)); ?>
  370. </p>
  371. </div>
  372. <?php if($commonTopics):?>
  373. <?php foreach ($commonTopics as $topicId=>$item):?>
  374. <?php if(isset($topicInfoArr[$topicId])):?>
  375. <?php $commonTopicDetail = $topicInfoArr[$topicId];?>
  376. <div class="question-type">
  377. <span class="multiple-choice">
  378. <b>第<?php echo $item['topic_no'];?>题&nbsp;&nbsp;<?php //echo $commonTopicDetail['type_name'];?> </b>
  379. </span>
  380. <span class="round"></span>
  381. <div class="id">
  382. <span>ID: <b>
  383. <?php
  384. if(isset($commonTopicDetail["basic_type_id"]) && substr($commonTopicDetail["topic_id"],0,4) =="2015"){
  385. echo substr($commonTopicDetail["topic_id"],4) ;
  386. }else{
  387. echo $commonTopicDetail['topic_id'];
  388. }
  389. ?></b>
  390. </span>
  391. <span>班级得分率: <b><?php echo $paperCommentsArr[$topicId]['class_scoring_rate'];?>%</b> </span>
  392. <span>答错: <b><?php echo $paperCommentsArr[$topicId]['wrong_stu_num'];?>人</b> </span>
  393. </div>
  394. </div>
  395. <div class="wrong-student-lable">
  396. <img class="wrong-lable-icon" src="<?php echo $zsyas2Url;?>/images/product_exam/student.png" alt="">
  397. <div class="wrong-lable-txt color">答错学生</div>
  398. </div>
  399. <div class="wrong-studen-block color">
  400. <p class="wrong-studen-name">
  401. <?php foreach ($paperCommentsArr[$topicId]['wrong_stu_arr'] as $key => $stuId):?>
  402. <?php echo $key > 0?'、':'';?><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:'';?>
  403. <?php endforeach;?>
  404. </p>
  405. </div>
  406. <div class="question-text">
  407. <p><?php echo $commonTopicDetail['topic_title'];?></p>
  408. </div>
  409. <?php if(($commonTopicDetail['topic_option'])):?>
  410. <div class="option-block">
  411. <?php echo $commonTopicDetail['topic_option'];?>
  412. </div>
  413. <?php endif;?>
  414. <div class="answer-analysis">
  415. <div class="answer-text">
  416. <div class="answer-txt">答案:</div>
  417. <div class="answer-result"><?php echo $commonTopicDetail['topic_answer'];?></div>
  418. </div>
  419. <div class="analysis">
  420. <span class="analysis-title">【解析】</span>
  421. <div class="analysis-text">
  422. <?php echo $commonTopicDetail['topic_parse'];?>
  423. </div>
  424. </div>
  425. </div>
  426. <?php if(isset($excellent_solution) && $excellent_solution && isset($excellent_solution[$topicId]) && $excellent_solution[$topicId]):?>
  427. <div class="student-excellent">
  428. <div class="tit">
  429. <span>【同学优解】</span>
  430. <span></span>
  431. <span></span>
  432. <span></span>
  433. <span>
  434. <?php echo isset($excellent_solution[$topicId]['class_name'])?$excellent_solution[$topicId]['class_name']:"";?>
  435. <?php echo isset($excellent_solution[$topicId]['student_name'])?$excellent_solution[$topicId]['student_name']:"";?>
  436. </span>
  437. </div>
  438. <div class="sm">
  439. <img src="<?php echo isset($excellent_solution[$topicId]['answer_url'])?$excellent_solution[$topicId]['answer_url']:"";?>" alt="" />
  440. </div>
  441. </div>
  442. <?php endif;?>
  443. <?php endif;?>
  444. <?php endforeach;?>
  445. <?php endif;?>
  446. </div>
  447. <div class="third-part">
  448. <div class="title tac">
  449. <p>第三部分:方法训练精讲</p>
  450. </div>
  451. <?php $classicTopics = array();?>
  452. <?php foreach ($methodPractice as $key=>$method):?>
  453. <div class="solution">
  454. <img src="<?php echo $zsyas2Url;?>/images/product_exam/Solution.png" alt="">
  455. <span>解决方法<?php echo numToUpper($key+1);?>:<?php echo $method['name'];?></span>
  456. </div>
  457. <div class="wrong-student-lable">
  458. <img class="wrong-lable-icon" src="<?php echo $zsyas2Url;?>/images/product_exam/commentary-suggestion.png" alt="">
  459. <div class="wrong-lable-txt">方法释义</div>
  460. </div>
  461. <div class="wrong-studen-block">
  462. <p class="wrong-studen-name">
  463. <?php echo $method['content'];?>
  464. </p>
  465. </div>
  466. <div class="question-type">
  467. <span class="multiple-choice">
  468. <b>例题<?php echo ($key+1);?></b>
  469. </span>
  470. <span class="round"></span>
  471. </div>
  472. <div class="question-text">
  473. <p>
  474. <?php echo $method['classic_content'];?>
  475. </p>
  476. </div>
  477. <?php foreach ($method['classic_topic_ids'] as $topicInfo):?>
  478. <?php
  479. $topicId = $topicInfo['topic_id'];
  480. if(in_array($topicId,$classicTopics)){
  481. continue;
  482. }
  483. array_push($classicTopics, $topicId);
  484. ?>
  485. <div class="solution">
  486. <img src="<?php echo $zsyas2Url;?>/images/product_exam/method.png" alt="">
  487. <span>【方法训练】【<?php
  488. if (isset($topicInfo["basic_type_id"]) && substr($topicInfo["topic_id"], 0, 4) == "2015") {
  489. echo substr($topicInfo["topic_id"], 4);
  490. } else {
  491. echo number_format($topicId, 0, '', '');
  492. }
  493. ?>
  494. 】</span>
  495. </div>
  496. <div class="question-text">
  497. <p><?php echo $topicInfo['topic_title'];?></p>
  498. </div>
  499. <?php if(($topicInfo['topic_option'])):?>
  500. <div class="option-block">
  501. <?php echo $topicInfo['topic_option'];?>
  502. </div>
  503. <?php endif;?>
  504. <div class="answer-analysis">
  505. <div class="answer-text">
  506. <div class="answer-txt">答案:</div>
  507. <div class="answer-result"><?php echo $topicInfo['topic_answer'];?></div>
  508. </div>
  509. <div class="analysis">
  510. <span class="analysis-title">【解析】</span>
  511. <div class="analysis-text">
  512. <?php echo $topicInfo['topic_parse'];?>
  513. </div>
  514. </div>
  515. </div>
  516. <?php break;?>
  517. <?php endforeach;?>
  518. <?php endforeach;?>
  519. </div>
  520. </div>
  521. </body>
  522. </html>