Studienordnung Entwurf

This commit is contained in:
Andreas Österreicher
2013-10-22 07:42:36 +00:00
parent e1f68f2172
commit 30bded7830
8 changed files with 765 additions and 0 deletions
+1
View File
@@ -73,6 +73,7 @@ $menu=array
'Gruppenverwaltung'=>array('name'=>'Gruppen', 'permissions'=>array('admin','lv-plan','support'), 'link'=>'stammdaten/lvbgruppenverwaltung.php', 'target'=>'main'),
'Lehrveranstaltung'=>array('name'=>'Lehrveranstaltung', 'link'=>'lehre/lehrveranstaltung_frameset.html', 'target'=>'main'),
'Lehrfach'=>array('name'=>'Lehrfach', 'link'=>'lehre/lehrfach.php', 'target'=>'main'),
'Studienordnung'=>array('name'=>'Studienordnung', 'link'=>'lehre/studienordnung.php', 'target'=>'_blank','permissions'=>array('lehre/studienordnung')),
'Moodle'=>array
(
+82
View File
@@ -0,0 +1,82 @@
<?php
/*
* Copyright 2013 fhcomplete.org
*
* 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., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
* Authors: Andreas Österreicher <andreas.oesterreicher@technikum-wien.at>
*/
/**
* Aufruf: fhcomplete.php?class=benutzer&method=search&typ=json&parameter_0=österreicher
*/
header( 'Expires: -1' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Pragma: no-cache' );
header('Content-Type: text/html;charset=UTF-8');
$class = $_REQUEST['class'];
$method = $_REQUEST['method'];
$typ = (isset($_REQUEST['typ'])?$_REQUEST['typ']:'');
// die einzelnen funktionsparameter werden durchnummeriert mit 0 beginnend:
// parameter_0=param0&parameter_1=param1&parameter_3[0]=param3arr0&parameter_3[1]=param3arr1
$parameter=array();
for($i=0;$i<100;$i++)
{
if(isset($_REQUEST['parameter_'.$i]))
$parameter[]=$_REQUEST['parameter_'.$i];
else
break;
}
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/webservicerecht.class.php');
require_once('../include/'.$class.'.class.php');
// Berechtigung pruefen
$uid = get_uid();
// TODO Klasse pruefen und nicht nur die Methode
$wsrecht = new webservicerecht();
if(!$wsrecht->isUserAuthorized($uid, $method))
die('Sie haben keine Berechtigung fuer diesen Vorgang');
// Funktion aufrufen
$obj = new $class();
if(call_user_func_array(array($obj, $method), $parameter))
{
$data['result']=$obj->cleanResult();
$data['error']='false';
$data['errormsg']='';
}
else
{
$data['result']='';
$data['error']='true';
$data['errormsg']=$obj->errormsg;
}
// Daten ausgeben
if($typ=='json')
echo json_encode($data);
elseif($typ=='xml')
echo array_to_xml($data);
else
var_dump($data);
?>
+63
View File
@@ -0,0 +1,63 @@
<?php
/* Copyright (C) 2013 fhcomplete.org
*
* 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
*/
header( 'Expires: -1' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Pragma: no-cache' );
header('Content-Type: text/html;charset=UTF-8');
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/lehrveranstaltung.class.php');
require_once('../include/benutzerberechtigung.class.php');
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('lehre/studienordnung'))
die('Sie haben keine Berechtigung für diese Seite');
$method = isset($_REQUEST['method'])?$_REQUEST['method']:'';
switch($method)
{
case 'loadLehrveranstaltungStudienplan':
$studienplan_id=$_REQUEST['studienplan_id'];
$lehrveranstaltung = new lehrveranstaltung();
if($lehrveranstaltung->loadLehrveranstaltungStudienplan($studienplan_id))
{
$data['result']=$lehrveranstaltung->getLehrveranstaltungTree();
$data['error']='false';
$data['errormsg']='';
}
else
{
$data['error']='true';
$data['errormsg']=$lehrveranstaltung->errormsg;
}
break;
default:
break;
}
echo json_encode($data);
?>
+45
View File
@@ -0,0 +1,45 @@
<?php
header( 'Expires: -1' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Pragma: no-cache' );
header('Content-Type: text/html;charset=UTF-8');
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/studienordnung.class.php');
require_once('../include/benutzerberechtigung.class.php');
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('lehre/studienordnung'))
die('Sie haben keine Berechtigung für diese Seite');
$method = isset($_REQUEST['method'])?$_REQUEST['method']:'';
switch($method)
{
case 'loadStudienordnungSTG':
$studiengang_kz=$_REQUEST['studiengang_kz'];
$studienordnung = new studienordnung();
if($studienordnung->loadStudienordnungSTG($studiengang_kz))
{
$data['result']=$studienordnung->cleanResult();
$data['error']='false';
$data['errormsg']='';
}
else
{
$data['error']='true';
$data['errormsg']=$studienordnung->errormsg;
}
break;
default:
break;
}
echo json_encode($data);
?>
+45
View File
@@ -0,0 +1,45 @@
<?php
header( 'Expires: -1' );
header( 'Last-Modified: ' . gmdate( 'D, d M Y H:i:s' ) . ' GMT' );
header( 'Cache-Control: no-store, no-cache, must-revalidate' );
header( 'Pragma: no-cache' );
header('Content-Type: text/html;charset=UTF-8');
require_once('../config/vilesci.config.inc.php');
require_once('../include/functions.inc.php');
require_once('../include/studienplan.class.php');
require_once('../include/benutzerberechtigung.class.php');
$uid = get_uid();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
if(!$rechte->isBerechtigt('lehre/studienordnung'))
die('Sie haben keine Berechtigung für diese Seite');
$method = isset($_REQUEST['method'])?$_REQUEST['method']:'';
switch($method)
{
case 'loadStudienplanSTO':
$studienordnung_id=$_REQUEST['studienordnung_id'];
$studienplan = new studienplan();
if($studienplan->loadStudienplanSTO($studienordnung_id))
{
$data['result']=$studienplan->cleanResult();
$data['error']='false';
$data['errormsg']='';
}
else
{
$data['error']='true';
$data['errormsg']=$studienplan->errormsg;
}
break;
default:
break;
}
echo json_encode($data);
?>
+176
View File
@@ -0,0 +1,176 @@
<?php
/*
* Copyright 2013 fhcomplete.org
*
* 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., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
* Authors: Andreas Österreicher <andreas.oesterreicher@technikum-wien.at>
*/
require_once('../../config/vilesci.config.inc.php');
require_once('../../include/studienordnung.class.php');
require_once('../../include/studienplan.class.php');
require_once('../../include/studiengang.class.php');
require_once('../../include/benutzerberechtigung.class.php');
require_once('../../include/functions.inc.php');
require_once('../../include/studiensemester.class.php');
require_once('../../include/organisationsform.class.php');
require_once('../../include/sprache.class.php');
$uid = get_uid();
$db = new basis_db();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
$method=(isset($_GET['method'])?$_GET['method']:'');
if(!$rechte->isBerechtigt('lehre/studienordnung'))
die('Sie haben keine Berechtigung für diese Seite');
switch($method)
{
case 'neueStudienordnung':
if(!isset($_GET['studiengang_kz']))
die('Bitte zuerst einen Studiengang auswählen');
$studiengang_kz = $_GET['studiengang_kz'];
$studiengang = new studiengang();
if(!$studiengang->load($studiengang_kz))
die('Studiengang ist ungültig');
echo '
<table>
<tr>
<td>Bezeichnung:</td>
<td><input type="text" id="bezeichnung" maxlenght="512" /></td>
</tr>
<tr>
<td>Version:</td>
<td><input type="text" id="version" maxlenght="256" /></td>
</tr>
<tr>
<td>Gültig von:</td>
<td><select id="gueltigvon">
<option value="" >-- keine Auswahl --</option>';
$studiensemester = new studiensemester();
$studiensemester->getAll();
foreach($studiensemester->studiensemester as $row)
{
echo '<option value="'.$row->studiensemester_kurzbz.'">'.$row->studiensemester_kurzbz.'</option>';
}
echo '
</select></td>
</tr>
<tr>
<td>Gültig bis:</td>
<td><select id="gueltigvon">
<option value="" >-- keine Auswahl --</option>';
foreach($studiensemester->studiensemester as $row)
{
echo '<option value="'.$row->studiensemester_kurzbz.'">'.$row->studiensemester_kurzbz.'</option>';
}
echo '
</select></td>
</tr>
<tr>
<td>ECTS:</td>
<td><input type="text" id="ects" maxlength="5" size="5" value="'.($studiengang->max_semester*30).'"/></td>
</tr>
<tr>
<td>Studiengangsbezeichnung:</td>
<td><input type="text" id="studiengangbezeichnung" maxlength="256" value="'.$studiengang->bezeichnung.'" /></td>
</tr>
<tr>
<td>Studiengangsbezeichnung Englisch:</td>
<td><input type="text" id="studiengangbezeichnungenglisch" value="'.$studiengang->english.'" maxlength="256" /></td>
</tr>
<tr>
<td>Kurzbezeichnung des Studiengangs:</td>
<td><input type="text" id="studiengangkurzbzlang" maxlength="8" size="8" value="'.$studiengang->kurzbzlang.'" /></td>
</tr>
<tr>
<td></td>
<td><input type="button" value="Anlegen" onclick="saveStudienordnung()"/></td>
</tr>
</table>
';
break;
case 'neuerStudienplan':
if(!isset($_GET['studiengang_kz']))
die('Bitte zuerst einen Studiengang auswählen');
$studiengang_kz = $_GET['studiengang_kz'];
$studiengang = new studiengang();
if(!$studiengang->load($studiengang_kz))
die('Studiengang ist ungültig');
echo '
<table>
<tr>
<td>Bezeichnung:</td>
<td><input type="text" id="bezeichnung" maxlenght="256" /></td>
</tr>
<tr>
<td>Version:</td>
<td><input type="text" id="version" maxlenght="256" /></td>
</tr>
<tr>
<td>Organisationsform:</td>
<td><select id="orgform_kurzbz">
<option value="" >-- keine Auswahl --</option>';
$orgform = new organisationsform();
$orgform->getAll();
foreach($orgform->result as $row)
{
echo '<option value="'.$row->orgform_kurzbz.'">'.$row->bezeichnung.'</option>';
}
echo '
</select></td>
</tr>
<tr>
<td>Regelstudiendauer:</td>
<td><input type="text" id="regelstudiendauer" maxlength="2" size="2" value="'.($studiengang->max_semester).'"/></td>
</tr>
<tr>
<td>Sprache</td>
<td><select id="sprache">
<option value="" >-- keine Auswahl --</option>';
$sprache = new sprache();
$sprache->getAll();
foreach($sprache->result as $row)
{
echo '<option value="'.$row->sprache.'">'.$row->bezeichnung_arr[DEFAULT_LANGUAGE].'</option>';
}
echo '
</select></td>
<tr>
<td></td>
<td><input type="button" value="Anlegen" onclick="saveStudienplan()" /></td>
</tr>
</table>
';
break;
default:
echo 'Unknown Method'.$method;
break;
}
?>
+213
View File
@@ -0,0 +1,213 @@
/* Copyright (C) 2013 fhcomplete.org
*
* 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: Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
*/
var studiengang_kz='';
var studiengang_bezeichnung='';
var studienordnung_id='';
var studienordnung_bezeichnung='';
var studienplan_id='';
var lehrveranstaltungen='';
function loadError(xhr, textStatus, errorThrown)
{
alert('Fehler beim Laden der Daten. ErrorNr:'+xhr.status);
}
function drawHeader(text)
{
if(text===undefined)
{
text = '<h2>';
if(studiengang_bezeichnung!='')
text=text+studiengang_bezeichnung;
if(studienordnung_bezeichnung!='')
text=text+' <b>&gt;</b> '+studienordnung_bezeichnung;
if(studienplan_bezeichnung!='')
text=text+' <b>&gt;</b> '+studienplan_bezeichnung;
text=text+'</h2>';
}
else
text='<h2>'+text+'</h2>';
$('#header').html(text);
}
function loadStudienordnung()
{
studiengang_kz = $('#studiengang').val();
studiengang_bezeichnung = $( "#studiengang option:selected" ).text();
studienordnung_id='';
studienordnung_bezeichnung='';
studienplan_id='';
studienplan_bezeichnung='';
drawHeader();
$.ajax(
{
dataType: "json",
url: "../../soap/fhcomplete.php",
data: {
"typ": "json",
"class": "studienordnung",
"method": "loadStudienordnungSTG",
"parameter_0": studiengang_kz
},
success: StudienordnungLoaded,
error: loadError
});
}
function StudienordnungLoaded(data)
{
if(data.error=='true')
{
alert('Fehler:'+data.errormsg);
}
else
{
drawStudienordnungen(data.result);
$( "#menueLinks" ).accordion("option","active",1);
}
}
function drawStudienordnungen(data)
{
var obj='<a href="#Neu" onclick="neueStudienordnung();return false;">Neue Studienordnung</a><ul>';
for(i in data)
{
obj=obj+'<li><a href="#Load" onclick="loadStudienplanSTO('+data[i].studienordnung_id+',\''+data[i].bezeichnung+'\');return false;">'+data[i].bezeichnung+'</a></li>';
}
obj=obj+'</ul>';
$('#studienordnung').html(obj);
}
function loadStudienplanSTO(studienordnung_id,bezeichnung)
{
studienordnung_bezeichnung=bezeichnung;
studienordnung_id=studienordnung_id;
drawHeader();
$.ajax(
{
dataType: "json",
url: "../../soap/fhcomplete.php",
data: {
"typ": "json",
"class": "studienplan",
"method": "loadStudienplanSTO",
"parameter_0": studienordnung_id
},
success: StudienplanSTOLoaded,
error: loadError
});
}
function StudienplanSTOLoaded(data)
{
if(data.error=='true')
{
alert('Fehler:'+data.errormsg);
}
else
{
drawStudienplan(data.result);
$( "#menueLinks" ).accordion("option","active",2);
}
}
function drawStudienplan(data)
{
var obj='<a href="#Neu" onclick="neuerStudienplan();return false;">Neuer Studienplan</a><ul>';
for(i in data)
{
obj=obj+'<li><a href="#Load'+data[i].studienplan_id+'" onclick="loadLehrveranstaltungSTPL('+data[i].studienplan_id+',\''+data[i].bezeichnung+' '+data[i].orgform_kurzbz+'\');return false;">'+data[i].bezeichnung+' '+data[i].orgform_kurzbz+'</a></li>';
}
obj=obj+'</ul>';
$('#studienplan').html(obj);
}
function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
{
studienplan_id=studienplan_id;
studienplan_bezeichnung=bezeichnung;
drawHeader();
$.ajax(
{
dataType: "json",
url: "../../soap/lehrveranstaltung.json.php",
data: {
"method": "loadLehrveranstaltungStudienplan",
"studienplan_id": studienplan_id
},
success: LehrveranstaltungSTPLLoaded,
error: loadError
});
}
function LehrveranstaltungSTPLLoaded(data)
{
if(data.error=='true')
{
alert('Fehler:'+data.errormsg);
}
else
{
lehrveranstaltungen = data.result;
drawLehrveranstaltung(data.result);
$( "#menueRechts" ).accordion("option","active",0);
//drawLehrveranstaltungGrid();
$("#lehrveranstaltung").html("<h2>Organisationseinheit</h2><h2>Lehrtyp</h2>");
}
}
function drawLehrveranstaltung(data)
{
var obj='';
obj=getLehrveranstaltungSub(data);
$('#data').html(obj);
}
function getLehrveranstaltungSub(data)
{
var obj='<ul>';
for(i in data)
{
obj=obj+'<li><a href="#Load'+data[i].lehrveranstaltung_id+'" onclick="alert(\'comming soon\');return false;">'+data[i].bezeichnung+'</a></li>';
if(data[i].childs)
{
obj=obj+getLehrveranstaltungSub(data[i].childs);
}
}
obj=obj+'</ul>';
return obj;
}
function neueStudienordnung()
{
drawHeader('Neue Studienordnung');
$("#data").load('studienordnung.inc.php?method=neueStudienordnung&studiengang_kz='+studiengang_kz);
}
function neuerStudienplan()
{
drawHeader('Neuer Studienplan');
$("#data").load('studienordnung.inc.php?method=neuerStudienplan&studiengang_kz='+studiengang_kz);
}
+140
View File
@@ -0,0 +1,140 @@
<?php
/*
* Copyright 2013 fhcomplete.org
*
* 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., 51 Franklin Street, Fifth Floor, Boston,
* MA 02110-1301, USA.
*
*
* Authors: Andreas Österreicher <andreas.oesterreicher@technikum-wien.at>
*/
require_once('../../config/vilesci.config.inc.php');
require_once('../../include/studienordnung.class.php');
require_once('../../include/studienplan.class.php');
require_once('../../include/studiengang.class.php');
require_once('../../include/benutzerberechtigung.class.php');
require_once('../../include/functions.inc.php');
$uid = get_uid();
$db = new basis_db();
$rechte = new benutzerberechtigung();
$rechte->getBerechtigungen($uid);
$studiengang_kz=(isset($_POST['studiengang_kz'])?$_POST['studiengang_kz']:'');
echo '<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>Studienordnung</title>
<link rel="stylesheet" href="../../skin/jquery.css" />
<link rel="stylesheet" href="../../skin/jquery-ui-1.9.2.custom.min.css" />
<link rel="stylesheet" href="../../skin/fhcomplete.css" />
<link rel="stylesheet" href="../../skin/vilesci.css" />
<script src="../../include/js/jquery1.9.min.js" type="text/javascript"></script>
<script src="studienordnung.js" type="text/javascript"></script>
<script type="text/javascript">
$(function()
{
$( "#menueLinks" ).accordion({
heightStyle: "content",
header: "h3",
collapsible: true
});
$( "#menueRechts" ).accordion({
heightStyle: "content",
header: "h3",
collapsible: true
});
});
</script>
</head>
<body>';
if(!$rechte->isBerechtigt('lehre/studienordnung'))
die('Sie haben keine Berechtigung für diese Seite');
$studiengang = new studiengang();
$studiengang->getAll('typ,kurzbz');
echo '
<table style="width:100%">
<tr>
<td valign="top" width="20%">
<div id="menueLinks">
<h3>Studiengang</h3>
<div style="margin:0px;padding:5px;">
<p>
<select id="studiengang" name="studiengang_kz" onchange="loadStudienordnung()">';
foreach($studiengang->result as $row)
{
if($studiengang_kz=='')
$studiengang_kz=$row->studiengang_kz;
if($studiengang_kz==$row->studiengang_kz)
$selected='selected';
else
$selected='';
echo '<option value="'.$row->studiengang_kz.'" '.$selected.'>'.$db->convert_html_chars($row->kuerzel.' - '.$row->kurzbzlang).'</option>';
}
echo '
</select>
</p>
</div>
<h3>Studienordnung</h3>
<div style="margin:0px;padding:5px;">
<p id="studienordnung" >
Bitte wählen Sie einen Studiengang aus!
<br><br><br><br><br><br><br><br><br><br>
</p>
</div>
<h3>Studienplan</h3>
<div style="margin:0px;padding:5px;">
<p id="studienplan" style="margin:0;padding:0;">
Bitte wählen Sie zuerst eine Studienordnung aus!
</p>
</div>
</div>
</td>
<td valign="top">
<div id="header">
&nbsp;
</div>
<div id="data" >
&nbsp;
</div>
</td>
<td valign="top" width="20%">
<div id="menueRechts">
<h3>Lehrveranstaltungen</h3>
<div style="margin:0px;padding:5px;">
<p id="lehrveranstaltung" style="margin:0;padding:0;">
Bitte wählen Sie zuerst einen Studienplan aus!
</p>
</div>
</div>
</td>
</tr>
</table>
';
echo '
</body>
</html>';
?>