answer.php 19 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. <?php
  2. $wordReview = $product_setting['training']['wordReview']; //词汇回顾
  3. $wordExplain = $product_setting['training']['wordExplain']; //词汇精讲
  4. $translate = $product_setting['training']['practiceExact']['translate']; //英汉互译(中译英、英译中)
  5. $wordApply = $product_setting['training']['practiceExact']['wordApply']; //词汇运用
  6. $discourse = $product_setting['training']['practiceExact']['discourse']; //语篇训练
  7. $checkCard = $product_setting['checkCard']; //词汇检测卡
  8. $wrongPractice = $product_setting['wrongPractice']; //错词再练
  9. $title_no = array(1=>'Ⅰ',2=>'Ⅱ',3=>'Ⅲ',4=>'Ⅳ');
  10. $title_m_no = array(1=>'一',2=>'二',3=>'三',4=>'四');
  11. $flag_no = 1;
  12. $flag_m_no = 1;
  13. ?>
  14. <!-- 词汇集训答案 -->
  15. <div class="part vocabulary">
  16. <!-- 答案 -->
  17. <div class="answer">
  18. <div class="title-head">
  19. <div class="title">
  20. <div class="title-text">Answer to Expression Intensive Training(词汇集训答案)</div>
  21. </div>
  22. </div>
  23. <div class="modular train">
  24. <?php
  25. if($wordReview && $wordExplain){
  26. $flag_m_no = 3;
  27. }elseif(($wordReview && !$wordExplain) || (!$wordReview && $wordExplain)){
  28. $flag_m_no = 2;
  29. }else{
  30. $flag_m_no = 1;
  31. }
  32. $title_m_no = array(1=>'一',2=>'二',3=>'三',4=>'四');
  33. ?>
  34. <div class="modular-title">
  35. <img class="modular-title-icon" src="<?php echo $server.'/images/magic_word/lable1-icon.png'; ?> " alt="">
  36. <?php echo $title_m_no[$flag_m_no]; ?>、Precise Application (精准训练)
  37. </div>
  38. <!-- 英汉互译 -->
  39. <?php
  40. $flag_m_no = 1;
  41. if($translates && $translate){
  42. ?>
  43. <div class="unit-block">
  44. <div class="unit-title b-title">
  45. <img src="<?php echo $server.'/images/magic_word/start.png';?>" alt="" />
  46. <span>(<?php echo $title_m_no[$flag_m_no]; ?>)<?php if($setting['practice_type'] == 1){ //共性
  47. echo $translate_type[$setting['translate_type']];
  48. }else{ //个性
  49. echo isset($translates['type']) ? $translate_type[$translates['type']] : $translate_type[1];
  50. }
  51. ?></span>
  52. </div>
  53. <div class="type-block">
  54. <ol class="sort-list lr-list clearfix">
  55. <?php
  56. $translate_type_no = 1;
  57. if($setting['practice_type'] == 1){ //共性
  58. if($setting['translate_type'] == 1){ //英汉互译
  59. if(isset($translates['phrases'])){
  60. foreach ($translates['phrases'] as $val){
  61. ?>
  62. <li><?php echo $val['content']; ?><i></i></li>
  63. <?php
  64. $translate_type_no++;
  65. }
  66. }
  67. if(isset($translates['single_words'])){
  68. foreach ($translates['single_words'] as $val){
  69. ?>
  70. <li><?php echo $translate_type_no < 11 ? $val['content'] : $val['mean']; ?><i></i></li>
  71. <?php
  72. $translate_type_no++;
  73. }
  74. }
  75. }elseif($setting['translate_type'] == 2){ //英译中
  76. if(isset($translates['single_words'])){
  77. foreach ($translates['single_words'] as $key=>$val){
  78. ?>
  79. <li><?php echo $val['mean']; ?><i></i></li>
  80. <?php
  81. }
  82. }
  83. }else{ //中译英
  84. if(isset($translates['phrases'])){
  85. foreach ($translates['phrases'] as $val){
  86. ?>
  87. <li><?php echo $val['content']; ?><i></i></li>
  88. <?php
  89. }
  90. }
  91. if(isset($translates['single_words'])){
  92. foreach ($translates['single_words'] as $val){
  93. ?>
  94. <li><?php echo $val['content'] ; ?><i></i></li>
  95. <?php
  96. }
  97. }
  98. }
  99. }else{ //个性
  100. if(isset($translates['type']) && $translates['type'] == 1){
  101. foreach ($translates['phrases'] as $val){
  102. ?>
  103. <li><?php echo $val['content']; ?><i></i></li>
  104. <?php
  105. $translate_type_no++;
  106. }
  107. if(isset($translates['single_words'])){
  108. foreach ($translates['single_words'] as $val){
  109. ?>
  110. <li><?php echo $translate_type_no < 11 ? $val['content'] : $val['mean']; ?><i></i></li>
  111. <?php
  112. $translate_type_no++;
  113. }
  114. }
  115. }elseif(isset($translates['type']) && $translates['type'] == 2){
  116. if(isset($translates['phrases'])){
  117. foreach ($translates['phrases'] as $key=>$val){
  118. ?>
  119. <li><?php echo $val['mean']; ?><i></i></li>
  120. <?php
  121. }
  122. }
  123. if(isset($translates['single_words'])){
  124. foreach ($translates['single_words'] as $key=>$val){
  125. ?>
  126. <li><?php echo $val['mean']; ?><i></i></li>
  127. <?php
  128. }
  129. }
  130. }elseif(isset($translates['type']) && $translates['type'] == 3){
  131. if(isset($translates['phrases'])){
  132. foreach ($translates['phrases'] as $val){
  133. ?>
  134. <li><?php echo $val['content']; ?><i></i></li>
  135. <?php
  136. }
  137. }
  138. if(isset($translates['single_words'])){
  139. foreach ($translates['single_words'] as $val){
  140. ?>
  141. <li><?php echo $val['content'] ; ?><i></i></li>
  142. <?php
  143. }
  144. }
  145. }
  146. }
  147. ?>
  148. </ol>
  149. </div>
  150. </div>
  151. <?php $flag_m_no++;}?>
  152. <!-- 词汇运用 -->
  153. <?php if($word_apply_ids && $wordApply){
  154. $topic_type = array(8=>'Word Spelling (单词拼写)',19=>'Grammar Gap in Sentence (单句语法填空)',20=>'Sentence Translation (单句翻译)');
  155. $no =1;
  156. ?>
  157. <div class="unit-block has-three">
  158. <div class="unit-title b-title">
  159. <img src="<?php echo $server.'/images/magic_word/start.png';?>" alt="" />
  160. <span>(<?php echo $title_m_no[$flag_m_no]; ?>)Word in Practice (单词运用)</span>
  161. </div>
  162. <?php foreach($word_apply_ids as $tp=>$topic_id){
  163. if(array_key_exists($tp,$topic_type)){
  164. ?>
  165. <div class="type-block">
  166. <div class="type-title">
  167. <img src="<?php echo $server.'/images/magic_word/Feather-bg.png';?>" alt="" />
  168. <i><?php echo $title_no[$no];?></i><?php echo isset($topic_type[$tp]) ? $topic_type[$tp] : ''; ?>
  169. </div>
  170. <div class="ans-analysis">
  171. <ul class="sort-list">
  172. <?php foreach($word_apply_ids[$tp] as $topic_id){
  173. ?>
  174. <li>
  175. <?php if(isset($word_apply_content[$topic_id])){ ?>
  176. <span><?php echo isset($word_apply_content[$topic_id]['answer'][$topic_id]) ? preg_replace("/<\/?[p|P][^>]*>/si","",$word_apply_content[$topic_id]['answer'][$topic_id]) : '' ;?></span>
  177. <?php if($tp != 20){ //单句翻译不需要解析?>
  178. <p class="analysis">
  179. <em class="ana-lable">【解析】</em>
  180. <?php
  181. $content = preg_replace("/<\/?[p|P][^>]*>/si","",$word_apply_content[$topic_id]['analysis']);
  182. echo $content;
  183. ?>
  184. </p>
  185. <?php }
  186. }?>
  187. </li>
  188. <?php } ?>
  189. </ul>
  190. </div>
  191. </div>
  192. <?php }
  193. $no++;}?>
  194. </div>
  195. <?php $flag_m_no++;}?>
  196. <!-- 语篇训练 -->
  197. <?php if($card_topic_ids && $discourse){
  198. $topic_type = array(2=>'Choice Cloze (完形填空)', 3=>'Reading Comprehension (阅读理解)', 5=>'七选五', 6=>'Grammar Gap Filling (语法填空)');
  199. $no = 1;
  200. ?>
  201. <div class="unit-block has-three">
  202. <div class="unit-title b-title">
  203. <img src="<?php echo $server.'/images/magic_word/start.png';?>" alt="" />
  204. <span>(<?php echo $title_m_no[$flag_m_no]; ?>) Passage Test (语篇训练)</span>
  205. </div>
  206. <?php foreach($card_topic_ids as $tp=>$topic_id){
  207. if(array_key_exists($tp,$topic_type)){
  208. ?>
  209. <div class="type-block">
  210. <div class="type-title">
  211. <img src="<?php echo $server.'/images/magic_word/Feather-bg.png';?>" alt="" />
  212. <i><?php echo $title_no[$no];?></i><?php echo isset($topic_type[$tp]) ? $topic_type[$tp] : ''; ?>
  213. </div>
  214. <?php if(isset($card_topic_content[$card_topic_ids[$tp]])){ ?>
  215. <div class="ans-analysis">
  216. <div class="ans-list">
  217. <em class="ans-lable">【答案】</em>
  218. <ul class="sort-list">
  219. <?php foreach($card_topic_content[$card_topic_ids[$tp]]['answer'] as $option_answer){?>
  220. <li><?php echo preg_replace("/<\/?[p|P][^>]*>/si","",$option_answer);?></li>
  221. <?php }?>
  222. </ul>
  223. </div>
  224. <div class="analysis">
  225. <em class="ana-lable">【解析】</em>
  226. <?php echo $card_topic_content[$card_topic_ids[$tp]]['analysis']; ?>
  227. <!--ul class="sort-list">
  228. <li>
  229. <em class="Blod">细节理解题。</em>
  230. <p>
  231. 根据“Don't let the noise of others' opinions drown out
  232. your own inner
  233. voice...”不要让别人的意见淹没了你内心的声音。意思是不要被别人的言论影响。本句话是出自Steve
  234. Jobs,故选C。
  235. </p>
  236. </li>
  237. <li>
  238. <em class="Blod">细节理解题。</em>
  239. <p>
  240. 根据题目关键词“Oprah Winfrey”找到“And the solution will arise from the
  241. challenge.”可知,直面挑战才能找到解决问题的方法。
  242. </p>
  243. </li>
  244. <li>
  245. <em class="Blod">细节理解题。</em>
  246. <p>
  247. 根据题目中的人名“Michael Dell“找到“But you will learn from your mistakes and the
  248. mistakes of others.”你会从你的错误和别人的错误中吸取教训。故选D。
  249. </p>
  250. </li>
  251. <li>
  252. <em class="Blod">推理判断题。</em>
  253. <p>
  254. 根据每位伟人的演讲内容“Don't be affected by what other people say.”以及“To meet
  255. challenges in your life.”以及“learn from our
  256. mistakes”可知,我们能从毕业典礼的演讲上得到人生经验教训,即:life lessons。
  257. </p>
  258. </li>
  259. </ul-->
  260. </div>
  261. </div>
  262. <?php } ?>
  263. </div>
  264. <?php }
  265. $no++; }?>
  266. </div>
  267. <?php }?>
  268. </div>
  269. </div>
  270. </div>
  271. <div style="page-break-after: always;"></div>