Skip to content

Commit 2cca3e1

Browse files
committed
on RSCE 3 heights, ( i.e: selectivas ) fix categories in tandas. typo in events.js
1 parent 5d30406 commit 2cca3e1

File tree

2 files changed

+14
-3
lines changed

2 files changed

+14
-3
lines changed

agility/scripts/events.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ function parseEvent(data) {
3737
response.Tanda=response.Tnd;
3838
response.Perro=response.Dog;
3939
response.Dorsal=response.Drs;
40-
response.Celo= 1 & esponse.Hot;
40+
response.Celo= 1 & response.Hot;
4141
response.Faltas=response.Flt;
4242
response.Tocados=response.Toc;
4343
response.Rehuses=response.Reh;

agility/server/database/classes/Tandas.php

+13-2
Original file line numberDiff line numberDiff line change
@@ -779,7 +779,12 @@ private function getListaPerros($s=0,$t=0,$pendientes=0){
779779
$perrosmanga=$os->getData(false); // false: do not include extra team information row
780780
}
781781
// OK ya tenemos la lista ordenada de los perros de cada manga
782-
// Ahora vamos a sacar la lista por cada tanda
782+
// en selectiva RSCE se salta en 3 alturas, pero hay perros de cinco, con lo que hay que "hacer trampas"
783+
$heights=Competitions::getHeights($this->prueba->ID,$this->jornada->ID,$tanda['Manga']);
784+
if( ($heights==3) && ($tanda['Categoria']==='L')) $tanda['Categoria']='XL';
785+
if( ($heights==3) && ($tanda['Categoria']==='S')) $tanda['Categoria']='ST';
786+
if( ($heights==4) && ($tanda['Categoria']==='L')) $tanda['Categoria']='XL'; // idem para 4 alturas
787+
// Ahora vamos a sacar la lista por cada tanda
783788
foreach($perrosmanga['rows'] as &$perro) {
784789
// si hay categoria distinta de "-" hay que comprobar si el perro pertenece a la tanda
785790
if ($tanda['Categoria']!="-") {
@@ -819,7 +824,13 @@ private function getListaPerros($s=0,$t=0,$pendientes=0){
819824
function getData($s,$t,$p) {
820825
return $this->getListaPerros($s,-($t),$p);
821826
}
822-
827+
828+
/**
829+
* @param {integer} $s id de session
830+
* @param {integer} $t id de tanda
831+
* @return array
832+
* @throws Exception
833+
*/
823834
function getDataByTanda($s,$t) {
824835
$page=http_request("page","i",0);
825836
$rows=http_request("rows","i",0);

0 commit comments

Comments
 (0)