mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-20 00:12:15 +00:00
Merge branch 'master' into merge_C4_25999_61235_61730
This commit is contained in:
@@ -95,12 +95,15 @@ class AntragJob extends JOB_Controller
|
||||
continue;
|
||||
}
|
||||
|
||||
$leitung = current(getData($result));
|
||||
if (!isset($stgLeitungen[$leitung->uid]))
|
||||
$leitungen = getData($result);
|
||||
foreach ($leitungen as $leitung)
|
||||
{
|
||||
$stgLeitungen[$leitung->uid] = [ 'Details' => $leitung, 'stgs' => [] ];
|
||||
if (!isset($stgLeitungen[$leitung->uid]))
|
||||
{
|
||||
$stgLeitungen[$leitung->uid] = ['Details' => $leitung, 'stgs' => []];
|
||||
}
|
||||
$stgLeitungen[$leitung->uid]['stgs'][] = $antrag->studiengang_kz;
|
||||
}
|
||||
$stgLeitungen[$leitung->uid]['stgs'][] = $antrag->studiengang_kz;
|
||||
|
||||
$result = $this->StudierendenantragModel->getStgAndSem($antrag->studierendenantrag_id);
|
||||
if (isError($result))
|
||||
|
||||
@@ -131,6 +131,11 @@ class VertragsbestandteilLib
|
||||
return $this->VertragsbestandteilModel->getVertragsbestandteil($vertragsbestandteil_id);
|
||||
}
|
||||
|
||||
public function fetchLastVertragsbestandteilStundenBeforeAltersteilzeit($dienstverhaeltnis_id)
|
||||
{
|
||||
return $this->VertragsbestandteilModel->getLastVertragsbestanteilStundenBeforeAltersteilzeit($dienstverhaeltnis_id);
|
||||
}
|
||||
|
||||
public function storeDienstverhaeltnis(Dienstverhaeltnis $dv)
|
||||
{
|
||||
if( intval($dv->getDienstverhaeltnis_id()) > 0 )
|
||||
|
||||
@@ -183,6 +183,46 @@ EOSQL;
|
||||
return $vbcount[0]->overlappingvbs;
|
||||
}
|
||||
|
||||
public function getLastVertragsbestanteilStundenBeforeAltersteilzeit($dienstverhaeltnis_id)
|
||||
{
|
||||
$sql = <<<EOATZSQL
|
||||
select
|
||||
*
|
||||
from
|
||||
hr.tbl_vertragsbestandteil vb
|
||||
join
|
||||
hr.tbl_vertragsbestandteil_stunden vbs USING(vertragsbestandteil_id)
|
||||
where
|
||||
vb.dienstverhaeltnis_id = ?
|
||||
and (
|
||||
vbs.teilzeittyp_kurzbz != 'altersteilzeit'
|
||||
or
|
||||
vbs.teilzeittyp_kurzbz is NULL
|
||||
)
|
||||
order by
|
||||
vb.bis desc
|
||||
limit 1
|
||||
EOATZSQL;
|
||||
$query = $this->execReadOnlyQuery($sql, array($dienstverhaeltnis_id));
|
||||
$data = getData($query);
|
||||
|
||||
if ($data == null)
|
||||
{
|
||||
return null;
|
||||
}
|
||||
|
||||
$vertragsbestandteil = null;
|
||||
try
|
||||
{
|
||||
$vertragsbestandteil = VertragsbestandteilFactory::getVertragsbestandteil($data[0], true);
|
||||
}
|
||||
catch (Exception $ex)
|
||||
{
|
||||
echo $ex->getMessage() . "\n";
|
||||
}
|
||||
return $vertragsbestandteil;
|
||||
}
|
||||
|
||||
/**
|
||||
* Checks if sap sync table exists.
|
||||
* @return bool
|
||||
|
||||
@@ -384,17 +384,6 @@ for ($i = 0; $i < count($ztaufdata); $i++)
|
||||
}
|
||||
}
|
||||
|
||||
//worktime with no break greater 6 -> compulsory break of half an hour
|
||||
if ($pauseSubtracted < 0.5 && !$lehreExternExists)
|
||||
{
|
||||
if ($projektlines[$day]->arbeitszeit >= 6.5)
|
||||
$projektlines[$day]->arbeitszeit -= 0.5;
|
||||
|
||||
//ensure that no worktime gets smaller than 6 hours because of compulsory break
|
||||
elseif ($projektlines[$day]->arbeitszeit > 6)
|
||||
$projektlines[$day]->arbeitszeit -= $projektlines[$day]->arbeitszeit - 6;
|
||||
}
|
||||
|
||||
$projektlines[$day]->arbeitszeit = round($projektlines[$day]->arbeitszeit, 2);
|
||||
|
||||
//calculate sums
|
||||
|
||||
+307
-55
@@ -65,7 +65,7 @@ if (isset($_GET['nummer']))
|
||||
}
|
||||
else
|
||||
{
|
||||
$nummer = '';
|
||||
$nummer = '0';
|
||||
}
|
||||
|
||||
if (isset($_GET['frage_id']))
|
||||
@@ -102,29 +102,175 @@ echo '<?xml version="1.0" encoding="UTF-8"?>';
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css" />
|
||||
<script language="Javascript">
|
||||
//Vorschau anzeigen
|
||||
function preview()
|
||||
{
|
||||
document.getElementById('vorschau').innerHTML = document.getElementById('text').value;
|
||||
function preview(input) {
|
||||
const xmlText = document.getElementById('text_'+input).value;
|
||||
const vorschau = document.getElementById('vorschau_'+input);
|
||||
|
||||
// Zurücksetzen der Styles
|
||||
vorschau.style.textAlign = 'center';
|
||||
vorschau.style.backgroundColor = 'initial';
|
||||
vorschau.style.color = 'initial';
|
||||
|
||||
// Prüfen ob überhaupt Inhalt vorhanden ist
|
||||
if (!xmlText.trim()) {
|
||||
vorschau.innerHTML = '';
|
||||
return;
|
||||
}
|
||||
|
||||
// Prüfe ob HTML/XML-Tags vorhanden sind
|
||||
const hatTags = xmlText.indexOf('<') != -1 && xmlText.indexOf('>') != -1;
|
||||
|
||||
if (!hatTags) {
|
||||
// Kein HTML/XML - zeige als normalen Text
|
||||
vorschau.innerText = xmlText;
|
||||
return;
|
||||
}
|
||||
|
||||
// Versuche HTML/MathML zu rendern
|
||||
try {
|
||||
// Erstelle einen temporären Container für die Validierung
|
||||
const tempDiv = document.createElement('div');
|
||||
tempDiv.innerHTML = xmlText;
|
||||
|
||||
// Prüfe auf MathML-Elemente und stelle sicher, dass sie korrekt sind
|
||||
const mathElements = tempDiv.querySelectorAll('math');
|
||||
let mathmlValid = true;
|
||||
|
||||
// Verwende eine while-Schleife statt for-Schleife um XML-Probleme zu vermeiden
|
||||
let i = 0;
|
||||
while (i < mathElements.length) {
|
||||
const mathEl = mathElements[i];
|
||||
// Prüfe ob das MathML-Element den korrekten Namespace hat
|
||||
if (!mathEl.hasAttribute('xmlns')) {
|
||||
mathEl.setAttribute('xmlns', 'http://www.w3.org/1998/Math/MathML');
|
||||
}
|
||||
|
||||
// Grundlegende MathML-Validierung
|
||||
const mathmlContent = mathEl.innerHTML;
|
||||
if (mathmlContent.trim() === '') {
|
||||
mathmlValid = false;
|
||||
break;
|
||||
}
|
||||
i++;
|
||||
}
|
||||
|
||||
if (mathmlValid) {
|
||||
// Wenn alles ok ist, zeige den Inhalt an
|
||||
vorschau.innerHTML = xmlText;
|
||||
|
||||
// Versuche MathML zu rendern falls MathJax verfügbar ist
|
||||
if (typeof MathJax != 'undefined' && MathJax.typesetPromise) {
|
||||
MathJax.typesetPromise([vorschau]).catch(function (err) {
|
||||
console.log('MathJax-Fehler:', err.message);
|
||||
});
|
||||
}
|
||||
} else {
|
||||
throw new Error('Ungültiges MathML');
|
||||
}
|
||||
|
||||
} catch (error) {
|
||||
// HTML-Parsing fehlgeschlagen - prüfe ob es sich um reines XML handelt
|
||||
const startetMitTag = xmlText.trim().charAt(0) === '<';
|
||||
const endetMitTag = xmlText.trim().charAt(xmlText.trim().length - 1) === '>';
|
||||
const hatNurTags = xmlText.indexOf('<') === 0 && xmlText.lastIndexOf('>') === xmlText.length - 1;
|
||||
|
||||
if (startetMitTag && endetMitTag && hatNurTags) {
|
||||
// Versuche XML-Parsing
|
||||
try {
|
||||
const parser = new DOMParser();
|
||||
const parsed = parser.parseFromString(xmlText, 'application/xml');
|
||||
const parsererror = parsed.getElementsByTagName('parsererror');
|
||||
|
||||
if (parsererror.length > 0) {
|
||||
let fehlertext = parsererror[0].textContent;
|
||||
const zeileninfoStart = fehlertext.indexOf("Zeile Nr.");
|
||||
if (zeileninfoStart != -1) {
|
||||
const zeileninfo = fehlertext.substring(zeileninfoStart);
|
||||
fehlertext = 'XML-Verarbeitungsfehler:\n' + zeileninfo;
|
||||
}
|
||||
vorschau.innerText = fehlertext;
|
||||
vorschau.style.textAlign = 'left';
|
||||
vorschau.style.backgroundColor = 'lightyellow';
|
||||
vorschau.style.color = 'red';
|
||||
return;
|
||||
} else {
|
||||
// XML ist gültig
|
||||
vorschau.innerText = xmlText;
|
||||
return;
|
||||
}
|
||||
} catch (xmlError) {
|
||||
// XML-Parsing fehlgeschlagen
|
||||
vorschau.innerText = 'XML-Formatfehler: ' + xmlError.message;
|
||||
vorschau.style.textAlign = 'left';
|
||||
vorschau.style.backgroundColor = 'lightyellow';
|
||||
vorschau.style.color = 'red';
|
||||
return;
|
||||
}
|
||||
} else {
|
||||
// Gemischter Inhalt oder HTML mit Fehlern - zeige Fehlermeldung
|
||||
vorschau.innerText = 'HTML/MathML-Formatfehler: ' + error.message;
|
||||
vorschau.style.textAlign = 'left';
|
||||
vorschau.style.backgroundColor = 'lightyellow';
|
||||
vorschau.style.color = 'red';
|
||||
}
|
||||
}
|
||||
}
|
||||
function previewvorschlag()
|
||||
{
|
||||
document.getElementById('vorschauvorschlag').innerHTML = document.getElementById('text_vorschlag').value;
|
||||
function previewvorschlag() {
|
||||
const xmlText = document.getElementById('text_vorschlag').value;
|
||||
const vorschau = document.getElementById('vorschauvorschlag');
|
||||
const parser = new DOMParser();
|
||||
const parsed = parser.parseFromString(xmlText, 'application/xml');
|
||||
|
||||
const parsererror = parsed.getElementsByTagName('parsererror');
|
||||
|
||||
if (parsererror.length > 0) {
|
||||
var fehlertext = parsererror[0].textContent;
|
||||
const zeileninfoStart = fehlertext.indexOf("Zeile Nr.");
|
||||
|
||||
if (zeileninfoStart !== -1) {
|
||||
const zeileninfo = fehlertext.substring(zeileninfoStart);
|
||||
fehlertext = 'XML-Verarbeitungsfehler:\n ' + zeileninfo;
|
||||
} else {
|
||||
fehlertext = fehlertext; // Fallback
|
||||
}
|
||||
vorschau.innerText = fehlertext;
|
||||
vorschau.style.textAlign = 'left';
|
||||
vorschau.style.backgroundColor = 'lightyellow';
|
||||
} else {
|
||||
// Zeige XML als Text (nicht als HTML rendern!)
|
||||
vorschau.innerHTML = xmlText;
|
||||
vorschau.style.textAlign = 'center';
|
||||
vorschau.style.backgroundColor = 'initial';
|
||||
}
|
||||
}
|
||||
function insertfrage(aTag, eTag)
|
||||
{
|
||||
var input = document.forms['formular_frage'].elements['text'];
|
||||
var input = document.forms['formular_frage'].elements['text_frage'];
|
||||
input.focus();
|
||||
/* Einfügen des Formatierungscodes */
|
||||
var start = input.selectionStart;
|
||||
var end = input.selectionEnd;
|
||||
var insText = input.value.substring(start, end);
|
||||
input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
|
||||
if (eTag)
|
||||
{
|
||||
input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
|
||||
}
|
||||
else
|
||||
{
|
||||
input.value = input.value.substr(0, start) + aTag + input.value.substr(end);
|
||||
}
|
||||
/* Anpassen der Cursorposition */
|
||||
var pos;
|
||||
if (insText.length == 0) {
|
||||
pos = start + aTag.length;
|
||||
} else {
|
||||
pos = start + aTag.length + insText.length + eTag.length;
|
||||
} else
|
||||
{
|
||||
if (eTag) {
|
||||
pos = start + aTag.length + insText.length + eTag.length;
|
||||
}
|
||||
else {
|
||||
pos = start + aTag.length + insText.length;
|
||||
}
|
||||
}
|
||||
input.selectionStart = pos;
|
||||
input.selectionEnd = pos;
|
||||
@@ -137,13 +283,25 @@ function insertvorschlag(aTag, eTag)
|
||||
var start = input.selectionStart;
|
||||
var end = input.selectionEnd;
|
||||
var insText = input.value.substring(start, end);
|
||||
input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
|
||||
if (eTag)
|
||||
{
|
||||
input.value = input.value.substr(0, start) + aTag + insText + eTag + input.value.substr(end);
|
||||
}
|
||||
else
|
||||
{
|
||||
input.value = input.value.substr(0, start) + aTag + input.value.substr(end);
|
||||
}
|
||||
/* Anpassen der Cursorposition */
|
||||
var pos;
|
||||
if (insText.length == 0) {
|
||||
pos = start + aTag.length;
|
||||
} else {
|
||||
pos = start + aTag.length + insText.length + eTag.length;
|
||||
if (eTag) {
|
||||
pos = start + aTag.length + insText.length + eTag.length;
|
||||
}
|
||||
else {
|
||||
pos = start + aTag.length + insText.length;
|
||||
}
|
||||
}
|
||||
input.selectionStart = pos;
|
||||
input.selectionEnd = pos;
|
||||
@@ -153,6 +311,14 @@ function confirmDeleteFrage()
|
||||
{
|
||||
return confirm('Wollen Sie diese Frage wirklich löschen?');
|
||||
}
|
||||
|
||||
function increaseMATHML()
|
||||
{
|
||||
const mathTags = document.querySelectorAll('math');
|
||||
mathTags.forEach(tag => {
|
||||
tag.style.fontSize = '200%';
|
||||
});
|
||||
}
|
||||
</script>
|
||||
<style type="text/css">
|
||||
|
||||
@@ -778,44 +944,83 @@ if (($anzahl !== 0) || ($stg_kz == '-1') && ($stg_kz !== ''))
|
||||
<a href="'.$PHP_SELF.'?gebiet_id='.$gebiet_id.'&stg_kz='.$stg_kz.'&nummer='.$nummer.'&filter=aktiv">
|
||||
<input type="checkbox" name="inaktiv" '.$inaktivchecked.' onclick="window.location.assign(\''.$PHP_SELF.'?gebiet_id='.$gebiet_id.'&stg_kz='.$stg_kz.'&nummer='.$nummer.'&filter=aktiv\');"/>inaktiv</a>';
|
||||
}
|
||||
echo '<br/><table class="nummern" style="display: inline-table;"><tbody><tr>
|
||||
<td>Nummer:</td>';
|
||||
foreach ($resultArray AS $key=>$value)
|
||||
{
|
||||
if ($nummer == '')
|
||||
$nummer = $value['nummer'];
|
||||
echo '<br/>';
|
||||
|
||||
$style = '';
|
||||
if ($db->db_parse_bool($value['aktiv']) == false)
|
||||
$style = 'style="color: lightgrey"';
|
||||
$counter = 0;
|
||||
$maxPerTable = 50;
|
||||
$totalItems = count($resultArray);
|
||||
|
||||
$styleSelected = '';
|
||||
if ($nummer == $value['nummer'])
|
||||
{
|
||||
$styleSelected = 'style="background-color: lightblue"';
|
||||
}
|
||||
// Erste Tabelle öffnen
|
||||
echo '<table class="nummern" style="display: inline-table; margin-bottom: 10px;"><tbody><tr>
|
||||
<td>Nummer:</td>';
|
||||
|
||||
echo '<td class="nummern" '.$styleSelected.'><a href="'.$PHP_SELF.'?gebiet_id='.$gebiet_id.'&stg_kz='.$stg_kz.'&nummer='.$value['nummer'].'&filter='.$filter.'" '.$style.'>'.$value['nummer'].'</a></td>';
|
||||
foreach ($resultArray AS $key=>$value) {
|
||||
// Neue Tabelle starten, wenn 50 Einträge erreicht sind
|
||||
if ($counter > 0 && $counter % $maxPerTable == 0) {
|
||||
// Aktuelle Tabelle schließen
|
||||
echo '</tr><tr><td>Level:</td>';
|
||||
|
||||
// Level-Zeile für die vorherigen Einträge
|
||||
$startIndex = $counter - $maxPerTable;
|
||||
$endIndex = $counter;
|
||||
$tempArray = array_slice($resultArray, $startIndex, $maxPerTable, true);
|
||||
|
||||
foreach ($tempArray AS $tempKey=>$tempValue) {
|
||||
$leveltext = '';
|
||||
if ($tempValue['level'] == '') {
|
||||
$leveltext = '-';
|
||||
} else {
|
||||
$leveltext = $tempValue['level'];
|
||||
if ($tempValue['demo'] == 't') {
|
||||
$leveltext .= '*';
|
||||
}
|
||||
}
|
||||
echo '<td class="nummern" style="color: grey">'.$leveltext.'</td>';
|
||||
}
|
||||
|
||||
echo '</tr></tbody></table><br/>';
|
||||
|
||||
// Neue Tabelle starten
|
||||
echo '<table class="nummern" style="display: inline-table; margin-bottom: 10px;"><tbody><tr>
|
||||
<td>Nummer:</td>';
|
||||
}
|
||||
|
||||
if ($nummer == '')
|
||||
$nummer = $value['nummer'];
|
||||
$style = '';
|
||||
if ($db->db_parse_bool($value['aktiv']) == false)
|
||||
$style = 'style="color: lightgrey"';
|
||||
$styleSelected = '';
|
||||
if ($nummer == $value['nummer']) {
|
||||
$styleSelected = 'style="background-color: lightblue"';
|
||||
}
|
||||
echo '<td class="nummern" '.$styleSelected.'><a href="'.$PHP_SELF.'?gebiet_id='.$gebiet_id.'&stg_kz='.$stg_kz.'&nummer='.$value['nummer'].'&filter='.$filter.'" '.$style.'>'.$value['nummer'].'</a></td>';
|
||||
|
||||
$counter++;
|
||||
}
|
||||
echo '</tr><tr>
|
||||
<td>Level:</td>';
|
||||
$leveltext = '';
|
||||
foreach ($resultArray AS $key=>$value)
|
||||
{
|
||||
if ($value['level'] == '')
|
||||
{
|
||||
$leveltext = '-';
|
||||
}
|
||||
else
|
||||
{
|
||||
$leveltext = $value['level'];
|
||||
if ($value['demo'] == 't')
|
||||
{
|
||||
$leveltext .= '*';
|
||||
}
|
||||
}
|
||||
echo '<td class="nummern" style="color: grey">'.$leveltext.'</td>';
|
||||
|
||||
// Letzte Tabelle schließen
|
||||
echo '</tr><tr><td>Level:</td>';
|
||||
|
||||
// Level-Zeile für die letzten Einträge
|
||||
$remainingItems = $counter % $maxPerTable;
|
||||
if ($remainingItems == 0) $remainingItems = $maxPerTable;
|
||||
$startIndex = $counter - $remainingItems;
|
||||
$tempArray = array_slice($resultArray, $startIndex, $remainingItems, true);
|
||||
|
||||
foreach ($tempArray AS $tempKey=>$tempValue) {
|
||||
$leveltext = '';
|
||||
if ($tempValue['level'] == '') {
|
||||
$leveltext = '-';
|
||||
} else {
|
||||
$leveltext = $tempValue['level'];
|
||||
if ($tempValue['demo'] == 't') {
|
||||
$leveltext .= '*';
|
||||
}
|
||||
}
|
||||
echo '<td class="nummern" style="color: grey">'.$leveltext.'</td>';
|
||||
}
|
||||
|
||||
echo '</tr></tbody></table>';
|
||||
echo " <a href='$PHP_SELF?gebiet_id=$gebiet_id&stg_kz=$stg_kz&type=neuefrage&filter=$filter' class='Item'>neue Frage hinzufuegen</a>";
|
||||
$frage_obj = new frage();
|
||||
@@ -931,7 +1136,7 @@ if ($frage_id != '')
|
||||
//Bei Aenderungen im Textfeld werden diese sofort in der Vorschau angezeigt
|
||||
//Wenn beim Speichern der Text kein Gueltiges XML ist, wird der vorige Text erneut angezeigt
|
||||
|
||||
echo "<tr valign='top'><td colspan='2'>\n<textarea name='text' id='text' cols='50' rows='27' oninput='preview()' ".($frage->aktiv == false?'disabled="disabled"':'')."><![CDATA[".(isset($frage_error_text)?$frage_error_text:$frage->text)."]]></textarea>\n</td>";
|
||||
echo "<tr valign='top'><td colspan='2'>\n<textarea name='text' id='text_frage' cols='50' rows='27' oninput='preview(\"frage\")' ".($frage->aktiv == false?'disabled="disabled"':'')."><![CDATA[".(isset($frage_error_text)?$frage_error_text:$frage->text)."]]></textarea>\n</td>";
|
||||
echo "<table><tr><td><input type='button' value='br' onclick='insertfrage(\"<br/>\", \"\")' />";
|
||||
echo "<input type='button' value='F' style='font-weight:bold' onclick='insertfrage(\"<strong>\", \"</strong>\")' />";
|
||||
echo "<input type='button' value='K' style='font-style:italic' onclick='insertfrage(\"<i>\", \"</i>\")' /><br/><br/>";
|
||||
@@ -948,8 +1153,14 @@ if ($frage_id != '')
|
||||
echo "<input type='button' value='msqrt' onclick='insertfrage(\"<msqrt>\", \"</msqrt>\")' title='Wurzel' /><br/>";
|
||||
echo "<input type='button' value='munderover' onclick='insertfrage(\"<munderover><mo movablelimits=\"false\">Das steht mittig</mo><mo>Das steht unten</mo><mo>Das steht oben</mo></munderover>\", \"\")' title='Oben und unten' /><br/>";
|
||||
echo "<input type='button' value='mtext' onclick='insertfrage(\"<mtext>\", \"</mtext>\")' title='Text' /><br/>";
|
||||
echo "Operatoren:<br/>π<br/>·<br/>∑<br/>∫<br/><a href='http://de.selfhtml.org/html/referenz/zeichen.htm#benannte_iso8859_1' target='blank'>Weitere</a>";
|
||||
echo "</td>";
|
||||
echo "Operatoren:<p>";
|
||||
echo "<button type='button' onclick='insertfrage(\"<mo>π</mo>\")'>π</button> ";
|
||||
echo "<button type='button' onclick='insertfrage(\"<mo>·</mo>\")'>·</button> ";
|
||||
echo "<button type='button' onclick='insertfrage(\"<mo>∑</mo>\")'>∑</button> ";
|
||||
echo "<button type='button' onclick='insertfrage(\"<mo>∫</mo>\")'>∫</button>";
|
||||
echo "<p><a href='http://de.selfhtml.org/html/referenz/zeichen.htm#benannte_iso8859_1' target='blank'>Weitere</a></p>";
|
||||
echo "<button type='button' onclick='increaseMATHML()'>MathML größer</button>";
|
||||
echo "</p></td>";
|
||||
echo "</tr></table></tr>";
|
||||
echo "<tr><td>Demo <input type='checkbox' name='demo' ".($frage->demo?'checked="true"':'')." />
|
||||
Level <input type='text' name='level' value='$frage->level' size='1' />
|
||||
@@ -960,7 +1171,10 @@ if ($frage_id != '')
|
||||
echo "</form>";
|
||||
echo "</td></tr>";
|
||||
//Vorschau fuer das Text-Feld
|
||||
echo "<tr><td colspan='2'>Vorschau:<br /><div id='vorschau' style='border: 1px solid black' align='center'>$frage->text</div></td></tr>";
|
||||
echo "<tr><td style='width: 50%'>Vorschau:<br />
|
||||
<div id='vorschau_frage' style='border: 1px solid black' align='center'>$frage->text</div></td>
|
||||
<td style='width: 50%'>Derzeit:<br /><div id='aktuell' style='border: 1px solid black' align='center'>$frage->text</div>
|
||||
</td></tr>";
|
||||
echo "</table>";
|
||||
echo '</td><td style="border-left: 1px solid black" valign="top">';
|
||||
|
||||
@@ -1022,7 +1236,7 @@ if ($frage_id != '')
|
||||
echo "<input type='button' value='+1/2' style='background-color:#C5FFBF' onclick='document.getElementById(\"punkte\").value=\"0.5\";' /></td>";
|
||||
echo '</tr>';
|
||||
echo '<tr valign="top">';
|
||||
echo '<td>Text:</td><td><textarea name="text" id="text_vorschlag" rows="25" cols="45" oninput="previewvorschlag()" '.($vorschlag->aktiv == true || is_null($vorschlag->aktiv)?'':'disabled="disabled"').'><![CDATA['.$vorschlag->text."]]></textarea>\n</td>";
|
||||
echo '<td>Text:</td><td><textarea name="text" id="text_vorschlag" rows="25" cols="45" oninput="preview(\'vorschlag\')" '.($vorschlag->aktiv == true || is_null($vorschlag->aktiv)?'':'disabled="disabled"').'><![CDATA['.$vorschlag->text."]]></textarea>\n</td>";
|
||||
echo "<td><input type='button' value='br' onclick='insertvorschlag(\"<br/>\", \"\")' />";
|
||||
echo "<input type='button' value='F' style='font-weight:bold' onclick='insertvorschlag(\"<strong>\", \"</strong>\")' />";
|
||||
echo "<input type='button' value='K' style='font-style:italic' onclick='insertvorschlag(\"<i>\", \"</i>\")' /><br/><br/>";
|
||||
@@ -1039,8 +1253,12 @@ if ($frage_id != '')
|
||||
echo "<input type='button' value='msqrt' onclick='insertvorschlag(\"<msqrt>\", \"</msqrt>\")' title='Wurzel' /><br/>";
|
||||
echo "<input type='button' value='munderover' onclick='insertvorschlag(\"<munderover><mo movablelimits=\"false\">Das steht mittig</mo><mo>Das steht unten</mo><mo>Das steht oben</mo></munderover>\", \"\")' title='Oben und unten' /><br/>";
|
||||
echo "<input type='button' value='mtext' onclick='insertvorschlag(\"<mtext>\", \"</mtext>\")' title='Text' /><br/>";
|
||||
echo "Operatoren:<br/>π<br/>·<br/>∑<br/>∫<br/><a href='http://de.selfhtml.org/html/referenz/zeichen.htm#benannte_iso8859_1' target='blank'>Weitere</a>";
|
||||
echo "</td>";
|
||||
echo "Operatoren:<p>";
|
||||
echo "<button type='button' onclick='insertvorschlag(\"<mo>π</mo>\")'>π</button> ";
|
||||
echo "<button type='button' onclick='insertvorschlag(\"<mo>·</mo>\")'>·</button> ";
|
||||
echo "<button type='button' onclick='insertvorschlag(\"<mo>∑</mo>\")'>∑</button> ";
|
||||
echo "<button type='button' onclick='insertvorschlag(\"<mo>∫</mo>\")'>∫</button>";
|
||||
echo "</p></td>";
|
||||
echo '</tr><tr valign="top">';
|
||||
//Upload Feld fuer Bild
|
||||
echo "<td>Bild:</td><td><input type='file' name='bild' /></td>";
|
||||
@@ -1062,10 +1280,10 @@ if ($frage_id != '')
|
||||
echo "/></td></tr>";
|
||||
echo "<tr><td colspan='2' align='right'><input type='submit' name='submitvorschlag' value='Speichern' />".($vorschlag_id != ''?"<input type='button' value='Abbrechen' onclick=\"document.location.href='$PHP_SELF?gebiet_id=$gebiet_id&stg_kz=$stg_kz&nummer=$nummer&frage_id=$frage->frage_id'\" />":'')."</td></tr>";
|
||||
//Vorschau fuer das Text-Feld
|
||||
echo "<tr><td colspan='2'>Vorschau:<br /><div id='vorschauvorschlag' style='border: 1px solid black' align='center'>$vorschlag->text</div></td></tr>";
|
||||
echo "<tr><td colspan='2'>Vorschau:<br /><div id='vorschau_vorschlag' style='border: 1px solid black' align='center'>$vorschlag->text</div>
|
||||
Derzeit:<br /><div id='aktuellvorschlag' style='border: 1px solid black' align='center'>$vorschlag->text</div></td></tr>";
|
||||
echo "</table>";
|
||||
echo "</form>";
|
||||
|
||||
echo '</td></tr></table>';
|
||||
|
||||
$vorschlag = new vorschlag();
|
||||
@@ -1115,6 +1333,40 @@ if ($frage_id != '')
|
||||
echo '<tr><td><input type="hidden" name="allevorschlaege" value="'.$allevorschlaege.'" />Summe:</td><td align="left">'.number_format(array_sum($a), 2, ".", "").' </td><td></td><td></td><td></td><td></td><td></td><td><input type="submit" value="Speichern"/></td></tr>';
|
||||
echo '</table></form><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/><br/>';
|
||||
}
|
||||
echo "<script>
|
||||
document.getElementById('text_vorschlag').addEventListener('keydown', function(e)
|
||||
{
|
||||
if (e.key === 'Tab') {
|
||||
e.preventDefault();
|
||||
|
||||
const textarea = e.target;
|
||||
const start = textarea.selectionStart;
|
||||
const end = textarea.selectionEnd;
|
||||
|
||||
// Tabulator-Zeichen einfügen
|
||||
textarea.value = textarea.value.substring(0, start) + '\t' + textarea.value.substring(end);
|
||||
|
||||
// Cursor hinter den Tab setzen
|
||||
textarea.selectionStart = textarea.selectionEnd = start + 1;
|
||||
}
|
||||
});
|
||||
document.getElementById('text_frage').addEventListener('keydown', function(e)
|
||||
{
|
||||
if (e.key === 'Tab') {
|
||||
e.preventDefault();
|
||||
|
||||
const textarea = e.target;
|
||||
const start = textarea.selectionStart;
|
||||
const end = textarea.selectionEnd;
|
||||
|
||||
// Tabulator-Zeichen einfügen
|
||||
textarea.value = textarea.value.substring(0, start) + '\t' + textarea.value.substring(end);
|
||||
|
||||
// Cursor hinter den Tab setzen
|
||||
textarea.selectionStart = textarea.selectionEnd = start + 1;
|
||||
}
|
||||
});
|
||||
</script>";
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ export const CoreFilterCmpt = {
|
||||
newBtnDisabled: Boolean,
|
||||
newBtnLabel: String,
|
||||
uniqueId: String,
|
||||
// TODO soll im master kommen?
|
||||
|
||||
idField: String,
|
||||
parentIdField: String,
|
||||
countOnly: Boolean,
|
||||
@@ -220,17 +220,22 @@ export const CoreFilterCmpt = {
|
||||
}
|
||||
// Define a default tabulator options in case it was not provided
|
||||
let tabulatorOptions = {...{
|
||||
height: 500,
|
||||
layout: "fitDataStretchFrozen",
|
||||
movableColumns: true,
|
||||
columnDefaults:{
|
||||
tooltip: true
|
||||
},
|
||||
placeholder,
|
||||
reactiveData: true,
|
||||
persistence: this.persistence,
|
||||
}, ...(this.tabulatorOptions || {})};
|
||||
|
||||
// set default height if no height property is set
|
||||
if (tabulatorOptions.height === undefined &&
|
||||
tabulatorOptions.minHeight === undefined &&
|
||||
tabulatorOptions.maxHeight === undefined) {
|
||||
tabulatorOptions.height = 500;
|
||||
}
|
||||
|
||||
if (!this.tableOnly) {
|
||||
tabulatorOptions.data = this.filteredData;
|
||||
tabulatorOptions.columns = this.filteredColumns;
|
||||
@@ -238,7 +243,7 @@ export const CoreFilterCmpt = {
|
||||
|
||||
if (tabulatorOptions.selectable || (tabulatorOptions.columns && tabulatorOptions.columns.filter(el => el.formatter == 'rowSelection').length))
|
||||
this.tabulatorHasSelector = true;
|
||||
// TODO check ob im core bleiben soll
|
||||
|
||||
if (this.idField) {
|
||||
// enable nested tabulator if parent Id given
|
||||
if (this.parentIdField) tabulatorOptions.dataTree = true;
|
||||
@@ -262,7 +267,7 @@ export const CoreFilterCmpt = {
|
||||
this.tabulator.on("rowSelectionChanged", data => {
|
||||
this.selectedData = data;
|
||||
});
|
||||
// TODO check ob im core so bleiben soll
|
||||
|
||||
// if nested tabulator, restructure data
|
||||
if (this.parentIdField && this.idField) {
|
||||
this.tabulator.on("dataLoading", data => {
|
||||
@@ -579,7 +584,7 @@ export const CoreFilterCmpt = {
|
||||
this.getFilter
|
||||
);
|
||||
},
|
||||
// TODO check ob im core so bleiben soll
|
||||
|
||||
// append child to it's parent
|
||||
appendChild(data, child) {
|
||||
// get parent id
|
||||
|
||||
+21
-1
@@ -35,6 +35,7 @@ require_once('../include/studiengang.class.php');
|
||||
require_once('../include/mitarbeiter.class.php');
|
||||
require_once('../include/anrechnung.class.php');
|
||||
require_once('../include/prestudent.class.php');
|
||||
require_once('../include/nation.class.php');
|
||||
|
||||
$datum = new datum();
|
||||
$db = new basis_db();
|
||||
@@ -107,7 +108,7 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
tbl_studiengang.bezeichnung, tbl_studiengang.english, tbl_studentlehrverband.semester,
|
||||
tbl_person.vorname, tbl_person.vornamen, tbl_person.nachname,tbl_person.gebdatum,tbl_person.titelpre,
|
||||
tbl_person.titelpost, tbl_person.anrede, tbl_studiensemester.bezeichnung as sembezeichnung,
|
||||
tbl_studiensemester.studiensemester_kurzbz as stsem, tbl_student.prestudent_id, tbl_studiengang.max_semester
|
||||
tbl_studiensemester.studiensemester_kurzbz as stsem, tbl_student.prestudent_id, tbl_studiengang.max_semester, tbl_person.gebort, tbl_person.geburtsnation, tbl_person.geschlecht
|
||||
FROM tbl_person, tbl_student, tbl_studiengang, tbl_benutzer, tbl_studentlehrverband, tbl_studiensemester
|
||||
WHERE tbl_student.studiengang_kz = tbl_studiengang.studiengang_kz
|
||||
AND tbl_student.student_uid = tbl_benutzer.uid AND tbl_benutzer.person_id = tbl_person.person_id
|
||||
@@ -187,6 +188,10 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
else
|
||||
$studiengang_kz = sprintf("%04s", abs($row->studiengang_kz));
|
||||
|
||||
|
||||
$nation = new nation($row->geburtsnation);
|
||||
$geburtsnation = $nation->kurztext;
|
||||
|
||||
$xml .= " <studiengang_art><![CDATA[".$bezeichnung."]]></studiengang_art>";
|
||||
$xml .= " <studiengang_kz><![CDATA[".$studiengang_kz."]]></studiengang_kz>";
|
||||
$xml .= "\n <anrede><![CDATA[".$row->anrede."]]></anrede>";
|
||||
@@ -195,6 +200,9 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
$xml .= " <name><![CDATA[".trim($row->titelpre.' '.trim($row->vorname.' '.$row->vornamen).' '.$row->nachname.($row->titelpost!=''?', '.$row->titelpost:''))."]]></name>";
|
||||
$gebdatum = date('d.m.Y',strtotime($row->gebdatum));
|
||||
$xml .= " <gebdatum><![CDATA[".$gebdatum."]]></gebdatum>";
|
||||
$xml .= " <gebort><![CDATA[".$row->gebort."]]></gebort>";
|
||||
$xml .= " <geburtsnation><![CDATA[".$geburtsnation."]]></geburtsnation>";
|
||||
$xml .= " <geschlecht><![CDATA[".$row->geschlecht."]]></geschlecht>";
|
||||
$xml .= " <matrikelnr><![CDATA[".trim($row->matrikelnr)."]]></matrikelnr>";
|
||||
$xml .= " <studiengangsleiter><![CDATA[".$stgl."]]></studiengangsleiter>";
|
||||
$datum_aktuell = date('d.m.Y');
|
||||
@@ -267,6 +275,15 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
if ($lastPrestudentStatus)
|
||||
$showAllNoten = $prestudent->status_kurzbz === 'Incoming';
|
||||
|
||||
$lastBenotungsdatum = '';
|
||||
|
||||
$dates = array_column($obj->result, 'benotungsdatum');
|
||||
if (!empty($dates))
|
||||
{
|
||||
$lastBenotungsdatum = max($dates);
|
||||
$xml .= "<last_benotungsdatum><![CDATA[".date('d.m.Y', strtotime($lastBenotungsdatum))."]]></last_benotungsdatum>";
|
||||
}
|
||||
|
||||
foreach ($obj->result as $row)
|
||||
{
|
||||
if($showAllNoten || $row->zeugnis)
|
||||
@@ -390,12 +407,15 @@ if (isset($_REQUEST["xmlformat"]) && $_REQUEST["xmlformat"] == "xml")
|
||||
}
|
||||
}
|
||||
$xml .= "\n <unterrichtsfach>";
|
||||
$xml .= " <benotungsdatum><![CDATA[".date('d.m.Y', strtotime($row->benotungsdatum))."]]></benotungsdatum>";
|
||||
$xml .= " <bezeichnung><![CDATA[".$bezeichnung."]]></bezeichnung>";
|
||||
$xml .= " <bezeichnung_englisch><![CDATA[".$bezeichnung_englisch."]]></bezeichnung_englisch>";
|
||||
$xml .= " <note_positiv><![CDATA[".$row->note_positiv."]]></note_positiv>";
|
||||
$xml .= " <note><![CDATA[".$note2."]]></note>";
|
||||
$xml .= " <sws><![CDATA[".($row->semesterstunden==0?'':number_format(sprintf('%.1F',$row->semesterstunden/$wochen),1))."]]></sws>";
|
||||
$xml .= " <sws_lv><![CDATA[".($row->sws==0?'':number_format(sprintf('%.1F',$row->sws),1))."]]></sws_lv>";
|
||||
$xml .= " <lv_id><![CDATA[".$row->lehrveranstaltung_id."]]></lv_id>";
|
||||
|
||||
$ectspunkte='';
|
||||
|
||||
$anrechnung = new anrechnung();
|
||||
|
||||
@@ -550,6 +550,8 @@ if($orgform_kurzbz != -1)
|
||||
|
||||
if($lehrveranstaltung_id != '')
|
||||
$sql_query.= " AND tbl_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param($lehrveranstaltung_id, FHC_INTEGER);
|
||||
elseif(isset($_GET['delete_lvid']))
|
||||
$sql_query.= " AND tbl_lehrveranstaltung.lehrveranstaltung_id=".$db->db_add_param(intval($_GET['delete_lvid']), FHC_INTEGER);
|
||||
|
||||
if($lehrveranstaltung_name != '')
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user