Skip to content

Commit

Permalink
on RSCE 3 heights, ( i.e: selectivas ) fix categories in tandas. typo…
Browse files Browse the repository at this point in the history
… in events.js
  • Loading branch information
jonsito committed Jan 27, 2022
1 parent 5d30406 commit 2cca3e1
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
2 changes: 1 addition & 1 deletion agility/scripts/events.js
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ function parseEvent(data) {
response.Tanda=response.Tnd;
response.Perro=response.Dog;
response.Dorsal=response.Drs;
response.Celo= 1 & esponse.Hot;
response.Celo= 1 & response.Hot;
response.Faltas=response.Flt;
response.Tocados=response.Toc;
response.Rehuses=response.Reh;
Expand Down
15 changes: 13 additions & 2 deletions agility/server/database/classes/Tandas.php
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,12 @@ private function getListaPerros($s=0,$t=0,$pendientes=0){
$perrosmanga=$os->getData(false); // false: do not include extra team information row
}
// OK ya tenemos la lista ordenada de los perros de cada manga
// Ahora vamos a sacar la lista por cada tanda
// en selectiva RSCE se salta en 3 alturas, pero hay perros de cinco, con lo que hay que "hacer trampas"
$heights=Competitions::getHeights($this->prueba->ID,$this->jornada->ID,$tanda['Manga']);
if( ($heights==3) && ($tanda['Categoria']==='L')) $tanda['Categoria']='XL';
if( ($heights==3) && ($tanda['Categoria']==='S')) $tanda['Categoria']='ST';
if( ($heights==4) && ($tanda['Categoria']==='L')) $tanda['Categoria']='XL'; // idem para 4 alturas
// Ahora vamos a sacar la lista por cada tanda
foreach($perrosmanga['rows'] as &$perro) {
// si hay categoria distinta de "-" hay que comprobar si el perro pertenece a la tanda
if ($tanda['Categoria']!="-") {
Expand Down Expand Up @@ -819,7 +824,13 @@ private function getListaPerros($s=0,$t=0,$pendientes=0){
function getData($s,$t,$p) {
return $this->getListaPerros($s,-($t),$p);
}


/**
* @param {integer} $s id de session
* @param {integer} $t id de tanda
* @return array
* @throws Exception
*/
function getDataByTanda($s,$t) {
$page=http_request("page","i",0);
$rows=http_request("rows","i",0);
Expand Down

0 comments on commit 2cca3e1

Please sign in to comment.