diff --git a/app/chengji/model/Chengji.php b/app/chengji/model/Chengji.php index bb5d323a..2cda378f 100755 --- a/app/chengji/model/Chengji.php +++ b/app/chengji/model/Chengji.php @@ -214,17 +214,27 @@ class Chengji extends BaseModel return true; } - asort($cj); + arsort($cj); $khids = array_keys($cj); # 获取考号即键值 $data = array(); # 新数据容器 + $mc = 1; foreach ($khids as $key => $value) { - $data[$key]['id'] = $value; - $data[$key][$col[0]] = $cnt - $key; - $data[$key][$col[1]] = round(($key) / $cnt * 100, 2); + if($cnt == 1) + { + $data[$key]['id'] = $value; + $data[$key][$col[0]] = 1; + $data[$key][$col[1]] = 100; + }else{ + $data[$key]['id'] = $value; + $data[$key][$col[0]] = $mc; + $data[$key][$col[1]] = round(($cnt - $mc) / ($cnt - 1) * 100, 2); + } + $mc++; } $temp = $this->saveAll($data); + return true; } diff --git a/app/login/view/index/shangma_log.html b/app/login/view/index/shangma_log.html index 0b93fb14..babcbb7b 100755 --- a/app/login/view/index/shangma_log.html +++ b/app/login/view/index/shangma_log.html @@ -44,6 +44,19 @@
+ 修改超过算法
+ 修复书籍错误
+ 增加学生帐号显示成绩或等级设置
+ 增加统计项目
+ 将统计项目作用扩展到下载和教师帐号
+