From af925fb218e7a333759eb49c667bfb22eb71196d Mon Sep 17 00:00:00 2001 From: Cassio de Campos Date: Fri, 4 Aug 2017 14:20:51 +0100 Subject: bug fixes --- src/fscore.php | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) (limited to 'src/fscore.php') diff --git a/src/fscore.php b/src/fscore.php index d87f1bd..1e6dba0 100644 --- a/src/fscore.php +++ b/src/fscore.php @@ -157,6 +157,26 @@ function DBScore($contest, $verifylastmile, $hor=-1, $globalsite='0') { } } } + + if(true) { + $arrori = $arr; + reset($arrori); //cassio cassiopc + $pname = array('A','B','C','D','E','F','G','H','I','J','K'); + while(list($ee,$cc) = each($arrori)) { + for($pi=0; $pi < 11; $pi++) unset($arr[$ee]['problem'][$pi+1]); + reset($arrori[$ee]["problem"]); + while(list($e2,$c2) = each($arrori[$ee]["problem"])) { + for($pi=0; $pi < 11; $pi++) + if(isset($arrori[$ee]['problem'][$e2]['name']) && trim($arrori[$ee]['problem'][$e2]['name']) == $pname[$pi]) break; + if($pi < 11) { + $arr[$ee]['problem'][$pi+1] = $arrori[$ee]['problem'][$e2]; + } + } + } + } + + + $resp = array_merge($resp, $arr); } } else { -- cgit v1.2.3