aboutsummaryrefslogtreecommitdiffstats
path: root/mayor-orig/mayor-naplo
diff options
context:
space:
mode:
authorM.Gergo2020-03-31 19:40:35 +0200
committerM.Gergo2020-03-31 19:40:35 +0200
commit0ba1d0c88b25762d4acb0f4b5425778f0cbc76a9 (patch)
tree967d5c6f8477b2871ae022b9bd56fc9697af4bbd /mayor-orig/mayor-naplo
parent2f564886b387ecd47ce4f88cabb26a706a32c56c (diff)
parent4c6b313fae97ccb7eaae75b5d05881f10469e13d (diff)
downloadmayor-0ba1d0c88b25762d4acb0f4b5425778f0cbc76a9.tar.gz
mayor-0ba1d0c88b25762d4acb0f4b5425778f0cbc76a9.zip
Merge branch 'MaYor-dev'
Az eddigi fejlesztések a forrásból -> (devel@mayor.hu)
Diffstat (limited to 'mayor-orig/mayor-naplo')
-rw-r--r--mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql2
-rw-r--r--mayor-orig/mayor-naplo/log/mayor-naplo.rev2
-rw-r--r--mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql4
-rw-r--r--mayor-orig/mayor-naplo/update/pre004643-1-naplo.sql27
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php60
-rw-r--r--mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php16
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php36
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarend-pre.php7
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php5
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css7
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/hazifeladat.css5
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarend.css21
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml15
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/hazifeladat.phtml10
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarend.phtml38
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml3
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/hazifeladat.jquery.min.js7
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/naplo.jquery.min.js16
18 files changed, 245 insertions, 36 deletions
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 efe43f5d..f8d78259 100644
--- a/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql
+++ b/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql
@@ -148,8 +148,10 @@ CREATE TABLE `oraHazifeladat` (
`oraId` int(10) unsigned DEFAULT NULL,
`hazifeladatLeiras` text COLLATE utf8_hungarian_ci NOT NULL,
`hazifeladatFeltoltesEngedely` tinyint(3) unsigned DEFAULT '0',
+ `hazifeladatHataridoDt` datetime DEFAULT NULL,
PRIMARY KEY (`hazifeladatId`),
UNIQUE KEY `oraId` (`oraId`),
+ KEY `hazifeladatHataridoDt` (`hazifeladatHataridoDt`),
CONSTRAINT `oraHazifeladat_ibfk_1` FOREIGN KEY (`oraId`) REFERENCES `ora` (`oraId`) ON DELETE CASCADE ON UPDATE CASCADE
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_hungarian_ci;
diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
index 7ea43f6c..ff844583 100644
--- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev
+++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
@@ -1 +1 @@
-4638
+4644
diff --git a/mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql
index ba6686cd..d726406b 100644
--- a/mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql
+++ b/mayor-orig/mayor-naplo/update/pre004627-1-naplo.sql
@@ -10,8 +10,8 @@ IF NOT EXISTS (
) THEN
CREATE TABLE `oraHazifeladatDiak` (
- `hazifeladatId` int(10) unsigned DEFAULT NULL,
- `diakId` int(10) unsigned DEFAULT NULL,
+ `hazifeladatId` int(10) unsigned NOT NULL,
+ `diakId` int(10) unsigned NOT NULL,
`diakLattamDt` datetime DEFAULT NULL,
`tanarLattamDt` datetime DEFAULT NULL,
`hazifeladatDiakStatus` ENUM('','kész') DEFAULT '',
diff --git a/mayor-orig/mayor-naplo/update/pre004643-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004643-1-naplo.sql
new file mode 100644
index 00000000..4b662642
--- /dev/null
+++ b/mayor-orig/mayor-naplo/update/pre004643-1-naplo.sql
@@ -0,0 +1,27 @@
+DELIMITER $$
+DROP PROCEDURE IF EXISTS upgrade_database_4643 $$
+
+CREATE PROCEDURE upgrade_database_4643()
+BEGIN
+SET NAMES utf8 COLLATE utf8_hungarian_ci;
+
+IF NOT EXISTS (
+ SELECT * FROM information_schema.COLUMNS WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraHazifeladat' and COLUMN_NAME='hazifeladatHataridoDt'
+) THEN
+
+ALTER TABLE `oraHazifeladat` ADD `hazifeladatHataridoDt` datetime DEFAULT NULL;
+
+END IF;
+
+
+IF NOT EXISTS (
+ SELECT * FROM information_schema.statistics WHERE TABLE_SCHEMA=DATABASE() and TABLE_NAME='oraHazifeladat' and INDEX_NAME = 'hazifeladatHataridoDt'
+) THEN
+
+ALTER TABLE `oraHazifeladat` ADD INDEX `hazifeladatHataridoDt` (`hazifeladatHataridoDt`);
+
+END IF;
+
+END $$
+DELIMITER ;
+CALL upgrade_database_4643();
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php
index 602f26e1..1809ab50 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/ora.php
@@ -24,16 +24,22 @@
tankorNev,
feladatTipusId,
munkaido,
- hazifeladatId, hazifeladatLeiras
+ hazifeladatId,
+ hazifeladatLeiras,
+ hazifeladatFeltoltesEngedely,
+ hazifeladatHataridoDt,
+ cimkeId, cimkeLeiras
FROM `%s`.ora
LEFT JOIN `%s`.oraHazifeladat USING (oraId)
+ LEFT JOIN `%s`.oraCimke USING (oraId)
+ LEFT JOIN ".__INTEZMENYDBNEV.".cimke USING (cimkeId)
LEFT JOIN ".__INTEZMENYDBNEV.".tankorSzemeszter USING (tankorId)
LEFT JOIN ".__INTEZMENYDBNEV.".tanar AS t1 ON ki=t1.tanarId
LEFT JOIN ".__INTEZMENYDBNEV.".tanar AS t2 ON kit=t2.tanarId
LEFT JOIN ".__INTEZMENYDBNEV.".feladatTipus USING (feladatTipusId)
LEFT JOIN ".__INTEZMENYDBNEV.".terem USING (teremId)
WHERE oraId=%u AND (tanev=%u OR feladatTipusId IS NOT NULL)";
- $v = array(tanevDbNev(__INTEZMENY, $tanev),tanevDbNev(__INTEZMENY, $tanev), $oraId, $tanev);
+ $v = array(tanevDbNev(__INTEZMENY, $tanev),tanevDbNev(__INTEZMENY, $tanev), tanevDbNev(__INTEZMENY, $tanev), $oraId, $tanev);
return db_query($q, array('fv' => 'getOraAdatById', 'modul' => 'naplo_intezmeny', 'result' => 'record', 'values' => $v), $olr);
} else {
@@ -349,6 +355,8 @@
} else {
$q = "SELECT * FROM ora
LEFT JOIN oraHazifeladat USING (oraId)
+LEFT JOIN oraCimke USING (oraId)
+LEFT JOIN ".__INTEZMENYDBNEV.".cimke USING (cimkeId)
WHERE dt>='%s' and dt<='%s' AND (ki=%u OR kit=%u) $WHERE ORDER BY dt,ora";
array_unshift($v, $tolDt, $igDt, $tanarId, $tanarId);
if ($SET['result']=='assoc')
@@ -389,13 +397,19 @@ WHERE dt>='%s' and dt<='%s' AND (ki=%u OR kit=%u) $WHERE ORDER BY dt,ora";
$RE = db_query($q, array('modul' => 'naplo', 'fv' => 'getOrak', 'result' => 'indexed', 'values' => $v));
} else {
if ($SET['elmaradokNelkul'])
- $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime FROM ora
+ $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime, cimkeId, cimkeLeiras
+FROM ora
LEFT JOIN oraHazifeladat USING (oraId)
+LEFT JOIN oraCimke USING (oraId)
+LEFT JOIN ".__INTEZMENYDBNEV.".cimke USING (cimkeId)
WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count($TANKORIDK), '%u')).")
AND tipus NOT IN ('elmarad','elmarad máskor')";
else
- $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime FROM ora
+ $q = "SELECT *,getOraTolTime(ora.oraId) AS tolTime,getOraIgTime(ora.oraId) AS igTime, cimkeId, cimkeLeiras
+FROM ora
LEFT JOIN oraHazifeladat USING (oraId)
+LEFT JOIN oraCimke USING (oraId)
+LEFT JOIN ".__INTEZMENYDBNEV.".cimke USING (cimkeId)
WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count($TANKORIDK), '%u')).")";
$R = db_query($q, array('modul' => 'naplo', 'fv' => 'getOrak', 'result' => 'indexed', 'values' => $v));
$RE['tankorok']=array();
@@ -621,6 +635,18 @@ WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count(
return $R;
}
+ function getKovetkezoOraAdatByOraId($oraId) {
+ if ($oraId>0) {
+ $q = "SELECT * FROM ora WHERE oraId = %u";
+ $v = array($oraId);
+ $ORA = db_query($q,array('debug'=>false,'fv'=>'oraMostVane','modul'=>'naplo','values'=>$v,'result'=>'record'));
+ $q = "SELECT * FROM ora WHERE dt>'%s' AND tankorId=%u AND tipus NOT IN ('elmarad','elmarad_máskor') ORDER BY dt LIMIT 1";
+ $v = array($ORA['dt'],$ORA['tankorId']);
+ $R = db_query($q,array('debug'=>false,'fv'=>'oraMostVane','modul'=>'naplo','values'=>$v,'result'=>'record'));
+ }
+ return $R;
+ }
+
function getDiakOra($diakId,$dt,$ora,$olr_intezmeny = '',$olr_naplo) { // jelenlét mezőt nem vesszük figyelembe!!!
// diakId->tankor->ora
@@ -657,5 +683,31 @@ WHERE dt>='%s' and dt<='%s' AND tankorId IN (".implode(',', array_fill(0, count(
return $R;
}
+ function getDiakHazifeladatByHatarido($diakId,$ADAT,$olr='') {
+ $dt = $hazifeladatHataridoDt = readVariable($ADAT['hazifeladatHataridoDt'],'date',null);
+ $R = array();
+ if ($diakId>0 && !is_null($hazifeladatHataridoDt)) {
+ $tankorIds = getTankorByDiakId($diakId, __TANEV, $SET = array('csakId' => true, 'tolDt' => $dt, 'igDt' => $dt, 'result'=>'idonly'),$olr);
+ if (count($tankorIds)>0) {
+ $q = "SELECT *,getNev(tankorId,'tankor') AS tankorNev
+FROM oraHazifeladat
+LEFT JOIN ora USING (oraId)
+LEFT JOIN oraHazifeladatDiak ON (oraHazifeladat.hazifeladatId = oraHazifeladatDiak.hazifeladatId AND diakId=%u)
+WHERE tankorId IN (".implode(',',$tankorIds).") AND hazifeladatHataridoDt BETWEEN '%s' AND '%s 23:59:59'";
+ $v = array($diakId,$hazifeladatHataridoDt,$hazifeladatHataridoDt);
+ } else { // fallback
+ $q = "SELECT *,getNev(tankorId,'tankor') AS tankorNev FROM oraHazifeladat LEFT JOIN oraHazifeladatDiak USING (hazifeladatId) LEFT JOIN ora USING (oraId) WHERE diakId=%u AND DATE(hazifeladatHataridoDt)='%s'";
+ $v = array($diakId,$hazifeladatHataridoDt);
+ }
+ $R = db_query($q,array('debug'=>false,'fv'=>'getDiakhazifeladatByOraIds','modul'=>'naplo','values'=>$v,'result'=>'indexed'),$olr);
+ }
+ return $R;
+ }
+
+ function getOsztalyHazifeladatByHatarido($osztalyId,$ADAT,$olr='') {
+ // loop $diakId
+ $hazifeladatHataridoDt = $ADAT['hazifeladatHataridoDt'];
+
+ }
?>
diff --git a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php
index 53b6c763..8c5bd077 100644
--- a/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php
+++ b/mayor-orig/mayor-naplo/www/include/modules/naplo/share/oraModifier.php
@@ -156,4 +156,20 @@
}
+ function oraHazifeladatDiakLatta($hazifeladatId) {
+ if (__DIAK===true && $hazifeladatId>0) {
+ if (defined('__USERDIAKID') && __USERDIAKID>0) {
+ $diakId=__USERDIAKID;
+ } elseif (defined('__SZULODIAKID') && __SZULODIAKID>0) {
+ $diakId=__SZULODIAKID;
+ }
+ if ($diakId>0) {
+ $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,diakLattamDt) VALUES (%u,%u,NOW())";
+ $values = array($hazifeladatId, $diakId);
+ db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values));
+ }
+ }
+ }
+
+
?> \ No newline at end of file
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 23d9f391..ac911f8b 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
@@ -53,21 +53,32 @@
$values = array($ADAT['oraId']);
$ADAT['hazifeladatId'] = $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values));
$ADAT['oraAdat'] = getOraadatById($oraId);
+ $ADAT['oraAdat']['oraBeirhato'] = oraBeirhato($ADAT['oraAdat']['oraId']);
$ADAT['nevsor'] = getTankorDiakjaiByInterval($ADAT['oraAdat']['tankorId'], __TANEV, $ADAT['oraAdat']['dt'], $ADAT['oraAdat']['dt']);
-
+ $ADAT['kovetkezoOraAdat'] = getKovetkezoOraAdatByOraId($ADAT['oraAdat']['oraId']);
if (__TANAR===true && $action=='hazifeladatBeiras') {
+ $hazifeladatHataridoDt = readVariable($_POST['hazifeladatHataridoDt'],'datetime',null);
$hazifeladatFeltoltesEngedely = readVariable($_POST['hazifeladatFeltoltesEngedely'],'id',0);
if ($hazifeladatId>0) { // update
- $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u WHERE hazifeladatId=%u";
- $values = array($ADAT['hazifeladatLeiras'],$hazifeladatFeltoltesEngedely,$ADAT['hazifeladatId']);
- $r = db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values));
+ if (is_null($hazifeladatHataridoDt)) {
+ $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u WHERE hazifeladatId=%u";
+ $values = array($ADAT['hazifeladatLeiras'],$hazifeladatFeltoltesEngedely,$ADAT['hazifeladatId']);
+ } else {
+ $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s',hazifeladatFeltoltesEngedely=%u,hazifeladatHataridoDt='%s' WHERE hazifeladatId=%u";
+ $values = array($ADAT['hazifeladatLeiras'],$hazifeladatFeltoltesEngedely,$hazifeladatHataridoDt,$ADAT['hazifeladatId']);
+ }
+ $r = db_query($q, array('debug'=>false,'modul'=>'naplo','result'=>'update','values'=>$values));
} elseif ($oraId>0) { // insert
- $q = "INSERT IGNORE INTO oraHazifeladat (hazifeladatLeiras,oraId,hazifeladatFeltoltesEngedely) VALUES ('%s',%u,%u)";
- $values = array($ADAT['hazifeladatLeiras'],$ADAT['oraId'],$hazifeladatFeltoltesEngedely);
+ if (is_null($hazifeladatHataridoDt)) {
+ $q = "INSERT IGNORE INTO oraHazifeladat (hazifeladatLeiras,oraId,hazifeladatFeltoltesEngedely) VALUES ('%s',%u,%u)";
+ $values = array($ADAT['hazifeladatLeiras'],$ADAT['oraId'],$hazifeladatFeltoltesEngedely);
+ } else {
+ $q = "INSERT IGNORE INTO oraHazifeladat (hazifeladatLeiras,oraId,hazifeladatFeltoltesEngedely,hazifeladatHataridoDt) VALUES ('%s',%u,%u,'%s')";
+ $values = array($ADAT['hazifeladatLeiras'],$ADAT['oraId'],$hazifeladatFeltoltesEngedely,$hazifeladatHataridoDt);
+ }
$hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values));
-
}
- if ($oraId>0 && strtotime(date('Y-m-d'))>=strtotime($ADAT['oraAdat']['dt'])) {
+ if ($oraId>0 && $ADAT['oraAdat']['oraBeirhato']===true ) {
$leiras = readVariable($_POST['oraLeiras'],'string');
updateHaladasiNaploOra($oraId, $leiras);
}
@@ -105,9 +116,11 @@
}
if ($diakId>0) {
- $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,diakLattamDt) VALUES (%u,%u,NOW())";
- $values = array($ADAT['hazifeladatId'], $diakId);
- db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values));
+ // $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,diakLattamDt) VALUES (%u,%u,NOW())";
+ // $values = array($ADAT['hazifeladatId'], $diakId);
+ // db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values));
+
+ oraHazifeladatDiakLatta($ADAT['hazifeladatId']);
if ($action=='hazifeladatKesz') {
if ($diakId>0 && $ADAT['hazifeladatId']>0) {
@@ -168,6 +181,7 @@
$ADAT['hazifeladatDiak'] = db_query($q, array('debug'=>false,'modul'=>'naplo','result'=>'indexed','values'=>$values));
}
$ADAT['oraAdat'] = getOraadatById($oraId);
+ $ADAT['oraAdat']['oraBeirhato'] = oraBeirhato($ADAT['oraAdat']['oraId']);
$TOOL['vissza'] = array('tipus'=>'vissza',
'paramName'=>'vissza',
diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarend-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarend-pre.php
index c56b6d87..262ff572 100644
--- a/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarend-pre.php
+++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/orarend/orarend-pre.php
@@ -235,7 +235,14 @@
$_napok = getNapok(array('tolDt'=>$tolDt,'igDt'=>$igDt));
for ($i=0; $i<count($_napok); $i++) {
+ $_dt = $_napok[$i];
$ADAT['napok'][($i+1)] = getNapAdat($_napok[$i]);
+ if ($diakId>0) {
+ $lr = db_connect('naplo');
+ $_HF = getDiakHazifeladatByHatarido($diakId,array('hazifeladatHataridoDt'=>$_dt),$lr);
+ if (is_array($_HF) && count($_HF)>0) $ADAT['hazifeladat'][$_dt] = $_HF;
+ db_close($lr);
+ }
}
if (_POLICY!='public' && is_array($TANKOROK)) {
diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php
index 31dd4699..064bc796 100644
--- a/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php
+++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/tools/getOraAdat-pre.php
@@ -27,9 +27,10 @@
$leiras = readVariable($_POST['leiras'], 'string');
updateHaladasiNaploOra($oraId,$leiras);
}
-
$_JSON['oraAdat'] = $ORAADAT = getOraAdatById($oraId);
-
+ if ($ORAADAT['hazifeladatId']>0) {
+ oraHazifeladatDiakLatta($ORAADAT['hazifeladatId']); // log: diakLattamDt
+ }
if ($dolgozatBeirhato === true && $action=='dolgozatBeiras') {
$dolgozatId = ujDolgozat('',$ORAADAT['tankorId']);
dolgozatModositas($dolgozatId,'',$ORAADAT['dt']);
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css
index 4477f75c..b4449090 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/haladasi.css
@@ -316,6 +316,13 @@
td.cimke { text-align:center; white-space: wrap; background-color: rgba(255,255,255,0.3);}
td.cimke span.cimke {background-color: orange; color:white; font-size:x-small; padding:0px 2px; border-radius: 2px; margin:2px;}
+ td.cimke span.cimke_0 { background-color: #4caf50; }
+ td.cimke span.cimke_1 { background-color: red; }
+ td.cimke span.cimke_2 { background-color: orange; }
+ td.cimke span.cimke_3 { background-color: #3f51b5; }
+ td.cimke span.cimke_4 { background-color: #673ab7; }
+
+
}
@media print {
table.haladasiBejegyzesek thead tr th { border-bottom: solid 1px black;}
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 cc5f8869..a44e9d2d 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
@@ -65,3 +65,8 @@
table.hazifeladatDiak tr td a:hover, fieldset.adatok a:hover { text-decoration:underline; color: cornflowerblue; }
table.hazifeladatDiak tr td.kesz { background-color: lightgreen; color:white; text-align:center }
+
+ input.modosit { background-color: #ffeb3b; }
+ span#hintDt {margin-left:5px; font-size:x-small; color:#888; cursor: copy;}
+ span#hintDt span { padding-right:2px; }
+ span#hintDt:hover { color:black; }
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarend.css b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarend.css
index fab07933..9fc17d27 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarend.css
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/orarend/orarend.css
@@ -90,12 +90,25 @@ table.orarend tbody tr td div.jegyzet {
margin:2px;
font-size: x-small;
}
+table.orarend tbody tr td div.hazifeladat {
+ background-color: #3f51b5; color:white;
+ background-color: #e91e63;
+ border-radius:2px; padding:2px;
+ border: solid 1px white;
+ margin:2px;
+ font-size: x-small;
+}
table.orarend tbody tr td div.jegyzet.publikus0 { }
table.orarend tbody tr td div.jegyzet.publikus1 { border: dashed 1px white; }
table.orarend tbody tr td div.jegyzet.publikus2 { border: dotted 1px white; }
table.orarend tbody tr td div.jegyzet.mase.publikus1 { background-color: #4caf50;}
table.orarend tbody tr td div.jegyzet.mase.publikus2 { background-color: #4caf50;}
+
+table.orarend tbody tr td div.hazifeladat span { padding-right:2px; }
+table.orarend tbody tr td div.hazifeladat.tanarLattam { background-color: #2E7D32;}
+table.orarend tbody tr td div.hazifeladat.diakKesz { background-color: #4CAF50;}
+
table.orarend tbody tr.orarendJegyzetSor th { background-color: orange; border-color: orange; font-weight:normal; font-size: x-small; cursor: pointer}
table.orarend tbody tr.orarendJegyzetSor td.jegyzetContainer { background-color: cornflowerblue; }
table.orarend tbody tr.orarendJegyzetSor td.jegyzetContainer div:hover { border-color: #bbb; transition : border 50ms ease-out;}
@@ -207,6 +220,14 @@ div.unfinished {
table.orarend div.orarendTools span.dolgozat:hover { color: orange;}
table.orarend div.orarendTools span.bezar:hover { color: #f06; }
+ table.orarend span.cimke { margin:0px 1px; border-radius: 2px; font-size:xx-small; color:white; padding: 0px 2px 0px 2px; background-color:#ddd; }
+ table.orarend span.cimke_0 { background-color: #4caf50; }
+ table.orarend span.cimke_1 { background-color: red; }
+ table.orarend span.cimke_2 { background-color: orange; }
+ table.orarend span.cimke_3 { background-color: #3f51b5; }
+ table.orarend span.cimke_4 { background-color: #673ab7; }
+
+
h2.mayorSocialEdition {
text-align: center;
background-color: #f06;
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
index ce15cd4d..fa46ad2c 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/haladasi.phtml
@@ -53,7 +53,7 @@
echo ($ADAT['oraTerheles'][$ADAT['tanarId']]['ossz']['heti']);
}
echo '</th>';
- echo '<th colspan="8" class="fejlec8">';
+ echo '<th colspan="9" class="fejlec8">';
if ($tanarId!='') {
echo '<span class="tanarNev" data-tanarid="'.$tanarId.'">'.$title.'</span>';
if ($ADAT['csakUres']==true) {
@@ -106,7 +106,7 @@
echo ($ADAT['oraTerheles'][$ADAT['tanarId']]['ossz']['heti']);
}
echo '</th>';
- echo '<th colspan="8">';
+ echo '<th colspan="10">';
// if (_SHOW_DAYS_FROM > $_TANEV['kezdesDt']) echo '<input class="gomb" type="submit" name="lapoz" value="<<" tabindex="5" />'."\n";
if (_SHOW_DAYS_FROM > $_TANEV['kezdesDt']) echo '<button class="gomb" type="submit" name="lapoz1" value="prevWeek" tabindex="7"><span class="icon-chevron-left"></span></button>';
@@ -197,7 +197,7 @@
if (__PLUSZBEIRHAT===true && !$jovoDt) echo '<div class="icon-plus-sign rejtMutat"></div>';
echo '</th>'."\n";
// Az első cella a dátum/nap
- echo '<th colspan="8" class="nap">';
+ echo '<th colspan="9" class="nap">';
echo str_replace('-','.',$dt) .'. ';
echo '<span class="napNev">'.$aHetNapjai[(date('w',$time)+6)%7].'</span>';
if ($napInfo2['napszam']!='' || $napInfo['orarendiHet'] != 0) {
@@ -237,7 +237,7 @@
if (__PLUSZBEIRHAT===true) putUjOra(array('dt'=>$dt, 'ora'=>$j));
}
} else {
- echo '<tr><th colspan="9" class="nincsOra">'._NINCS_ORAJA.'</th></tr>';
+ echo '<tr><th colspan="10" class="nincsOra">'._NINCS_ORAJA.'</th></tr>';
// if ($tanitasiNap && strtotime(date('Y-m-d'))>=strtotime($dt)) {
// if (
// (strtotime(date('Y-m-d'))>=strtotime($dt)
@@ -523,9 +523,14 @@
for ($c = 0; $c<count($ADAT['cimkek']); $c++) {
if (in_array($ADAT['cimkek'][$c]['cimkeId'], $dOra['cimke'])) $_C[] = $ADAT['cimkek'][$c]['cimkeLeiras'];
}
- if (count($_C)>0) echo '<span class="cimke">'.implode('</span> <span class="cimke">',$_C).'</span>';
+ if (count($_C)>0) { // vigyázz, csak egy címke engedélyezett! (egyelőre, különben sérül a getHaladasi)
+ $_cimkeId = $dOra['cimke'][0];
+ echo '<span class="cimke cimke_'.$_cimkeId.'">'.implode('</span> <span class="cimke">',$_C).'</span>';
+ }
}
}
+ echo '</td>';
+ echo '<td class="cimke">';
echo '<a href="'.href('index.php?page=naplo&sub=haladasi&f=hazifeladat&oraId='.$dOra['oraId'].'&hazifeladatId='.$ADAT['tankorHazifeladat'][ $dOra['oraId'] ]).'" class="onClickUpdateWindow" title="'._HAZIFELADAT.'">';
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 e03ac99a..83d5d6f1 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
@@ -107,7 +107,7 @@
echo '<input type="hidden" name="hazifeladatId" value="'.$ADAT['hazifeladatId'].'"/>';
echo '<fieldset class="adatok"><legend>'.ucfirst(_TANANYAG).'</legend>'."\n";
- if ($ADAT['oraAdat']['oraId']>0 && strtotime(date('Y-m-d'))>=strtotime($ADAT['oraAdat']['dt'])) {
+ if ($ADAT['oraAdat']['oraId']>0 && strtotime(date('Y-m-d'))>=strtotime($ADAT['oraAdat']['dt']) && $ADAT['oraAdat']['oraBeirhato']===true) {
echo '<input type="text" name="oraLeiras" value="'.$ADAT['oraAdat']['leiras'].'" style="width:70%">';
echo '<input type="submit">';
} else {
@@ -116,6 +116,7 @@
echo '</fieldset>'."\n";
echo '<fieldset class="adatok"><legend>'._HAZIFELADAT.'</legend>'."\n";
+
echo '<textarea name="hazifeladatLeiras" class="wysiwyg" rows="10" cols="80" style="width:100%">';
echo htmlspecialchars($ADAT['hazifeladatAdat']['hazifeladatLeiras']);
echo '</textarea>';
@@ -151,6 +152,13 @@
echo '<input type="checkbox" name="hazifeladatFeltoltesEngedely" id="hazifeladatFeltoltesEngedelyChk" value="1" '.$_CHK.'/>';
echo '<label for="hazifeladatFeltoltesEngedelyChk">Diák/Szülő házi feladat csatolás engedélyezve</label>';
echo '</div>';
+ echo 'Leadási határidő: <input type="text" class="datetime" name="hazifeladatHataridoDt" id="hazifeladatHataridoDt" value="'.$ADAT['hazifeladatAdat']['hazifeladatHataridoDt'].'" placeholder="nem kötelező">';
+ if ($ADAT['kovetkezoOraAdat']['oraId']>0) {
+ echo '<span id="hintDt" data-hintdt="'.$ADAT['kovetkezoOraAdat']['dt'].' 08:00:00">';
+ echo '<span class="icon-circle-arrow-left"></span>';
+ echo 'következő tervezett óra: '.$ADAT['kovetkezoOraAdat']['dt'];
+ echo '</span>';
+ }
echo '<div style="width:100%; margin:auto; text-align:center;">';
echo '<input type="submit" class="btnSubmit">';
echo '</div>';
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarend.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarend.phtml
index 5c75bfb6..f36850bc 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarend.phtml
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/orarend/orarend.phtml
@@ -24,11 +24,7 @@
function putOrarend($ADAT) {
global $aHetNapjai,$skin;
- // $ADAT['utolsoorak'][$teremId]['oraId']
-
-
/* Képzés-Mátrix */
- //dump($ADAT['kepzesOraterv']);
if (is_array($ADAT['kepzesOraterv']) && count($ADAT['kepzesOraterv'])>0) {
$kepzes_figyel = true;
$KEPZES_MATRIX[2]=$ADAT['kepzesOraterv']['első nyelv']['sum'];
@@ -37,7 +33,6 @@
+$ADAT['kepzesOraterv']['kötelezően választható']['sum']
+$ADAT['kepzesOraterv']['szabadon választható']['sum']
;
- //dump($KEPZES_MATRIX);
} else $kepzes_figyel = false;
// ----------------
$multiTelephely = (count($ADAT['orarend']['telephelyIdk'])>1);
@@ -152,10 +147,10 @@
}
echo '<tbody>'."\n";
// echo '<caption>'.$het.'. heti órarend</caption>';
- if (count($ADAT['dolgozat']['tervezett'])>0 || count($ADAT['jegyzet'])>0) { $_jegyzetSorCss = ''; } else { $_jegyzetSorStyle = 'display:none;'; }
+ if (count($ADAT['dolgozat']['tervezett'])>0 || count($ADAT['jegyzet'])>0 || (is_array($ADAT['hazifeladat']) && count($ADAT['hazifeladat'])>0)) { $_jegyzetSorCss = ''; } else { $_jegyzetSorStyle = 'display:none;'; }
echo '<tr id="orarendJegyzetSor" class="orarendJegyzetSor" style="'.$_jegyzetSorStyle.'">';
echo '<th>';
- echo 'dolgozatok, jegyzetek';
+ echo 'dolgozatok, jegyzetek, határidők';
// echo '<span class="icon-info-sign"></span>';
echo '</th>';
for ($nap=1;$nap<=$ADAT['hetiMaxNap'];$nap++) {
@@ -192,6 +187,30 @@
echo '</div>';
}
}
+
+ //for ($d=0; $d<count($ADAT['hazifeladat'][$dt]); $d++) {
+ if (is_array($ADAT['hazifeladat'][$dt]) && count($ADAT['hazifeladat'][$dt])>0) {
+ for ($_h=0; $_h<count($ADAT['hazifeladat'][$dt]); $_h++) {
+ $_HF = $ADAT['hazifeladat'][$dt][$_h];
+ $_oraId = $_HF['oraId'];
+ $_str = '';
+ // hazifeladatDiakStatus, diakLattamDt, tanarLattamDt, hazifeladatFeltoltesiEngedely
+ if ($_HF['hazifeladatFeltoltesEngedely']) {
+ if ($_HF['tanarLattamDt']!='') { $_hfIcon = 'icon-ok-sign'; $_str = 'elfogadva'; }
+ elseif ($_HF['hazifeladatDiakStatus']!='') { $_hfIcon = 'icon-ok-circle'; $_str = 'feltöltve';}
+ else {$_hfIcon = 'icon-paper-clip-alt'; $_str = 'leadási határidő';}
+ } else {
+ if ($_HF['tanarLattamDt']!='') { $_hfIcon = 'icon-ok'; $_str = 'elfogadva';}
+ elseif ($_HF['hazifeladatDiakStatus']!='') { $_hfIcon = 'icon-ok-circle'; $_str = 'kész';}
+ else {$_hfIcon = 'icon-home-alt'; $_str='határidő';}
+ }
+ if ($_HF['tanarLattamDt']!='') $_hfClass = 'tanarLattam';
+ elseif ($_HF['hazifeladatDiakStatus']!='') $_hfClass = 'diakKesz';
+ else $_hfClass = '';
+ echo '<div class="hazifeladat oraAdat '.$_hfClass.'" data-oraid="'.$_oraId.'" data-hazifeladatid="'.$x.'"><span class="'.$_hfIcon.'"></span>házifeladat '.$_str.'<br/>'.$_HF['tankorNev'].'</div>';
+ }
+ }
+ //}
echo '</td>';
}
echo '</tr>';
@@ -274,6 +293,11 @@
echo '<span class="'.$_icon.'" title="h.f." style="color:'.$_hfcolor.'; padding-right:2px;"></span>';
}
+ if ($_ORA['cimkeLeiras']!='') {
+ $_cimkeMod = intval($_ORA['cimkeId']) % 5;
+ echo '<span class="cimke cimke_'.$_cimkeMod.'">'.$_ORA['cimkeLeiras'].'</span>';
+ }
+
if (is_array($_hianyzasAdat)) {
echo '<span class="hianyzasTicker '.ekezettelen($_hianyzasAdat['hTipus']).' '.ekezettelen($_hianyzasAdat['statusz']).' '.ekezettelen($_hianyzasAdat['igazolas']).'">';
if ($_hianyzasAdat['hTipus']=='hiányzás')
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml
index 24304570..a7302388 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/uzeno/uzeno.phtml
@@ -124,7 +124,8 @@
$href_szal = href('index.php?page=naplo&sub=uzeno&f=uzeno&szalId='.$D['feladoId'].'_'.$D['feladoTipus'].'_'.$D['cimzettId'].'_'.$D['cimzettTipus'].'&mId='.$D['mId'],array('sessionID','lang','policy'));
// $D['txt'] = '<a href="'.$href_szal.'">'.nl2br(htmlspecialchars($D['txt'])).'</a>';
- $D['txt'] = makelinksclickable(nl2br(supertext($D['txt'])));
+ // $D['txt'] = makelinksclickable(nl2br(supertext($D['txt'])));
+ $D['txt'] = (nl2br(supertext($D['txt'])));
echo (mb_substr($D['txt'],0,2000,'UTF-8'));
if (mb_strlen($D['txt'],'UTF-8')>2000) {
echo ' <a class="more" href="'.$href.'">...</a>';
diff --git a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/hazifeladat.jquery.min.js b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/hazifeladat.jquery.min.js
index 4d225a86..a8e1d250 100644
--- a/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/hazifeladat.jquery.min.js
+++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/hazifeladat.jquery.min.js
@@ -9,4 +9,11 @@ $(function() {
}
});
+ $('#hintDt').click(function(){
+ // console.log($('#hazifeladatHataridoDt').val());
+ $('#hazifeladatHataridoDt').addClass('modosit');
+ $('#hazifeladatHataridoDt').val($('#hintDt').data('hintdt'));
+ });
+
+
}); \ 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 df72b0cb..b5d19f89 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
@@ -727,18 +727,30 @@ processJSONOraAdat = function(adat) {
}
}
+
// content += '<h3>Óra kapcsolatai</h3>';
// content += '<ul><li>Beírt mulasztások száma: '+'n/a'+'</li>';
// content += '<li>Beírt jegyek száma: '+'n/a'+'</li>';
// content += '</ul>';
content += '<h3>Házi feladat ';
- content += '<a href="'+href({'page':'naplo','sub':'haladasi','f':'hazifeladat','oraId':adat['oraAdat']['oraId']})+'"><span class="icon-resize-full"></span></a>';
+ content += '<a href="'+href({'page':'naplo','sub':'haladasi','f':'hazifeladat','oraId':adat['oraAdat']['oraId']})+'">';
+ if (adat['oraAdat']['hazifeladatFeltoltesEngedely']==1) {
+ content += '<span class="icon-paper-clip"></span>';
+ } else {
+ content += '<span class="icon-resize-full"></span>';
+ }
+ content += '</a>';
content += '</h3>';
if (adat['oraAdat']['hazifeladatId']>0) {
- content += '<div style="border-left: solid 0px #888; padding: 4px; background-color:#444;">';
+ if (adat['oraAdat']['hazifeladatHataridoDt']!=null) {
+ content += '<ul><li style="font-style:x-small;">Határidő: '+adat['oraAdat']['hazifeladatHataridoDt']+' <span class="icon-time"></span></li></ul>';
+ }
+ if (adat['oraAdat']['hazifeladatLeiras']!='') {
+ content += '<div style="border-left: solid 0px #888; padding: 4px; background-color: #e91e63; font-size: x-small;">';
content += adat['oraAdat']['hazifeladatLeiras'];
content += '</div>';
+ }
}
content += '<h3>Dolgozatok</h3>';