From 8c9ffb12892161e5a0fc12c97aa0c8d90f99eb6c Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Sat, 4 Apr 2020 12:40:03 +0200 Subject: Rev: 4649 --- mayor-orig/mayor-base/log/mayor-base.rev | 2 +- mayor-orig/mayor-felveteli/log/mayor-felveteli.rev | 2 +- mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev | 2 +- .../mayor-installer-orig/log/mayor-installer.rev | 2 +- .../log/mayor-installer-sulix.rev | 2 +- mayor-orig/mayor-jatek/log/mayor-jatek.rev | 2 +- .../log/mayor-locales-de_DE.rev | 2 +- .../log/mayor-locales-en_US.rev | 2 +- .../log/mayor-locales-jp_JP.rev | 2 +- mayor-orig/mayor-naplo/log/mayor-naplo.rev | 2 +- .../include/modules/naplo/share/oraModifier.php | 31 +++++++++++++++++++--- .../module-naplo/html/haladasi/hazifeladat.phtml | 4 ++- mayor-orig/mayor-portal/log/mayor-portal.rev | 2 +- mayor-orig/mayor-wiki/log/mayor-wiki.rev | 2 +- mayor-orig/md5sum | 26 +++++++++--------- mayor-orig/rev.txt | 2 +- 16 files changed, 57 insertions(+), 30 deletions(-) (limited to 'mayor-orig') diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev +++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev +++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev +++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev b/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev +++ b/mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev +++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev b/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev +++ b/mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev b/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev +++ b/mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev b/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev +++ b/mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev @@ -1 +1 @@ -4648 +4649 diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index 31e10e49..1aa1538a 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4648 +4649 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 8c5bd077..625b6b13 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 @@ -164,12 +164,37 @@ $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)); + if (diakSajatHazifeladatE($hazifeladatId)) { + $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)); + } } } } + function diakSajatHazifeladatE($hazifeladatId) { + $sajat = false; + if (__DIAK===true && $hazifeladatId>0) { + if (defined('__USERDIAKID') && __USERDIAKID>0) { + $diakId=__USERDIAKID; + } elseif (defined('__SZULODIAKID') && __SZULODIAKID>0) { + $diakId=__SZULODIAKID; + } + if ($diakId>0) { + + $q = "SELECT tankorId,dt AS oraDt FROM oraHazifeladat LEFT JOIN ora USING (oraId) WHERE hazifeladatId=%u"; + $values = array($hazifeladatId); + $ORA = db_query($q, array('debug'=>false,'modul'=>'naplo','result'=>'record','values'=>$values)); + + $dt = $ORA['oraDt']; + $tankorId = $ORA['tankorId']; + $diakTankorIds = getTankorIdsByDiakIds(array($diakId), array('tanev' => __TANEV,'tolDt'=>$dt,'igDt'=>$dt,'felmentettekkel'=>true)); + + if (in_array($tankorId,$diakTankorIds)) $sajat = true; + } + } + return $sajat; + } ?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/hazifeladat.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/hazifeladat.phtml index ffe8a4dd..419fbc49 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/hazifeladat.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/hazifeladat.phtml @@ -221,7 +221,9 @@ echo '