zoukankan      html  css  js  c++  java
  • 考试 试卷分析,根据答题对错,绑定答题卡,以显示不同颜色

    前台定义一个DIV,用来绑定和显示答题卡的内容

    <div id="AnswerSheet" runat="server" style="height:450px; overflow:auto; ">
                                </div>

    后台通过 AnswerSheet 绑定答题卡

     1 public void InitSubjectAnswer(string ExamPaperGuid)
     2         {
     3             //20130105 加载xml文件
     4             String strTempFilePath = System.Web.HttpContext.Current.Server.MapPath(GetApplicationPath() + "px/xmlFile/");
     5 
     6             if (!Directory.Exists(strTempFilePath))
     7             {//文件夹路径不存在则创建
     8                 Directory.CreateDirectory(strTempFilePath);
     9             }
    10 //文件的名称
    11             strTempFilePath = strTempFilePath + "EpointExam_" + ViewState["ExamGuid"] + "_" + ExamPaperGuid + "_" + Session["UserGuid"].ToString() + ".xml";
    12             XmlDocument xmlExam = new XmlDocument();
    13             if (File.Exists(strTempFilePath))//如果这个文件已经存在
    14                 xmlExam.Load(strTempFilePath);//读取文件内容
    15             else
    16                 return;
    17 
    18             Epoint.PeiXun.Bizlogic.BLL.ExamOnline.IPaperDetail iPaper = new Epoint.PeiXun.Bizlogic.BLL.ExamOnline.DB_IPaper().GetDetailPaper(xmlExam);
    19             Epoint.PeiXun.Bizlogic.BLL.ExamOnline.IQuestionDetail iQuestion = new Epoint.PeiXun.Bizlogic.BLL.ExamOnline.IQuestionDetail();
    20 
    21             #region
    22             StringBuilder strHTML = new StringBuilder();
    23             int m = 0;
    24             int Count = 0;
    25             string type = "";
    26 
    27             //单选题
    28             Count = Epoint.Common.Functions.IntNull(iPaper.QuestionCount0);
    29 
    30             type = "single";
    31             if (Count > 0)
    32             {
    33                 strHTML.Append("<div class='answer-block'><h2>单选题</h2>");
    34                 strHTML.Append(BindAnswerSheet(Count, type, ref m));
    35             }
    36             //多选题
    37             Count = Epoint.Common.Functions.IntNull(iPaper.QuestionCount1);
    38             type = "mult";
    39             if (Count > 0)
    40             {
    41                 strHTML.Append("<div class='answer-block'><h2>多选题</h2>");
    42                 strHTML.Append(BindAnswerSheet(Count, type, ref m));
    43             }
    44             //判断题
    45             Count = Epoint.Common.Functions.IntNull(iPaper.QuestionCount2);
    46             type = "judge";
    47             if (Count > 0)
    48             {
    49                 strHTML.Append("<div class='answer-block'><h2>判断题</h2>");
    50                 strHTML.Append(BindAnswerSheet(Count, type, ref m));
    51             }
    52             //填空题
    53             Count = Epoint.Common.Functions.IntNull(iPaper.QuestionCount3);
    54             type = "fill";
    55             if (Count > 0)
    56             {
    57                 strHTML.Append("<div class='answer-block'><h2>填空题</h2>");
    58                 strHTML.Append(BindAnswerSheet(Count, type, ref m));
    59             }
    60             //简答题
    61             Count = Epoint.Common.Functions.IntNull(iPaper.QuestionCount4);
    62             type = "answer";
    63             if (Count > 0)
    64             {
    65                 strHTML.Append("<div class='answer-block'><h2>简答题</h2>");
    66                 strHTML.Append(BindAnswerSheet(Count, type, ref m));
    67             }
    68             AnswerSheet.InnerHtml = strHTML.ToString();
    69             #endregion
    70         }
    View Code

    因为绑定答题卡是通过循环绑定的,所以我们定义一个通用方法,在 InitSubjectAnswer 方法里面调用这个方法就可以了

     1  public string BindAnswerSheet(int Count, string type, ref int mm)
     2         {
     3             string TypeNum = "";
     4             switch (type)//根据传过来的Type,判断题目的类型
     5             {
     6                 case "single": TypeNum = "0";
     7                     break;
     8                 case "mult": TypeNum = "1";
     9                     break;
    10                 case "judge": TypeNum = "2";
    11                     break;
    12                 case "fill": TypeNum = "3";
    13                     break;
    14                 case "answer": TypeNum = "4";
    15                     break;
    16             }
    17             string AnswerClass = "";
    18 
    19             StringBuilder sb = new StringBuilder();
    20             sb.Append("<ul class='answer-list'>");
    21 
    22             List<M_Exam_Question> list_question = b_question.SelectByExamPaperGuid(ViewState["ExamPaperGuid"].ToString()).FindAll(x => x.Type == TypeNum);//根据ExamPaperGuid找出试卷的所有题目
    23             //M_Exam_Question m_eq = b_question.SelectByExamPaperGuid(ViewState["ExamPaperGuid"].ToString()).Find(x => x.Type == AnswerClass);
    24 
    25             for (int i = 0; i < Count; i++)
    26             {
    27                 mm++;
    28                 string SubjectGuid = list_question[i].SubjectGuid;
    29                 int Score = b_question.GetScore(ViewState["ExamPaperGuid"].ToString(), SubjectGuid);//取出题目的标准分
    30                 int Code = b_er.GetCode(RegisGuid, SubjectGuid);  //取出答题所得分
    31                 if (Score == Code)
    32                 {
    33                     AnswerClass = "right";//正确的样式
    34                     sb.Append("<li class='" + AnswerClass + "' onclick="Skip('" + type + (i + 1) + "','" + type + "');" id='" + type + (i + 1) + "'>" + (mm) + "</li>");
    35                 }
    36                 else
    37                 {
    38                     AnswerClass = "wrong";//错误的样式
    39                     sb.Append("<li class='" + AnswerClass + "' onclick="Skip('" + type + (i + 1) + "','" + type + "');" id='" + type + (i + 1) + "'>" + (mm) + "</li>");
    40                 }
    41                 //sb.Append("<li class='" + AnswerClass + "' onclick="Skip('" + type + (i + 1) + "','" + type + "');" id='" + type + (i + 1) + "'>" + (mm) + "</li>");
    42             }
    43             sb.Append("</ul>");
    44             sb.Append("</div>");
    45             //AnswerSheet.InnerHtml = sb.ToString();
    46             return sb.ToString();
    47         }
    View Code


    从数据库中取出对应类型的题目

      1 public void GetSubject(string ExamPaperGuid, string BasePaperGuid)
      2         {
      3             Epoint.PeiXun.Bizlogic.BLL.ExamSubject.B_Exam_Answer b_answer = new Epoint.PeiXun.Bizlogic.BLL.ExamSubject.B_Exam_Answer();//答案
      4             List<M_Exam_Answer> listanswer;
      5             M_Exam_Paper m_paper = b_paper.SelectByRowGuid(BasePaperGuid);
      6 
      7             //是否启用选对一个得分模式
      8             string IsShowMultiCode2 = new Epoint.Frame.Bizlogic.Frame_Config().GetDetail("IsShowMultiCode2").ConfigValue;
      9 
     10             //20130105 加载xml文件
     11             String strTempFilePath = System.Web.HttpContext.Current.Server.MapPath(GetApplicationPath() + "px/xmlFile/");
     12 
     13             if (!Directory.Exists(strTempFilePath))
     14                 Directory.CreateDirectory(strTempFilePath);
     15             strTempFilePath = strTempFilePath + "EpointExam_" + ViewState["ExamGuid"].ToString().Trim() + "_" + ExamPaperGuid.Trim() + "_" + RegisGuid + ".xml";
     16             XmlDocument xmlExam = new XmlDocument();
     17             xmlExam.Load(strTempFilePath);
     18 
     19             Epoint.PeiXun.Bizlogic.BLL.ExamOnline.IPaperDetail iPaper = new Epoint.PeiXun.Bizlogic.BLL.ExamOnline.DB_IPaper().GetDetailPaper(xmlExam);
     20             Epoint.PeiXun.Bizlogic.BLL.ExamOnline.IQuestionDetail iQuestion = new Epoint.PeiXun.Bizlogic.BLL.ExamOnline.IQuestionDetail();
     21 
     22             StringBuilder strHTML = new StringBuilder();
     23             string typeString = "";
     24             DataView dvAnswerList = new DataView();
     25             ArrayList Strnum = new ArrayList();
     26             String strRight = "", strYouAnswer = "", TempAnswer = "";
     27             String strChk = "";
     28             string GetCode = "";
     29             string yourAnswer = "";
     30             string SubjectGuid = "";
     31             int Code = 0;
     32 
     33             #region
     34             Strnum.Add("A");
     35             Strnum.Add("B");
     36             Strnum.Add("C");
     37             Strnum.Add("D");
     38             Strnum.Add("E");
     39             Strnum.Add("F");
     40 
     41             #endregion
     42 
     43 
     44             #region 题目
     45             List<M_Exam_Question> list_question = b_question.SelectByExamPaperGuid(ExamPaperGuid);
     46 
     47             for (int i = 0; i < list_question.Count; i++)
     48             {
     49                 //int IsCheck = Convert.ToInt32(iPaper.QuestionList[i].IsCheck);//题目类型
     50                 int IsCheck = Convert.ToInt32(list_question[i].Type);//题目类型
     51 
     52                 M_Exam_User m_eu = b_eu.GetAllDetail(ViewState["ExamGuid"].ToString(), RegisGuid);
     53 
     54 
     55                 int QuestionNum = 0;
     56                 iQuestion = iPaper.QuestionList[i];
     57                 SubjectGuid = iQuestion.SubjectGuid;
     58                 //存储题目以及答案的信息
     59                 //questionGuid[m] = SubjectGuid;
     60 
     61                 List<M_Exam_Answer> list_ea = b_answer.SelectIsRightBySubjectGuid(SubjectGuid);//正确的答案
     62                 switch (IsCheck)
     63                 {
     64                     case 0://0-单选 
     65                         typeString = "";
     66                         strChk = "";
     67                         if (iQuestion.IsFirst == "1")
     68                         {
     69                             QuestionNum = Convert.ToInt32(iPaper.QuestionCount0);
     70                             if (IsShowMultiCode2 == "1")
     71                                 strHTML.Append("<div class='ques-category' id='single'><h2>" + typeString + "、单选题(选对得" + m_paper.DanXSore.ToString() + "分,选错、多选不得分,合计" + (m_paper.DanXSore * QuestionNum).ToString() + "分)</h2>");
     72                             else
     73                                 strHTML.Append("<div class='ques-category' id='single'><h2>" + typeString + "、单选题,共" + QuestionNum.ToString() + "题,每题" + m_paper.DanXSore.ToString() + "分</h2>");
     74                             strHTML.Append("<div class='ques-list'>");
     75                         }
     76                         //生成试卷的题目
     77                         strHTML.Append("<div class='question'><p class='title'>题目" + (i + 1) + ".<span class='orange'>(单选题)</span>" + iQuestion.SubjectName + "</p>");
     78 
     79                         listanswer = b_answer.SelectBySubjectGuid(SubjectGuid);//当前题目的所有答案项
     80                         strRight = ""; strYouAnswer = "";
     81                         strHTML.Append("<ul class='result single'>");
     82                         for (int j = 0; j < listanswer.Count; j++)
     83                         {
     84                             strChk = ((iQuestion.AnswerID.IndexOf(listanswer[j].AnswerGuid.ToString()) >= 0) ? " checked " : "");//判断答案是否被选中
     85 
     86                             string liclass = "";
     87                             bool IsRight = JudgeIsRight(SubjectGuid, iQuestion.AnswerID, listanswer[j].AnswerGuid.ToString());
     88                             if (!string.IsNullOrEmpty(iQuestion.AnswerID))
     89                             {//已做题                               
     90                                 liclass = (IsRight) ? "right checked" : "wrong checked";
     91                             }
     92                             else
     93                             {
     94                                 liclass = (IsRight) ? "right unchecked" : "";
     95 
     96                             }
     97 
     98                             //liclass += (strChk == "checked") ? " itemchecked" : "";
     99                             strHTML.Append("<li class='" + liclass + "'  value="" + listanswer[j].AnswerGuid + ""> " + Strnum[j] + ". " + listanswer[j].AnswerName + "</li>");
    100                             if (listanswer[j].IsRight == "1")
    101                                 strRight += Strnum[j];
    102                         }
    103 
    104                         strHTML.Append("</ul>");
    105 
    106                         strHTML.Append("<div class='analysis'>");
    107                         //strHTML.Append("<h2>正确答案<em class='letter'>" + m_ea.AnswerGuid + "</em><h2>");
    108                         strHTML.Append("<h2>正确答案<em class='letter'>" + strRight + "</em></h2>");
    109                         strHTML.Append("<p class='item'>");
    110                         strHTML.Append("<span class='lbl'>解析</span>");
    111                         strHTML.Append("<span class='desc'>" + iQuestion.Note + "</span>");
    112                         strHTML.Append("</p>");
    113 
    114                         strHTML.Append("<p class='item'>");
    115                         strHTML.Append("<span class='lbl'>考点</span>");
    116                         strHTML.Append("<span class='desc'>12345</span>");
    117                         strHTML.Append("</p>");
    118 
    119                         strHTML.Append("<p class='item'>");
    120                         strHTML.Append("<span class='lbl'>统计</span>");
    121                         strHTML.Append("<span class='desc'><span>本题我做过2次,做错了1次。</span><span class='r summary'>本题150人做过,正确率80% 易错项C</span></span>");
    122                         strHTML.Append("</p>");
    123                         strHTML.Append("</div>");
    124 
    125                         strHTML.Append("</div>");
    126                         break;
    127 
    128                     case 1:    //1-多选 
    129                         typeString = "";
    130                         strChk = "";
    131                         if (iQuestion.IsFirst == "1")
    132                         {
    133                             if (Convert.ToInt32(iPaper.QuestionCount0) > 0)
    134                                 strHTML.Append("</div></div>");
    135 
    136                             QuestionNum = Convert.ToInt32(iPaper.QuestionCount1);
    137                             if (IsShowMultiCode2 == "1")
    138                                 strHTML.Append("<div class='ques-category' id='mult'><h2>" + typeString + "、多选题(选对得" + m_paper.DanXSore.ToString() + "分,选错、多选不得分,合计" + (m_paper.DanXSore * QuestionNum).ToString() + "分)</h2>");
    139                             else
    140                                 strHTML.Append("<div class='ques-category' id='mult'><h2>" + typeString + "、多选题,共" + QuestionNum.ToString() + "题,每题" + m_paper.DanXSore.ToString() + "分</h2>");
    141                             strHTML.Append("<div class='ques-list'>");
    142                         }
    143                         //生成试卷的题目
    144 
    145                         strHTML.Append("<div class='question'><p class='title'>题目" + (i + 1) + ".<span class='orange'>(多选题)</span>" + iQuestion.SubjectName + "</p>");
    146 
    147                         listanswer = b_answer.SelectBySubjectGuid(SubjectGuid);//当前题目的所有答案项
    148                         strRight = ""; strYouAnswer = "";
    149                         strHTML.Append("<ul class='result'>");
    150                         for (int j = 0; j < listanswer.Count; j++)
    151                         {
    152                             strChk = ((iQuestion.AnswerID.IndexOf(listanswer[j].AnswerGuid.ToString()) >= 0) ? " checked " : "");//判断答案是否被选中
    153 
    154                             string liclass = "";
    155                             bool IsRight = JudgeIsRight(SubjectGuid, iQuestion.AnswerID, listanswer[j].AnswerGuid.ToString());
    156                             if (!string.IsNullOrEmpty(iQuestion.AnswerID))
    157                             {//已做题                               
    158                                 liclass = (IsRight) ? "right checked" : "wrong checked";
    159                             }
    160                             else
    161                             {
    162                                 liclass = (IsRight) ? "right unchecked" : "";
    163 
    164                             }
    165 
    166                             //liclass += (strChk == "checked") ? " itemchecked" : "";
    167                             strHTML.Append("<li class='" + liclass + "'  value="" + listanswer[j].AnswerGuid + ""> " + Strnum[j] + ". " + listanswer[j].AnswerName + "</li>");
    168 
    169                             if (listanswer[j].IsRight == "1")
    170                                 strRight += Strnum[j];
    171                         }
    172                         strHTML.Append("</ul>");
    173                         strHTML.Append("<div class='analysis'>");
    174                         strHTML.Append("<h2>正确答案<em class='letter'>" + strRight + "</em></h2>");
    175                         strHTML.Append("<p class='item'>");
    176                         strHTML.Append("<span class='lbl'>解析</span>");
    177                         strHTML.Append("<span class='desc'>" + iQuestion.Note + "</span>");
    178                         strHTML.Append("</p>");
    179 
    180                         strHTML.Append("<p class='item'>");
    181                         strHTML.Append("<span class='lbl'>考点</span>");
    182                         strHTML.Append("<span class='desc'>12345</span>");
    183                         strHTML.Append("</p>");
    184 
    185                         strHTML.Append("<p class='item'>");
    186                         strHTML.Append("<span class='lbl'>统计</span>");
    187                         strHTML.Append("<span class='desc'><span>本题我做过2次,做错了1次。</span><span class='r summary'>本题150人做过,正确率80% 易错项C</span></span>");
    188                         strHTML.Append("</p>");
    189                         strHTML.Append("</div>");
    190                         strHTML.Append("</div>");
    191                         break;
    192 
    193                     case 2:   //2-判断
    194                         typeString = "";
    195                         strChk = "";
    196                         if (iQuestion.IsFirst == "1")
    197                         {
    198                             if (Convert.ToInt32(iPaper.QuestionCount0) + Convert.ToInt32(iPaper.QuestionCount1) > 0)
    199                                 strHTML.Append("</div></div>");
    200 
    201                             QuestionNum = Convert.ToInt32(iPaper.QuestionCount2);
    202                             if (IsShowMultiCode2 == "1")
    203                                 strHTML.Append("<div class='ques-category' id='judge'><h2>" + typeString + "、判断题(选对得" + m_paper.DanXSore.ToString() + "分,选错、多选不得分,合计" + (m_paper.DanXSore * QuestionNum).ToString() + "分)</h2>");
    204                             else
    205                                 strHTML.Append("<div class='ques-category' id='judge'><h2>" + typeString + "、判断题,共" + QuestionNum.ToString() + "题,每题" + m_paper.DanXSore.ToString() + "分</h2>");
    206                             strHTML.Append("<div class='ques-list'>");
    207                         }
    208                         //生成试卷的题目
    209                         strHTML.Append("<div class='question'><p class='title'>题目" + (i + 1) + ".<span class='orange'>(判断题)</span>" + iQuestion.SubjectName + "</p>");
    210 
    211                         listanswer = b_answer.SelectBySubjectGuid(SubjectGuid);//当前题目的所有答案项
    212                         strRight = ""; strYouAnswer = "";
    213                         strHTML.Append("<ul class='result single'>");
    214                         for (int j = 0; j < listanswer.Count; j++)
    215                         {
    216                             strChk = ((iQuestion.AnswerID.IndexOf(listanswer[j].AnswerGuid.ToString()) >= 0) ? " checked " : "");//判断答案是否被选中
    217 
    218                             string liclass = "";
    219                             bool IsRight = JudgeIsRight(SubjectGuid, iQuestion.AnswerID, listanswer[j].AnswerGuid.ToString());
    220                             if (!string.IsNullOrEmpty(iQuestion.AnswerID))
    221                             {//已做题                               
    222                                 liclass = (IsRight) ? "right checked" : "wrong checked";
    223                             }
    224                             else
    225                             {
    226                                 liclass = (IsRight) ? "right unchecked" : "";
    227 
    228                             }
    229 
    230                             //liclass += (strChk == "checked") ? " itemchecked" : "";
    231                             strHTML.Append("<li class='" + liclass + "'  value="" + listanswer[j].AnswerGuid + ""> " + Strnum[j] + ". " + listanswer[j].AnswerName + "</li>");
    232 
    233                             if (listanswer[j].IsRight == "1")
    234                                 strRight += Strnum[j];
    235                         }
    236                         strHTML.Append("</ul>");
    237                         strHTML.Append("<div class='analysis'>");
    238                         strHTML.Append("<h2>正确答案<em class='letter'>" + strRight + "</em></h2>");
    239                         strHTML.Append("<p class='item'>");
    240                         strHTML.Append("<span class='lbl'>解析</span>");
    241                         strHTML.Append("<span class='desc'>" + iQuestion.Note + "</span>");
    242                         strHTML.Append("</p>");
    243 
    244                         strHTML.Append("<p class='item'>");
    245                         strHTML.Append("<span class='lbl'>考点</span>");
    246                         strHTML.Append("<span class='desc'>12345</span>");
    247                         strHTML.Append("</p>");
    248 
    249                         strHTML.Append("<p class='item'>");
    250                         strHTML.Append("<span class='lbl'>统计</span>");
    251                         strHTML.Append("<span class='desc'><span>本题我做过2次,做错了1次。</span><span class='r summary'>本题150人做过,正确率80% 易错项C</span></span>");
    252                         strHTML.Append("</p>");
    253                         strHTML.Append("</div>");
    254                         strHTML.Append("</div>");
    255                         break;
    256                     case 3:   // 3-填空 
    257                         typeString = "";
    258                         strChk = "";
    259                         if (iQuestion.IsFirst == "1")
    260                         {
    261                             if (Convert.ToInt32(iPaper.QuestionCount0) + Convert.ToInt32(iPaper.QuestionCount1) + Convert.ToInt32(iPaper.QuestionCount2) > 0)
    262                                 strHTML.Append("</div></div>");
    263 
    264                             QuestionNum = Convert.ToInt32(iPaper.QuestionCount3);
    265                             strHTML.Append("<div class='ques-category' id='fill'><h2>" + typeString + "、填空题,共" + QuestionNum.ToString() + "题。</h2>");
    266                             strHTML.Append("<div class='ques-list'>");
    267                         }
    268 
    269                         GetCode = iQuestion.GetCode == "" ? "0" : iQuestion.GetCode;
    270 
    271                         if (m_eu.IsPiYue != "1")
    272                             GetCode = "未阅";
    273                         //生成试卷的题目
    274                         strHTML.Append("<div class='question'><p class='title'>题目" + (i + 1) + ".<span class='orange'>(填空题)</span>" + iQuestion.SubjectName + " &nbsp;&nbsp;&nbsp;&nbsp;<font color="red">得分:(" + GetCode + ")</font></p>");
    275                         strHTML.Append("<ul class='result'>");
    276 
    277                         strHTML.Append("<textarea maxlength="200" class="inputtxt" style="98%; height:50px;Background:white" disabled='true'">" + yourAnswer + "</textarea><br>");
    278 
    279                         strHTML.Append("</ul>");
    280 
    281                         strRight = "";
    282                         string AnswerNote = "";
    283                         strRight = b_es.GetAllDetail(SubjectGuid).RightAnswer;  //EpointTrainingManage.Bizlogic.Exam.DB_ExamJianda().GetDetail(SubjectGuid).AnswerContent;
    284                         AnswerNote = b_es.GetAllDetail(SubjectGuid).AnswerNote;
    285                         if (m_eu.IsPiYue == "1")
    286                         {//主观题已经批阅之后才显示正确答案及答案解析
    287                             strHTML.Append("<div class='analysis'>");
    288                             strHTML.Append("<h2>正确答案<em class='letter'>" + strRight + "</em></h2>");
    289                             strHTML.Append("<p class='item'>");
    290                             strHTML.Append("<span class='lbl'>解析</span>");
    291                             strHTML.Append("<span class='desc'>" + AnswerNote + "</span>");
    292                             strHTML.Append("</p>");
    293 
    294                             strHTML.Append("<p class='item'>");
    295                             strHTML.Append("<span class='lbl'>考点</span>");
    296                             strHTML.Append("<span class='desc'>12345</span>");
    297                             strHTML.Append("</p>");
    298 
    299                             strHTML.Append("<p class='item'>");
    300                             strHTML.Append("<span class='lbl'>统计</span>");
    301                             strHTML.Append("<span class='desc'><span>本题我做过2次,做错了1次。</span><span class='r summary'>本题150人做过,正确率80% 易错项C</span></span>");
    302                             strHTML.Append("</p>");
    303                             strHTML.Append("</div>");
    304                         }
    305                         strHTML.Append("</div>");
    306                         break;
    307 
    308                     case 4:   //  4-简答
    309 
    310                         typeString = "";
    311                         strChk = "";
    312                         if (iQuestion.IsFirst == "1")
    313                         {
    314                             if (Convert.ToInt32(iPaper.QuestionCount0) + Convert.ToInt32(iPaper.QuestionCount1) + Convert.ToInt32(iPaper.QuestionCount2) + Convert.ToInt32(iPaper.QuestionCount3) > 0)
    315                                 strHTML.Append("</div></div>");
    316 
    317                             QuestionNum = Convert.ToInt32(iPaper.QuestionCount3);
    318                             strHTML.Append("<div class='ques-category' id='answer'><h2>" + typeString + "、简答题,共" + QuestionNum.ToString() + "题。</h2>");
    319                             strHTML.Append("<div class='ques-list'>");
    320                         }
    321 
    322 
    323                         GetCode = iQuestion.GetCode == "" ? "0" : iQuestion.GetCode;
    324 
    325                         if (m_eu.IsPiYue != "1")
    326                             GetCode = "未阅";
    327                         //生成试卷的题目
    328                         strHTML.Append("<div class='question'><p class='title'>题目" + (i + 1) + ".<span class='orange'>(简答题)</span>" + iQuestion.SubjectName + "&nbsp;&nbsp;&nbsp;&nbsp;<font color="red">得分:(" + GetCode + ")</font></p>");
    329 
    330                         strHTML.Append("<ul class='result'>");
    331                         strHTML.Append("<textarea maxlength="200" class="inputtxt" style="98%; height:50px;Background:white" disabled='true'>" + yourAnswer + "</textarea><br>");
    332 
    333                         strHTML.Append("</ul>");
    334 
    335                         strRight = "";
    336                         AnswerNote = "";
    337                         strRight = b_es.GetAllDetail(SubjectGuid).RightAnswer;  //EpointTrainingManage.Bizlogic.Exam.DB_ExamJianda().GetDetail(SubjectGuid).AnswerContent;
    338                         AnswerNote = b_es.GetAllDetail(SubjectGuid).AnswerNote;
    339                         if (m_eu.IsPiYue == "1")
    340                         {//主观题已经批阅之后才显示正确答案及答案解析
    341                             strHTML.Append("<div class='analysis'>");
    342                             strHTML.Append("<h2>正确答案<em class='letter'>" + strRight + "</em></h2>");
    343                             strHTML.Append("<p class='item'>");
    344                             strHTML.Append("<span class='lbl'>解析</span>");
    345                             strHTML.Append("<span class='desc'>" + AnswerNote + "</span>");
    346                             strHTML.Append("</p>");
    347 
    348                             strHTML.Append("<p class='item'>");
    349                             strHTML.Append("<span class='lbl'>考点</span>");
    350                             strHTML.Append("<span class='desc'>12345</span>");
    351                             strHTML.Append("</p>");
    352 
    353                             strHTML.Append("<p class='item'>");
    354                             strHTML.Append("<span class='lbl'>统计</span>");
    355                             strHTML.Append("<span class='desc'><span>本题我做过2次,做错了1次。</span><span class='r summary'>本题150人做过,正确率80% 易错项C</span></span>");
    356                             strHTML.Append("</p>");
    357                             strHTML.Append("</div>");
    358                         }
    359                         strHTML.Append("</div>");
    360                         break;
    361                 }
    362             }
    363             strHTML.Append("</div>");
    364             strHTML.Append("</div>");
    365             #endregion
    366             div_ask.InnerHtml = strHTML.ToString();
    367         }
    View Code
  • 相关阅读:
    vue-动画
    vue笔记-路由,组件
    自定义键盘信息
    自定义指令
    vue-笔记2
    轻松搭建基于 Serverless 的文档图片在线转换服务
    轻松搭建基于 SpringBoot + Vue 的 Web 商城应用
    一小时快速搭建基于阿里云容器服务-Kubernetes的Web应用
    阿里云正式推出内容平台“云栖号”:全面助力企业和个人上云决策
    云原生安全-更安全的密文管理 Vault on ACK
  • 原文地址:https://www.cnblogs.com/lyhsblog/p/6024274.html
Copyright © 2011-2022 走看看