diff options
Diffstat (limited to 'mayor-orig')
20 files changed, 99 insertions, 46 deletions
diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4668 +4670 diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev +++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev @@ -1 +1 @@ -4668 +4670 diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev +++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev @@ -1 +1 @@ -4668 +4670 diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev +++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev @@ -1 +1 @@ -4668 +4670 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 1144753c..ae6d0645 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 @@ -4668 +4670 diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev +++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev @@ -1 +1 @@ -4668 +4670 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 1144753c..ae6d0645 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 @@ -4668 +4670 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 1144753c..ae6d0645 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 @@ -4668 +4670 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 1144753c..ae6d0645 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 @@ -4668 +4670 diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4668 +4670 diff --git a/mayor-orig/mayor-naplo/update/pre004669-1.sh b/mayor-orig/mayor-naplo/update/pre004669-1.sh new file mode 100644 index 00000000..4ca6ff0a --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004669-1.sh @@ -0,0 +1,13 @@ +#!/bin/sh + +#BASEDIR="/var/mayor" + +DIR="$BASEDIR/download/private/naplo/nyomtatas/torzslap/" +mkdir -p $DIR +chown -R www-data $DIR +echo "$DIR Kész." + +DIR="$BASEDIR/download/private/naplo/upload/" +mkdir -p $DIR +chown -R www-data $DIR +echo "$DIR Kész." diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas-pre.php index 8497ec46..fe445355 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas-pre.php @@ -94,7 +94,7 @@ if ($DIAKOK[$i]['oId']!='') { $OID2ID[$DIAKOK[$i]['oId']] = intval($DIAKOK[$i]['diakId']); } else { - $ADAT['bug']['diak'][] = $DIAKOK[$i]['oId']; + $ADAT['bug']['diak'][] = $DIAKOK[$i]['oId'].serialize($DIAKOK[$i]); } } // TÁRGYAK @@ -527,7 +527,7 @@ $_D = $ADAT['ttf'][$i]; $q = "select *,tankorSzemeszter.tankorId AS tankorId from tankorSzemeszter LEFT JOIN tankor USING (tankorId) -LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<=NOW() AND (kiDt is null or kiDt>=NOW())) +LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<='2020-09-01' AND (kiDt is null or kiDt>='2020-09-01')) LEFT JOIN ".__TANEVDBNEV.".tankorCsoport ON (tankor.tankorId = tankorCsoport.tankorId) LEFT JOIN ".__TANEVDBNEV.".csoport USING (csoportId) WHERE tanev=%u AND szemeszter=%u AND targyId=%u AND oraszam=%f AND tanarId=%u @@ -551,7 +551,7 @@ GROUP BY tankor.tankorId"; // Belerakjuk azon tanköröket is, ahol vélhetően csak a csoport hozzárendelés hiányzik $q = "select *,tankorSzemeszter.tankorId AS tankorId from tankorSzemeszter LEFT JOIN tankor USING (tankorId) -LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<=NOW() AND (kiDt is null or kiDt>=NOW())) +LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<='2020-09-01' AND (kiDt is null or kiDt>='2020-09-01')) LEFT JOIN ".__TANEVDBNEV.".tankorCsoport ON (tankor.tankorId = tankorCsoport.tankorId) LEFT JOIN ".__TANEVDBNEV.".csoport USING (csoportId) WHERE tanev=%u AND szemeszter=%u AND targyId=%u AND oraszam=%f AND tanarId=%u @@ -591,7 +591,7 @@ GROUP BY tankor.tankorId"; } $q = "select *,tankorSzemeszter.tankorId AS tankorId from tankorSzemeszter LEFT JOIN tankor USING (tankorId) -LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<=NOW() AND (kiDt is null or kiDt>=NOW())) +LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<='2020-09-01' AND (kiDt is null or kiDt>='2020-09-01')) LEFT JOIN tankorOsztaly ON (tankor.tankorId = tankorOsztaly.tankorId) WHERE tanev=%u AND szemeszter=%u AND targyId=%u AND oraszam=%f @@ -611,7 +611,7 @@ GROUP BY tankor.tankorId ORDER BY tankorNev"; } else { $q = "select *,tankorSzemeszter.tankorId AS tankorId from tankorSzemeszter LEFT JOIN tankor USING (tankorId) -LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<=NOW() AND (kiDt is null or kiDt>=NOW())) +LEFT JOIN tankorTanar ON (tankorTanar.tankorId=tankor.tankorId AND beDt<='2020-09-01' AND (kiDt is null or kiDt>='2020-09-01')) WHERE tanev=%u AND szemeszter=%u AND targyId=%u AND oraszam>=%f AND tanarId IS NULL @@ -662,7 +662,7 @@ GROUP BY tankor.tankorId ORDER BY tankorNev"; // MaYoR: csoportId+targyId+tanarId => tankorId; $lr_naplo = db_connect('naplo'); - $q = "select csoportId, targyId, tanarId, tankor.tankorId FROM tankorCsoport LEFT JOIN csoport USING (csoportId) LEFT JOIN ".__INTEZMENYDBNEV.".tankor USING (tankorId) LEFT JOIN ".__INTEZMENYDBNEV.".tankorTanar ON (tankor.tankorId = tankorTanar.tankorId AND beDt>='2019-09-01' AND (kiDt IS NULL or kiDt>=NOW()))"; + $q = "select csoportId, targyId, tanarId, tankor.tankorId FROM tankorCsoport LEFT JOIN csoport USING (csoportId) LEFT JOIN ".__INTEZMENYDBNEV.".tankor USING (tankorId) LEFT JOIN ".__INTEZMENYDBNEV.".tankorTanar ON (tankor.tankorId = tankorTanar.tankorId AND beDt>='2019-09-01' AND (kiDt IS NULL or kiDt>='2020-09-01'))"; $r = db_query($q, array('fv' => 'pre', 'modul' => 'naplo', 'values' => $v, 'result'=>'indexed'),$lr_naplo); for ($i=0; $i<count($r); $i++) { $d = $r[$i]; diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas.php index 9d5fbf07..7eceb83d 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas.php @@ -4,15 +4,24 @@ putTTFimport($ADAT); - if (count($ADAT['bug']['targy'])>0) + if (count($ADAT['bug']['targy'])>0) { + echo '<h1>Hibás tárgyak</h1>'; + echo '<pre>'; var_dump($ADAT['bug']['targy']); + echo '</pre>'; + } - if (count($ADAT['bug']['diak'])>0) + if (count($ADAT['bug']['diak'])>0) { + echo '<h1>Hibás diákok</h1>'; + echo '<pre>'; var_dump($ADAT['bug']['diak']); + echo '</pre>'; + } - echo 'Használt kulcs érték párok:'; - var_dump($ADAT['kulcsertektar']['osztalyjel2id']); - + echo 'Használt kulcs-érték párok (osztályJel-osztályId):'; + echo '<pre>'; + var_dump($ADAT['kulcsertektar']['osztalyjel2id']); + echo '</pre>'; diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php index 5097037f..9222a0c8 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php @@ -19,7 +19,9 @@ require_once('include/modules/naplo/share/tankorDiakModifier.php'); require_once('include/modules/naplo/share/hianyzasModifier.php'); require_once('include/modules/naplo/share/jegyModifier.php'); require_once('include/modules/naplo/share/jegy.php'); +require_once('include/share/net/upload.php'); +define('FILE_UPLOAD_DIR',_DOWNLOADDIR.'/private/naplo/upload/'); if (defined('__INTEZMENY') and __INTEZMENY != '') { $ADAT['tanevek'] = getTanevek(true); @@ -40,11 +42,28 @@ else $TA = $_TANEV; /* -------- */ // Adatok frissítése adatállományból -if (__NAPLOADMIN && isset($_POST['fileName']) && $_POST['fileName'] != '') { +if (__NAPLOADMIN===true && + ( + (isset($_POST['fileName']) && $_POST['fileName'] != '') + or + (is_array($_FILES) && $_FILES['upfile']['name']!='') + ) + ) { + define('_SKIP_ON_DUP',readVariable($_POST['skipOnDup'],'bool')); + if (is_array($_FILES) && $_FILES['upfile']['name']!='') { // távoli feltöltés + try { + $_F = array('subdir'=>FILE_UPLOAD_DIR, 'filename'=>uniqid()); // move ide + $sikeresFeltoltes = mayorFileUpload($_F, false); + $fileName = FILE_UPLOAD_DIR.$_F['filename']; + } catch (Exception $e) { + dump($e); + } + } else { // helyi beolvasás + // $fileName = fileNameNormal($_POST['fileName']); + $fileName = ($_POST['fileName']); // TODO + } $mezo_elvalaszto = ' '; // "\t" -// $fileName = fileNameNormal($_POST['fileName']); - $fileName = ($_POST['fileName']); // TODO $ADATOK = array(); if (file_exists($fileName)) { diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/import/tantargyFelosztas.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/import/tantargyFelosztas.phtml index 5fe6435a..2980672b 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/import/tantargyFelosztas.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/import/tantargyFelosztas.phtml @@ -29,7 +29,8 @@ table.ttf tr.createTankor td { background-color: magenta;} table.ttf tr.done td { background-color: lightgreen;} - table.ttf tr td {padding:4px;} + table.ttf tr td {padding:4px; border-bottom: solid 1px #ccc;} + table.ttf tr td:hover {outline: solid 2px cornflowerblue;} table.ttf tr td div.tankorLista span:hover { color: white; } </style>'; @@ -104,7 +105,7 @@ echo '<option>--'.$D['action'].'--</option>'; for ($j=0; $j<count($D['displayTankor']); $j++) { $_SEL = (count($D['displayTankor'])==1 && $D['action']=='tankorHozzarendel') ? ' selected="selected" ': ''; - echo '<option value="'.$D['csoportId'].':####:'.$D['tanarId'].':####:'.$D['displayTankor'][$j]['tankorId'].':####:'.$D['oraszam'].'" '.$_SEL.'>'.$D['displayTankor'][$j]['tankorNev'].'</option>'; + echo '<option value="'.$D['csoportId'].':####:'.$D['tanarId'].':####:'.$D['displayTankor'][$j]['tankorId'].':####:'.$D['oraszam'].'" '.$_SEL.'>'.$D['displayTankor'][$j]['tankorNev'].' ('.$D['displayTankor'][$j]['tankorId'].')</option>'; } echo '</select>'; echo '<div class="tankorLista">'; @@ -124,7 +125,16 @@ echo '</div>'; // ha ezt összehasonlítom a mayorban rögzített névsorral, akkor eldönhető lehet, hogy melyik a jó választás! echo ' Új tankör:'; - echo '<input type="checkbox" name="ujTankor[]" value="'.$D['csoportId'].':####:'.$D['tanarId'].':####:'.$_osztalyok.':####:'.$D['targyId'].'.'.':####:'.$_O.':####:'.$D[1].'" />'; + if (count($_osztalyok)>0) { + echo '<input type="checkbox" name="ujTankor[]" value="'.$D['csoportId'].':####:'.$D['tanarId'].':####:'.$_osztalyok.':####:'.$D['targyId'].'.'.':####:'.$_O.':####:'.$D[1].'" />'; + } else { + echo '<select name="ujTankor[]">'; + echo '<option value=""></option>'; + foreach ($ADAT['kulcsertektar']['osztalyjel2id'] as $__osztalyJel => $__osztalyId) { // TODO osztalyJel mayorbol inkabb + echo '<option value="'.$D['csoportId'].':####:'.$D['tanarId'].':####:'.$__osztalyId.':####:'.$D['targyId'].'.'.':####:'.$_O.':####:'.$D[1].'">'.$__osztalyJel.'</option>'; + } + echo '</select>'; + } } elseif ($D['action'] == 'createTankor') { echo 'Új tankör létrehozása: <input type="text" name="ujTankor[]" value="'.$D['csoportId'].':####:'.$D['tanarId'].':####:'.$_osztalyok.':####:'.$D['targyId'].'.'.':####:'.$_O.':####:'.$D[1].'" />'; } else { diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/share/file.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/share/file.phtml index 7720f2ba..a1ac34d4 100644 --- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/share/file.phtml +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/share/file.phtml @@ -2,7 +2,7 @@ function putFileSelectForm($dbtable, $post = array()) { - formBegin(array('class'=>'updateTable')); + formBegin(array('class'=>'updateTable', 'enctype'=>'multipart/form-data')); // A form címe if (defined('_FILESELECTTITLE')) echo '<h1>'._FILESELECTTITLE.'</h1>'; // A továbbadandó POST adatok @@ -12,8 +12,10 @@ } echo '<input type="hidden" name="dbtable" value="'.$dbtable.'">'."\n"; echo '<input type="checkbox" name="skipOnDup" value="true" /> Meglevő rekord találatkor kihagyjuk a rekord frissítést'; - echo '<label for="file">'._FILENEV.':</label>'."\n"; - echo '<input type="text" id="file" name="fileName" />'."\n"; + echo '<p><label for="file">'._FILENEV.':</label>'."\n"; + echo '<input type="text" id="file" name="fileName" /></p>'."\n"; + echo '<p>Vagy feltöltés:'; + echo '<input type="file" name="upfile" /></p>'; echo '<input type="submit" value="'._OK.'" />'."\n"; formEnd(); diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-portal/log/mayor-portal.rev +++ b/mayor-orig/mayor-portal/log/mayor-portal.rev @@ -1 +1 @@ -4668 +4670 diff --git a/mayor-orig/mayor-wiki/log/mayor-wiki.rev b/mayor-orig/mayor-wiki/log/mayor-wiki.rev index 1144753c..ae6d0645 100644 --- a/mayor-orig/mayor-wiki/log/mayor-wiki.rev +++ b/mayor-orig/mayor-wiki/log/mayor-wiki.rev @@ -1 +1 @@ -4668 +4670 diff --git a/mayor-orig/md5sum b/mayor-orig/md5sum index ae45fb75..b78cc000 100644 --- a/mayor-orig/md5sum +++ b/mayor-orig/md5sum @@ -1,13 +1,13 @@ -Revision 4668 -d31c2e99f5971da280de226d58efb1fe mayor-fenntarto-rev4668.tgz -8c5aad6ff460483f39cf322c684f7ae5 mayor-installer-sulix-rev4668.tgz -144adb4ed5747b3fdd2bcb5f968166c1 mayor-wiki-rev4668.tgz -3ade4f8cb094f846c33fda6ff728cd42 mayor-installer-rev4668.tgz -d21f84d601d41b4dceeb0279b9045437 mayor-portal-rev4668.tgz -ac2517fa941fefad37f7200b0ed2a4f6 mayor-felveteli-rev4668.tgz -0b8529f409d21c8f029fa86eb6d1b272 mayor-jatek-rev4668.tgz -123950373ab1b5fa1b2920927c4e95b0 mayor-locales-jp_JP-rev4668.tgz -a54261cd74ed2b410e4453d6d9360c43 mayor-locales-de_DE-rev4668.tgz -a934d21e116794142150a48e38fb9ae3 mayor-locales-en_US-rev4668.tgz -91d52124b4e62d7744462c4fc53c98b4 mayor-naplo-rev4668.tgz -8894910d63f85409e7dacf5b6c4a5200 mayor-base-rev4668.tgz +Revision 4670 +cba1147e897c76e7c16d45dbe47d1182 mayor-fenntarto-rev4670.tgz +fd708eb082977562764f1b1825e29f67 mayor-installer-sulix-rev4670.tgz +a721fb2bfbd2839c3cba735b1c4caab8 mayor-wiki-rev4670.tgz +c8b3a9922b7b5cd9dedba587bd15c4f1 mayor-installer-rev4670.tgz +61204f6f2312a735247d998c397de7fa mayor-portal-rev4670.tgz +8093da7931507cde6c2aaad259ceda4d mayor-felveteli-rev4670.tgz +3c08d033790423f67349f0ec352246d0 mayor-jatek-rev4670.tgz +3bbb4da1261cc77507793fdb7ff0256a mayor-locales-jp_JP-rev4670.tgz +a6456f0d911fce770b9e8840fbf87833 mayor-locales-de_DE-rev4670.tgz +f6b1df395dc6d411fa682916058279c3 mayor-locales-en_US-rev4670.tgz +b8b5c925ecfcc25da36bb202564f0e1e mayor-naplo-rev4670.tgz +024478761bf99fd4af52cd6d06814946 mayor-base-rev4670.tgz diff --git a/mayor-orig/rev.txt b/mayor-orig/rev.txt index 1144753c..ae6d0645 100644 --- a/mayor-orig/rev.txt +++ b/mayor-orig/rev.txt @@ -1 +1 @@ -4668 +4670 |