aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mayor-orig/mayor-base/log/mayor-base.rev2
-rw-r--r--mayor-orig/mayor-felveteli/log/mayor-felveteli.rev2
-rw-r--r--mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev2
-rw-r--r--mayor-orig/mayor-installer-orig/log/mayor-installer.rev2
-rw-r--r--mayor-orig/mayor-installer-sulix/log/mayor-installer-sulix.rev2
-rw-r--r--mayor-orig/mayor-jatek/log/mayor-jatek.rev2
-rw-r--r--mayor-orig/mayor-locales-de_DE/log/mayor-locales-de_DE.rev2
-rw-r--r--mayor-orig/mayor-locales-en_US/log/mayor-locales-en_US.rev2
-rw-r--r--mayor-orig/mayor-locales-jp_JP/log/mayor-locales-jp_JP.rev2
-rw-r--r--mayor-orig/mayor-naplo/log/mayor-naplo.rev2
-rw-r--r--mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/hazifeladat-pre.php26
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/css/haladasi/hazifeladat.css2
-rw-r--r--mayor-orig/mayor-naplo/www/skin/classic/module-naplo/html/haladasi/hazifeladat.phtml81
-rw-r--r--mayor-orig/mayor-portal/log/mayor-portal.rev2
-rw-r--r--mayor-orig/mayor-wiki/log/mayor-wiki.rev2
-rw-r--r--mayor-orig/md5sum26
-rw-r--r--mayor-orig/rev.txt2
-rw-r--r--rev.txt2
18 files changed, 128 insertions, 35 deletions
diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-base/log/mayor-base.rev
+++ b/mayor-orig/mayor-base/log/mayor-base.rev
@@ -1 +1 @@
-4635
+4636
diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev
+++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev
@@ -1 +1 @@
-4635
+4636
diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev
+++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev
@@ -1 +1 @@
-4635
+4636
diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev
+++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev
@@ -1 +1 @@
-4635
+4636
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 2996c056..b02620cf 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 @@
-4635
+4636
diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev
+++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev
@@ -1 +1 @@
-4635
+4636
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 2996c056..b02620cf 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 @@
-4635
+4636
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 2996c056..b02620cf 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 @@
-4635
+4636
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 2996c056..b02620cf 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 @@
-4635
+4636
diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev
+++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev
@@ -1 +1 @@
-4635
+4636
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 a26b39fa..23d9f391 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,6 +53,7 @@
$values = array($ADAT['oraId']);
$ADAT['hazifeladatId'] = $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values));
$ADAT['oraAdat'] = getOraadatById($oraId);
+ $ADAT['nevsor'] = getTankorDiakjaiByInterval($ADAT['oraAdat']['tankorId'], __TANEV, $ADAT['oraAdat']['dt'], $ADAT['oraAdat']['dt']);
if (__TANAR===true && $action=='hazifeladatBeiras') {
$hazifeladatFeltoltesEngedely = readVariable($_POST['hazifeladatFeltoltesEngedely'],'id',0);
@@ -71,16 +72,31 @@
updateHaladasiNaploOra($oraId, $leiras);
}
} elseif (__TANAR===true && $action=='lattam') {
+ $lr = db_connect('naplo');
+ db_start_trans($lr);
$lattamDiakIds = readVariable($_POST['lattam'],'id');
- $q = "UPDATE oraHazifeladatDiak SET tanarLattamDt=null WHERE hazifeladatId=%u";
- $values = array($ADAT['hazifeladatId'], $_diakId);
- db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values));
+ $megsemlattamDiakIds = readVariable($_POST['megsemlattam'],'id');
for ($i=0; $i<count($lattamDiakIds); $i++) {
$_diakId = $lattamDiakIds[$i];
- $q = "UPDATE oraHazifeladatDiak SET tanarLattamDt=NOW() WHERE hazifeladatId=%u AND diakId=%u";
$values = array($ADAT['hazifeladatId'], $_diakId);
- db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values));
+ $q = "SELECT count(*) AS db FROM oraHazifeladatDiak WHERE hazifeladatId=%u AND diakId=%u";
+ $db = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values),$lr);
+ if ($db==1) {
+ $q = "UPDATE oraHazifeladatDiak SET tanarLattamDt=NOW() WHERE hazifeladatId=%u AND diakId=%u";
+ $r = db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values),$lr);
+ } else {
+ $q = "INSERT IGNORE INTO oraHazifeladatDiak (hazifeladatId,diakId,tanarLattamDt) VALUES (%u,%u,NOW())";
+ db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values),$lr);
+ }
+ }
+ for ($i=0; $i<count($megsemlattamDiakIds); $i++) {
+ $_diakId = $megsemlattamDiakIds[$i];
+ $q = "UPDATE oraHazifeladatDiak SET tanarLattamDt=null WHERE hazifeladatId=%u AND diakId=%u";
+ $values = array($ADAT['hazifeladatId'], $_diakId);
+ db_query($q, array('modul'=>'naplo','result'=>'update','values'=>$values),$lr);
}
+ db_commit($lr);
+ db_close($lr);
} elseif (__DIAK===true) {
if (defined('__USERDIAKID') && __USERDIAKID>0) {
$diakId=__USERDIAKID;
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 127dfa75..cc5f8869 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
@@ -61,5 +61,7 @@
table.hazifeladatDiak tr td a, fieldset.adatok a { color: black; }
+ table.hazifeladatDiak tr td a:visited, fieldset.adatok a:visited { color: #888; }
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 }
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 cddfd0e8..e03ac99a 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
@@ -88,6 +88,18 @@
}
} else { ////////////////////////////////////////////////////////////////////////////////////
+
+ if (__USERTANARID!=$ADAT['oraAdat']['ki']) { // nem saját óra
+
+ echo '<fieldset class="adatok"><legend>'._HAZIFELADAT.'</legend>'."\n";
+ if ($ADAT['hazifeladatAdat']['hazifeladatLeiras']=='')
+ { echo '<p style="color:#aaa;">még nincs kitöltve</p>'; }
+ else
+ { echo ($ADAT['hazifeladatAdat']['hazifeladatLeiras']); }
+ echo '</fieldset>'."\n";
+
+ } else { // saját óra
+
echo '<script src="//cdn.ckeditor.com/4.14.0/standard/ckeditor.js"></script>';
if ($skin != 'ajax') formBegin(array('class'=>'hazifeladat'));
echo '<input type="hidden" name="action" value="hazifeladatBeiras"/>';
@@ -145,31 +157,93 @@
echo '</fieldset>'."\n";
if ($skin != 'ajax') formEnd();
+ } // saját óra
+
if (count($ADAT['hazifeladatDiak'])>0) {
echo '<fieldset class="adatok">';
echo '<legend>Visszajelzések</legend>';
putHazifeladatDiak($ADAT);
echo '</fieldset>';
}
- }
+ }
}
function putHazifeladatDiak($ADAT) {
if (count($ADAT['hazifeladatDiak'])==0) return false;
+ for ($i=0; $i<count($ADAT['hazifeladatDiak']); $i++) {
+ $D = $ADAT['hazifeladatDiak'][$i];
+ $DIAKHF[$D['diakId']] = $D;
+ }
+
+ echo formBegin();
+ echo '<input type="hidden" name="action" value="lattam" />';
+ echo '<input type="hidden" name="hazifeladatId" value="'.$ADAT['hazifeladatId'].'" />';
+ echo '<table class="hazifeladatDiak" cellpadding="1" cellspacing="1">';
+ echo '<thead>';
+ if (__NAPLOADMIN===true || __VEZETOSEG===true)
+ echo '<tr><th>diák</th><th>látta</th><th colspan="2">státusz</th><th colspan="1">csatolmány</th><th>láttam</th></tr>';
+ else
+ echo '<tr><th>diák</th><th colspan="2">státusz</th><th colspan="1">csatolmány</th><th>láttam</th></tr>';
+ echo '</thead>';
+
+ if (is_array($ADAT['nevsor']['nevek']))
+ foreach ($ADAT['nevsor']['nevek'] as $diakId => $ITEM) {
+ $D = $DIAKHF[$diakId];
+ echo '<tr>';
+ echo '<td class="diakNev diakAdat" data-diakid="'.$diakId.'">'.$ITEM['diakNev'].'</td>';
+ if (__NAPLOADMIN===true || __VEZETOSEG===true) echo '<td>'.$D['diakLattamDt'].'</td>';
+ echo '<td colspan="2" class="'.ekezettelen($D['hazifeladatDiakStatus']).'">'.$D['hazifeladatDiakStatus'].'</td>';
+ //echo '<td>'.$D['hazifeladatDiakMegjegyzes'].'</td>';
+
+ $ADAT['dir'] = 'naplo/haladasi/hazifeladat';
+ $ADAT['file'] = $D['hazifeladatDiakFilename'];
+ $href = href('index.php?page=session&f=download&dir='.$ADAT['dir'].'&file='.$ADAT['file'].'&download=true');
+ echo '<td>';
+ if ($D['hazifeladatDiakOrigFilename']!='') {
+ echo '<a href="'.$href.'" target="_blank">'.htmlspecialchars($D['hazifeladatDiakOrigFilename']).'</a> <span class="icon-paper-clip"></span>';
+ }
+ echo '</td>';
+ echo '<td style="text-align: center">';
+// if ($ADAT['hazifeladatDiak']['hazifeladatDiakStatus']=='kész') {
+ if (__TANAR===true && __USERTANARID==$ADAT['oraAdat']['ki']) {
+ if ($D['tanarLattamDt']=='') {
+ echo '<button type="submit" name="lattam[]" value="'.$diakId.'" class="btnLattamStatusz"><span class="icon-ok-sign"></span> láttam!</button>';
+ } else {
+ echo '<button type="submit" name="megsemlattam[]" value="'.$diakId.'" class="btnLattamStatusz lattam"><span class="icon-ok-sign"></span> láttam.</button>';
+ }
+ } else {
+ if ($D['tanarLattamDt']!='') {echo '<span class="icon-ok-sign" style="color:lightblue"></span>';}
+ }
+// }
+ echo '</td>';
+ echo '</tr>';
+ }
+ echo '</table>';
+ echo formEnd();
+
+ }
+
+ function putHazifeladatDiakOrig($ADAT) {
+
+ if (count($ADAT['hazifeladatDiak'])==0) return false;
+
echo formBegin();
echo '<input type="hidden" name="action" value="lattam" />';
echo '<input type="hidden" name="hazifeladatId" value="'.$ADAT['hazifeladatId'].'" />';
echo '<table class="hazifeladatDiak" cellpadding="1" cellspacing="1">';
echo '<thead>';
- echo '<tr><th>diák</th><th>látta</th><th colspan="2">státusz</th><th colspan="1">csatolmány</th><th>láttam</th></tr>';
+ if (__NAPLOADMIN===true || __VEZETOSEG===true)
+ echo '<tr><th>diák</th><th>látta</th><th colspan="2">státusz</th><th colspan="1">csatolmány</th><th>láttam</th></tr>';
+ else
+ echo '<tr><th>diák</th><th colspan="2">státusz</th><th colspan="1">csatolmány</th><th>láttam</th></tr>';
echo '</thead>';
for ($i=0; $i<count($ADAT['hazifeladatDiak']); $i++) {
$D = $ADAT['hazifeladatDiak'][$i];
echo '<tr>';
echo '<td class="diakNev diakAdat" data-diakid="'.$D['diakId'].'">'.$D['diakNev'].'</td>';
- echo '<td>'.$D['diakLattamDt'].'</td>';
+ if (__NAPLOADMIN===true || __VEZETOSEG===true) echo '<td>'.$D['diakLattamDt'].'</td>';
echo '<td>'.$D['hazifeladatDiakStatus'].'</td>';
echo '<td>'.$D['hazifeladatDiakMegjegyzes'].'</td>';
@@ -198,6 +272,7 @@
}
echo '</table>';
echo formEnd();
+
}
?>
diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-portal/log/mayor-portal.rev
+++ b/mayor-orig/mayor-portal/log/mayor-portal.rev
@@ -1 +1 @@
-4635
+4636
diff --git a/mayor-orig/mayor-wiki/log/mayor-wiki.rev b/mayor-orig/mayor-wiki/log/mayor-wiki.rev
index 2996c056..b02620cf 100644
--- a/mayor-orig/mayor-wiki/log/mayor-wiki.rev
+++ b/mayor-orig/mayor-wiki/log/mayor-wiki.rev
@@ -1 +1 @@
-4635
+4636
diff --git a/mayor-orig/md5sum b/mayor-orig/md5sum
index 2c28df09..64df47f5 100644
--- a/mayor-orig/md5sum
+++ b/mayor-orig/md5sum
@@ -1,13 +1,13 @@
-Revision 4635
-41562a4824f29be1ae0372b7d502aef2 mayor-fenntarto-rev4635.tgz
-536f0fc97bfd4fd2f31ced5a11958fd4 mayor-installer-sulix-rev4635.tgz
-a27fd616a31df8a1d6918366fe6fb5ec mayor-wiki-rev4635.tgz
-af3e635ff220b8561908e52d72db80db mayor-installer-rev4635.tgz
-2b6b81a1158df50b1bbd35a929f43bbe mayor-portal-rev4635.tgz
-85b8f21103e2c43295b03e92c90ce3c7 mayor-felveteli-rev4635.tgz
-73f734ee3beca396c19c4d6d127646d5 mayor-jatek-rev4635.tgz
-bb88ea04ffd8ec678bcd3125251f85d9 mayor-locales-jp_JP-rev4635.tgz
-e36c28d0e9ec82814481f9a5cae7e51a mayor-locales-de_DE-rev4635.tgz
-973b58703d7151c5aac3a7bd61e89922 mayor-locales-en_US-rev4635.tgz
-efef72ed8fee0ecddf5f155427138e33 mayor-naplo-rev4635.tgz
-84154bb49db92bf6d4f34fa3e52873c6 mayor-base-rev4635.tgz
+Revision 4636
+3984cb91cd9401421a7c228920d9afa8 mayor-fenntarto-rev4636.tgz
+e9dc0d99d56ed7ce0feac0b88d517b49 mayor-installer-sulix-rev4636.tgz
+9ed22b632285302d049d4d615b0e65cf mayor-wiki-rev4636.tgz
+2ac683038891b9b45e5c6e49f41e90f6 mayor-installer-rev4636.tgz
+64a4bd3f5dedd3dd85b20f6a16add9a6 mayor-portal-rev4636.tgz
+6730cc3657155fccbcb90e01c1698b62 mayor-felveteli-rev4636.tgz
+43524fe82ae26bc04368eb604585f8d7 mayor-jatek-rev4636.tgz
+e7a3f8a719957e93270e9957da4ac705 mayor-locales-jp_JP-rev4636.tgz
+6388bc1e38d1010b7232fee7e0cd6805 mayor-locales-de_DE-rev4636.tgz
+43cc1f581483a40a268865af7f2f9353 mayor-locales-en_US-rev4636.tgz
+9049ffb272a96153f0f33ff7e52b63df mayor-naplo-rev4636.tgz
+ed384ad9581b23262a1266d1fbd25d5c mayor-base-rev4636.tgz
diff --git a/mayor-orig/rev.txt b/mayor-orig/rev.txt
index 2996c056..b02620cf 100644
--- a/mayor-orig/rev.txt
+++ b/mayor-orig/rev.txt
@@ -1 +1 @@
-4635
+4636
diff --git a/rev.txt b/rev.txt
index 2996c056..b02620cf 100644
--- a/rev.txt
+++ b/rev.txt
@@ -1 +1 @@
-4635
+4636