From 973ae816e66352e9d97facf92f8ffc3bcc0d89bd Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Wed, 1 Apr 2020 12:10:03 +0200 Subject: Rev: 4645 --- .../install/module-naplo/mysql/tanev.sql | 1 + mayor-orig/mayor-naplo/log/mayor-naplo.rev | 2 +- .../mayor-naplo/update/pre004644-1-naplo.sql | 17 +++++ .../private/naplo/haladasi/hazifeladat-pre.php | 4 +- .../module-naplo/css/haladasi/hazifeladat.css | 2 + .../www/skin/classic/module-naplo/css/naplo.css | 4 ++ .../module-naplo/html/haladasi/hazifeladat.phtml | 75 +++++++--------------- .../module-naplo/javascript/naplo.jquery.min.js | 2 +- 8 files changed, 51 insertions(+), 56 deletions(-) create mode 100644 mayor-orig/mayor-naplo/update/pre004644-1-naplo.sql (limited to 'mayor-orig/mayor-naplo') diff --git a/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql b/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql index f8d78259..3ba37839 100644 --- a/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql +++ b/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql @@ -164,6 +164,7 @@ CREATE TABLE `oraHazifeladatDiak` ( `hazifeladatDiakMegjegyzes` varchar(255) COLLATE utf8_hungarian_ci NOT NULL, `hazifeladatDiakFilename` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL, `hazifeladatDiakOrigFilename` varchar(255) COLLATE utf8_hungarian_ci DEFAULT NULL, + `hazifeladatDiakFileDt` datetime DEFAULT NULL, PRIMARY KEY (`hazifeladatId`,`diakId`), UNIQUE KEY `oraHazifeladatDiak_UK` (`hazifeladatId`,`diakId`), KEY `oraHazifeladatDiak_ibfk_2` (`diakId`), diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index ff844583..df260d9e 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4644 +4645 diff --git a/mayor-orig/mayor-naplo/update/pre004644-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004644-1-naplo.sql new file mode 100644 index 00000000..047c2c7c --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004644-1-naplo.sql @@ -0,0 +1,17 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4644 $$ + +CREATE PROCEDURE upgrade_database_4644() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF NOT EXISTS ( + SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraHazifeladatDiak' and COLUMN_NAME='hazifeladatDiakFileDt' +) THEN +ALTER TABLE `oraHazifeladatDiak` ADD `hazifeladatDiakFileDt` datetime DEFAULT NULL; +UPDATE `oraHazifeladatDiak` SET `hazifeladatDiakFileDt`=`diakLattamDt` WHERE `hazifeladatDiakFilename`!=''; +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4644(); 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 ac911f8b..3fd87f21 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 @@ -147,8 +147,6 @@ } if ($sikeresFeltoltes===true) { - // --todo unlink existing?-- - $q = "SELECT hazifeladatDiakFilename FROM oraHazifeladatDiak WHERE hazifeladatId=%u AND diakId=%u"; $values = array($ADAT['hazifeladatId'],$diakId); $oldFilename = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values)); @@ -158,7 +156,7 @@ $origFilename = mb_ereg_replace("([^\w\s\d\-_~,;\[\]\(\).])", '', $_FILES['upfile']['name']); $origFilename = mb_ereg_replace("([\.]{2,})", '', $_FILES['upfile']['name']); if ($origFilename=='') $origFilename = $FILEADAT['filename']; - $q = "UPDATE oraHazifeladatDiak SET hazifeladatDiakFilename='%s',hazifeladatDiakOrigFilename='%s' WHERE hazifeladatId=%u AND diakId=%u"; + $q = "UPDATE oraHazifeladatDiak SET hazifeladatDiakFilename='%s',hazifeladatDiakOrigFilename='%s',hazifeladatDiakFileDt=NOW() WHERE hazifeladatId=%u AND diakId=%u"; $values = array($FILEADAT['filename'],$origFilename,$ADAT['hazifeladatId'], $diakId); db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values)); } 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 a44e9d2d..a02734f3 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 @@ -70,3 +70,5 @@ span#hintDt {margin-left:5px; font-size:x-small; color:#888; cursor: copy;} span#hintDt span { padding-right:2px; } span#hintDt:hover { color:black; } + + span.hataridoUtaniFeltoltes { margin-left: 2px; font-size: x-small; background-color: #e91e63; border-radius:2px; padding: 0px 2px; color:white; } diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css index 8f26e848..f12a5b14 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/naplo.css @@ -212,6 +212,10 @@ #updateWindowSideContent ul li a:hover,#updateWindowSideSubContent ul li a:hover { color:#999 } #updateWindowSideTitle a:hover, #updateWindowSideSubTitle a:hover { color:#999 } + div.sideOraAdatHazifeladat {border-left: solid 0px #888; padding: 4px; background-color: #e91e63; font-size: x-small;} + div.sideOraAdatHazifeladat a { text-decoration:underline; } + div.sideOraAdatHazifeladat a:hover { font-style:italic; } + /* #updateWindowSide h3:before { font-family: 'Elusive-Icons'; font-size:10px; content: "\e0a4"; padding-right:8px;font-weight:100; }*/ .updateWindowSide button.mentes, .updateWindowSide button.torles { margin: 4px 18px; height:2em; border-radius:2px; border: solid 1px white; color:white; background-color: #2196f3;} 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 83d5d6f1..e6e2d4e6 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 @@ -28,6 +28,20 @@ { echo '

még nincs kitöltve

'; } else { echo ($ADAT['hazifeladatAdat']['hazifeladatLeiras']); } + if ($ADAT['hazifeladatAdat']['hazifeladatHataridoDt']!='') { + $_lejart = (strtotime(date('Y-m-d H:i:s'))>=strtotime($ADAT['hazifeladatAdat']['hazifeladatHataridoDt'])); + +echo ' +'; + $_icon = ($_lejart) ? 'icon-ban-circle':'icon-time'; + $_class = ($_lejart) ? 'hatarido lejart':'hatarido'; + echo '
'; + echo ' Határidő: '.$ADAT['hazifeladatAdat']['hazifeladatHataridoDt']; + echo '
'; + } echo ''."\n"; @@ -65,6 +79,9 @@ if ($ADAT['hazifeladatDiak']['tanarLattamDt']!='') { echo ' '.$ADAT['hazifeladatDiak']['tanarLattamDt']; } + if (strtotime($ADAT['hazifeladatDiak']['hazifeladatDiakFileDt']) > strtotime($ADAT['hazifeladatAdat']['hazifeladatHataridoDt'])) { + echo 'határidő utáni feltöltés'; + } echo ''; } @@ -202,8 +219,13 @@ echo ''; echo ''.$ITEM['diakNev'].''; if (__NAPLOADMIN===true || __VEZETOSEG===true) echo ''.$D['diakLattamDt'].''; - echo ''.$D['hazifeladatDiakStatus'].''; + echo ''.$D['hazifeladatDiakStatus'].''; //echo ''.$D['hazifeladatDiakMegjegyzes'].''; + echo ''; + if (strtotime($D['hazifeladatDiakFileDt']) > strtotime($ADAT['hazifeladatAdat']['hazifeladatHataridoDt'])) { + echo 'határidő utáni feltöltés'; + } + echo ''; $ADAT['dir'] = 'naplo/haladasi/hazifeladat'; $ADAT['file'] = $D['hazifeladatDiakFilename']; @@ -233,54 +255,5 @@ } - function putHazifeladatDiakOrig($ADAT) { - - if (count($ADAT['hazifeladatDiak'])==0) return false; - - echo formBegin(); - echo ''; - echo ''; - echo ''; - echo ''; - if (__NAPLOADMIN===true || __VEZETOSEG===true) - echo ''; - else - echo ''; - echo ''; - for ($i=0; $i'; - 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
'.$D['diakNev'].''.$D['diakLattamDt'].''.$D['hazifeladatDiakStatus'].''.$D['hazifeladatDiakMegjegyzes'].''; - if ($D['hazifeladatDiakOrigFilename']!='') { - echo ''.htmlspecialchars($D['hazifeladatDiakOrigFilename']).' '; - } - echo ''; -// if ($ADAT['hazifeladatDiak']['hazifeladatDiakStatus']=='kész') { - if (__TANAR===true) { - if ($D['tanarLattamDt']=='') { - echo ''; - } else { - echo ''; - } - } else { - if ($D['tanarLattamDt']!='') {echo '';} - } -// } - echo '
'; - echo formEnd(); - - } -?> +?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js index b5d19f89..ece36953 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js @@ -747,7 +747,7 @@ processJSONOraAdat = function(adat) { content += ''; } if (adat['oraAdat']['hazifeladatLeiras']!='') { - content += '
'; + content += '
'; content += adat['oraAdat']['hazifeladatLeiras']; content += '
'; } -- cgit v1.2.3 From ad6a38cc882f9da97aae74bb8c48ad9f70bc39e8 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Wed, 1 Apr 2020 15:50:03 +0200 Subject: Rev: 4646 --- 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 | 2 +- .../module-naplo/html/haladasi/hazifeladat.phtml | 9 ++++++-- 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 +- 17 files changed, 35 insertions(+), 30 deletions(-) (limited to 'mayor-orig/mayor-naplo') diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev index df260d9e..432cde09 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4645 +4646 diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev index df260d9e..432cde09 100644 --- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev +++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev @@ -1 +1 @@ -4645 +4646 diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev index df260d9e..432cde09 100644 --- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev +++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev @@ -1 +1 @@ -4645 +4646 diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev index df260d9e..432cde09 100644 --- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev +++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev @@ -1 +1 @@ -4645 +4646 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 df260d9e..432cde09 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 @@ -4645 +4646 diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev index df260d9e..432cde09 100644 --- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev +++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev @@ -1 +1 @@ -4645 +4646 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 df260d9e..432cde09 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 @@ -4645 +4646 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 df260d9e..432cde09 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 @@ -4645 +4646 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 df260d9e..432cde09 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 @@ -4645 +4646 diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index df260d9e..432cde09 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4645 +4646 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 3fd87f21..86ca57a0 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 @@ -61,7 +61,7 @@ $hazifeladatFeltoltesEngedely = readVariable($_POST['hazifeladatFeltoltesEngedely'],'id',0); if ($hazifeladatId>0) { // update if (is_null($hazifeladatHataridoDt)) { - $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u WHERE hazifeladatId=%u"; + $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u,hazifeladatHataridoDt=NULL WHERE hazifeladatId=%u"; $values = array($ADAT['hazifeladatLeiras'],$hazifeladatFeltoltesEngedely,$ADAT['hazifeladatId']); } else { $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u,hazifeladatHataridoDt='%s' WHERE hazifeladatId=%u"; 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 e6e2d4e6..98337d4e 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 @@ -79,7 +79,10 @@ echo '