mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-19 16:02:15 +00:00
Studienordnung: LVs mit Studienplan verknüpfen; speichern der verknüpften LVs in DB; Dropdown für Organisationseinheit in GUI für kompatible Lehrveranstaltungen hinzugefügt
This commit is contained in:
@@ -1270,7 +1270,7 @@ class lehrveranstaltung extends basis_db
|
||||
* @param $lehrveranstaltung_id ID der Lehrveranstaltung
|
||||
* @param $lehrveranstaltung_id ID der kompatiblen Lehrveranstaltung
|
||||
*/
|
||||
public function deleteKompatibleLehrveranstaltung($lehrveranstaltung_id, $lehrveranstaltung_id)
|
||||
public function deleteKompatibleLehrveranstaltung($lehrveranstaltung_id, $lehrveranstaltung_id_kompatibel)
|
||||
{
|
||||
$qry = 'DELETE FROM lehre.tbl_lehrveranstaltung_kompatibel WHERE
|
||||
lehrveranstaltung_id='.$this->db_add_param($lehrveranstaltung_id, FHC_INTEGER).' AND
|
||||
@@ -1293,7 +1293,7 @@ class lehrveranstaltung extends basis_db
|
||||
* @param $aktiv optional, true wenn nur aktive LVs
|
||||
* @param $lehrtyp optional, gewünschter Lehrtyp
|
||||
*/
|
||||
public function load_lva_oe($oe_kurzbz, $aktiv=null, $lehrtyp=null)
|
||||
public function load_lva_oe($oe_kurzbz, $aktiv=null, $lehrtyp=null, $sort=null)
|
||||
{
|
||||
|
||||
if (is_null($oe_kurzbz)) {
|
||||
@@ -1315,8 +1315,8 @@ class lehrveranstaltung extends basis_db
|
||||
if(!is_null($lehrtyp))
|
||||
$qry .= " AND lehrtyp_kurzbz='".$lehrtyp."'";
|
||||
|
||||
// if ($sort == "bezeichnung")
|
||||
// $qry .= " ORDER BY bezeichnung";
|
||||
if ($sort == "bezeichnung")
|
||||
$qry .= " ORDER BY bezeichnung";
|
||||
// elseif (is_null($sort) || empty($sort))
|
||||
// $qry .= " ORDER BY semester, bezeichnung";
|
||||
// else
|
||||
@@ -1361,6 +1361,7 @@ class lehrveranstaltung extends basis_db
|
||||
$lv_obj->koordinator = $row->koordinator;
|
||||
$lv_obj->bezeichnung_english = $row->bezeichnung_english;
|
||||
$lv_obj->orgform_kurzbz = $row->orgform_kurzbz;
|
||||
$lv_obj->lehrtyp_kurzbz = $row->lehrtyp_kurzbz;
|
||||
|
||||
$lv_obj->bezeichnung_arr['German'] = $row->bezeichnung;
|
||||
$lv_obj->bezeichnung_arr['English'] = $row->bezeichnung_english;
|
||||
|
||||
@@ -25,6 +25,7 @@ require_once('../../include/fachbereich.class.php');
|
||||
require_once('../../include/lvinfo.class.php');
|
||||
require_once('../../include/lehrveranstaltung.class.php');
|
||||
require_once('../../include/organisationsform.class.php');
|
||||
require_once ('../../include/organisationseinheit.class.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
die('Es konnte keine Verbindung zum Server aufgebaut werden.');?>
|
||||
@@ -90,6 +91,67 @@ if (!$db = new basis_db())
|
||||
{
|
||||
var studiengang_kz = $("#stgDropdown").val();
|
||||
var semester = $("#semDropdown").val();
|
||||
var oe_kurzbz = $("#oeDropdown").val();
|
||||
console.log(oe_kurzbz);
|
||||
if(oe_kurzbz === "null")
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "../../soap/fhcomplete.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"typ": "json",
|
||||
"class": "lehrveranstaltung",
|
||||
"method": "load_lva",
|
||||
"parameter_0": studiengang_kz,
|
||||
"parameter_1": semester,
|
||||
"parameter_2": "null",
|
||||
"parameter_3": "null",
|
||||
"parameter_4": "true"
|
||||
},
|
||||
}).success(function(data)
|
||||
{
|
||||
var html = "";
|
||||
data.result.forEach(function(option)
|
||||
{
|
||||
html+="<option value='"+ option.metadata.lehrveranstaltung_id +"'>"+ option.data +"</option>"
|
||||
})
|
||||
$("#lvDropdown").html(html);
|
||||
});
|
||||
}
|
||||
else
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "../../soap/fhcomplete.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"typ": "json",
|
||||
"class": "lehrveranstaltung",
|
||||
"method": "load_lva_oe",
|
||||
"parameter_0": oe_kurzbz,
|
||||
"parameter_1": true,
|
||||
"parameter_2": "null",
|
||||
"parameter_3": "bezeichnung"
|
||||
},
|
||||
}).success(function(data)
|
||||
{
|
||||
console.log(data);
|
||||
var html = "";
|
||||
data.result.forEach(function(option)
|
||||
{
|
||||
html+="<option value='"+ option.metadata.lehrveranstaltung_id +"'>"+ option.data +"</option>"
|
||||
})
|
||||
$("#lvDropdown").html(html);
|
||||
});
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
function loadOrganisationseinheiten()
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
@@ -235,6 +297,16 @@ foreach($studiengang->result as $stg)
|
||||
}
|
||||
echo "</select>";
|
||||
|
||||
//OE-Dropdown
|
||||
$organisationseinheit = new organisationseinheit();
|
||||
$organisationseinheit->getAll();
|
||||
echo "<b>OE: </b><select id='oeDropdown' style='margin-right: 1em;' onload='javascript:loadSemester();' onchange='javascript:loadSemester();'><option value='null'>-- Keine --</option>";
|
||||
foreach($organisationseinheit->result as $oe)
|
||||
{
|
||||
echo "<option value=".$oe->oe_kurzbz.">".$oe->bezeichnung."</option>";
|
||||
}
|
||||
echo "</select>";
|
||||
|
||||
//Semester Dropdown
|
||||
echo "<b>Semester: </b><select id='semDropdown' style='margin-right: 1em;' onchange='javascript:loadLehrveranstaltungen()'>";
|
||||
echo "</select>";
|
||||
|
||||
@@ -248,8 +248,8 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
|
||||
dnd: {
|
||||
"drag_check": function(data){
|
||||
return {
|
||||
after: true,
|
||||
before: true,
|
||||
after: false,
|
||||
before: false,
|
||||
inside: true
|
||||
}
|
||||
}
|
||||
@@ -269,16 +269,16 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
|
||||
icon : {
|
||||
image : "../../include/js/jstree/icons/lehrveranstaltung.png"
|
||||
},
|
||||
max_children: 0
|
||||
// max_children: 0
|
||||
},
|
||||
"semester" : {
|
||||
"valid_children" : ["lv", "lf", "modul"]
|
||||
// "valid_children" : ["lv", "lf", "modul"]
|
||||
},
|
||||
"modul" : {
|
||||
icon : {
|
||||
image : "../../include/js/jstree/icons/modul.png"
|
||||
},
|
||||
"valid_children" : ["lv"]
|
||||
// "valid_children" : ["lv"]
|
||||
},
|
||||
"lf" : {
|
||||
//TODO valid_children
|
||||
@@ -327,7 +327,7 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
|
||||
var nodes = root[0].childNodes;
|
||||
for(var i=0; i<nodes.length; i++)
|
||||
{
|
||||
if(nodes[i].getAttribute("rel") !== "lv"){
|
||||
if(nodes[i].getAttribute("rel") === "semester"){
|
||||
writeEctsSum(nodes[i]);
|
||||
}
|
||||
|
||||
@@ -341,7 +341,7 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
|
||||
// console.log(nodes);
|
||||
for(var i=0; i<nodes.length; i++)
|
||||
{
|
||||
if(nodes[i].getAttribute("rel") !== "lv"){
|
||||
if(nodes[i].getAttribute("rel") === "semester"){
|
||||
writeEctsSum(nodes[i]);
|
||||
}
|
||||
|
||||
@@ -356,7 +356,7 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
|
||||
|
||||
for(var i=0; i<nodes.length; i++)
|
||||
{
|
||||
if(nodes[i].getAttribute("rel") !== "lv"){
|
||||
if(nodes[i].getAttribute("rel") === "semester"){
|
||||
writeEctsSum(nodes[i]);
|
||||
}
|
||||
}
|
||||
@@ -367,6 +367,10 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
|
||||
// Bei einem Klick auf eine LV werden die Details geladen
|
||||
stpllvid = data.rslt.obj.attr("studienplan_lehrveranstaltung_id");
|
||||
lvid = data.rslt.obj.attr("id");
|
||||
if(lvid.substring(0,5)==="copy_")
|
||||
{
|
||||
lvid = lvid.substring(5);
|
||||
}
|
||||
|
||||
// Lehrveranstaltungsdetails laden
|
||||
LoadLVDetails(lvid, stpllvid);
|
||||
@@ -432,7 +436,7 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung)
|
||||
error: loadError
|
||||
}).success(function(data)
|
||||
{
|
||||
var html = "<div><select id='oeDropdown' style='max-width: 200px' onchange='loadFilteredLehrveranstaltungen();'><option value=''>-- Alle --</option>";
|
||||
var html = "<div><select id='oeDropdown' style='max-width: 200px' onchange='loadFilteredLehrveranstaltungen();'><option value=''>-- Keine --</option>";
|
||||
for(i in data.result)
|
||||
{
|
||||
if(data.result[i].aktiv===true)
|
||||
@@ -504,8 +508,8 @@ function loadFilteredLehrveranstaltungen()
|
||||
{
|
||||
if($("#oeDropdown option:selected").val() === "")
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "../../soap/fhcomplete.php",
|
||||
data: {
|
||||
@@ -791,6 +795,10 @@ function saveJsondataFromTree(nodeId, studienplan_id, studienplan_lehrveranstalt
|
||||
|
||||
var lehrveranstaltung_id = jsonData[0]["metadata"]["lehrveranstaltung_id"];
|
||||
var semester = node.closest("li[rel=semester]").attr("id");
|
||||
if(semester === undefined)
|
||||
{
|
||||
semester = 0;
|
||||
}
|
||||
|
||||
var parent_id ='';
|
||||
if(node.parent().parent().attr("studienplan_lehrveranstaltung_id"))
|
||||
@@ -1018,7 +1026,7 @@ function writeEctsSum(parent)
|
||||
}
|
||||
}
|
||||
// console.log($(parent).attr("rel"));
|
||||
if($(parent).attr("rel") !== "lv")
|
||||
if($(parent).attr("rel") === "semester")
|
||||
{
|
||||
var cells = $(parent).find(".jstree-grid-col-1");
|
||||
// console.log(cells);
|
||||
|
||||
Reference in New Issue
Block a user