aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/www/policy/private
diff options
context:
space:
mode:
Diffstat (limited to 'mayor-orig/www/policy/private')
-rw-r--r--mayor-orig/www/policy/private/naplo/orarend/orarend-pre.php32
-rw-r--r--mayor-orig/www/policy/private/naplo/orarend/orarendModosito-pre.php22
-rw-r--r--mayor-orig/www/policy/private/naplo/orarend/orarendModosito.php8
-rw-r--r--mayor-orig/www/policy/private/naplo/osztalyozo/vizsga-pre.php1
4 files changed, 54 insertions, 9 deletions
diff --git a/mayor-orig/www/policy/private/naplo/orarend/orarend-pre.php b/mayor-orig/www/policy/private/naplo/orarend/orarend-pre.php
index cbf21119..947b70ef 100644
--- a/mayor-orig/www/policy/private/naplo/orarend/orarend-pre.php
+++ b/mayor-orig/www/policy/private/naplo/orarend/orarend-pre.php
@@ -48,7 +48,7 @@
}
}
-// -- TESZT VÉGE
+ // -- TESZT VÉGE
$targyId = readVariable($_POST['targyId'], 'id', getPSFvar('targyId'));
$tankorId = readVariable($_POST['tankorId'], 'id', readVariable($_GET['tankorId'],'id',getPSFvar('tankorId')));
$osztalyId = readVariable($_POST['osztalyId'], 'id', readVariable($_GET['osztalyId'],'id',getPSFvar('osztalyId')));
@@ -95,6 +95,26 @@
if ($het == '') $het = getLastOrarend();
$igDt = date('Y-m-d', mktime(0,0,0,date('m',strtotime($tolDt)), date('d',strtotime($tolDt))+6, date('Y',strtotime($tolDt))));
+ // SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL
+ if (MAYOR_SOCIAL === true && $action== 'orarendiOraTeremModosit') {
+ dump($_POST);
+ $_MODIFY;
+ if(is_array($_POST)) {
+ $TMP_TERMEK = getTermek(array('result' => 'assoc'));
+ $TMP_TEREMIDS = array_keys($TMP_TERMEK);
+ foreach($_POST as $_pk => $_pv) {
+ if (($_pv>0 || $_pv=="teremTorol") && substr($_pk,0,3) == 'OOM') {
+ list($placeholder, $M['het'], $M['nap'], $M['ora'], $M['tanarId'],$M['tolDt']) = explode('+',$_pk);
+ if ($_pv=='teremTorol') $_pv=0; // hackit
+ $M['teremId'] = readVariable($_pv,'id',0,$TMP_TEREMIDS);
+ $M['tanev'] = __TANEV;
+ $teremModositasResult = teremModositas($M);
+ }
+ }
+ }
+ }
+ // SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL SOCIAL
+
$ADAT['termek'] = getTermek(array('result'=>'assoc','telephelyId'=>$telephelyId));
$ADAT['tanarok'] = getTanarok(array('result'=>'assoc','telephelyId'=>$telephelyId)); //--TODO telephely
// =====================
@@ -115,6 +135,9 @@
/* ide kerülhet, hogy a diák (__NAGYKORU)/szülő engedélyezte-e a saját/gyermeke órarendjének mutatását */
$ADAT['adatKezeles'] = getDiakAdatkezeles($diakId,array('publikusOrarend'=>1));
$ADAT['publikusOrarend'] = ($ADAT['adatKezeles']['publikusOrarend']['ertek'] == 1) ? true : false;
+
+ // if (MAYOR_SOCIAL === true) $ADAT['publikusOrarend'] = true;
+
/* Ha belül vagyunk, akkor állíthassa be egy gombnyomással, hogy ő bizony engedélyezi */
define(__ALLOWSET, ((__NAGYKORU===true && $diakId==__USERDIAKID) || (__NAGYKORU === false && $diakId==__SZULODIAKID)));
if (_POLICY == 'public' && $ADAT['publikusOrarend'] === false) {
@@ -235,6 +258,13 @@
$ADAT['hianyzas'] = getHianyzasByDiakIds(array($diakId), array('tolDt' => $tolDt, 'igDt' => $igDt, 'result' => 'multiassoc', 'keyfield'=>'oraId'));
}
}
+
+ $ADAT['dt'] = $tolDt;
+ $ADAT['tanarId'] = $tanarId;
+ $ADAT['osztalyId'] = $osztalyId;
+ $ADAT['diakId'] = $diakId;
+ $ADAT['tankorId'] = $tankorId;
+ $ADAT['teremId'] = $teremId;
if ($skin=='ajax' && $_REQUEST['httpResponse']=='json') $_JSON['orarend']=$ADAT;
//=====================================
diff --git a/mayor-orig/www/policy/private/naplo/orarend/orarendModosito-pre.php b/mayor-orig/www/policy/private/naplo/orarend/orarendModosito-pre.php
index 831c0fa5..6d80c3fa 100644
--- a/mayor-orig/www/policy/private/naplo/orarend/orarendModosito-pre.php
+++ b/mayor-orig/www/policy/private/naplo/orarend/orarendModosito-pre.php
@@ -73,7 +73,6 @@
}
if ($action==='do') {
$HOT = readVariable($_POST['HALADASIORATOROL'],'id');
- //dump($HOT);
for ($i=0; $i<count($HOT); $i++) {
oraElmarad($HOT[$i]);
}
@@ -132,16 +131,17 @@
for ($i=0; $i<count($_POST['ORARENDPLUSZ']); $i++) {
if ($_POST['ORARENDPLUSZ'][$i]!='') {
$_ADAT = array();
- list($_TB,$_het,$_nap,$_ora,$_Id) = explode('.',$_POST['ORARENDPLUSZ'][$i]);
+ list($_TB,$_het,$_nap,$_ora,$_Id,$_tanarId) = explode('.',$_POST['ORARENDPLUSZ'][$i]);
$_teremId = readVariable($_POST["T_".$_het."_".$_nap."_".$_ora], 'id');
$_ADAT['het'] = readVariable($_het,'id');
$_ADAT['nap'] = readVariable($_nap,'id');
$_ADAT['ora'] = readVariable($_ora,'id');
$_ADAT['tolDt'] = readVariable($refTolDt,'date');
$_ADAT['igDt'] = readVariable($refIgDt,'date');
- $_ADAT['tankorId'] = $_ADAT['blokkId'] =readVariable($_Id,'id'); // vagy tankör vagy blokk ID szerepel. a $_TB mondja meg
+ $_ADAT['tankorId'] = $_ADAT['blokkId'] = readVariable($_Id,'id'); // vagy tankör vagy blokk ID szerepel. a $_TB mondja meg
$_ADAT['teremId'] = readVariable($_teremId,'id',null);
- $_ADAT['tanarId'] = readVariable($tanarId,'id',null);
+ if ($tanarId>0) $_ADAT['tanarId'] = readVariable($tanarId,'id',null);
+ else $_ADAT['tanarId'] = readVariable($_tanarId,'id',null);
$_ADAT['haladasiModositando'] = $ADAT['haladasiModositando'];
if ($_TB == 'T') pluszOraFelvesz($_ADAT);
elseif ($_TB == 'B') pluszBlokkFelvesz($_ADAT);
@@ -161,7 +161,6 @@
$_ADAT['igDt'] = readVariable($refIgDt,'date');
$_ADAT['refDt'] = readVariable($refDt,'date');
$_ADAT['tanarId'] = readVariable($_tanarId,'id',null);
-dump($_ADAT);
teremModosit($_ADAT);
}
}
@@ -191,8 +190,18 @@ dump($_ADAT);
$ADAT['orarend'] = getOrarendByDiakId($diakId,array('tolDt'=>$tolDt,'igDt'=>$igDt));
} elseif ($osztalyId!='') {
$ADAT['orarend'] = getOrarendByOsztalyId($osztalyId,array('tolDt'=>$tolDt,'igDt'=>$igDt));
+
$OADAT = getOsztalyAdat($osztalyId);
$ADAT['toPrint'] = $OADAT['osztalyJel'];
+
+
+ $ADAT['felvehetoTankorok'] = getTankorByOsztalyId($osztalyId,$tanev, array('csakId'=>false,'tolDt'=>$refTolDt, 'igDt'=>$refIgDt, 'tanarral'=>true));
+//TEST-TODO
+ $TANKORIDK = getTankorByOsztalyId($osztalyId, __TANEV, array('csakId' => true, 'tolDt' => $tolDt, 'igDt' => $igDt, 'result' => 'indexed', 'tanarral' => false));
+//TEST
+ $ADAT['haladasi'] = getOrak($TANKORIDK, array('tolDt'=>$tolDt,'igDt'=>$igDt, 'result'=>'likeOrarend', 'elmaradokNelkul'=>false));
+//TEST
+ $ADAT['vanHaladasi'] = checkHaladasi(array('tolDt'=>$refTolDt,'igDt'=>$refIgDt));
} elseif ($mkId!='') {
$ADAT['orarend'] = getOrarendByMkId($mkId,array('tolDt'=>$tolDt,'igDt'=>$igDt,'telephely'=>$telephely));
} elseif ($teremId!='') {
@@ -235,6 +244,7 @@ dump($_ADAT);
if ($ADAT['hetiMaxNap'] < __HETIMAXNAP_MINIMUMA) $ADAT['hetiMaxNap'] = __HETIMAXNAP_MINIMUMA;
$ADAT['tanarId'] = $tanarId;
+ $ADAT['osztalyId'] = $osztalyId;
$ADAT['refTolDt'] = $refTolDt;
$ADAT['refIgDt'] = $refIgDt;
$ADAT['tolDt'] = $tolDt;
@@ -268,7 +278,7 @@ dump($_ADAT);
// } else
// $TOOL['munkakozossegSelect'] = array('tipus'=>'sor', 'paramName'=>'mkId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely'));
$TOOL['tanarSelect'] = array('tipus'=>'cella', 'paramName'=>'tanarId', 'post'=>array('refTolDt','refIgDt','tolDt','telephely'));
-// $TOOL['osztalySelect']= array('tipus'=>'cella', 'paramName'=>'osztalyId', 'post'=>array('refTolDt','refIgDt','tolDt'));
+ $TOOL['osztalySelect']= array('tipus'=>'cella', 'paramName'=>'osztalyId', 'post'=>array('refTolDt','refIgDt','tolDt'));
// $TOOL['telephelySelect'] = array('tipus'=>'cella', 'paramName'=>'telephely', 'post'=>array('refTolDt','refIgDt','tolDt','mkId','tanarId'));
// $TOOL['teremSelect'] = array('tipus'=>'cella', 'paramName'=>'teremId', 'telephely'=>$telephely, 'post'=>array('refTolDt','refIgDt','tolDt','telephely'));
if ($osztalyId!='' || $tanarId!='' || $diakId!='' || $mkId!='') $TOOL['tankorSelect'] = array('tipus'=>'sor','paramName'=>'tankorId', 'post'=>array('refTolDt','refIgDt','tolDt','osztalyId','targyId','tanarId','diakId','telephely'));
diff --git a/mayor-orig/www/policy/private/naplo/orarend/orarendModosito.php b/mayor-orig/www/policy/private/naplo/orarend/orarendModosito.php
index e60986b5..59ad88ac 100644
--- a/mayor-orig/www/policy/private/naplo/orarend/orarendModosito.php
+++ b/mayor-orig/www/policy/private/naplo/orarend/orarendModosito.php
@@ -4,5 +4,11 @@
// if (count($_SESSION['alert'])==0)
// if (!in_array('info:nincs_intervallum', $_SESSION['alert']) && is_array($ADAT['orarend']) && count($ADAT['orarend']) != 0) putOrarend($ADAT);
- if ((!is_array($_SESSION['alert']) || !in_array('info:nincs_intervallum', $_SESSION['alert'])) && is_array($ADAT['felvehetoTankorok']) && count($ADAT['felvehetoTankorok']) > 0) putOrarend($ADAT);
+ if (
+ (!is_array($_SESSION['alert']) || !in_array('info:nincs_intervallum', $_SESSION['alert']))
+ && is_array($ADAT['felvehetoTankorok'])
+ && count($ADAT['felvehetoTankorok']) > 0
+ )
+ putOrarend($ADAT);
+
?>
diff --git a/mayor-orig/www/policy/private/naplo/osztalyozo/vizsga-pre.php b/mayor-orig/www/policy/private/naplo/osztalyozo/vizsga-pre.php
index 7ed83510..6ad310ab 100644
--- a/mayor-orig/www/policy/private/naplo/osztalyozo/vizsga-pre.php
+++ b/mayor-orig/www/policy/private/naplo/osztalyozo/vizsga-pre.php
@@ -30,7 +30,6 @@
$ADAT['zarojegytipusok'] = getEnumField('naplo_intezmeny', 'zaroJegy', 'jegyTipus');
$ADAT['statusz'] = getEnumField('naplo_intezmeny', 'diak', 'statusz');
$ADAT['vizsgaTipus'] = $vizsgaTipus = readVariable($_POST['vizsgaTipus'], 'enum', null, $ADAT['vizsgatipusok']);
-
if ($action == 'vizsgajelentkezes' && isset($diakId) && isset($targyId) && isset($evfolyamJel)) {
$ADAT['jelentkezesDt'] = readVariable($_POST['jelentkezesDt'], 'date');
if (isset($ADAT['jelentkezesDt']) && isset($ADAT['vizsgaTipus'])) {