Exemplo n.º 1
0
 public static void 给选词填空选项赋值新ID(选词填空 diction)
 {
     foreach (选项 choice in diction.选项组.选项集合)
     {
         选词空格 space = diction.选词空格集合.Where(a => a.答案ID == choice.ID).FirstOrDefault();
         if (space != null)
         {
             choice.ID = Guid.NewGuid();
             space.答案ID = choice.ID;
         }
         else
         {
             choice.ID = Guid.NewGuid();
         }
     }
 }
Exemplo n.º 2
0
        public static string getT14(选词填空 选词填空, bool 是否显示答案)
        {
            if (!是否显示答案) { return ""; }

            Dictionary<Guid, 选项集合对象类> 选项集合Data = get选项集合对象(选词填空.选项组.选项集合);

            List<选词空格> 选词空格集合 = 选词填空.选词空格集合;
            Guid 答案ID;
            string html = "<span class=\"z333\">参考答案:</span>";

            //遍历选词空格集合
            for (var i = 0; i < 选词空格集合.Count; i++)
            {
                答案ID = 选词空格集合[i].答案ID;
                html += "<span>(" + (i + 1) + ")</span><span class=\"keyFontRight\" style=\"padding-right:10px;\">" + (选项集合Data[答案ID].大写字母) + "</span>";
            }
            return getKeyItemDiv(html) +
                   getResItem(选词填空.解题思路);
        }