From 4cba41696a27f776305c67d637de1e6b77015bcd Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Wed, 25 Mar 2020 01:02:40 +0100 Subject: Rev: 4636 --- 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 +- .../private/naplo/haladasi/hazifeladat-pre.php | 26 +++++-- .../module-naplo/css/haladasi/hazifeladat.css | 2 + .../module-naplo/html/haladasi/hazifeladat.phtml | 81 +++++++++++++++++++++- 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 +- rev.txt | 2 +- 18 files changed, 128 insertions(+), 35 deletions(-) diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4635 +4636 diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev +++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev @@ -1 +1 @@ -4635 +4636 diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev +++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev @@ -1 +1 @@ -4635 +4636 diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev +++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev @@ -1 +1 @@ -4635 +4636 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 2996c056..b02620cf 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 @@ -4635 +4636 diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev +++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev @@ -1 +1 @@ -4635 +4636 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 2996c056..b02620cf 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 @@ -4635 +4636 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 2996c056..b02620cf 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 @@ -4635 +4636 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 2996c056..b02620cf 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 @@ -4635 +4636 diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4635 +4636 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 a26b39fa..23d9f391 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 @@ -53,6 +53,7 @@ $values = array($ADAT['oraId']); $ADAT['hazifeladatId'] = $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values)); $ADAT['oraAdat'] = getOraadatById($oraId); + $ADAT['nevsor'] = getTankorDiakjaiByInterval($ADAT['oraAdat']['tankorId'], __TANEV, $ADAT['oraAdat']['dt'], $ADAT['oraAdat']['dt']); if (__TANAR===true && $action=='hazifeladatBeiras') { $hazifeladatFeltoltesEngedely = readVariable($_POST['hazifeladatFeltoltesEngedely'],'id',0); @@ -71,16 +72,31 @@ updateHaladasiNaploOra($oraId, $leiras); } } elseif (__TANAR===true && $action=='lattam') { + $lr = db_connect('naplo'); + db_start_trans($lr); $lattamDiakIds = readVariable($_POST['lattam'],'id'); - $q = "UPDATE oraHazifeladatDiak SET tanarLattamDt=null WHERE hazifeladatId=%u"; - $values = array($ADAT['hazifeladatId'], $_diakId); - db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values)); + $megsemlattamDiakIds = readVariable($_POST['megsemlattam'],'id'); for ($i=0; $i'naplo','result'=>'update','values'=>$values)); + $q = "SELECT count(*) AS db FROM oraHazifeladatDiak WHERE hazifeladatId=%u AND diakId=%u"; + $db = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values),$lr); + if ($db==1) { + $q = "UPDATE oraHazifeladatDiak SET tanarLattamDt=NOW() WHERE hazifeladatId=%u AND diakId=%u"; + $r = db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values),$lr); + } else { + $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,tanarLattamDt) VALUES (%u,%u,NOW())"; + db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values),$lr); + } + } + for ($i=0; $i'naplo','result'=>'update','values'=>$values),$lr); } + db_commit($lr); + db_close($lr); } elseif (__DIAK===true) { if (defined('__USERDIAKID') && __USERDIAKID>0) { $diakId=__USERDIAKID; diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/hazifeladat.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/hazifeladat.css index 127dfa75..cc5f8869 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/hazifeladat.css +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/hazifeladat.css @@ -61,5 +61,7 @@ table.hazifeladatDiak tr td a, fieldset.adatok a { color: black; } + table.hazifeladatDiak tr td a:visited, fieldset.adatok a:visited { color: #888; } table.hazifeladatDiak tr td a:hover, fieldset.adatok a:hover { text-decoration:underline; color: cornflowerblue; } + table.hazifeladatDiak tr td.kesz { background-color: lightgreen; color:white; text-align:center } 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 cddfd0e8..e03ac99a 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 @@ -88,6 +88,18 @@ } } else { //////////////////////////////////////////////////////////////////////////////////// + + if (__USERTANARID!=$ADAT['oraAdat']['ki']) { // nem saját óra + + echo '
'._HAZIFELADAT.''."\n"; + if ($ADAT['hazifeladatAdat']['hazifeladatLeiras']=='') + { echo '

még nincs kitöltve

