mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 09:22:22 +00:00
Merge branch 'master' into ci
Conflicts: cis/testtool/admin/add_gebiet.php cis/testtool/admin/edit_gebiet.php cis/testtool/admin/index.php config/global.config-default.inc.php content/student/studentDBDML.php content/student/studentdetailoverlay.xul.php include/ablauf.class.php include/frage.class.php include/organisationseinheit.class.php include/studiengang.class.php include/vorschlag.class.php phpci.yml rdf/student.rdf.php system/dbupdate_3.2.php tests/codeception/_support/AcceptanceTester.php tests/codeception/_support/BasisKlasseTest.php tests/codeception/_support/FunctionalTester.php tests/codeception/_support/UnitTester.php tests/codeception/_support/_generated/AcceptanceTesterActions.php tests/codeception/acceptance/AcceptanceTester.php tests/codeception/acceptance/CISLoginPageCept.php tests/codeception/acceptance/_bootstrap.php tests/codeception/codeception.dist.yml tests/codeception/functional/FunctionalTester.php tests/codeception/functional/_bootstrap.php tests/codeception/tests/acceptance.suite.dist.yml tests/codeception/tests/acceptance/CISLoginPage.php tests/codeception/tests/acceptance/CISLoginPageCept.php tests/codeception/tests/api/_bootstrap.php tests/codeception/tests/functional/FunctionalTester.php tests/codeception/tests/functional/_bootstrap.php tests/codeception/tests/unit/BasisKlasseTest.php tests/codeception/tests/unit/UnitTester.php tests/codeception/unit/BasisKlasseTest.php tests/codeception/unit/UnitTester.php
This commit is contained in:
+139
-129
@@ -8,7 +8,7 @@
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
@@ -31,14 +31,18 @@ require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/studiengang.class.php');
|
||||
require_once('../../../include/sprache.class.php');
|
||||
|
||||
if (!$user=get_uid())
|
||||
if (!$user = get_uid())
|
||||
die('Sie sind nicht angemeldet. Es wurde keine Benutzer UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
$sprache = new sprache();
|
||||
$sprache->getAll(true);
|
||||
$sprache->getAll(true, 'index');
|
||||
|
||||
$sprache_user = getSprache();
|
||||
|
||||
$db = new basis_db();
|
||||
|
||||
echo '
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
@@ -60,15 +64,15 @@ echo '
|
||||
|
||||
function deleteZuordnung(ablauf_id)
|
||||
{
|
||||
if(confirm("Wollen Sie dieses Zuordnung wirklich entfernen?"))
|
||||
{
|
||||
$("#data").html(\'<form action="edit_gebiet.php" name="sendform" id="sendform" method="POST"><input type="hidden" name="action" value="deleteZuordnung" /><input type="hidden" name="ablauf_id" value="\'+ablauf_id+\'" /></form>\');
|
||||
if (confirm("Wollen Sie dieses Zuordnung wirklich entfernen?"))
|
||||
{
|
||||
$("#data").html(\'<form action="edit_gebiet.php" name="sendform" id="sendform" method="POST"><input type="hidden" name="action" value="deleteZuordnung" /><input type="hidden" name="ablauf_id" value="\'+ablauf_id+\'" /></form>\');
|
||||
document.sendform.submit();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="data"></div>
|
||||
@@ -89,9 +93,13 @@ echo '<a href="index.php?stg_kz='.$stg_kz.'" class="Item">Zurück zur Admin Seit
|
||||
|
||||
//Dropdown Auswahl Studiengang
|
||||
echo "Studiengang: <SELECT name='studiengang' id='studiengang' onchange='window.location.href=this.value'><OPTION value='-1'>-- Keine Auswahl --</OPTION>";
|
||||
$i=0; $selected='';
|
||||
for ($i=0; $i<count($studiengang->result); $i++) {
|
||||
if ($stg_kz == $studiengang->result[$i]->studiengang_kz) $selected = 'selected';
|
||||
$i = 0;
|
||||
$selected = '';
|
||||
$result_count = count($studiengang->result);
|
||||
for ($i = 0; $i < $result_count; $i++)
|
||||
{
|
||||
if ($stg_kz == $studiengang->result[$i]->studiengang_kz)
|
||||
$selected = 'selected';
|
||||
echo "<OPTION value='".$_SERVER['PHP_SELF']."?stg_kz=".$studiengang->result[$i]->studiengang_kz."' ".$selected.">".strtoupper($studiengang->result[$i]->typ.$studiengang->result[$i]->kurzbz).' ('.$studiengang->result[$i]->bezeichnung.")</OPTION>";
|
||||
$selected = '';
|
||||
}
|
||||
@@ -100,133 +108,135 @@ echo "</SELECT><br /><br /><hr />";
|
||||
echo '
|
||||
<form action="'.$_SERVER['PHP_SELF'].'" method="POST">
|
||||
<table cellspacing="4">
|
||||
<tr>
|
||||
<td>ID</td>
|
||||
<td><input type="text" name="id" disabled value="'.(intval($gebiet->getHighestId())+1).'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kurzbz</td>
|
||||
<td><input type="text" name="kurzbz" placeholder="Pflichtfeld"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bezeichnung German</td>
|
||||
<td><input type="text" name="bezeichnung_mehrsprachig_German"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<tr>
|
||||
<td>Bezeichnung English</td>
|
||||
<td><input type="text" name="bezeichnung_mehrsprachig_English"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Beschreibung</td>
|
||||
<td><textarea rows="" cols="" name="beschreibung"></textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zeit</td>
|
||||
<td><input type="text" name="zeit" placeholder="Pflichtfeld"/> hh:mm:ss</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Multiple Response</td>
|
||||
<td><input type="checkbox" name="multiple_respone"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kategorien</td>
|
||||
<td><input type="checkbox" name="kategorien"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zufällige Fragereihenfolge</td>
|
||||
<td><input type="checkbox" name="zufaellige_fragereihenfolge"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zufällige Vorschlagreihenfolge</td>
|
||||
<td><input type="checkbox" name="zufaellige_vorschlagreihenfolge"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Levelgleichverteilung</td>
|
||||
<td><input type="checkbox" name="levelgleichverteilung"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Maximale Punkteanzahl</td>
|
||||
<td><input type="text" name="maximale_punkteanzahl"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Maximale Frageanzahl</td>
|
||||
<td><input type="text" name="maximale_fragenanzahl"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Antworten pro Zeile</td>
|
||||
<td><input type="text" name="antworten_pro_zeile" placeholder="Pflichtfeld"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Start Level</td>
|
||||
<td><input type="text" name="start_level"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Richtige Fragen bis Levelaufstieg</td>
|
||||
<td><input type="text" name="richtige_fragen_bis_levelaufstieg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Falsche Fragen bis Levelabstieg</td>
|
||||
<td><input type="text" name="falsche_fragen_bis_levelabstieg"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" value="Speichern"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kurzbezeichnung</td>
|
||||
<td><input type="text" name="kurzbz" placeholder="Pflichtfeld" maxlength="10" value="'.(isset($_POST['kurzbz'])?$_POST['kurzbz']:'').'" required/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Bezeichnung (intern)</td>
|
||||
<td><input type="text" name="bezeichnung_intern" maxlength="50" value="'.(isset($_POST['bezeichnung_intern'])?$_POST['bezeichnung_intern']:'').'"/></td>
|
||||
</tr>';
|
||||
|
||||
foreach ($sprache->result as $row)
|
||||
{
|
||||
echo ' <tr>
|
||||
<td>Bezeichnung '.$row->bezeichnung_arr[$sprache_user].'</td>
|
||||
<td><input type="text" name="bezeichnung_mehrsprachig_'.$row->sprache.'" maxlength="255" value="'.(isset($_POST['bezeichnung_mehrsprachig_'.$row->sprache.''])?$_POST['bezeichnung_mehrsprachig_'.$row->sprache.'']:'').'"/></td>
|
||||
</tr>';
|
||||
}
|
||||
echo '
|
||||
<tr>
|
||||
<td>Beschreibung (intern)</td>
|
||||
<td><textarea rows="" cols="" name="beschreibung" style="font-size: 9pt">'.(isset($_POST['beschreibung'])?$_POST['beschreibung']:'').'</textarea></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zeit</td>
|
||||
<td><input type="text" name="zeit" placeholder="Pflichtfeld" value="'.(isset($_POST['zeit'])?$_POST['zeit']:'').'" required/> hh:mm:ss</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Multiple Response</td>
|
||||
<td><input type="checkbox" name="multiple_respone" '.(isset($_POST['multiple_respone'])?'checked':'').'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Kategorien</td>
|
||||
<td><input type="checkbox" name="kategorien" '.(isset($_POST['kategorien'])?'checked':'').'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zufällige Fragereihenfolge</td>
|
||||
<td><input type="checkbox" name="zufaellige_fragereihenfolge" '.(isset($_POST['zufaellige_fragereihenfolge'])?'checked':'').'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Zufällige Vorschlagreihenfolge</td>
|
||||
<td><input type="checkbox" name="zufaellige_vorschlagreihenfolge" '.(isset($_POST['zufaellige_vorschlagreihenfolge'])?'checked':'').'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Levelgleichverteilung</td>
|
||||
<td><input type="checkbox" name="levelgleichverteilung" '.(isset($_POST['levelgleichverteilung'])?'checked':'').'/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Maximale Punkteanzahl</td>
|
||||
<td><input type="text" name="maximale_punkteanzahl" maxlength="5" value="'.(isset($_POST['maximale_punkteanzahl'])?$_POST['maximale_punkteanzahl']:'').'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Maximale Frageanzahl</td>
|
||||
<td><input type="text" name="maximale_fragenanzahl" maxlength="5" value="'.(isset($_POST['maximale_fragenanzahl'])?$_POST['maximale_fragenanzahl']:'').'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Antworten pro Zeile</td>
|
||||
<td><input type="text" name="antworten_pro_zeile" placeholder="Pflichtfeld" maxlength="2" value="'.(isset($_POST['antworten_pro_zeile'])?$_POST['antworten_pro_zeile']:'').'" required/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Start Level</td>
|
||||
<td><input type="text" name="start_level" maxlength="5" value="'.(isset($_POST['start_level'])?$_POST['start_level']:'').'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Richtige Fragen bis Levelaufstieg</td>
|
||||
<td><input type="text" name="richtige_fragen_bis_levelaufstieg" maxlength="5" value="'.(isset($_POST['richtige_fragen_bis_levelaufstieg'])?$_POST['richtige_fragen_bis_levelaufstieg']:'').'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Falsche Fragen bis Levelabstieg</td>
|
||||
<td><input type="text" name="falsche_fragen_bis_levelabstieg" maxlength="5" value="'.(isset($_POST['falsche_fragen_bis_levelabstieg'])?$_POST['falsche_fragen_bis_levelabstieg']:'').'"/></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td></td>
|
||||
<td><input type="submit" value="Speichern"/></td>
|
||||
</tr>
|
||||
</table>
|
||||
<input type="hidden" name="save" value="save"/>
|
||||
</form>
|
||||
';
|
||||
|
||||
//Speichern der Daten
|
||||
if (isset($_POST['save']) && $_POST['save']=='save')
|
||||
if (isset($_POST['save']) && $_POST['save'] == 'save')
|
||||
{
|
||||
/*
|
||||
* kurzbz
|
||||
* zeit
|
||||
* antw/zeile
|
||||
*/
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
die('Sie haben keine Berechtigung fuer diese Aktion');
|
||||
if (!$rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
if (isset($_POST['kurzbz']) && $_POST['kurzbz']!='' && isset($_POST['zeit']) && $_POST['zeit']!='' && isset($_POST['antworten_pro_zeile']) && $_POST['antworten_pro_zeile']!='')
|
||||
if (isset($_POST['kurzbz']) && $_POST['kurzbz'] != '' && isset($_POST['zeit']) && $_POST['zeit'] != '' && isset($_POST['antworten_pro_zeile']) && $_POST['antworten_pro_zeile'] != '')
|
||||
{
|
||||
$gebiet = new gebiet();
|
||||
|
||||
$bezeichnung_mehrsprachig=array();
|
||||
foreach($sprache->result as $row_sprache)
|
||||
//Test, ob kurzbz schon vorhanden
|
||||
if ($result = $db->db_query('SELECT kurzbz FROM testtool.tbl_gebiet WHERE kurzbz = '.$db->db_add_param($_POST['kurzbz']).' LIMIT 1;'))
|
||||
{
|
||||
if(isset($_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache]))
|
||||
$bezeichnung_mehrsprachig[$row_sprache->sprache]=$_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache];
|
||||
}
|
||||
$gebiet->bezeichnung_mehrsprachig = $bezeichnung_mehrsprachig;
|
||||
|
||||
$gebiet->kurzbz = $_POST['kurzbz'];
|
||||
$gebiet->bezeichnung = $_POST['bezeichnung_mehrsprachig_German'];
|
||||
$gebiet->beschreibung = $_POST['beschreibung'];
|
||||
$gebiet->zeit = $_POST['zeit'];
|
||||
$gebiet->multipleresponse = isset($_POST['multiple_respone']);
|
||||
$gebiet->kategorien = isset($_POST['kategorien']);
|
||||
$gebiet->maxfragen = $_POST['maximale_fragenanzahl'];
|
||||
$gebiet->zufallfrage = isset($_POST['zufaellige_fragereihenfolge']);
|
||||
$gebiet->zufallvorschlag = isset($_POST['zufaellige_vorschlagreihenfolge']);
|
||||
$gebiet->levelgleichverteilung = isset($_POST['levelgleichverteilung']);
|
||||
$gebiet->maxpunkte = $_POST['maximale_punkteanzahl'];
|
||||
$gebiet->level_start = $_POST['start_level'];
|
||||
$gebiet->level_sprung_auf = $_POST['richtige_fragen_bis_levelaufstieg'];
|
||||
$gebiet->level_sprung_ab = $_POST['falsche_fragen_bis_levelabstieg'];
|
||||
$gebiet->insertamum = date('Y-m-d H:i:s');
|
||||
$gebiet->insertvon = $user;
|
||||
$gebiet->antwortenprozeile = $_POST['antworten_pro_zeile'];
|
||||
|
||||
if($gebiet->save(true))
|
||||
{
|
||||
echo 'Daten erfolgreich gespeichert';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">Fehler beim Speichern: '.$gebiet->errormsg.'</span>';
|
||||
if ($db->db_num_rows($result) == 0)
|
||||
{
|
||||
$gebiet = new gebiet();
|
||||
|
||||
$bezeichnung_mehrsprachig = array();
|
||||
foreach ($sprache->result as $row_sprache)
|
||||
{
|
||||
$bezeichnung_mehrsprachig[$row_sprache->sprache] = $_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache];
|
||||
}
|
||||
$gebiet->bezeichnung_mehrsprachig = $bezeichnung_mehrsprachig;
|
||||
|
||||
$gebiet->kurzbz = $_POST['kurzbz'];
|
||||
$gebiet->bezeichnung = $_POST['bezeichnung_intern'];
|
||||
$gebiet->beschreibung = $_POST['beschreibung'];
|
||||
$gebiet->zeit = $_POST['zeit'];
|
||||
$gebiet->multipleresponse = isset($_POST['multiple_respone']);
|
||||
$gebiet->kategorien = isset($_POST['kategorien']);
|
||||
$gebiet->maxfragen = $_POST['maximale_fragenanzahl'];
|
||||
$gebiet->zufallfrage = isset($_POST['zufaellige_fragereihenfolge']);
|
||||
$gebiet->zufallvorschlag = isset($_POST['zufaellige_vorschlagreihenfolge']);
|
||||
$gebiet->levelgleichverteilung = isset($_POST['levelgleichverteilung']);
|
||||
$gebiet->maxpunkte = $_POST['maximale_punkteanzahl'];
|
||||
$gebiet->level_start = $_POST['start_level'];
|
||||
$gebiet->level_sprung_auf = $_POST['richtige_fragen_bis_levelaufstieg'];
|
||||
$gebiet->level_sprung_ab = $_POST['falsche_fragen_bis_levelabstieg'];
|
||||
$gebiet->insertamum = date('Y-m-d H:i:s');
|
||||
$gebiet->insertvon = $user;
|
||||
$gebiet->antwortenprozeile = $_POST['antworten_pro_zeile'];
|
||||
|
||||
if ($gebiet->save(true))
|
||||
{
|
||||
echo 'Daten erfolgreich gespeichert';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">Fehler beim Speichern: '.$gebiet->errormsg.'</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
echo '<span class="error">Kurzbezeichnung ist schon vorhanden</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
|
||||
@@ -31,7 +31,7 @@ require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/studiengang.class.php');
|
||||
require_once('../../../include/sprache.class.php');
|
||||
|
||||
if (!$user=get_uid())
|
||||
if (!$user = get_uid())
|
||||
die('Sie sind nicht angemeldet. Es wurde keine Benutzer UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
|
||||
|
||||
$db = new basis_db();
|
||||
@@ -40,7 +40,9 @@ $rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
$sprache = new sprache();
|
||||
$sprache->getAll(true);
|
||||
$sprache->getAll(true, 'index');
|
||||
|
||||
$sprache_user = getSprache();
|
||||
|
||||
echo '
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
@@ -62,7 +64,7 @@ echo '
|
||||
|
||||
function deleteZuordnung(ablauf_id)
|
||||
{
|
||||
if(confirm("Wollen Sie dieses Zuordnung wirklich entfernen?"))
|
||||
if (confirm("Wollen Sie dieses Zuordnung wirklich entfernen?"))
|
||||
{
|
||||
$("#data").html(\'<form action="edit_gebiet.php" name="sendform" id="sendform" method="POST"><input type="hidden" name="action" value="deleteZuordnung" /><input type="hidden" name="ablauf_id" value="\'+ablauf_id+\'" /></form>\');
|
||||
document.sendform.submit();
|
||||
@@ -76,17 +78,17 @@ echo '
|
||||
<div id="data"></div>
|
||||
';
|
||||
|
||||
if(isset($_GET['gebiet_id']))
|
||||
$gebiet_id=$_GET['gebiet_id'];
|
||||
if (isset($_GET['gebiet_id']))
|
||||
$gebiet_id = $_GET['gebiet_id'];
|
||||
else
|
||||
$gebiet_id='';
|
||||
$gebiet_id = '';
|
||||
|
||||
$stg_kz = (isset($_GET['stg_kz'])?$_GET['stg_kz']:'-1');
|
||||
|
||||
echo '<h1> Gebiet bearbeiten</h1>';
|
||||
|
||||
if(!$rechte->isBerechtigt('basis/testtool'))
|
||||
die('Sie haben keine Berechtigung fuer diese Seite');
|
||||
if (!$rechte->isBerechtigt('basis/testtool'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$gebiet = new gebiet();
|
||||
$gebiet->getAll();
|
||||
@@ -99,13 +101,13 @@ echo 'Gebiet: <SELECT name="gebiet_id" onchange="document.getElementById(\'gebie
|
||||
|
||||
foreach ($gebiet->result as $row)
|
||||
{
|
||||
if($gebiet_id=='')
|
||||
$gebiet_id=$row->gebiet_id;
|
||||
if ($gebiet_id == '')
|
||||
$gebiet_id = $row->gebiet_id;
|
||||
|
||||
if($gebiet_id==$row->gebiet_id)
|
||||
$selected='selected';
|
||||
if ($gebiet_id == $row->gebiet_id)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected='';
|
||||
$selected = '';
|
||||
|
||||
echo '<OPTION value="'.$row->gebiet_id.'" '.$selected.'>'.$row->bezeichnung.' - '.$row->kurzbz.' - '.$row->zeit.'</OPTION>';
|
||||
}
|
||||
@@ -116,22 +118,21 @@ echo '</SELECT>
|
||||
echo '<br /><br />';
|
||||
|
||||
// Ablaufzuordnung entfernen
|
||||
if(isset($_POST['action']) && $_POST['action']=='deleteZuordnung')
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'deleteZuordnung')
|
||||
{
|
||||
if(!isset($_POST['ablauf_id']) || !is_numeric($_POST['ablauf_id']))
|
||||
if (!isset($_POST['ablauf_id']) || !is_numeric($_POST['ablauf_id']))
|
||||
die('ungueltige Parameteruebergabe');
|
||||
|
||||
$ablauf_id = $_POST['ablauf_id'];
|
||||
|
||||
$ablauf = new gebiet();
|
||||
if($ablauf->deleteAblaufZuordnung($ablauf_id))
|
||||
if ($ablauf->deleteAblaufZuordnung($ablauf_id))
|
||||
echo '<span class="ok">Ablauf wurde entfernt</span>';
|
||||
else
|
||||
echo '<span class="error">Fehler beim Entfernen:'.$ablauf->errormsg.'</span>';
|
||||
|
||||
}
|
||||
// Ablaufzuordnung hinzufügen
|
||||
if(isset($_POST['action']) && $_POST['action']=='saveAblauf')
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'saveAblauf')
|
||||
{
|
||||
$ablauf_vorgaben_id = $_POST['ablauf_vorgaben_id'];
|
||||
$studiengang_kz = $_POST['studiengang_kz'];
|
||||
@@ -149,21 +150,20 @@ if(isset($_POST['action']) && $_POST['action']=='saveAblauf')
|
||||
$ablauf->new = true;
|
||||
$ablauf->gebiet_id = $gebiet_id;
|
||||
|
||||
if($ablauf->saveAblauf())
|
||||
if ($ablauf->saveAblauf())
|
||||
echo '<span class="ok">Ablauf gespeichert</span>';
|
||||
else
|
||||
echo '<span class="error">Fehler beim Speichern:'.$ablauf->errormsg.'</span>';
|
||||
|
||||
}
|
||||
|
||||
//Speichern der Daten
|
||||
if(isset($_POST['speichern']))
|
||||
if (isset($_POST['speichern']))
|
||||
{
|
||||
if(!$rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
die('Sie haben keine Berechtigung fuer diese Aktion');
|
||||
if (!$rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$gebiet = new gebiet();
|
||||
if($gebiet->load($gebiet_id))
|
||||
if ($gebiet->load($gebiet_id))
|
||||
{
|
||||
$bezeichnung_mehrsprachig=array();
|
||||
foreach($sprache->result as $row_sprache)
|
||||
@@ -191,7 +191,7 @@ if(isset($_POST['speichern']))
|
||||
$gebiet->updatevon = $user;
|
||||
$gebiet->antwortenprozeile = $_POST['antwortenprozeile'];
|
||||
|
||||
if($gebiet->save(false))
|
||||
if ($gebiet->save(false))
|
||||
{
|
||||
echo 'Daten erfolgreich gespeichert';
|
||||
}
|
||||
@@ -206,7 +206,7 @@ if(isset($_POST['speichern']))
|
||||
}
|
||||
}
|
||||
|
||||
if($gebiet_id!='')
|
||||
if ($gebiet_id != '')
|
||||
{
|
||||
$gebiet = new gebiet($gebiet_id);
|
||||
|
||||
@@ -222,16 +222,16 @@ if($gebiet_id!='')
|
||||
echo '<td>Kurzbz</td><td><input type="text" maxlength="10" size="10" name="" value="'.$gebiet->kurzbz.'" disabled /><input type="hidden" name="kurzbz" value="'.$gebiet->kurzbz.'"/></td>';
|
||||
echo '</tr><tr>';
|
||||
//Bezeichnung
|
||||
echo '<td>Bezeichnung</td><td><input type="text" name="bezeichnung" value="'.$gebiet->bezeichnung.'" /></td>';
|
||||
echo '<td>Bezeichnung (intern)</td><td><input type="text" maxlength="50" name="bezeichnung" value="'.$gebiet->bezeichnung.'" /></td>';
|
||||
echo '</tr><tr>';
|
||||
foreach($sprache->result as $s)
|
||||
foreach ($sprache->result as $s)
|
||||
{
|
||||
echo '<td>Bezeichnung '.$s->sprache.'</td>';
|
||||
echo '<td><input type="text" maxlength="50" name="bezeichnung_mehrsprachig_'.$s->sprache.'" value="'.(isset($gebiet->bezeichnung_mehrsprachig[$s->sprache])?$db->convert_html_chars($gebiet->bezeichnung_mehrsprachig[$s->sprache]):'').'" /></td>';
|
||||
echo '<td>Bezeichnung '.$s->bezeichnung_arr[$s->sprache].'</td>';
|
||||
echo '<td><input type="text" maxlength="255" name="bezeichnung_mehrsprachig_'.$s->sprache.'" value="'.(isset($gebiet->bezeichnung_mehrsprachig[$s->sprache])?$db->convert_html_chars($gebiet->bezeichnung_mehrsprachig[$s->sprache]):'').'" /></td>';
|
||||
echo '</tr><tr>';
|
||||
}
|
||||
//Beschreibung
|
||||
echo '<td>Beschreibung</td><td><textarea name="beschreibung">'.$gebiet->beschreibung.'</textarea></td>';
|
||||
echo '<td>Beschreibung (intern)</td><td><textarea name="beschreibung" style="font-size: 9pt">'.$gebiet->beschreibung.'</textarea></td>';
|
||||
echo '</tr><tr>';
|
||||
//Zeit
|
||||
echo '<td>Zeit</td><td><input type="text" name="zeit" size="8" maxlength="8" value="'.$gebiet->zeit.'"> hh:mm:ss</td>';
|
||||
@@ -248,15 +248,15 @@ if($gebiet_id!='')
|
||||
echo '</tr><tr>';
|
||||
// empfohlene maximalpunkte berechnen und anzeigen
|
||||
$maximalpunkte = $gebiet->berechneMaximalpunkte($gebiet_id);
|
||||
if($gebiet->maxpunkte!=$maximalpunkte)
|
||||
$hinweis = '<span class="error">empfohlene Maximalpunkteanzahl: '.$maximalpunkte.'</span>';
|
||||
if ($gebiet->maxpunkte != $maximalpunkte)
|
||||
$hinweis = ' <span class="error">empfohlene Maximalpunkteanzahl: '.round($maximalpunkte).(round($maximalpunkte) != $maximalpunkte?' ('.$maximalpunkte.' gerundet)':'').'</span>';
|
||||
else
|
||||
$hinweis ='';
|
||||
$hinweis = '';
|
||||
echo '<td>Maximale Punkteanzahl</td><td><input type="text" size="5" maxlength="5" name="maxpunkte" value="'.$gebiet->maxpunkte.'">'.$hinweis.'</td>';
|
||||
echo '</tr><tr>';
|
||||
echo '<td>Maximale Fragenanzahl</td><td><input type="text" size="5" maxlength="5" name="maxfragen" value="'.$gebiet->maxfragen.'"></td>';
|
||||
echo '</tr><tr>';
|
||||
echo '<td>Antworten pro Zeile</td><td><input type="text" size="5" maxlength="5" name="antwortenprozeile" value="'.$gebiet->antwortenprozeile.'"></td>';
|
||||
echo '<td>Antworten pro Zeile</td><td><input type="text" size="5" maxlength="2" name="antwortenprozeile" value="'.$gebiet->antwortenprozeile.'" required></td>';
|
||||
echo '</tr><tr>';
|
||||
echo '<td>Start Level</td><td><input type="text" size="5" maxlength="5" name="level_start" value="'.$gebiet->level_start.'"></td>';
|
||||
echo '</tr><tr>';
|
||||
@@ -276,7 +276,7 @@ if($gebiet_id!='')
|
||||
$gebiet->loadAblaufGebiet($gebiet_id);
|
||||
|
||||
$studiengang = new studiengang();
|
||||
$studiengang->getAll('typ, kurzbz',false);
|
||||
$studiengang->getAll('typ, kurzbz', false);
|
||||
|
||||
echo '<table id="t1" class="tablesorter">
|
||||
<thead>
|
||||
@@ -290,7 +290,7 @@ if($gebiet_id!='')
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>';
|
||||
foreach($gebiet->result as $row)
|
||||
foreach ($gebiet->result as $row)
|
||||
{
|
||||
echo '<tr>
|
||||
<td>'.$studiengang->kuerzel_arr[$row->studiengang_kz].'</td>
|
||||
@@ -305,7 +305,7 @@ if($gebiet_id!='')
|
||||
echo '<tfoot>
|
||||
<tr>
|
||||
<td><select name="studiengang_kz">';
|
||||
foreach($studiengang->kuerzel_arr as $stg_kz=>$row_stg)
|
||||
foreach ($studiengang->kuerzel_arr as $stg_kz => $row_stg)
|
||||
{
|
||||
echo '<option value="'.$stg_kz.'">'.$row_stg.'</option>';
|
||||
}
|
||||
@@ -320,7 +320,7 @@ if($gebiet_id!='')
|
||||
$ablauf_vorgabe = new gebiet();
|
||||
$ablauf_vorgabe->getAblaufVorgaben();
|
||||
|
||||
foreach($ablauf_vorgabe->result as $vorgabe)
|
||||
foreach ($ablauf_vorgabe->result as $vorgabe)
|
||||
{
|
||||
echo '<option value="'.$vorgabe->ablauf_vorgaben_id.'">'.$studiengang->kuerzel_arr[$vorgabe->studiengang_kz].' - Sprache: '.$vorgabe->sprache.' Sprachwahl: '.($vorgabe->sprachwahl?'Ja':'Nein').' Content:'.$vorgabe->content_id.'</option>';
|
||||
}
|
||||
|
||||
@@ -0,0 +1,478 @@
|
||||
<?php
|
||||
/* Copyright (C) 2009 Technikum-Wien
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This program is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with this program; if not, write to the Free Software
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at> and
|
||||
* Gerald Simane-Sequens <gerald.simane-sequens@technikum-wien.at>
|
||||
*/
|
||||
/**
|
||||
* Seite zum Editieren von Testtool-Gebieten
|
||||
*/
|
||||
|
||||
require_once('../../../config/cis.config.inc.php');
|
||||
require_once('../../../include/functions.inc.php');
|
||||
require_once('../../../include/gebiet.class.php');
|
||||
require_once('../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../include/studiengang.class.php');
|
||||
require_once('../../../include/sprache.class.php');
|
||||
require_once('../../../include/studienplan.class.php');
|
||||
require_once('../../../include/studiensemester.class.php');
|
||||
require_once('../../../include/organisationsform.class.php');
|
||||
require_once('../../../include/ablauf.class.php');
|
||||
|
||||
if (!$user = get_uid())
|
||||
die('Sie sind nicht angemeldet. Es wurde keine Benutzer UID gefunden ! <a href="javascript:history.back()">Zurück</a>');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
{
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');
|
||||
}
|
||||
|
||||
$rechte = new benutzerberechtigung();
|
||||
$rechte->getBerechtigungen($user);
|
||||
|
||||
$sprache = new sprache();
|
||||
$sprache->getAll(true);
|
||||
|
||||
echo '
|
||||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
<head>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
|
||||
<link href="../../../skin/style.css.php" rel="stylesheet" type="text/css">
|
||||
<link href="../../../skin/tablesort.css" rel="stylesheet" type="text/css">
|
||||
<script type="text/javascript" src="../../../include/js/jquery1.9.min.js" ></script>
|
||||
<script type="text/javascript">
|
||||
$(document).ready(function()
|
||||
{
|
||||
$("#t1").tablesorter(
|
||||
{
|
||||
sortList: [[3,0],[1,0]],
|
||||
widgets: ["zebra"]
|
||||
});
|
||||
});
|
||||
|
||||
function deleteZuordnung(ablauf_id)
|
||||
{
|
||||
if (confirm("Wollen Sie dieses Zuordnung wirklich entfernen?"))
|
||||
{
|
||||
$("#data").html(\'<form action="edit_gebiet.php" name="sendform" id="sendform" method="POST"><input type="hidden" name="action" value="deleteZuordnung" /><input type="hidden" name="ablauf_id" value="\'+ablauf_id+\'" /></form>\');
|
||||
document.sendform.submit();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
|
||||
</script>
|
||||
</head>
|
||||
<body>
|
||||
<div id="data"></div>
|
||||
';
|
||||
|
||||
if (isset($_GET['gebiet_id']))
|
||||
$gebiet_id = $_GET['gebiet_id'];
|
||||
else
|
||||
$gebiet_id = '';
|
||||
|
||||
$stg_kz = (isset($_GET['stg_kz'])?$_GET['stg_kz']:'-1');
|
||||
|
||||
echo '<h1> Gebiete an Studiengänge anhängen</h1>';
|
||||
|
||||
if (!$rechte->isBerechtigt('basis/testtool'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$studiengang = new studiengang();
|
||||
$studiengang->getAll('typ, kurzbz', false);
|
||||
$gebiet = new gebiet();
|
||||
$gebiet->getAll();
|
||||
$ablauf_vorgabe = new gebiet();
|
||||
$ablauf_vorgabe->getAblaufVorgaben();
|
||||
|
||||
|
||||
echo '<a href="index.php?gebiet_id='.$gebiet_id.'&stg_kz='.$stg_kz.'" class="Item">Zurück zur Admin Seite</a><br /><br />';
|
||||
echo '<table><tr><td>';
|
||||
|
||||
//Studiengang Dropdown
|
||||
echo '<form id="studiengang_form" action="'.$_SERVER['PHP_SELF'].'" method="GET">';
|
||||
echo 'Studiengang: </td><td><SELECT name="stg_kz" onchange="document.getElementById(\'studiengang_form\').submit();"><OPTION value="-1">-- Keine Auswahl --</OPTION>';
|
||||
$i = 0;
|
||||
$selected = '';
|
||||
$result_count = count($studiengang->result);
|
||||
for ($i = 0; $i < $result_count; $i++)
|
||||
{
|
||||
if ($stg_kz == $studiengang->result[$i]->studiengang_kz) $selected = 'selected';
|
||||
echo '<OPTION value="'.$studiengang->result[$i]->studiengang_kz.'" '.$selected.' >'.strtoupper($studiengang->result[$i]->typ.$studiengang->result[$i]->kurzbz).' ('.$studiengang->result[$i]->bezeichnung.')</OPTION>';
|
||||
$selected = '';
|
||||
}
|
||||
echo '</SELECT>';
|
||||
|
||||
// Studienplan Dropdown
|
||||
echo "</tr><tr><td>Studienplan: </td><td>";
|
||||
drawStudienplanDropdown($stg_kz, $db, "stp_id", 'studiengang_form');
|
||||
echo "</form></td></tr></table>";
|
||||
echo '<br /><br />';
|
||||
|
||||
// Gebiet speichern
|
||||
if (isset($_GET['action']) && $_GET['action'] == 'save')
|
||||
{
|
||||
if (isset($_POST['gebiet_id']) && $_POST['gebiet_id'] != '' &&
|
||||
isset($_POST['reihung']) && $_POST['reihung'] != '' &&
|
||||
isset($_POST['gewicht']) && $_POST['gewicht'] != '' &&
|
||||
isset($_POST['semester']) && $_POST['semester'] != '' &&
|
||||
isset($_POST['studienplan']) && $_POST['studienplan'] != '')
|
||||
{
|
||||
$ablauf = new ablauf();
|
||||
$ablauf->studiengang_kz = $_POST['stg_kz'];
|
||||
$ablauf->gebiet_id = $_POST['gebiet_id'];
|
||||
$ablauf->reihung = $_POST['reihung'];
|
||||
$ablauf->gewicht = $_POST['gewicht'];
|
||||
$ablauf->semester = $_POST['semester'];
|
||||
$ablauf->insertvon = $user;
|
||||
$ablauf->insertamum = date('Y-m-d H:i:s');
|
||||
$ablauf->studienplan_id = $_POST['studienplan'];
|
||||
|
||||
if (!$ablauf->save(true))
|
||||
echo $ablauf->errormsg;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">Bitte füllen Sie alle Felder aus</span>';
|
||||
}
|
||||
}
|
||||
// Gebiet entfernen
|
||||
if (isset($_GET['action']) && $_GET['action'] == 'delete')
|
||||
{
|
||||
if (isset($_POST['gebiet_id']) && $_POST['gebiet_id'] != '')
|
||||
{
|
||||
$ablauf = new ablauf();
|
||||
$ablauf->getAblaufId($stg_kz, $_POST['gebiet_id']);
|
||||
$ablauf_id = $ablauf->result[0];
|
||||
if ($ablauf->delete($ablauf_id))
|
||||
echo $ablauf->errormsg;
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo '<span class="error">Bitte füllen Sie alle Felder aus</span>';
|
||||
}
|
||||
}
|
||||
// Gebiet bearbeiten
|
||||
if (isset($_GET['action']) && $_GET['action'] == 'edit')
|
||||
{
|
||||
if (isset($_POST['gebiet_id']) && $_POST['gebiet_id'] != '')
|
||||
{
|
||||
$ablauf = new ablauf();
|
||||
$ablauf->getAblaufId($stg_kz, $_POST['gebiet_id']);
|
||||
$ablauf_id = $ablauf->result[0];
|
||||
$ablauf = new ablauf($ablauf_id);
|
||||
$ablauf = $ablauf->result[0];
|
||||
|
||||
$gebiet = new gebiet($_POST['gebiet_id']);
|
||||
$studiengang = new studiengang($stg_kz);
|
||||
|
||||
echo '<table><form action="'.$_SERVER['PHP_SELF'].'?stg_kz='.$stg_kz.'&action=editsave" method="POST">
|
||||
<tr><td>Studiengang_kz: </td><td><input type="text" name="stg_kz" value="'.strtoupper($studiengang->typ.$studiengang->kurzbz).' ('.$studiengang->bezeichnung.')'.'" style="width:98.5%" disabled /></td></tr>
|
||||
<tr><td>Gebiet: </td><td><input type="text" value="'.$gebiet->kurzbz.' ('.$gebiet->bezeichnung.')" style="width:98.5%" disabled /><input type="hidden" name="gebiet_id" value="'.$ablauf->gebiet_id.'"/></td></tr>
|
||||
<tr><td>Reihung: </td><td><input type="text" name="reihung" value="'.$ablauf->reihung.'" style="width:98.5%" /></td></tr>
|
||||
<tr><td>Gewichtung: </td><td><input type="text" name="gewicht" value="'.$ablauf->gewicht.'" style="width:98.5%" /></td></tr>
|
||||
<tr><td>Semester: </td><td><input type="text" name="semester" value="'.$ablauf->semester.'" style="width:98.5%" /></td></tr>
|
||||
<tr><td>Studienplan: </td><td>';
|
||||
drawStudienplanDropdown($stg_kz, $db, $name = 'studienplan_id', null, 'width:100%', $ablauf->studienplan_id);
|
||||
echo '</td></tr>
|
||||
<tr><td></td><td><input type="submit" value="Speichern" style="width:50%"/><a href="'.$_SERVER['PHP_SELF'].'?stg_kz='.$stg_kz.'"><input type="button" value="Abbrechen" style="width:50%"></a></td></tr>
|
||||
</form></table>';
|
||||
}
|
||||
else
|
||||
{
|
||||
//echo '<span class="error">Bitte füllen Sie alle Felder aus</span>';
|
||||
}
|
||||
}
|
||||
// Bearbeitetes Gebiet speichern
|
||||
if (isset($_GET['action']) && $_GET['action'] == 'editsave')
|
||||
{
|
||||
if (isset($_POST['reihung']) && $_POST['reihung'] != '' && isset($_POST['gewicht']) && $_POST['gewicht'] != '' && isset($_POST['semester']) && $_POST['semester'] != '')
|
||||
{
|
||||
$ablauf = new ablauf();
|
||||
$ablauf->getAblaufId($stg_kz, $_POST['gebiet_id']);
|
||||
$ablauf_id = $ablauf->result[0];
|
||||
$ablauf = new ablauf($ablauf_id);
|
||||
$ablauf = $ablauf->result[0];
|
||||
$ablauf->reihung = $_POST['reihung'];
|
||||
$ablauf->gewicht = $_POST['gewicht'];
|
||||
$ablauf->semester = $_POST['semester'];
|
||||
if (isset($_POST['studienplan_id'])) // && $_POST['studienplan_id'] != ''
|
||||
$ablauf->studienplan_id = $_POST['studienplan_id'];
|
||||
|
||||
if (!$ablauf->save(false))
|
||||
echo $ablauf->errormsg;
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">Bitte füllen Sie alle Felder aus</span>';
|
||||
}
|
||||
}
|
||||
|
||||
// Liste aller zugehoerigen Gebiete anzeigen
|
||||
$ablauf = new ablauf();
|
||||
if (isset($_GET['stp_id']) && $_GET['stp_id'] != '')
|
||||
{
|
||||
$ablauf->getAblaufGebiete($stg_kz, $_GET['stp_id']);
|
||||
}
|
||||
else
|
||||
{
|
||||
$ablauf->getAblaufGebiete($stg_kz);
|
||||
}
|
||||
$gebieteangehaengt = array();
|
||||
$studienplan = new studienplan();
|
||||
|
||||
if ($stg_kz != -1)
|
||||
{
|
||||
echo '
|
||||
<table id="t1" class="tablesorter">
|
||||
<thead><tr>
|
||||
<th>Gebiet</th>
|
||||
<th>Reihung</th>
|
||||
<th>Gewichtung</th>
|
||||
<th>Semester</th>
|
||||
<th>Studienplan</th>
|
||||
<th></th>
|
||||
</tr></thead><tbody>';
|
||||
foreach ($ablauf->result as $row)
|
||||
{
|
||||
$studienplan->loadStudienplan($row->studienplan_id);
|
||||
$gebiet = new gebiet($row->gebiet_id);
|
||||
array_push($gebieteangehaengt, $gebiet->gebiet_id);
|
||||
echo '<tr><td>'.$gebiet->kurzbz.' ('.$gebiet->bezeichnung.')</td><td>'.$row->reihung.'</td><td>'.$row->gewicht.'</td><td>'.$row->semester.'</td><td>'.$studienplan->bezeichnung.'</td><td>
|
||||
<form action="'.$_SERVER['PHP_SELF'].'?stg_kz='.$stg_kz.'&action=edit" method="POST" style="float:left" id="fe'.$gebiet->gebiet_id.'"><a onclick="document.getElementById(\'fe'.$gebiet->gebiet_id.'\').submit();">edit</a>
|
||||
<input type="hidden" name="gebiet_id" value="'.$gebiet->gebiet_id.'" />
|
||||
</form>
|
||||
<form action="'.$_SERVER['PHP_SELF'].'?stg_kz='.$stg_kz.'&action=delete" method="POST" style="float:left; margin-left:5px;" id="fd'.$gebiet->gebiet_id.'"><a onclick="document.getElementById(\'fd'.$gebiet->gebiet_id.'\').submit();">delete</a>
|
||||
<input type="hidden" name="gebiet_id" value="'.$gebiet->gebiet_id.'" />
|
||||
</form></td></tr>';
|
||||
}
|
||||
|
||||
$gebiet->getAll();
|
||||
echo '</tbody><tfoot><tr><form action="'.$_SERVER['PHP_SELF'].'?stg_kz='.$stg_kz.'&action=save" method="POST"><input type="hidden" name="stg_kz" value="'.$stg_kz.'" /><td><SELECT name="gebiet_id">';
|
||||
foreach ($gebiet->result as $row)
|
||||
{
|
||||
if (!in_array($row->gebiet_id, $gebieteangehaengt))
|
||||
{
|
||||
if ($gebiet_id == '')
|
||||
$gebiet_id = $row->gebiet_id;
|
||||
if ($gebiet_id == $row->gebiet_id)
|
||||
$selected = 'selected';
|
||||
else
|
||||
$selected = '';
|
||||
echo '<OPTION value="'.$row->gebiet_id.'" '.$selected.'>'.$row->kurzbz.' ('.$row->bezeichnung.')</OPTION>';
|
||||
}
|
||||
}
|
||||
echo '</SELECT></td>';
|
||||
echo '<td><input type="text" name="reihung" /></td>';
|
||||
echo '<td><input type="text" name="gewicht" /></td>';
|
||||
echo '<td><input type="text" name="semester" /></td>';
|
||||
echo '<td>';
|
||||
drawStudienplanDropdown($stg_kz, $db, "studienplan");
|
||||
echo '</td>';
|
||||
echo '<td><input type="submit" value="Speichern"/></td></form></tr></tfoot></table>';
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
// Ablaufzuordnung entfernen
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'deleteZuordnung')
|
||||
{
|
||||
if (!isset($_POST['ablauf_id']) || !is_numeric($_POST['ablauf_id']))
|
||||
die('ungueltige Parameteruebergabe');
|
||||
|
||||
$ablauf_id = $_POST['ablauf_id'];
|
||||
|
||||
$ablauf = new gebiet();
|
||||
if ($ablauf->deleteAblaufZuordnung($ablauf_id))
|
||||
echo '<span class="ok">Ablauf wurde entfernt</span>';
|
||||
else
|
||||
echo '<span class="error">Fehler beim Entfernen:'.$ablauf->errormsg.'</span>';
|
||||
}
|
||||
// Ablaufzuordnung hinzufügen
|
||||
if (isset($_POST['action']) && $_POST['action'] == 'saveAblauf')
|
||||
{
|
||||
$ablauf_vorgaben_id = $_POST['ablauf_vorgaben_id'];
|
||||
$studiengang_kz = $_POST['studiengang_kz'];
|
||||
$reihung = $_POST['reihung'];
|
||||
$gewicht = $_POST['gewicht'];
|
||||
$semester = $_POST['semester'];
|
||||
|
||||
$ablauf = new gebiet();
|
||||
|
||||
$ablauf->ablauf_vorgaben_id = $ablauf_vorgaben_id;
|
||||
$ablauf->studiengang_kz = $studiengang_kz;
|
||||
$ablauf->reihung = $reihung;
|
||||
$ablauf->gewicht = $gewicht;
|
||||
$ablauf->semester = $semester;
|
||||
$ablauf->new = true;
|
||||
$ablauf->gebiet_id = $gebiet_id;
|
||||
|
||||
if ($ablauf->saveAblauf())
|
||||
echo '<span class="ok">Ablauf gespeichert</span>';
|
||||
else
|
||||
echo '<span class="error">Fehler beim Speichern:'.$ablauf->errormsg.'</span>';
|
||||
}
|
||||
|
||||
//Speichern eines neuen Eintrags
|
||||
if (isset($_POST['speichern']))
|
||||
{
|
||||
if (!$rechte->isBerechtigt('basis/testtool', null, 'suid'))
|
||||
die($rechte->errormsg);
|
||||
|
||||
$gebiet = new gebiet();
|
||||
if ($gebiet->load($gebiet_id))
|
||||
{
|
||||
$bezeichnung_mehrsprachig = array();
|
||||
foreach ($sprache->result as $row_sprache)
|
||||
{
|
||||
if (isset($_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache]) && $_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache] != '')
|
||||
$bezeichnung_mehrsprachig[$row_sprache->sprache] = $_POST['bezeichnung_mehrsprachig_'.$row_sprache->sprache];
|
||||
}
|
||||
$gebiet->bezeichnung_mehrsprachig = $bezeichnung_mehrsprachig;
|
||||
|
||||
$gebiet->kurzbz = $_POST['kurzbz'];
|
||||
$gebiet->bezeichnung = $_POST['bezeichnung_mehrsprachig_German'];
|
||||
$gebiet->beschreibung = $_POST['beschreibung'];
|
||||
$gebiet->zeit = $_POST['zeit'];
|
||||
$gebiet->multipleresponse = isset($_POST['multipleresponse']);
|
||||
$gebiet->kategorien = isset($_POST['kategorien']);
|
||||
$gebiet->zufallfrage = isset($_POST['zufallfrage']);
|
||||
$gebiet->zufallvorschlag = isset($_POST['zufallvorschlag']);
|
||||
$gebiet->levelgleichverteilung = isset($_POST['levelgleichverteilung']);
|
||||
$gebiet->maxpunkte = $_POST['maxpunkte'];
|
||||
$gebiet->maxfragen = $_POST['maxfragen'];
|
||||
$gebiet->level_start = $_POST['level_start'];
|
||||
$gebiet->level_sprung_auf = $_POST['level_sprung_auf'];
|
||||
$gebiet->level_sprung_ab = $_POST['level_sprung_ab'];
|
||||
$gebiet->updateamum = date('Y-m-d H:i:s');
|
||||
$gebiet->updatevon = $user;
|
||||
$gebiet->antwortenprozeile = $_POST['antwortenprozeile'];
|
||||
|
||||
if ($gebiet->save(false))
|
||||
{
|
||||
echo 'Daten erfolgreich gespeichert';
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">Fehler beim Speichern: '.$gebiet->errormsg.'</span>';
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
echo '<span class="error">Fehler beim Laden des Gebiets</span>';
|
||||
}
|
||||
}
|
||||
|
||||
echo '</body></html>';
|
||||
|
||||
|
||||
/**
|
||||
* Zeichnet das Dropdown zur Auswahl des Studienplans
|
||||
* @param integer $stg_kz Studiengang.
|
||||
* @param string $db Datenbankverbindung.
|
||||
* @param string $name Name des <select name="???">.
|
||||
* @param string $autosubmitform Name der uebergeordneten Form, um bei einer Auswahl submit().
|
||||
* @param string $style Styleanweisung.
|
||||
* @param integer $studienplan Studienplan_id.
|
||||
* @return ?
|
||||
*/
|
||||
function drawStudienplanDropdown($stg_kz, $db, $name = '', $autosubmitform = null, $style = 'width:100%', $studienplan = null)
|
||||
{
|
||||
$sprachen_obj = new sprache();
|
||||
$sprachen_obj->getAll();
|
||||
$sprachen_arr = array();
|
||||
$sprache1 = 'German';
|
||||
foreach ($sprachen_obj->result as $row)
|
||||
{
|
||||
if (isset($row->bezeichnung_arr[$sprache1]))
|
||||
$sprachen_arr[$row->sprache] = $row->bezeichnung_arr[$sprache1];
|
||||
else
|
||||
$sprachen_arr[$row->sprache] = $row->sprache;
|
||||
}
|
||||
$stsem_akt = new studiensemester();
|
||||
$stsem_akt = $stsem_akt->getaktorNext();
|
||||
$studiensemester_kurzbz = (isset($_GET['studiensemester_kurzbz']) ? $_GET['studiensemester_kurzbz'] : $stsem_akt);
|
||||
$studienplan_obj = new studienplan();
|
||||
$studienplan_obj->getStudienplaeneFromSem($stg_kz, $studiensemester_kurzbz);
|
||||
$studienordnung_arr = array();
|
||||
$studienplan_arr = array();
|
||||
$studienplaene_verwendet = array();
|
||||
$studienplan_id = '';
|
||||
$orgform_obj = new organisationsform();
|
||||
$orgform_obj->getAll();
|
||||
$orgform_arr = array();
|
||||
foreach ($orgform_obj->result as $row)
|
||||
$orgform_arr[$row->orgform_kurzbz] = $row->bezeichnung;
|
||||
|
||||
foreach ($studienplan_obj->result as $row_sto)
|
||||
{
|
||||
$studienordnung_arr[$row_sto->studienordnung_id]['bezeichnung'] = $row_sto->bezeichnung_studienordnung;
|
||||
$studienplan_arr[$row_sto->studienordnung_id][$row_sto->studienplan_id]['bezeichnung'] = $row_sto->bezeichnung_studienplan;
|
||||
|
||||
$studienplan_arr[$row_sto->studienordnung_id][$row_sto->studienplan_id]['orgform_kurzbz'] = $row_sto->orgform_kurzbz;
|
||||
$studienplan_arr[$row_sto->studienordnung_id][$row_sto->studienplan_id]['sprache'] = $sprachen_arr[$row_sto->sprache];
|
||||
$studienplaene_verwendet[$row_sto->studienplan_id] = $row_sto->bezeichnung_studienplan;
|
||||
}
|
||||
|
||||
$selected = isset($_GET['stp_id'])?'':'selected';
|
||||
echo "<SELECT id='studienplan_dropdown' name='".$name."' ";
|
||||
if (isset($autosubmitform) && $autosubmitform != '')
|
||||
echo 'onchange="document.getElementById(\''.$autosubmitform.'\').submit();"';
|
||||
|
||||
echo " style='".$style."'>";
|
||||
echo "<OPTION value='' ".$selected.">Studienplan auswaehlen</OPTION>";
|
||||
// Pruefen ob uebergebene StudienplanID in Auswahl enthalten
|
||||
// ist und ggf auf leer setzen
|
||||
if ($studienplan_id != '')
|
||||
{
|
||||
$studienplan_found = false;
|
||||
foreach ($studienplan_arr as $stoid => $row_sto)
|
||||
{
|
||||
if (array_key_exists($studienplan_id, $studienplan_arr[$stoid]))
|
||||
{
|
||||
$studienplan_found = true;
|
||||
break;
|
||||
}
|
||||
}
|
||||
if (!$studienplan_found)
|
||||
{
|
||||
$studienplan_id = '';
|
||||
}
|
||||
}
|
||||
foreach ($studienordnung_arr as $stoid => $row_sto)
|
||||
{
|
||||
$selected = '';
|
||||
|
||||
echo '<option value="" disabled>Studienordnung: '.$db->convert_html_chars($row_sto['bezeichnung']).'</option>';
|
||||
|
||||
foreach ($studienplan_arr[$stoid] as $stpid => $row_stp)
|
||||
{
|
||||
if (isset($_GET['stp_id']) && $_GET['stp_id'] == $stpid)
|
||||
$selected = 'selected';
|
||||
if (isset($studienplan) && $studienplan == $stpid)
|
||||
$selected = 'selected';
|
||||
echo '<option value="'.$stpid.'" '.$selected.'>'.$db->convert_html_chars($row_stp['bezeichnung']).' ('.$orgform_arr[$row_stp['orgform_kurzbz']].', '.$row_stp['sprache'].')</option>';
|
||||
$selected = '';
|
||||
}
|
||||
}
|
||||
echo '</SELECT>';
|
||||
}
|
||||
?>
|
||||
+1024
-996
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user