diff options
Diffstat (limited to 'mayor-orig/mayor-naplo/www')
4 files changed, 63 insertions, 11 deletions
diff --git a/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/haladasi/hazifeladat.php b/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/haladasi/hazifeladat.php index eea20314..6799d19e 100644 --- a/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/haladasi/hazifeladat.php +++ b/mayor-orig/mayor-naplo/www/lang/hu_HU/module-naplo/haladasi/hazifeladat.php @@ -36,6 +36,6 @@ define('_BEALLITASAI', 'beállításai'); define('_ALAPADATOK','Óra adatok'); - define('_HAZIFELADAT','Házi feladat'); + define('_HAZIFELADAT','Házi feladat, Részletek, Referenciák, Hivatkozások'); ?> diff --git a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php index 79d49bd0..3dbf4c9d 100644 --- a/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php +++ b/mayor-orig/mayor-naplo/www/policy/private/naplo/haladasi/haladasi-pre.php @@ -110,7 +110,6 @@ if ( $skin == 'ajax' // set defaults ++ // if (strtotime($igDt) > strtotime($_TANEV['zarasDt'])) $igDt = $_TANEV['zarasDt']; $maxIgDt = date('Y-m-d', strtotime('next Saturday', strtotime($_TANEV['kovetkezoKezdesDt']))); - if (strtotime($igDt) > strtotime($maxIgDt)) $igDt = $maxIgDt; elseif (strtotime($igDt) < strtotime($_TANEV['kezdesDt'])) $igDt = $_TANEV['kezdesDt']; if (date('w', strtotime($igDt)) == 0) $igDt = date('Y-m-d',strtotime('-1 days',strtotime($igDt))); // Hogy vasárnap még a múltheti látszódjon @@ -130,6 +129,7 @@ if ( $skin == 'ajax' // Vasárnap $igDt = date('Y-m-d',strtotime('Sunday',strtotime($tolDt))); } + if ($csakUres || strtotime($tolDt) < strtotime($_TANEV['kezdesDt'])) $tolDt = date('Y-m-d',strtotime($_TANEV['kezdesDt'])); // Ha ezt kiveszem, akkor mindig kirakja a teljes hetet, de a jövőbeli órákat nem lehet beírni! // Itt a post értékét nem használjuk fel, csak vizsgáljuk. @@ -175,6 +175,15 @@ if ( $skin == 'ajax' // || ((__TANAR || __VEZETOSEG ) && __FOLYO_TANEV) // A tanév közben a tanároknak, vezetőségi tagoknak - az év végi napok problémásak így! ) ) { + // checkNaplo (2020) + /* + checkNaplo($igDt); + $_dt = $igDt; + while (strtotime($_dt)>time()) { + $_dt = date('Y-m-d',strtotime('-1 day',strtotime($_dt))); + checkNaplo($_dt); + } + */ // action if ($action == 'haladasiNaploBeiras' && ( is_array($_POST['oraId']) 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 a4a1e696..ba0a27c4 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 @@ -23,14 +23,14 @@ $ADAT['oraId' ] = $oraId = readVariable($_POST['oraId'],'id',readVariable($_GET['oraId'],'id')); // $ADAT['hazifeladatId' ] = $hazifeladatId = readVariable($_POST['hazifeladatId'],'id', readVariable($_GET['hazifeladatId'],'id')); $ADAT['hazifeladatLeiras' ] = readVariable($_POST['hazifeladatLeiras'],'string'); - $ADAT['oraAdat'] = getOraadatById($oraId); $action = readVariable($_POST['action'],'strictstring',null,array('hazifeladatBeiras')); $q = "SELECT hazifeladatId FROM oraHazifeladat WHERE oraId=%u"; $values = array($ADAT['oraId']); $ADAT['hazifeladatId'] = $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'value','values'=>$values)); + $ADAT['oraAdat'] = getOraadatById($oraId); - if ($action=='hazifeladatBeiras') { + if (__TANAR===true && $action=='hazifeladatBeiras') { if ($hazifeladatId>0) { // update $q = "UPDATE oraHazifeladat set hazifeladatLeiras='%s' WHERE hazifeladatId=%u"; @@ -40,13 +40,18 @@ $q = "INSERT IGNORE INTO oraHazifeladat (hazifeladatLeiras,oraId) VALUES ('%s',%u)"; $values = array($ADAT['hazifeladatLeiras'],$ADAT['oraId']); $hazifeladatId = db_query($q, array('modul'=>'naplo','result'=>'insert','values'=>$values)); - } + } + if ($oraId>0 && strtotime(date('Y-m-d'))>=strtotime($ADAT['oraAdat']['dt'])) { + $leiras = readVariable($_POST['oraLeiras'],'string'); + updateHaladasiNaploOra($oraId, $leiras); + } } $q = "SELECT * FROM oraHazifeladat WHERE oraId=%u"; $values = array($ADAT['oraId']); $ADAT['hazifeladatAdat'] = db_query($q, array('modul'=>'naplo','result'=>'record','values'=>$values)); + $ADAT['oraAdat'] = getOraadatById($oraId); $TOOL['vissza'] = array('tipus'=>'vissza', 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 acf8fcae..e2b6d3ef 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 @@ -11,32 +11,70 @@ echo '<fieldset class="adatok"><legend>'._ALAPADATOK.'</legend>'."\n"; - echo superdate($ADAT['oraAdat']['dt']).' ('.$ADAT['oraAdat']['dt'].'), '.$ADAT['oraAdat']['ora'].'. '._ORA.' – <span class="tankorNev" data-tankorid="'.$ADAT['oraId']['tankorId'].'">'.$ADAT['oraAdat']['tankorNev'].'</span> – '.$ADAT['oraAdat']['kiCn']; - - echo '<p>'.$ADAT['oraAdat']['leiras'].'</p>'; + echo ($ADAT['oraAdat']['dt']).' ('.$ADAT['oraAdat']['dt'].'), '.$ADAT['oraAdat']['ora'].'. '._ORA.' – <span class="tankorNev" data-tankorid="'.$ADAT['oraId']['tankorId'].'">'.$ADAT['oraAdat']['tankorNev'].'</span> – '.$ADAT['oraAdat']['kiCn']; + // echo '<p>'.$ADAT['oraAdat']['leiras'].'</p>'; echo '</fieldset>'."\n"; if (__DIAK===true) { + echo '<fieldset class="adatok"><legend>'.ucfirst(_TANANYAG).'</legend>'."\n"; + if ($ADAT['oraAdat']['leiras']=='') + { echo '<p style="color:#aaa;">még nincs kitöltve</p>'; } + else + { echo '<p>'.$ADAT['oraAdat']['leiras'].'</p>'; } + echo '</fieldset>'."\n"; echo '<fieldset class="adatok"><legend>'._HAZIFELADAT.'</legend>'."\n"; - echo ($ADAT['hazifeladatAdat']['hazifeladatLeiras']); + if ($ADAT['hazifeladatAdat']['hazifeladatLeiras']=='') + { echo '<p style="color:#aaa;">még nincs kitöltve</p>'; } + else + { echo ($ADAT['hazifeladatAdat']['hazifeladatLeiras']); } echo '</fieldset>'."\n"; } else { - echo '<script src="//cdn.ckeditor.com/4.14.0/basic/ckeditor.js"></script>'; + 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"/>'; echo '<input type="hidden" name="oraId" value="'.$ADAT['oraAdat']['oraId'].'"/>'; 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'])) { + echo '<input type="text" name="oraLeiras" value="'.$ADAT['oraAdat']['leiras'].'" style="width:70%">'; + echo '<input type="submit">'; + } else { + echo '<p>'.$ADAT['oraAdat']['leiras'].'</p>'; + } + 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>'; echo " <script> - CKEDITOR.replace( 'hazifeladatLeiras' ); + CKEDITOR.replace( 'hazifeladatLeiras', { + disableNativeSpellChecker: true, + language: 'hu', + + toolbarGroups: [ + { name: 'basicstyles', groups: [ 'basicstyles', 'cleanup' ] }, + { name: 'paragraph', groups: [ 'list', 'indent' ] }, + { name: 'links' }, +// { name: 'document', groups: [ 'mode', 'document', 'doctools' ] }, + { name: 'clipboard', groups: [ 'undo', 'redo' ] }, +// { name: 'editing', groups: [ 'find', 'selection', 'spellchecker' ] }, +// { name: 'forms' }, +// { name: 'insert' }, +// { name: 'styles' }, +// { name: 'colors' }, +// { name: 'others' }, + { name: 'insert', groups: [ 'Image', 'Table', 'HorizontalRule' ] }, + { name: 'tools' }, +// { name: 'about' } + ], + removeButtons: 'Cut,Copy,Paste,PasteText,PasteFromWord,Anchor,Underline,Strike,SpecialChar,HorizontalRule' + }); </script>"; echo '<input type="submit">'; echo '</fieldset>'."\n"; |