aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/include/modules
diff options
context:
space:
mode:
authorM.Gergo2020-03-23 01:17:58 +0100
committerM.Gergo2020-03-23 01:17:58 +0100
commit31bf036be3be01ef7b3bbc9dc08813f0740dab9a (patch)
treef149b4cd7ee31e5e85b20e9b2e6317af6e7ae465 /mayor-orig/mayor-naplo/www/include/modules
parenta7992b5395dab0da64527b8cc6357709196663d2 (diff)
downloadmayor-31bf036be3be01ef7b3bbc9dc08813f0740dab9a.tar.gz
mayor-31bf036be3be01ef7b3bbc9dc08813f0740dab9a.zip
Rev: 4630rev4630
Diffstat (limited to 'mayor-orig/mayor-naplo/www/include/modules')
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php1
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php18
2 files changed, 18 insertions, 1 deletions
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php
index 0be1c61a..92d07ee8 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/haladasi/haladasi.php
@@ -134,6 +134,7 @@
$v = array($sor['oraId']);
$sor['cimke'] = db_query($q, array('fv' => 'getHaladasi/cimkek', 'modul' => 'naplo', 'result' => 'idonly', 'values' => $v), $lr);
}
+
$ret[$sor['dt']][] = $sor;
}
// Nap információk lekérdezése
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php
index 7c4c4b4e..602f26e1 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php
@@ -371,7 +371,7 @@ WHERE dt>='%s' and dt<='%s' AND (ki=%u OR kit=%u) $WHERE ORDER BY dt,ora";
return $RESULT;
}
- function getOrak($TANKORIDK, $SET=array('tolDt'=>'','igDt'=>'', 'result'=>'likeOrarend', 'elmaradokNelkul'=>false)) {
+ function getOrak($TANKORIDK, $SET=array('tolDt'=>'','igDt'=>'', 'result'=>'likeOrarend', 'elmaradokNelkul'=>false, 'diakId'=>null)) {
/* FIGYELEM! A függvény feltételezi, hogy az átadott tankoridkben az adott intervallumon helyes adatok szerepelnek!
-- problémát okozhat, ha hosszú intervallumot adunk meg!!! -- lásd FS#100 */
@@ -404,6 +404,12 @@ WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count(
$_put['oo'] = false;
$RE['orak'][$R[$i]['dt']][$R[$i]['ora']][$R[$i]['tankorId']] = $_put;
if (!in_array($R[$i]['tankorId'],$RE['tankorok'])) $RE['tankorok'][] = intval($R[$i]['tankorId']);
+ if ($R[$i]['hazifeladatId']>0) {
+ if ($SET['diakId']>0) {
+ $diakHazifeladat = getDiakHazifeladatByOraIds(array($R[$i]['oraId']) , $SET['diakId']);
+ $RE['orak'][$R[$i]['dt']][$R[$i]['ora']][$R[$i]['tankorId']]['diakHazifeladat'] = $diakHazifeladat[$R[$i]['oraId']];
+ }
+ }
}
}
return $RE;
@@ -641,5 +647,15 @@ WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count(
}
}
+ function getDiakHazifeladatByOraIds($oraIdk,$diakId,$olr='') {
+ $R = array();
+ if (count($oraIdk)>0 && $diakId>0) {
+ $q = "SELECT * FROM oraHazifeladat LEFT JOIN oraHazifeladatDiak USING (hazifeladatId) WHERE diakId=%u AND oraId IN (".implode(',',$oraIdk).")";
+ $v = array($diakId);
+ $R = db_query($q,array('debug'=>false,'fv'=>'getDiakhazifeladatByOraIds','modul'=>'naplo','values'=>$v,'result'=>'assoc','keyfield'=>'oraId'),$olr);
+ }
+ return $R;
+ }
+
?>