aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo/www/policy/private
diff options
context:
space:
mode:
authorM.Gergo2020-08-24 13:05:03 +0200
committerM.Gergo2020-08-24 13:05:03 +0200
commite22bbedcf69ea347a103d04d194136b8f3a761c8 (patch)
tree5d5653a23f1070af88f2fac633a75836e1e4bfb4 /mayor-orig/mayor-naplo/www/policy/private
parent37d424aa0d36fdb47e931340f7920a92870e3c34 (diff)
downloadmayor-e22bbedcf69ea347a103d04d194136b8f3a761c8.tar.gz
mayor-e22bbedcf69ea347a103d04d194136b8f3a761c8.zip
Rev: 4670rev4670
Diffstat (limited to 'mayor-orig/mayor-naplo/www/policy/private')
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas-pre.php12
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/import/tantargyFelosztas.php19
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/intezmeny/osztaly-pre.php25
3 files changed, 42 insertions, 14 deletions
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)) {