From 35283d60ca832c8c9c351ddd78cf9c5396ff80f6 Mon Sep 17 00:00:00 2001 From: M.Gergo Date: Sun, 2 Feb 2020 12:55:51 +0100 Subject: Rev: 4604 --- mayor-orig/mayor-base/log/mayor-base.rev | 2 +- mayor-orig/mayor-base/www/include/base/config.php | 5 +- mayor-orig/mayor-base/www/include/base/log.php | 3 + mayor-orig/mayor-base/www/include/base/mysql.php | 6 +- mayor-orig/mayor-felveteli/log/mayor-felveteli.rev | 2 +- .../www/static/hu_HU/felveteli/felveteli.html | 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 +- .../install/module-naplo/mysql/intezmeny.sql | 2 +- mayor-orig/mayor-naplo/log/mayor-naplo.rev | 2 +- .../mayor-naplo/update/pre004603-1-intezmeny.sql | 14 +++ .../modules/naplo/intezmeny/munkakozosseg.php | 20 ++- .../include/modules/naplo/osztalyozo/vizsga.php | 2 +- .../private/naplo/import/tantargyFelosztas-pre.php | 138 ++++++++++++++------- .../private/naplo/import/tantargyFelosztas.php | 4 +- .../private/naplo/tanev/tankorCsoport-pre.php | 2 +- 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 +- 25 files changed, 168 insertions(+), 82 deletions(-) create mode 100644 mayor-orig/mayor-naplo/update/pre004603-1-intezmeny.sql (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 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4599 +4604 diff --git a/mayor-orig/mayor-base/www/include/base/config.php b/mayor-orig/mayor-base/www/include/base/config.php index 28f711cb..8ac2614c 100644 --- a/mayor-orig/mayor-base/www/include/base/config.php +++ b/mayor-orig/mayor-base/www/include/base/config.php @@ -4,8 +4,6 @@ if (PHP_SAPI!=='cli') define('_RUNLEVEL','www'); else define('_RUNLEVEL','cron') define('_JSLIB','jquery.min'); -if (!defined('_LOGLEVEL')) define('_LOGLEVEL',10); - date_default_timezone_set('Europe/Budapest'); if (_RUNLEVEL === 'cron') { @@ -26,6 +24,9 @@ if (_RUNLEVEL === 'cron') { } } +if (!defined('_LOGLEVEL')) define('_LOGLEVEL',10); +if (!defined('__DEBUG')) define('__DEBUG',false); + if (!defined('_SECURECOOKIE')) define('_SECURECOOKIE', true); define('_BASE_URL',( ($_SERVER['HTTPS']=='on')?"https://".$_SERVER['SERVER_NAME']:"http://".$_SERVER['SERVER_NAME'] )); diff --git a/mayor-orig/mayor-base/www/include/base/log.php b/mayor-orig/mayor-base/www/include/base/log.php index 14e214a9..4ea4f4f7 100644 --- a/mayor-orig/mayor-base/www/include/base/log.php +++ b/mayor-orig/mayor-base/www/include/base/log.php @@ -27,6 +27,9 @@ $msg = date('Y-m-d H:i:s').' '.$userAccount.': '.$message."\n"; fputs($fp,$msg); fclose($fp); + } else { + echo 'fatal error 004'; + die(); } } } diff --git a/mayor-orig/mayor-base/www/include/base/mysql.php b/mayor-orig/mayor-base/www/include/base/mysql.php index e5e4a2e3..12aeb771 100644 --- a/mayor-orig/mayor-base/www/include/base/mysql.php +++ b/mayor-orig/mayor-base/www/include/base/mysql.php @@ -196,9 +196,11 @@ if (MYSQLI_ENABLED===true) { $r = mysqli_query($lr,$q); $_insert_id = mysqli_insert_id($lr); // itt lekérdezzük, hogy a warning lekérdezés ne rontsa el debug=true esetén!! + $_affected_rows = mysqli_affected_rows($lr); } else { $r = @mysql_query($q, $lr); $_insert_id = mysql_insert_id($lr); + $_affected_rows = mysql_affected_rows($lr); } define(MYSQL_LOGGER,false); if (MYSQL_LOGGER === true) { @@ -289,7 +291,7 @@ $RESULT = $_insert_id; // mysqli_insert_id($lr); - ez itt már elromlik debug=true esetén a warning lekérdezés miatt mayorLogger(1,'mysql',$q,_USERACCOUNT); } elseif ($SET['result'] == 'affected rows') { - $RESULT = mysqli_affected_rows($lr); + $RESULT = $_affected_rows; // $RESULT = mysqli_affected_rows($lr); mayorLogger(1,'mysql',$q,_USERACCOUNT); } else { // create, insert, de nem olyan resulttal... $RESULT = $r; @@ -333,7 +335,7 @@ $RESULT = $_insert_id; // mysql_insert_id($lr); - ez itt már elromlik debug=true esetén a warning lekérdezés miatt mayorLogger(1,'mysql',$q,_USERACCOUNT); } elseif ($SET['result'] == 'affected rows') { - $RESULT = mysql_affected_rows($lr); + $RESULT = $_affected_rows; // $RESULT = mysql_affected_rows($lr); mayorLogger(1,'mysql',$q,_USERACCOUNT); } else { // create, insert, de nem olyan resulttal... $RESULT = $r; diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev index 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev +++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev @@ -1 +1 @@ -4599 +4604 diff --git a/mayor-orig/mayor-felveteli/www/static/hu_HU/felveteli/felveteli.html b/mayor-orig/mayor-felveteli/www/static/hu_HU/felveteli/felveteli.html index 050e9351..13dd5cfa 100644 --- a/mayor-orig/mayor-felveteli/www/static/hu_HU/felveteli/felveteli.html +++ b/mayor-orig/mayor-felveteli/www/static/hu_HU/felveteli/felveteli.html @@ -70,7 +70,7 @@ A felvételi tájékoztató megjelenése.
Az iskola rövid neve és címe:
-
Városmajori Gimnázium és Kós Károly Általános Iskola
+
Városmajori Gimnázium
1122. Budapest, Városmajor u. 71.
Tel: 214-1554; Fax: 214-1479
Telephely kódja: 001
diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev index 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev +++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev @@ -1 +1 @@ -4599 +4604 diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev index 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev +++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev @@ -1 +1 @@ -4599 +4604 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 61a4c0c1..7561799f 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 @@ -4599 +4604 diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev index 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev +++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev @@ -1 +1 @@ -4599 +4604 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 61a4c0c1..7561799f 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 @@ -4599 +4604 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 61a4c0c1..7561799f 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 @@ -4599 +4604 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 61a4c0c1..7561799f 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 @@ -4599 +4604 diff --git a/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql b/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql index 63600aa9..bb15985a 100644 --- a/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql +++ b/mayor-orig/mayor-naplo/install/module-naplo/mysql/intezmeny.sql @@ -309,7 +309,7 @@ CREATE TABLE `tankor` ( `max` tinyint(3) unsigned NOT NULL, `_tankorTipus` enum('tanórai','tanórán kívüli','első nyelv','második nyelv','egyéni foglalkozás','délutáni') COLLATE utf8_hungarian_ci DEFAULT 'tanórai', `tankorTipusId` int(10) unsigned DEFAULT NULL, - `tankorNevExtra` varchar(16) COLLATE utf8_hungarian_ci DEFAULT NULL, + `tankorNevExtra` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL, PRIMARY KEY (`tankorId`), KEY `tankor_FKIndex1` (`targyId`), CONSTRAINT `tankor_ibfk_1` FOREIGN KEY (`targyId`) REFERENCES `targy` (`targyId`) ON DELETE NO ACTION ON UPDATE NO ACTION diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4599 +4604 diff --git a/mayor-orig/mayor-naplo/update/pre004603-1-intezmeny.sql b/mayor-orig/mayor-naplo/update/pre004603-1-intezmeny.sql new file mode 100644 index 00000000..3f8a31ff --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004603-1-intezmeny.sql @@ -0,0 +1,14 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4603 $$ + +CREATE PROCEDURE upgrade_database_4603() +BEGIN +SET NAMES utf8 COLLATE utf8_hungarian_ci; + +IF EXISTS (SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='tankor' and COLUMN_NAME='tankorNevExtra') THEN + ALTER TABLE `tankor` MODIFY `tankorNevExtra` varchar(64) COLLATE utf8_hungarian_ci DEFAULT NULL; +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4603(); diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/munkakozosseg.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/munkakozosseg.php index 64d6496d..9827f1f4 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/munkakozosseg.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/intezmeny/munkakozosseg.php @@ -115,8 +115,24 @@ } function targyModosit($ADAT) { - $q = "UPDATE targy SET targyJelleg='%s',zaroKovetelmeny='%s',evkoziKovetelmeny='%s',targyRovidNev='%s'"; - $v = array($ADAT['targyJelleg'],$ADAT['zaroKovetelmeny'],$ADAT['evkoziKovetelmeny'],$ADAT['targyRovidNev']); + $q = "UPDATE targy SET"; $v = array(); + if ($ADAT['targyJelleg'] != '') { + $q .= " targyJelleg='%s',"; $v[] = $ADAT['targyJelleg']; + } else { + $q .= " targyJelleg=NULL,"; + } + if ($ADAT['zaroKovetelmeny'] != '') { + $q .= "zaroKovetelmeny='%s',"; $v[] = $ADAT['zaroKovetelmeny']; + } else { + $q .= "zaroKovetelmeny=NULL,"; + } + if ($ADAT['evkoziKovetelmeny'] != '') { + $q .= "evkoziKovetelmeny='%s',"; $v[] = $ADAT['evkoziKovetelmeny']; + } else { + $q .= "evkoziKovetelmeny=NULL,"; + } + $q .= "targyRovidNev='%s'"; + $v[] = $ADAT['targyRovidNev']; if (is_numeric($ADAT['kirTargyId'])) { $q .= ",kirTargyId=%u"; array_push($v,$ADAT['kirTargyId']); diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/osztalyozo/vizsga.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/osztalyozo/vizsga.php index 9849255d..077a9252 100644 --- a/mayor-orig/mayor-naplo/www/include/modules/naplo/osztalyozo/vizsga.php +++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/osztalyozo/vizsga.php @@ -110,7 +110,7 @@ // eredeti vizsga záradékolása és zárójegyhez kötése $q = "UPDATE vizsga SET zaradekId=%u, zaroJegyId=%u WHERE vizsgaId=%u"; $v = array($zaradekId, $zaroJegyId, $vizsgaId); - db_query($q, array('modul' => 'naplo_intezmeny', 'fv' => 'vizsgaHalasztas/záradékolás', 'values' => $v)); + db_query($q, array('modul' => 'naplo_intezmeny', 'fv' => 'vizsgaErtekeles/záradékolás', 'values' => $v)); } } 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 8605f4e5..097c6960 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 @@ -1,18 +1,5 @@ _DATADIR.'/'."csoportba_jaro_tanulok.tsv", - 'osztalyba_jaro_tanulok' => _DATADIR.'/'."osztalyba_jaro_tanulok.tsv", - 'tantargyfelosztas' => _DATADIR.'/'."ttfimport.tsv", - 'orarendiOra' => _DATADIR.'/'."orarendiOra.tsv", - 'helyettesitett_tanorak' => _DATADIR.'/'."helyettesitett_tanorak.tsv", -// 'elmaradt_tanorak' => _DATADIR.'/'."helyettesitett_tanorak.tsv", - ); - /* - 1. Nyilvántartás, Tanulói Adatok, Csoportok, Exportálás, Csoportba Járó tanulók _DATADIR.'/'."csoportba_jaro_tanulok.tsv" @@ -51,12 +38,28 @@ 2019.09.02 1 1 Pintér László (mat) 07.B osztályfőnöki Tanévnyitó-Margitsziget 2019.09.02 2019.09.02 2 2 Pintér László (mat) 07.B osztályfőnöki Tanévnyitó-Margitsziget 2019.09.02 - */ - if (_RIGHTS_OK !== true) die(); + $IMPORT_FILES = array( + 'csoportba_jaro_tanulok' => _DATADIR.'/'."csoportba_jaro_tanulok.tsv", + 'osztalyba_jaro_tanulok' => _DATADIR.'/'."osztalyba_jaro_tanulok.tsv", + 'tantargyfelosztas' => _DATADIR.'/'."ttfimport.tsvx", + 'orarendiOra' => _DATADIR.'/'."orarendiOra.tsv", + 'helyettesitett_tanorak' => _DATADIR.'/'."helyettesitett_tanorak.tsv", +// 'elmaradt_tanorak' => _DATADIR.'/'."helyettesitett_tanorak.tsv", + ); + + // pre-check files + foreach($IMPORT_FILES as $key => $filename) { + if (file_exists($filename)===false) { + // $_SESSION['alert'][] = 'info:file_not_exists:'.$filename; + dump($IMPORT_FILES); + die('FATAL ERROR! Not found: '.$filename); + } + } + if (!__NAPLOADMIN) { $_SESSION['alert'][] = 'page:insufficient_access'; } else { @@ -110,7 +113,9 @@ // $OSZTALYNEV2ID[ $OSZTALY ]; //} - // TODO valami szótár, nem tudjuk kitalálni + // TODO valami szótár, nem tudjuk kitalálni (tanév függő is!) + + if (__INTEZMENY==='vmg') { // --TODO tanev $ADAT['kulcsertektar']['osztalyjel2id'] = $OSZTALYJEL2ID = array( '07.A' => 124, '07.B' => 125, @@ -138,9 +143,39 @@ '12.D' => 109, '12.E' => 99, ); + } elseif (__INTEZMENY==='MZSG') { + $ADAT['kulcsertektar']['osztalyjel2id'] = $OSZTALYJEL2ID = array( + '7.a' => 72, + '7.b' => 73, + '8.a' => 74, + '8.b' => 75, + '9.ny' => 71, + '9.a' => 60, + '9.b' => 61, + '9.c' => 68, + '9.d' => 69, + '9.e' => 70, + '10.a' => 57, + '10.b' => 58, + '10.c' => 66, + '10.d' => 67, + '10.e' => 64, + '11.a' => 50, + '11.b' => 51, + '11.c' => 62, + '11.d' => 63, + '11.e' => 59, + '12.a' => 45, + '12.b' => 46, + '12.c' => 55, + '12.d' => 56, + '12.e' => 53, + ); + } else { + $_SESSION['alert'][] = 'page:nincs_osztalyjel2id'; + } - - $fn = fopen($IMPORT_FILES['tantargyfelosztas'],"r"); + $fn = fopen($IMPORT_FILES['tantargyfelosztas'],"r") or die($IMPORT_FILES['tantargyfelosztas'].':file not found!'); while(! feof($fn)) { /* 0 => string '12.C' (length=4) @@ -166,7 +201,7 @@ # tankorosztaly kitalálás: # DIÁK1 -(import)-> kretaOsztalyNev -(osztalyNaplo)-> osztalyId - $fn = fopen($IMPORT_FILES['osztalyba_jaro_tanulok'],"r"); + $fn = fopen($IMPORT_FILES['osztalyba_jaro_tanulok'],"r") or die($IMPORT_FILES['osztalyba_jaro_tanulok'].':file not found!');; while(! feof($fn)) { $line = (fgets($fn)); if (ord($line[0]) == 32) $line = "\t".trim($line); @@ -186,6 +221,9 @@ $osztalyId = $OSZTALYJEL2ID[$result[0]]; $csoportNev = $result[0]; $oId = $result[2]; + + if(is_null($osztalyId)) $_SESSION['alert'][] = 'info:'.$IMPORT_FILES['osztalyba_jaro_tanulok'].':null osztalyId:adatok='.$result[0].':'.$line; + if (!in_array($osztalyId, $CSOPORTADAT[$csoportNev]['osztalyok'])) { $CSOPORTADAT[$csoportNev]['osztalyok'][] = $osztalyId; } @@ -203,18 +241,20 @@ #Csoportba Járó Tanulok: - $fn = fopen($IMPORT_FILES['csoportba_jaro_tanulok'],"r"); + $fn = fopen($IMPORT_FILES['csoportba_jaro_tanulok'],"r") or die($IMPORT_FILES['csoportba_jaro_tanulok'].':file not found!');; while(! feof($fn)) { $line = (fgets($fn)); if (ord($line[0]) == 32) $line = "\t".trim($line); else $line = trim($line); $result = explode("\t",$line); + if (count($result)<1) continue;; // $ADAT['osztalyDiak'][] = $result; // osztalyNev --> osztalyId ??? $osztalyId = $OSZTALYJEL2ID[$result[3]]; $csoportNev = $result[0]; $oId = $result[2]; + if(is_null($osztalyId)) $_SESSION['alert'][] = 'info:'.$IMPORT_FILES['csoportba_jaro_tanulok'].':null osztalyId:adatok='.$result[3].':'.$line; if (!in_array($osztalyId, $CSOPORTADAT[$csoportNev]['osztalyok'])) { $CSOPORTADAT[$csoportNev]['osztalyok'][] = $osztalyId; } @@ -527,7 +567,7 @@ GROUP BY tankor.tankorId"; $_M = array(); if (is_array($ADAT['csoportAdat'][$_D[0]]['osztalyok']) && is_array($ADAT['csoportAdat'][$_D[1]]['osztalyok'])) { $_M = array_merge( - $ADAT['csoportAdat'][$_D[1]]['osztalyok'], + $ADAT['csoportAdat'][$_D[0]]['osztalyok'], $ADAT['csoportAdat'][$_D[1]]['osztalyok'] ); } elseif (is_array($ADAT['csoportAdat'][$_D[1]]['osztalyok'])) { @@ -538,6 +578,13 @@ GROUP BY tankor.tankorId"; $_M = $ADAT['csoportAdat'][$_D['csoportNev']]['osztalyok']; + // null értékek kiszűrése: + $_TMP = array(); + for ($_tmpi = 0; $_tmpi0) $_TMP[] = $_M[$_tmpi]; + } + $_M = $_TMP; + if (!is_array($_M) || count($_M)==0 || is_null($_M)) { $_M = array(0); // $_SESSION['alert'][] = 'info:import_nincsenek osztályok:'.serialize($_D); @@ -554,6 +601,7 @@ GROUP BY tankor.tankorId ORDER BY tankorNev"; $v = array(__TANEV,1,$_D['targyId'],$_D['oraszam']); $r2 = db_query($q,array('modul'=>'naplo_intezmeny','values'=>$v,'result'=>'indexed')); + if ($r2===false) continue;; if (count($r2) >= 1) { // mit tegyünk? kézzel fvesszük fel? tagokat ellenőrzünk? $_D['action'] = 'tankorHozzarendel2'; @@ -614,17 +662,16 @@ 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 intezmeny_vmg.tankor USING (tankorId) LEFT JOIN intezmeny_vmg.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>=NOW()))"; $r = db_query($q, array('fv' => 'pre', 'modul' => 'naplo', 'values' => $v, 'result'=>'indexed'),$lr_naplo); for ($i=0; $i 'felügyelet', @@ -671,30 +719,29 @@ GROUP BY tankor.tankorId ORDER BY tankorNev"; $fn = fopen($IMPORT_FILES['helyettesitett_tanorak'],"r"); -// --TODO -/* - 0 => string '2019. 09. 04. 10:00' (length=19) - 1 => string 'Szerda' (length=6) - 2 => string '3' (length=1) - 3 => string 'Elmaradt óra' (length=13) - 4 => string 'Takácsi-Nagyné Past Zsuzsanna' (length=31) - 5 => string 'Balkayné Kalló Ágnes Zsófia' (length=31) - 6 => string 'Nem szakszerű helyettesítés (felügyelet)' (length=44) - 7 => string '07.a.e.tnpzs' (length=12) - 8 => string 'etika/hit- és erkölcstan' (length=26) - 9 => string '111' (length=3) - 10 => string 'Megtartott óra' (length=15) - 11 => string '-' (length=1) - 12 => string 'Tanóra' (length=7) -*/ -/* + // --TODO + /* + 0 => string '2019. 09. 04. 10:00' (length=19) + 1 => string 'Szerda' (length=6) + 2 => string '3' (length=1) + 3 => string 'Elmaradt óra' (length=13) + 4 => string 'Takácsi-Nagyné Past Zsuzsanna' (length=31) + 5 => string 'Balkayné Kalló Ágnes Zsófia' (length=31) + 6 => string 'Nem szakszerű helyettesítés (felügyelet)' (length=44) + 7 => string '07.a.e.tnpzs' (length=12) + 8 => string 'etika/hit- és erkölcstan' (length=26) + 9 => string '111' (length=3) + 10 => string 'Megtartott óra' (length=15) + 11 => string '-' (length=1) + 12 => string 'Tanóra' (length=7) + while(! feof($fn)) { $line = (fgets($fn)); if (ord($line[0]) == 32) $line = "\t".trim($line); else $line = trim($line); $result = explode("\t",$line); // $X[] = $result; -dump($result); + dump($result); if (($_tankorId = $TRIPLE2TANKOR[$CSOPORT2ID[$result[7]]][$KRETATARGYNEV2TARGYID[$result[8]]][$TANAR2ID[$result[4]]])>0) { //csoport-targy-tanar $_dt = str_replace('. ','-',substr($result[0],0,12)); $_ora = $result[2]; @@ -732,8 +779,11 @@ dump($result); } // lehet, hogy nincs megfeleltetés, és az is, hogy helyettesített óra volt. Ezt külön file tartalmazza! } -*/ + */ fclose($fn); + + + db_close($lr_naplo); ################################################################################## 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 bac83a15..9d5fbf07 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 @@ -1,8 +1,6 @@ 0) var_dump($ADAT['bug']['diak']); + echo 'Használt kulcs érték párok:'; + var_dump($ADAT['kulcsertektar']['osztalyjel2id']); diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/tanev/tankorCsoport-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/tanev/tankorCsoport-pre.php index 60060fd2..42a15eb7 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/tanev/tankorCsoport-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/tanev/tankorCsoport-pre.php @@ -144,7 +144,7 @@ - $ADAT['tankorCsoport'] = getTankorCsoport(); + $ADAT['tankorCsoport'] = getTankorCsoport($tanev); $ADAT['tankorCsoportAdat'] = getTankorCsoportAdat(); $TOOL['osztalySelect'] = array('tipus' => 'cella','paramName' => 'osztalyId', 'post' => array()); diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev index 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-portal/log/mayor-portal.rev +++ b/mayor-orig/mayor-portal/log/mayor-portal.rev @@ -1 +1 @@ -4599 +4604 diff --git a/mayor-orig/mayor-wiki/log/mayor-wiki.rev b/mayor-orig/mayor-wiki/log/mayor-wiki.rev index 61a4c0c1..7561799f 100644 --- a/mayor-orig/mayor-wiki/log/mayor-wiki.rev +++ b/mayor-orig/mayor-wiki/log/mayor-wiki.rev @@ -1 +1 @@ -4599 +4604 diff --git a/mayor-orig/md5sum b/mayor-orig/md5sum index 5a751e35..cc11959c 100644 --- a/mayor-orig/md5sum +++ b/mayor-orig/md5sum @@ -1,13 +1,13 @@ -Revision 4599 -ebdc452823025a40d8dd138129000919 mayor-fenntarto-rev4599.tgz -16ceb458b7b41a92aa5a6a41816a10db mayor-installer-sulix-rev4599.tgz -fa8fc67f1ae0df1e8e38d505593db1c5 mayor-wiki-rev4599.tgz -df919d2c2c55e593bb625449d5eecaca mayor-installer-rev4599.tgz -4951adc4f13981211dbee1b9ce76f5cb mayor-portal-rev4599.tgz -bb21bb5733dac87817bb81df70f3a4f3 mayor-felveteli-rev4599.tgz -00d295e53848a9dd821a7b2bf95e5463 mayor-jatek-rev4599.tgz -dc3b60b62e13aec2c9e7f0d2f5092a2b mayor-locales-jp_JP-rev4599.tgz -fa2c06d8035293f86e1973a001754e23 mayor-locales-de_DE-rev4599.tgz -6df40f0c2224ee8a14746ecfc7e643f9 mayor-locales-en_US-rev4599.tgz -33c7e7350687d860e687ed24d763cb51 mayor-naplo-rev4599.tgz -29a6f77ec33b12743c6b494261565050 mayor-base-rev4599.tgz +Revision 4604 +d72b2533adcf059e1f90589d0975e67a mayor-fenntarto-rev4604.tgz +ea6dbe15e57c748f768463f81929c49a mayor-installer-sulix-rev4604.tgz +45b4121cede835c6dbf57207f640deab mayor-wiki-rev4604.tgz +f9b96b605150327d4d5655ae025400d1 mayor-installer-rev4604.tgz +7663b57e634cc79baf4677bdb49dee2b mayor-portal-rev4604.tgz +daeac7b616fd7c7675c45c6dcd18cb8a mayor-felveteli-rev4604.tgz +d86c81e4e38b71e64a2b758c00da8195 mayor-jatek-rev4604.tgz +2174fc3e2d1eeeeb3715501a5125ad60 mayor-locales-jp_JP-rev4604.tgz +bf200dc79b4eff1b771539abdf65bbd0 mayor-locales-de_DE-rev4604.tgz +b6f5a1bf6405588c1066cdb1e0af74db mayor-locales-en_US-rev4604.tgz +384f93b8ac6455d6bc63107f4a67f9b8 mayor-naplo-rev4604.tgz +1ef12214796766c372f22ab35430e3f1 mayor-base-rev4604.tgz diff --git a/mayor-orig/rev.txt b/mayor-orig/rev.txt index 61a4c0c1..7561799f 100644 --- a/mayor-orig/rev.txt +++ b/mayor-orig/rev.txt @@ -1 +1 @@ -4599 +4604 -- cgit v1.2.3