Exemplo n.º 1
0
        public static string getStat()
        {
            //提问 总次数,总参与率,每次提问的参与率
            //点名 点名次数,覆盖率,排序
            //奖励 奖励次数,覆盖率,排序
            Stat stat = m_stat.Clone();

            //只保留12个
            while (stat.handon.list.Count < 12)
            {
                Stat_HandonItem item = new Stat_HandonItem();
                item.index = stat.handon.list.Count + 1;
                stat.handon.list.Add(item);
            }
            while (stat.xiti.list.Count < 12)
            {
                Stat_XitiItem item = new Stat_XitiItem();
                item.index = stat.xiti.list.Count + 1;
                stat.xiti.list.Add(item);
            }
            return(stat.toJson());
        }
Exemplo n.º 2
0
        public void AddHandon(string result)
        {
            Log.Info("AddHandon_0" + result + ", handon.count=" + handon.count + ", list.size=" + handon.list.Count);
            handon.count++;
            string[]        szItem = result.Split(',');
            Stat_HandonItem item   = new Stat_HandonItem();

            item.index = handon.count;

            if (result.Length == 0)
            {
                item.count = 0;
            }
            else
            {
                item.count = szItem.Length;
            }

            item.ratio = Math.Round((double)100 * item.count / Global.g_Studentlist.Count, 2);
            handon.list.Add(item);
            Log.Info("AddHandon_1, handon.count=" + handon.count + ", list.size=" + handon.list.Count + ", ratio=" + item.ratio);
        }