diff options
Diffstat (limited to 'mayor-orig/mayor-naplo')
4 files changed, 26 insertions, 4 deletions
diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index e387cc7f..4fbccb1a 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4642 +4643 diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php index 53b6c763..8c5bd077 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php @@ -156,4 +156,20 @@ } + function oraHazifeladatDiakLatta($hazifeladatId) { + if (__DIAK===true && $hazifeladatId>0) { + if (defined('__USERDIAKID') && __USERDIAKID>0) { + $diakId=__USERDIAKID; + } elseif (defined('__SZULODIAKID') && __SZULODIAKID>0) { + $diakId=__SZULODIAKID; + } + if ($diakId>0) { + $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,diakLattamDt) VALUES (%u,%u,NOW())"; + $values = array($hazifeladatId, $diakId); + db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values)); + } + } + } + + ?>
\ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php index 23d9f391..931b7dcd 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php @@ -105,9 +105,11 @@ } if ($diakId>0) { - $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,diakLattamDt) VALUES (%u,%u,NOW())"; - $values = array($ADAT['hazifeladatId'], $diakId); - db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values)); + // $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,diakLattamDt) VALUES (%u,%u,NOW())"; + // $values = array($ADAT['hazifeladatId'], $diakId); + // db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values)); + + oraHazifeladatDiakLatta($ADAT['hazifeladatId']); if ($action=='hazifeladatKesz') { if ($diakId>0 && $ADAT['hazifeladatId']>0) { diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php index 31dd4699..1596e591 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php @@ -30,6 +30,10 @@ $_JSON['oraAdat'] = $ORAADAT = getOraAdatById($oraId); + if ($ORAADAT['hazifeladatId']>0) { + oraHazifeladatDiakLatta($ORAADAT['hazifeladatId']); // log: diakLattamDt + } + if ($dolgozatBeirhato === true && $action=='dolgozatBeiras') { $dolgozatId = ujDolgozat('',$ORAADAT['tankorId']); dolgozatModositas($dolgozatId,'',$ORAADAT['dt']); |