diff options
Diffstat (limited to 'mayor-orig')
20 files changed, 81 insertions, 35 deletions
diff --git a/mayor-orig/mayor-base/log/mayor-base.rev b/mayor-orig/mayor-base/log/mayor-base.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-base/log/mayor-base.rev +++ b/mayor-orig/mayor-base/log/mayor-base.rev @@ -1 +1 @@ -4632 +4633 diff --git a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev +++ b/mayor-orig/mayor-felveteli/log/mayor-felveteli.rev @@ -1 +1 @@ -4632 +4633 diff --git a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev +++ b/mayor-orig/mayor-fenntarto/log/mayor-fenntarto.rev @@ -1 +1 @@ -4632 +4633 diff --git a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-installer-orig/log/mayor-installer.rev +++ b/mayor-orig/mayor-installer-orig/log/mayor-installer.rev @@ -1 +1 @@ -4632 +4633 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 5becefaa..2e58f957 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 @@ -4632 +4633 diff --git a/mayor-orig/mayor-jatek/log/mayor-jatek.rev b/mayor-orig/mayor-jatek/log/mayor-jatek.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-jatek/log/mayor-jatek.rev +++ b/mayor-orig/mayor-jatek/log/mayor-jatek.rev @@ -1 +1 @@ -4632 +4633 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 5becefaa..2e58f957 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 @@ -4632 +4633 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 5becefaa..2e58f957 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 @@ -4632 +4633 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 5becefaa..2e58f957 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 @@ -4632 +4633 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 65b3a584..efe43f5d 100644 --- a/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql +++ b/mayor-orig/mayor-naplo/install/module-naplo/mysql/tanev.sql @@ -147,6 +147,7 @@ CREATE TABLE `oraHazifeladat` ( `hazifeladatId` int(10) unsigned NOT NULL AUTO_INCREMENT, `oraId` int(10) unsigned DEFAULT NULL, `hazifeladatLeiras` text COLLATE utf8_hungarian_ci NOT NULL, + `hazifeladatFeltoltesEngedely` tinyint(3) unsigned DEFAULT '0', PRIMARY KEY (`hazifeladatId`), UNIQUE KEY `oraId` (`oraId`), CONSTRAINT `oraHazifeladat_ibfk_1` FOREIGN KEY (`oraId`) REFERENCES `ora` (`oraId`) ON DELETE CASCADE ON UPDATE CASCADE diff --git a/mayor-orig/mayor-naplo/log/mayor-naplo.rev b/mayor-orig/mayor-naplo/log/mayor-naplo.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-naplo/log/mayor-naplo.rev +++ b/mayor-orig/mayor-naplo/log/mayor-naplo.rev @@ -1 +1 @@ -4632 +4633 diff --git a/mayor-orig/mayor-naplo/update/pre004632-1-naplo.sql b/mayor-orig/mayor-naplo/update/pre004632-1-naplo.sql new file mode 100644 index 00000000..7a2be452 --- /dev/null +++ b/mayor-orig/mayor-naplo/update/pre004632-1-naplo.sql @@ -0,0 +1,18 @@ +DELIMITER $$ +DROP PROCEDURE IF EXISTS upgrade_database_4632 $$ + +CREATE PROCEDURE upgrade_database_4632() +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='hazifeladatFeltoltesEngedely' +) THEN + +ALTER TABLE `oraHazifeladat` ADD `hazifeladatFeltoltesEngedely` tinyint unsigned DEFAULT 0; + +END IF; + +END $$ +DELIMITER ; +CALL upgrade_database_4632(); 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 d0f4cb6b..a26b39fa 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 @@ -55,14 +55,14 @@ $ADAT['oraAdat'] = getOraadatById($oraId); if (__TANAR===true && $action=='hazifeladatBeiras') { - + $hazifeladatFeltoltesEngedely = readVariable($_POST['hazifeladatFeltoltesEngedely'],'id',0); if ($hazifeladatId>0) { // update - $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s' WHERE hazifeladatId=%u"; - $values = array($ADAT['hazifeladatLeiras'],$ADAT['hazifeladatId']); + $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)); } elseif ($oraId>0) { // insert - $q = "INSERT IGNORE INTO oraHazifeladat (hazifeladatLeiras,oraId) VALUES ('%s',%u)"; - $values = array($ADAT['hazifeladatLeiras'],$ADAT['oraId']); + $q = "INSERT IGNORE INTO oraHazifeladat (hazifeladatLeiras,oraId,hazifeladatFeltoltesEngedely) VALUES ('%s',%u,%u)"; + $values = array($ADAT['hazifeladatLeiras'],$ADAT['oraId'],$hazifeladatFeltoltesEngedely); $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values)); } 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 1169d008..127dfa75 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 @@ -24,8 +24,14 @@ form button.btnHfStatusz:hover span { color: white; } form button.btnHfStatusz.kesz:hover span { color: orange } + #hazifeladatFeltoltesEngedely { + padding:15px 0px 15px 0px; margin:5px 0px; text-align:center; border-radius:2px; background-color:#eee + } + #hazifeladatFeltoltesEngedely.engedelyezve { background-color: #c8e6c9; } - + input.btnSubmit { + margin: 5px auto 5px auto; + } /*---*/ form button.btnLattamStatusz { 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 a8540faa..cddfd0e8 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 @@ -36,8 +36,9 @@ echo '<fieldset class="adatok '.$_class.'"><legend>'._HAZIFELTOLTES.'</legend>'."\n"; echo formBegin(array('enctype'=>'multipart/form-data')); - if (FILE_UPLOAD_ENABLED===false || $ADAT['hazifeladatDiak']['tanarLattamDt']!='' || $ADAT['hazifeladatDiak']['hazifeladatDiakStatus']=='kész') { + if (FILE_UPLOAD_ENABLED===false || $ADAT['hazifeladatAdat']['hazifeladatFeltoltesEngedely'] == 0 || $ADAT['hazifeladatDiak']['tanarLattamDt']!='' || $ADAT['hazifeladatDiak']['hazifeladatDiakStatus']=='kész') { if (FILE_UPLOAD_ENABLED===false) $mert = ', mert a feltöltés le van tiltva'; + elseif ($ADAT['hazifeladatAdat']['hazifeladatFeltoltesEngedely']==0) $mert = ', mert a tanár nem kért ide csatolt házi feladatot'; elseif ($ADAT['hazifeladatDiak']['tanarLattamDt']!='') $mert = ', mert már láttamozta a tanár'; elseif ($ADAT['hazifeladatDiak']['hazifeladatDiakStatus']=='kész') $mert = ', mert már késznek jelölted a feladatot'; echo '<p style="color:#888">nem tudsz új filet feltölteni'.$mert.'</p>'; @@ -131,11 +132,19 @@ removeButtons: 'Cut,Copy,Paste,PasteText,PasteFromWord,Anchor,Underline,Strike,SpecialChar,HorizontalRule' }); </script>"; - echo '<input type="submit">'; + + $_CHK = ($ADAT['hazifeladatAdat']['hazifeladatFeltoltesEngedely']==1) ? 'checked="checked"':''; + $_cls = ($ADAT['hazifeladatAdat']['hazifeladatFeltoltesEngedely']==1) ? 'class="engedelyezve"':''; + echo '<div id="hazifeladatFeltoltesEngedely" '.$_cls.'>'; + 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 '<div style="width:100%; margin:auto; text-align:center;">'; + echo '<input type="submit" class="btnSubmit">'; + echo '</div>'; echo '</fieldset>'."\n"; if ($skin != 'ajax') formEnd(); - if (count($ADAT['hazifeladatDiak'])>0) { echo '<fieldset class="adatok">'; echo '<legend>Visszajelzések</legend>'; 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 new file mode 100644 index 00000000..4d225a86 --- /dev/null +++ b/mayor-orig/mayor-naplo/www/skin/classic/module-naplo/javascript/haladasi/hazifeladat.jquery.min.js @@ -0,0 +1,12 @@ +$(function() { + + $('input[type="checkbox"]').click(function(){ + if($(this).is(":checked")){ + $('#hazifeladatFeltoltesEngedely').addClass('engedelyezve'); + } + else if($(this).is(":not(:checked)")){ + $('#hazifeladatFeltoltesEngedely').removeClass('engedelyezve'); + } + }); + +});
\ No newline at end of file diff --git a/mayor-orig/mayor-portal/log/mayor-portal.rev b/mayor-orig/mayor-portal/log/mayor-portal.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-portal/log/mayor-portal.rev +++ b/mayor-orig/mayor-portal/log/mayor-portal.rev @@ -1 +1 @@ -4632 +4633 diff --git a/mayor-orig/mayor-wiki/log/mayor-wiki.rev b/mayor-orig/mayor-wiki/log/mayor-wiki.rev index 5becefaa..2e58f957 100644 --- a/mayor-orig/mayor-wiki/log/mayor-wiki.rev +++ b/mayor-orig/mayor-wiki/log/mayor-wiki.rev @@ -1 +1 @@ -4632 +4633 diff --git a/mayor-orig/md5sum b/mayor-orig/md5sum index f05e11a2..6140f4bc 100644 --- a/mayor-orig/md5sum +++ b/mayor-orig/md5sum @@ -1,13 +1,13 @@ -Revision 4632 -44a5b90dd6fabb18bb59eeadd4c4eda8 mayor-fenntarto-rev4632.tgz -5e9912753257eb8957b2d86c5ffffd32 mayor-installer-sulix-rev4632.tgz -19c632c43d212a3593cfe10e8845024f mayor-wiki-rev4632.tgz -5a1159e11a29a4cdeed5178ed8a8ce42 mayor-installer-rev4632.tgz -7c2ae17a4dfaf7c07cfe4059441451d1 mayor-portal-rev4632.tgz -6713324c051247ac2c1cd4fbb0611cae mayor-felveteli-rev4632.tgz -770ad6103604bdc22def1727846d4f14 mayor-jatek-rev4632.tgz -87a235db8d603de9e06bc4af76c79926 mayor-locales-jp_JP-rev4632.tgz -5353bfe9f7235d49716def67f67bea6a mayor-locales-de_DE-rev4632.tgz -1cd40690736747a537f2c6d2410b2f36 mayor-locales-en_US-rev4632.tgz -e3e81709ad75ea33baa40c2950597f8e mayor-naplo-rev4632.tgz -55b7840fc9d2fc09ea03e5c3952aaafc mayor-base-rev4632.tgz +Revision 4633 +b9733091e1e0f09e37ee12c4a4f8caa1 mayor-fenntarto-rev4633.tgz +4aeaae6affdf88d1852729565a91aeaa mayor-installer-sulix-rev4633.tgz +fc4533cc0bdbeb16401e7641ff124532 mayor-wiki-rev4633.tgz +47871e634b04e9553d999cb743e0f3bc mayor-installer-rev4633.tgz +46e7fad1930020c06631cc27a0315975 mayor-portal-rev4633.tgz +be292de2043d50072e57bcee8f9d9944 mayor-felveteli-rev4633.tgz +6fe9da5ad13be0d2eb967b8ab63fbb42 mayor-jatek-rev4633.tgz +e244f53f1f7d8831d1fe142a3f3ae25d mayor-locales-jp_JP-rev4633.tgz +680a1c5ef2aba4c799308e67bb501fb4 mayor-locales-de_DE-rev4633.tgz +d45093641913d06eba7c211d045e3d45 mayor-locales-en_US-rev4633.tgz +f7b27582fe01b1c7961cf9dffd4edb3a mayor-naplo-rev4633.tgz +bb8e2b455abda12f8169927255907ba5 mayor-base-rev4633.tgz diff --git a/mayor-orig/rev.txt b/mayor-orig/rev.txt index 5becefaa..2e58f957 100644 --- a/mayor-orig/rev.txt +++ b/mayor-orig/rev.txt @@ -1 +1 @@ -4632 +4633 |