From 05cd10ac470512a35ac392856baabe8b0619add5 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Sun, 6 Sep 2020 12:06:53 +0200 Subject: Rev: 4678 --- 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 +- .../config/module-naplo/config-pl.php.example | 4 ++++ .../config/module-naplo/config-vmg.php.example | 5 +++++ mayor-orig/mayor-naplo/log/mayor-naplo.rev | 2 +- .../include/modules/naplo/export/kretaOrarend.php | 25 ++++++++++++++++----- .../private/naplo/export/kretaOrarend-pre.php | 14 +++++++++--- .../www/skin/classic/module-naplo/html/base.phtml | 8 +++---- .../module-naplo/html/export/kretaOrarend.phtml | 1 + 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 +- 21 files changed, 71 insertions(+), 40 deletions(-) diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4675 +4678 diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev +++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev @@ -1 +1 @@ -4675 +4678 diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev +++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev @@ -1 +1 @@ -4675 +4678 diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev +++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev @@ -1 +1 @@ -4675 +4678 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 d197bb6d..3c4089ce 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 @@ -4675 +4678 diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev +++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev @@ -1 +1 @@ -4675 +4678 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 d197bb6d..3c4089ce 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 @@ -4675 +4678 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 d197bb6d..3c4089ce 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 @@ -4675 +4678 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 d197bb6d..3c4089ce 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 @@ -4675 +4678 diff --git a/mayor-orig/mayor-naplo/config/module-naplo/config-pl.php.example b/mayor-orig/mayor-naplo/config/module-naplo/config-pl.php.example index 97988330..9a075903 100644 --- a/mayor-orig/mayor-naplo/config/module-naplo/config-pl.php.example +++ b/mayor-orig/mayor-naplo/config/module-naplo/config-pl.php.example @@ -137,6 +137,10 @@ define('_JELES_ATLAG', 4.75); define('_JELES_LEGGYENGEBB_JEGY', 3); + // A kréta órarend exportban használt hetirend típusok a Kréta adatszótára szerint... + global $kretaHETIREND; + $kretaHETIREND = array(1 => 'A hét', 2 => 'B hét', 3 => 'Minden hét'); + */ ?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/config/module-naplo/config-vmg.php.example b/mayor-orig/mayor-naplo/config/module-naplo/config-vmg.php.example index 1eb19228..ae181515 100644 --- a/mayor-orig/mayor-naplo/config/module-naplo/config-vmg.php.example +++ b/mayor-orig/mayor-naplo/config/module-naplo/config-vmg.php.example @@ -112,6 +112,11 @@ define('_JELES_ATLAG', 4.75); define('_JELES_LEGGYENGEBB_JEGY', 3); + // A kréta órarend exportban használt hetirend típusok a Kréta adatszótára szerint... + global $kretaHETIREND; + $kretaHETIREND = array(1 => 'A hét', 2 => 'B hét', 3 => 'Minden hét'); + + */ ?> \ No newline at end of file diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4675 +4678 diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/export/kretaOrarend.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/export/kretaOrarend.php index 48cf5f52..0c458ea8 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/export/kretaOrarend.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/export/kretaOrarend.php @@ -6,12 +6,23 @@ $lr = db_connect('naplo'); // orarendiOra - tankor + // Így több hetes órarend esetén mindent külön felvesz az egyes hetekre, nem használja a "Minden hétre" lehetőséget... $q = "SELECT * from orarendiOra LEFT JOIN orarendiOraTankor USING (tanarId, targyJel, osztalyJel) LEFT JOIN ".__INTEZMENYDBNEV.".terem USING (teremId) + WHERE orarendiOra.tolDt <= '%s' AND '%s' <= orarendiOra.igDt ORDER BY tanarId, het, nap, ora"; - $v = array(); - $ADAT['orak'] = db_query($q, array('fv' => 'getOrarendAdat', 'result'=>'indexed','value'=>$v), $lr); + // A hetek összegét kérdezzük le, ez egy hetes órarend esetén nem változtat semmit + // Kéthetes órarendnél 1 -> A hét, 2 -> B hét, 1+2=3 -> Minden hét + // Más esetekben már nem lesz jó... + $q = "select sum(het) as het,nap,ora,tanarId,osztalyJel,targyJel,teremId,leiras,tankorId from orarendiOra + LEFT JOIN orarendiOraTankor USING (tanarId, targyJel, osztalyJel) + LEFT JOIN ".__INTEZMENYDBNEV.".terem USING (teremId) + WHERE orarendiOra.tolDt <= '%s' AND '%s' <= orarendiOra.igDt + group by nap,ora,tanarId,osztalyJel,targyJel,teremId,leiras,tankorId + ORDER BY tanarId, het, nap, ora"; + $v = array($ADAT['dt'], $ADAT['dt']); + $ADAT['orak'] = db_query($q, array('fv' => 'getOrarendAdat', 'result'=>'indexed','values'=>$v), $lr); $q = "SELECT tankorId, tankorNev, targyNev, kretaTargyNev, csoportNev FROM ".__INTEZMENYDBNEV.".tankor LEFT JOIN ".__INTEZMENYDBNEV.".tankorSzemeszter USING (tankorId) LEFT JOIN ".__INTEZMENYDBNEV.".targy USING (targyId) @@ -20,14 +31,18 @@ WHERE tanev=".__TANEV." AND szemeszter=1"; $v = array(); - $ADAT['tankor'] = db_query($q, array('fv' => 'getOrarendAdat/tankor', 'result'=>'assoc','keyfield'=>'tankorId','value'=>$v), $lr); + $ADAT['tankor'] = db_query($q, array('fv' => 'getOrarendAdat/tankor', 'result'=>'assoc','keyfield'=>'tankorId','values'=>$v), $lr); foreach ($ADAT['tankor'] as $_tankorId => $T) { $M = explode(' ', $T['csoportNev']); - if (strpos($T['csoportNev'],',') !== false) $ADAT['t2osztaly'][$_tankorId] = ''; + // Ha van a csoportnévben vessző vagy aláhúzás, akkor több osztályhoz tartozik, + // pl: "9.a, 9.b tnf", "11. inf_A", "12.inf_E" + if (strpos($T['csoportNev'],',') !== false || strpos($T['csoportNev'],'_') !== false) $ADAT['t2osztaly'][$_tankorId] = ''; else $ADAT['t2osztaly'][$_tankorId] = $M[0]; - + // Ha nincs benne szóköz és aláhúzás sem, akkor egy osztály jele valójában a MaYoR csoportnév + // csoportot jelöl pl: "12.inf_E", "9.a csop1", "7.a, 7.b tnl" + // osztályt jelöl pl: "8.b" if (strpos($T['csoportNev'],' ') === false && strpos($T['csoportNev'],'_') === false) $ADAT['t2csoport'][$_tankorId] = ''; else $ADAT['t2csoport'][$_tankorId] = $T['csoportNev']; } diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kretaOrarend-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kretaOrarend-pre.php index 65b52e40..b9af3e72 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kretaOrarend-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/export/kretaOrarend-pre.php @@ -12,7 +12,8 @@ Helyiség: a tanóra helyisége (ha nincs ilyen nevű helyiség a rendszerben, akkor ez rögzítésre kerül) - - A Heti rend - a config_xyz.php-ben: felsorolja az orarendiHet --> Kréta "Hetirend" típusú adatszótárának elemeit + - A Heti rend - a config_xyz.php-ben: $kretaHETIREND felsorolja az orarendiHet --> Kréta "Hetirend" típusú adatszótárának elemeit + a lekérdezés a hetek összegét veszi: 1 --> A hét, 2 --> B hét, 1+2=3 --> Minden hét - Minden tárgynál be van írva a kretaTargyNev - Feltételezzük, hogy minden tankör pontosan egy csoportba tartozik bele, s a csoportok a Kréta csoportoknak/osztályoknak megfelelők - A csoportok elnevezésében feltételezések: @@ -32,11 +33,11 @@ if (!__NAPLOADMIN && !__VEZETOSEG) { require_once('include/modules/naplo/share/targy.php'); require_once('include/modules/naplo/share/file.php'); + $dt = $ADAT['dt'] = readVariable($_POST['dt'], 'date'); if ($action == "kretaOrarendExport") { $ADAT['tanar'] = getTanarok(array('result'=>'assoc')); $ADAT['export'] = getOrarendAdat($ADAT); - $ADAT['formatum'] = readVariable($_POST['formatum'], 'enum', null, array('csv','ods','xml')); if ($ADAT['formatum'] == 'xml') $ADAT['mime'] = 'application/vnd.ms-excel'; if (isset($ADAT['formatum'])) { @@ -48,6 +49,13 @@ if (!__NAPLOADMIN && !__VEZETOSEG) { } - + $TOOL['datumSelect'] = array( + 'tipus'=>'sor', 'post'=>array('formatum'), + 'paramName' => 'dt', + 'tolDt' => date('Y-m-d', strtotime('last Monday', strtotime($_TANEV['kezdesDt']))), + 'igDt' => $_TANEV['zarasDt'], + 'override' => true + ); + getToolParameters(); } diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml index cd9ec7cc..0c5f7937 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/base.phtml @@ -3,7 +3,6 @@ if (_RIGHTS_OK !== true) die(); require_once('include/share/date/names.php'); - if (_RUNLEVEL!=='cron') putEszkozSor(); function putUjIntezmeny() { @@ -61,10 +60,11 @@ if ($showHelp) echo '?'; echo ''."\n"; reset($TOOL); - foreach ( $TOOL as $tool => $params ) { + foreach ( $TOOL as $tool => $params ) { // if ( function_exists( $func = "put$tool" ) && $params['tipus']=='cella') { if ( isset($params['tipus']) && $params['tipus']=='cella') { + if (isset($params['title'])) $title = '__'.$params['title']; else $title = '__'.nagybetus($tool).'TITLE'; @@ -274,9 +274,8 @@ } function putForrasSelect() { - global $TOOL; - putToolFormStart('forrasSelect'); + putToolFormStart('forrasSelect','forras'); echo ''; putToolFormStop(); - } function putIntezmenySelect() { diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/export/kretaOrarend.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/export/kretaOrarend.phtml index 7ffeccad..c1d40d25 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/export/kretaOrarend.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/export/kretaOrarend.phtml @@ -4,6 +4,7 @@ formBegin(array('action'=>href('index.php?page=naplo&sub=export&f=kretaOrarend'), 'class'=>"export")); echo ''."\n"; + echo ''."\n"; echo '
Kréta - Órarend export'."\n"; echo ''."\n"; diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-portal/log/mayor-portal.rev +++ b/mayor-orig/mayor-portal/log/mayor-portal.rev @@ -1 +1 @@ -4675 +4678 diff --git a/mayor-orig/mayor-wiki/log/mayor-wiki.rev b/mayor-orig/mayor-wiki/log/mayor-wiki.rev index d197bb6d..3c4089ce 100644 --- a/mayor-orig/mayor-wiki/log/mayor-wiki.rev +++ b/mayor-orig/mayor-wiki/log/mayor-wiki.rev @@ -1 +1 @@ -4675 +4678 diff --git a/mayor-orig/md5sum b/mayor-orig/md5sum index 247c88cd..ceb87b49 100644 --- a/mayor-orig/md5sum +++ b/mayor-orig/md5sum @@ -1,13 +1,13 @@ -Revision 4675 -443fba38b8b1c4ff6408bd0e3665e12c mayor-fenntarto-rev4675.tgz -0b32e36aacda0b14b87fe55bce5294c7 mayor-installer-sulix-rev4675.tgz -f4c8499c2792b24ada5c44ea2282cf57 mayor-wiki-rev4675.tgz -f74fd05a167bea6ccc15f3ef500a59e8 mayor-installer-rev4675.tgz -8c685cbdfc12344d3abe3e3a0d7cd248 mayor-portal-rev4675.tgz -ae5ec7cfa8a2c64182717796aa034124 mayor-felveteli-rev4675.tgz -99137f734125a76b92372855bbcb755c mayor-jatek-rev4675.tgz -761efab4d1e78176625bcfc1781bd675 mayor-locales-jp_JP-rev4675.tgz -d9d6dbbfc617fe7ac17e3eb4f547476d mayor-locales-de_DE-rev4675.tgz -fefca256d0fcb93b5a1281881a824730 mayor-locales-en_US-rev4675.tgz -e778d007c77fe9b68c2bbeadfc36c805 mayor-naplo-rev4675.tgz -cf933bc85930cdee356d8675dee61fa8 mayor-base-rev4675.tgz +Revision 4678 +ae37f4627dc0b9d59b8f7d02f6a36567 mayor-fenntarto-rev4678.tgz +8701623ef3593718cdc4e916cb9beb45 mayor-installer-sulix-rev4678.tgz +67af2c56005638e1e987413d22429ac0 mayor-wiki-rev4678.tgz +2d9568b5e406bb195ad41b8a17616445 mayor-installer-rev4678.tgz +9cbef6c69c497940efaf9b32a7c9d542 mayor-portal-rev4678.tgz +b7e19d4216b5bab9f6e3d39f88b96eb4 mayor-felveteli-rev4678.tgz +2aece1e47be886e15341154afc3ef82f mayor-jatek-rev4678.tgz +0a1e9519b2c195ad2cfd53698e1edd83 mayor-locales-jp_JP-rev4678.tgz +17b9730d7e0766198c0f0d536fda000d mayor-locales-de_DE-rev4678.tgz +0a6684550a20f620b6e590feed384d68 mayor-locales-en_US-rev4678.tgz +417c3c4ec00fe453667175ed3b0dd435 mayor-naplo-rev4678.tgz +8f7e80787a56704f86db4101ad727229 mayor-base-rev4678.tgz diff --git a/mayor-orig/rev.txt b/mayor-orig/rev.txt index d197bb6d..3c4089ce 100644 --- a/mayor-orig/rev.txt +++ b/mayor-orig/rev.txt @@ -1 +1 @@ -4675 +4678 diff --git a/rev.txt b/rev.txt index d197bb6d..3c4089ce 100644 --- a/rev.txt +++ b/rev.txt @@ -1 +1 @@ -4675 +4678 -- cgit v1.2.3