'; } + else + { echo ($ADAT['hazifeladatAdat']['hazifeladatLeiras']); } + echo '
'."\n"; + + } else { // saját óra + echo ''; if ($skin != 'ajax') formBegin(array('class'=>'hazifeladat')); echo ''; @@ -145,31 +157,93 @@ echo ''."\n"; if ($skin != 'ajax') formEnd(); + } // saját óra + if (count($ADAT['hazifeladatDiak'])>0) { echo '
'; echo 'Visszajelzések'; putHazifeladatDiak($ADAT); echo '
'; } - } + } } function putHazifeladatDiak($ADAT) { if (count($ADAT['hazifeladatDiak'])==0) return false; + for ($i=0; $i'; + echo ''; + echo ''; + echo ''; + if (__NAPLOADMIN===true || __VEZETOSEG===true) + echo ''; + else + echo ''; + echo ''; + + if (is_array($ADAT['nevsor']['nevek'])) + foreach ($ADAT['nevsor']['nevek'] as $diakId => $ITEM) { + $D = $DIAKHF[$diakId]; + echo ''; + echo ''; + if (__NAPLOADMIN===true || __VEZETOSEG===true) echo ''; + echo ''; + //echo ''; + + $ADAT['dir'] = 'naplo/haladasi/hazifeladat'; + $ADAT['file'] = $D['hazifeladatDiakFilename']; + $href = href('index.php?page=session&f=download&dir='.$ADAT['dir'].'&file='.$ADAT['file'].'&download=true'); + echo ''; + echo ''; + echo ''; + } + echo '
diákláttastátuszcsatolmányláttam
diákstátuszcsatolmányláttam
'.$ITEM['diakNev'].''.$D['diakLattamDt'].''.$D['hazifeladatDiakStatus'].''.$D['hazifeladatDiakMegjegyzes'].''; + if ($D['hazifeladatDiakOrigFilename']!='') { + echo ''.htmlspecialchars($D['hazifeladatDiakOrigFilename']).' '; + } + echo ''; +// if ($ADAT['hazifeladatDiak']['hazifeladatDiakStatus']=='kész') { + if (__TANAR===true && __USERTANARID==$ADAT['oraAdat']['ki']) { + if ($D['tanarLattamDt']=='') { + echo ''; + } else { + echo ''; + } + } else { + if ($D['tanarLattamDt']!='') {echo '';} + } +// } + echo '
'; + echo formEnd(); + + } + + function putHazifeladatDiakOrig($ADAT) { + + if (count($ADAT['hazifeladatDiak'])==0) return false; + echo formBegin(); echo ''; echo ''; echo ''; echo ''; - echo ''; + if (__NAPLOADMIN===true || __VEZETOSEG===true) + echo ''; + else + echo ''; echo ''; for ($i=0; $i'; echo ''; - echo ''; + if (__NAPLOADMIN===true || __VEZETOSEG===true) echo ''; echo ''; echo ''; @@ -198,6 +272,7 @@ } echo '
diákláttastátuszcsatolmányláttam
diákláttastátuszcsatolmányláttam
diákstátuszcsatolmányláttam
'.$D['diakNev'].''.$D['diakLattamDt'].''.$D['diakLattamDt'].''.$D['hazifeladatDiakStatus'].''.$D['hazifeladatDiakMegjegyzes'].'
'; echo formEnd(); + } ?> diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-portal/log/mayor-portal.rev +++ b/mayor-orig/mayor-portal/log/mayor-portal.rev @@ -1 +1 @@ -4635 +4636 diff --git a/mayor-orig/mayor-wiki/log/mayor-wiki.rev b/mayor-orig/mayor-wiki/log/mayor-wiki.rev index 2996c056..b02620cf 100644 --- a/mayor-orig/mayor-wiki/log/mayor-wiki.rev +++ b/mayor-orig/mayor-wiki/log/mayor-wiki.rev @@ -1 +1 @@ -4635 +4636 diff --git a/mayor-orig/md5sum b/mayor-orig/md5sum index 2c28df09..64df47f5 100644 --- a/mayor-orig/md5sum +++ b/mayor-orig/md5sum @@ -1,13 +1,13 @@ -Revision 4635 -41562a4824f29be1ae0372b7d502aef2 mayor-fenntarto-rev4635.tgz -536f0fc97bfd4fd2f31ced5a11958fd4 mayor-installer-sulix-rev4635.tgz -a27fd616a31df8a1d6918366fe6fb5ec mayor-wiki-rev4635.tgz -af3e635ff220b8561908e52d72db80db mayor-installer-rev4635.tgz -2b6b81a1158df50b1bbd35a929f43bbe mayor-portal-rev4635.tgz -85b8f21103e2c43295b03e92c90ce3c7 mayor-felveteli-rev4635.tgz -73f734ee3beca396c19c4d6d127646d5 mayor-jatek-rev4635.tgz -bb88ea04ffd8ec678bcd3125251f85d9 mayor-locales-jp_JP-rev4635.tgz -e36c28d0e9ec82814481f9a5cae7e51a mayor-locales-de_DE-rev4635.tgz -973b58703d7151c5aac3a7bd61e89922 mayor-locales-en_US-rev4635.tgz -efef72ed8fee0ecddf5f155427138e33 mayor-naplo-rev4635.tgz -84154bb49db92bf6d4f34fa3e52873c6 mayor-base-rev4635.tgz +Revision 4636 +3984cb91cd9401421a7c228920d9afa8 mayor-fenntarto-rev4636.tgz +e9dc0d99d56ed7ce0feac0b88d517b49 mayor-installer-sulix-rev4636.tgz +9ed22b632285302d049d4d615b0e65cf mayor-wiki-rev4636.tgz +2ac683038891b9b45e5c6e49f41e90f6 mayor-installer-rev4636.tgz +64a4bd3f5dedd3dd85b20f6a16add9a6 mayor-portal-rev4636.tgz +6730cc3657155fccbcb90e01c1698b62 mayor-felveteli-rev4636.tgz +43524fe82ae26bc04368eb604585f8d7 mayor-jatek-rev4636.tgz +e7a3f8a719957e93270e9957da4ac705 mayor-locales-jp_JP-rev4636.tgz +6388bc1e38d1010b7232fee7e0cd6805 mayor-locales-de_DE-rev4636.tgz +43cc1f581483a40a268865af7f2f9353 mayor-locales-en_US-rev4636.tgz +9049ffb272a96153f0f33ff7e52b63df mayor-naplo-rev4636.tgz +ed384ad9581b23262a1266d1fbd25d5c mayor-base-rev4636.tgz diff --git a/mayor-orig/rev.txt b/mayor-orig/rev.txt index 2996c056..b02620cf 100644 --- a/mayor-orig/rev.txt +++ b/mayor-orig/rev.txt @@ -1 +1 @@ -4635 +4636 diff --git a/rev.txt b/rev.txt index 2996c056..b02620cf 100644 --- a/rev.txt +++ b/rev.txt @@ -1 +1 @@ -4635 +4636 -- cgit v1.2.3