teach_physics.php 23 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412
  1. <!DOCTYPE html>
  2. <html lang="en">
  3. <head>
  4. <meta charset="UTF-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>物理教学宝</title>
  7. <link rel="stylesheet" type="text/css" href="<?php echo $zsyas2Url;?>/css/teaching/physics/reset.css">
  8. <link rel="stylesheet" type="text/css" href="<?php echo $zsyas2Url;?>/css/teaching/physics/base.css">
  9. <link rel="stylesheet" type="text/css" href="<?php echo $zsyas2Url;?>/css/teaching/physics/PhysicsTeaching.css">
  10. <!--试题样式-->
  11. <link rel="stylesheet" type="text/css" href="<?php echo $zsyas2Url;?>/css/teaching/physics/topic.css">
  12. </head>
  13. <body>
  14. <div class="pdf-paper">
  15. <div class="paper-top">
  16. <div class="paper-title">
  17. <?php echo $className;?>《<?php echo $examInfo['exam_name'];?>》教学宝
  18. </div>
  19. </div>
  20. <div class="paper-content">
  21. <!-- 班级情况分析 -->
  22. <?php if($classAnalyseArr):?>
  23. <div class="paper-part class-analysis">
  24. <h3 class="part-title">一、班级情况分析</h3>
  25. <div class="class-info">
  26. <table cellspacing="0" cellpadding="0">
  27. <tbody>
  28. <tr>
  29. <td>
  30. <div class="info-block">
  31. <p>参加考试人数<span class="bold"><?php echo $classAnalyseArr['exam_stu_num'];?></span>人</p>
  32. <p><?php echo $classAnalyseArr['miss_stu_num'];?>人缺考</p>
  33. </div>
  34. </td>
  35. <td>
  36. <div class="info-block">
  37. <p>平均得分率<span class="bold"><?php echo $classAnalyseArr['avg_score_rate'];?>%</span></p>
  38. <?php if($classAnalyseArr['pre_avg_rate_diff'] != 0):?>
  39. <p>较上次考试<?php echo $classAnalyseArr['pre_avg_rate_diff']>0?'+':'-';?><?php echo abs($classAnalyseArr['pre_avg_rate_diff']);?>%</p>
  40. <?php endif;?>
  41. </div>
  42. </td>
  43. <td>
  44. <div class="info-block">
  45. <p>平均分<span class="bold"><?php echo $classAnalyseArr['avg_scoring'];?></span></p>
  46. <p>最高分<?php echo $classAnalyseArr['max_scoring'];?>, 最低分<?php echo $classAnalyseArr['min_scoring'];?>, 满分<?php echo $classAnalyseArr['full_scoring'];?></p>
  47. </div>
  48. </td>
  49. <td>
  50. <div class="info-block">
  51. <p>及格率<span class="bold"><?php echo $classAnalyseArr['pass_rate'];?>%</span></p>
  52. <p>其中得分率90%以上的有<?php echo $classAnalyseArr['pass_rate_gt_90'];?>人</p>
  53. </div>
  54. </td>
  55. </tr>
  56. </tbody>
  57. </table>
  58. </div>
  59. <div class="class-table">
  60. <table>
  61. <tbody>
  62. <tr>
  63. <td colspan="3" class="table-title">大幅进步</td>
  64. </tr>
  65. <tr>
  66. <td>姓名</td>
  67. <td>班级排名</td>
  68. <td>排名提升</td>
  69. </tr>
  70. <?php if (isset($largeOrderArr['increase_stu'])): ?>
  71. <?php foreach ($largeOrderArr['increase_stu'] as $key => $stuId):
  72. $stu_order = isset($largeOrderArr['stu_order'][$stuId])?$largeOrderArr['stu_order'][$stuId]:'';
  73. $stu_score = isset($stuScore[$stuId])?$stuScore[$stuId]:'';
  74. ?>
  75. <tr>
  76. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:''; ?></td>
  77. <td><?php echo $stu_order ? $stu_order.'/'.$stu_score.'分' : ''; ?></td>
  78. <td>
  79. <?php
  80. if(isset($largeOrderArr['stu_diff_order'][$stuId]) && $largeOrderArr['stu_diff_order'][$stuId] > 0){
  81. echo abs($largeOrderArr['stu_diff_order'][$stuId]);
  82. }else{
  83. echo $stu_order?'-':'&nbsp;';
  84. }
  85. ?>
  86. </td>
  87. </tr>
  88. <?php endforeach; ?>
  89. <?php endif; ?>
  90. <?php for($i = 0;$i < (5-count($largeOrderArr['increase_stu']));$i++):?>
  91. <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
  92. <?php endfor;?>
  93. </tbody>
  94. </table>
  95. <table>
  96. <tbody>
  97. <tr>
  98. <td colspan="3" class="table-title">大幅退步</td>
  99. </tr>
  100. <tr>
  101. <td>姓名</td>
  102. <td>班级排名</td>
  103. <td>排名下降</td>
  104. </tr>
  105. <?php if (isset($largeOrderArr['reduce_stu'])): ?>
  106. <?php foreach ($largeOrderArr['reduce_stu'] as $key => $stuId): ?>
  107. <?php $stu_score = isset($stuScore[$stuId])?$stuScore[$stuId]:'';?>
  108. <tr>
  109. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:''; ?></td>
  110. <td><?php echo isset($largeOrderArr['stu_order'][$stuId])?$largeOrderArr['stu_order'][$stuId]:0; ?>/<?php echo $stu_score;?>分</td>
  111. <td>
  112. <?php
  113. if(isset($largeOrderArr['stu_diff_order'][$stuId]) && abs($largeOrderArr['stu_diff_order'][$stuId]) > 0){
  114. echo abs($largeOrderArr['stu_diff_order'][$stuId]);
  115. }else{
  116. echo '-';
  117. }
  118. ?>
  119. </td>
  120. </tr>
  121. <?php endforeach; ?>
  122. <?php endif; ?>
  123. <?php for($i = 0;$i < (5-count($largeOrderArr['reduce_stu']));$i++):?>
  124. <tr><td>&nbsp;</td><td>&nbsp;</td><td>&nbsp;</td></tr>
  125. <?php endfor;?>
  126. </tbody>
  127. </table>
  128. <table>
  129. <tbody>
  130. <tr>
  131. <td colspan="2" class="table-title">班级前五名</td>
  132. </tr>
  133. <tr>
  134. <td>姓名</td>
  135. <td>班级排名</td>
  136. </tr>
  137. <?php if(isset($largeOrderArr['font_five'])):?>
  138. <?php foreach ($largeOrderArr['font_five'] as $stuId =>$rank):?>
  139. <?php $stu_score = isset($stuScore[$stuId])?$stuScore[$stuId]:'';?>
  140. <tr>
  141. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:'';?></td>
  142. <td><?php echo $rank;?>/<?php echo $stu_score;?>分</td>
  143. </tr>
  144. <?php endforeach;?>
  145. <?php for($i = 0;$i < (5-count($largeOrderArr['font_five']));$i++):?>
  146. <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
  147. <?php endfor;?>
  148. <?php endif;?>
  149. </tbody>
  150. </table>
  151. <table>
  152. <tbody>
  153. <tr>
  154. <td colspan="2" class="table-title">班级后五名</td>
  155. </tr>
  156. <tr>
  157. <td>姓名</td>
  158. <td>班级排名</td>
  159. </tr>
  160. <?php if(isset($largeOrderArr['back_five'])):?>
  161. <?php foreach ($largeOrderArr['back_five'] as $stuId =>$rank):?>
  162. <?php $stu_score = isset($stuScore[$stuId])?$stuScore[$stuId]:'';?>
  163. <tr>
  164. <td><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:'';?></td>
  165. <td><?php echo $rank;?>/<?php echo $stu_score;?>分</td>
  166. </tr>
  167. <?php endforeach;?>
  168. <?php for($i = 0;$i < (5-count($largeOrderArr['back_five']));$i++):?>
  169. <tr><td>&nbsp;</td><td>&nbsp;</td></tr>
  170. <?php endfor;?>
  171. <?php endif;?>
  172. </tbody>
  173. </table>
  174. </div>
  175. </div>
  176. <?php endif;?>
  177. <!-- 试卷情况分析 -->
  178. <?php if($paperAnalyseArr):?>
  179. <div class="paper-part exam-analysis">
  180. <h3 class="part-title">二、试卷情况分析</h3>
  181. <div class="exam-table">
  182. <?php $columnNum = 8;?>
  183. <?php foreach (array_chunk($paperAnalyseArr,$columnNum) as $_paperAnalyseArr):?>
  184. <table>
  185. <tbody>
  186. <tr>
  187. <td style="width: 25mm">题号</td>
  188. <?php foreach ($_paperAnalyseArr as $analyseArr):?>
  189. <td><?php echo $analyseArr['no'];?></td>
  190. <?php endforeach;?>
  191. <?php for($i = 0;$i < ($columnNum-count($_paperAnalyseArr));$i++):?>
  192. <td>&nbsp;</td>
  193. <?php endfor;?>
  194. </tr>
  195. <tr>
  196. <td>答错人数</td>
  197. <?php foreach ($_paperAnalyseArr as $analyseArr):?>
  198. <td><?php echo $analyseArr['wrong_num'];?></td>
  199. <?php endforeach;?>
  200. <?php for($i = 0;$i < ($columnNum-count($_paperAnalyseArr));$i++):?>
  201. <td>&nbsp;</td>
  202. <?php endfor;?>
  203. </tr>
  204. <tr>
  205. <td>错误率</td>
  206. <?php foreach ($_paperAnalyseArr as $analyseArr):?>
  207. <td><?php echo $analyseArr['wrong_rate'];?>%</td>
  208. <?php endforeach;?>
  209. <?php for($i = 0;$i < ($columnNum-count($_paperAnalyseArr));$i++):?>
  210. <td>&nbsp;</td>
  211. <?php endfor;?>
  212. </tr>
  213. </tbody>
  214. </table>
  215. <?php endforeach;?>
  216. </div>
  217. </div>
  218. <?php endif;?>
  219. <!-- 知识点掌握情况 -->
  220. <?php if($kpsAnalyseArr):?>
  221. <div class="paper-part knowledge-points">
  222. <h3 class="part-title">三、知识点掌握情况</h3>
  223. <div class="knowledge-table">
  224. <table>
  225. <tbody>
  226. <tr>
  227. <td>知识点名称</td>
  228. <td style="width: 22mm;">知识点掌握水平</td>
  229. <td style="width: 16mm;">班级得分率</td>
  230. <td style="width: 13mm;">答错人数</td>
  231. <td style="width: 26mm;">对应题号</td>
  232. </tr>
  233. <?php foreach ($kpsAnalyseArr as $kpsAnalyse):?>
  234. <tr>
  235. <td><?php echo $kpsAnalyse['kp_name'];?></td>
  236. <td class="stars">
  237. <?php foreach (range(1,5,1) as $v):?>
  238. <?php echo $v <= $kpsAnalyse['kp_star']?'★':'☆';?>
  239. <?php endforeach;?>
  240. </td>
  241. <td><?php echo $kpsAnalyse['class_scoring_rate'];?>%</td>
  242. <td><?php echo $kpsAnalyse['wrong_stu_num'];?></td>
  243. <td><?php echo implode(',',$kpsAnalyse['kp_topic_no']);?></td>
  244. </tr>
  245. <?php endforeach;?>
  246. </tbody>
  247. </table>
  248. </div>
  249. </div>
  250. <?php endif;?>
  251. <!-- 四、试卷讲评 -->
  252. <?php if($paperCommentsArr):?>
  253. <div class="paper-part exam-comments">
  254. <h3 class="part-title">四、试卷讲评</h3>
  255. <?php if(!$isPushSameTrain):?>
  256. <?php $commonNo = array();
  257. foreach ($commonTopics as $commonTopic){
  258. array_push($commonNo, $commonTopic['topic_no']);
  259. }
  260. ;?>
  261. <div class="comments-tips">标题有★号的表示班级共性问题,本班级共性题目序号为<?php echo implode('、',$commonNo);?></div>
  262. <?php endif;?>
  263. <?php foreach ($paperCommentsArr as $paperConment):?>
  264. <?php
  265. $topicId = $paperConment['topic_id'];
  266. $topicInfo = isset($topicInfoArr[$topicId])?$topicInfoArr[$topicId]:array();
  267. if(!$topicInfo) continue;
  268. ?>
  269. <div class="topic">
  270. <div class="topic-top">
  271. <div class="topic-number">
  272. <div class="topic-number-txt">第<?php echo $paperConment['topic_no'];?>题
  273. <?php if(!$isPushSameTrain):?>
  274. <?php if(isset($commonTopics[$topicId])):?>
  275. <?php endif;?>
  276. <?php endif;?>
  277. </div>
  278. </div>
  279. <div class="topic-info">
  280. <span>
  281. 【<?php
  282. if(isset($topicInfo['basic_type_id']) && substr($topicId,0,4) =="2015"){
  283. echo substr($topicId,4);
  284. }else{
  285. echo $topicId;
  286. }
  287. ?>】
  288. </span>
  289. <span>班级得分率:<i><?php echo $paperConment['class_scoring_rate'];?>%</i></span>
  290. <span>年级得分率:<i><?php echo $paperConment['grade_scoring_rate'];?>%</i></span>
  291. <span>答对:<i><?php echo $paperConment['right_stu_num'];?>人</i></span>
  292. <span>答错:<i><?php echo $paperConment['wrong_stu_num'];?>人</i></span>
  293. </div>
  294. </div>
  295. <?php if($paperConment['wrong_stu_arr']):?>
  296. <div class="wrong-student">
  297. <span class="student-lable">答错学生:</span>
  298. <p class="student-list">
  299. <?php foreach ($paperConment['wrong_stu_arr'] as $key => $stuId):?>
  300. <?php echo $key > 0?'、':'';?><?php echo isset($stuNameArr[$stuId])?$stuNameArr[$stuId]:'';?>
  301. <?php endforeach;?>
  302. </p>
  303. </div>
  304. <?php endif;?>
  305. <div class="question-content">
  306. <div class="question-block">
  307. <div class="question">
  308. <?php echo $topicInfo['topic_title'];?>
  309. </div>
  310. <!-- <div class="question-picture">-->
  311. <!-- <img src="" />-->
  312. <!-- </div>-->
  313. <!-- 根据题库选项排列方式;横向排列用 x-4 类名,纵向排列用 y-4 类名,上下排列用 xy-2 类名 -->
  314. <?php if(isset($topicInfo['topic_option']) && $topicInfo['topic_option']):?>
  315. <?php echo $topicInfo['topic_option'];?>
  316. <?php endif;?>
  317. </div>
  318. <div class="analysis-block">
  319. <div class="an-item">
  320. <div class="tri">
  321. <i class="tri-icon"></i>
  322. <span>答案:</span>
  323. </div>
  324. <div class="answer-txt"><?php echo $topicInfo['topic_answer']?$topicInfo['topic_answer']:'';?></div>
  325. </div>
  326. <div class="an-item">
  327. <div class="tri">
  328. <i class="tri-icon"></i>
  329. <span>解析:</span>
  330. </div>
  331. <div class="analysis-txt"><?php echo $topicInfo['topic_parse'];?></div>
  332. </div>
  333. <div class="an-item">
  334. <div class="tri">
  335. <i class="tri-icon"></i>
  336. <span>案例题:</span>
  337. </div>
  338. <span>
  339. 【<?php $pushTopicId= isset($commonTopics[$topicId]) ? $commonTopics[$topicId]['isp_topic_id'] :$paperConment['push_topic_id'];
  340. if(isset($topicInfoArr[$pushTopicId]) && isset($topicInfoArr[$pushTopicId]['basic_type_id']) && substr($pushTopicId,0,4) =="2015"){
  341. echo substr($pushTopicId,4);
  342. }else{
  343. echo $pushTopicId;
  344. }
  345. ?>】
  346. </span>
  347. </div>
  348. </div>
  349. <?php if(isset($commonTopics[$topicId]) || $paperConment['push_topic_id']):?>
  350. <?php
  351. $pushTopicId = isset($commonTopics[$topicId]) ? $commonTopics[$topicId]['isp_topic_id'] :$paperConment['push_topic_id'];
  352. $pushTopicInfo = isset($topicInfoArr[$pushTopicId])?$topicInfoArr[$pushTopicId]:array();
  353. if(!$pushTopicInfo) continue;
  354. ?>
  355. <div class="question-block case-questions">
  356. <div class="question">
  357. <?php echo $pushTopicInfo['topic_title'];?>
  358. </div>
  359. <!-- <div class="question-picture">-->
  360. <!-- <img src="" />-->
  361. <!-- </div>-->
  362. <!-- 根据题库选项排列方式;横向排列用 x-4 类名,纵向排列用 y-4 类名,上下排列用 xy-2 类名 -->
  363. <?php if(isset($pushTopicInfo['topic_option']) && $pushTopicInfo['topic_option']):?>
  364. <?php echo $pushTopicInfo['topic_option'];?>
  365. <?php endif;?>
  366. </div>
  367. <div class="case-analysis">
  368. <div class="answer-analysis">
  369. <div class="answer">
  370. <span>【答案】</span>
  371. <div class="answer-txt"><?php echo $pushTopicInfo['topic_answer']?$pushTopicInfo['topic_answer']:'';?></div>
  372. </div>
  373. <div class="analysis">
  374. <span>【解析】</span>
  375. <div class="analysis-txt">
  376. <?php echo $pushTopicInfo['topic_parse'];?>
  377. <!-- 如图所示的装置中,A、B两物块的质量分别为4kg、1kg,不计弹簧和细绳质量以及一切摩擦,重力加速度g=10m/s,先固定物块A使系统处于静止状态,释放A的瞬间-->
  378. <!-- <p class="analysis-num">-->
  379. <!-- (1)-->
  380. <!-- 如图所示的装置中,A、B两物块的质量分别为4kg、1kg,不计弹簧和细绳质量以及一切摩擦,重力加速度-->
  381. <!-- </p>-->
  382. <!-- <p class="analysis-num">-->
  383. <!-- (2)-->
  384. <!-- 如图所示的装置中,A、B两物块的质量分别为4kg、1kg,不计弹簧和细绳质量以及一切摩擦,重力加速度-->
  385. <!-- </p>-->
  386. </div>
  387. </div>
  388. </div>
  389. </div>
  390. <?php endif;?>
  391. </div>
  392. </div>
  393. <?php endforeach;?>
  394. </div>
  395. <?php endif;?>
  396. </div>
  397. </div>
  398. </body>
  399. </html>