mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-26 09:04:28 +00:00
Sortierungsmöglichkeit der Lehrveranstaltungen im Studienplan
This commit is contained in:
@@ -573,6 +573,17 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
|
||||
{
|
||||
$("#tab-kompatibel").html("<p>Klicken Sie auf eine Lehrveranstaltung um die kompatiblen Lehrveranstaltungen anzuzeigen</p>");
|
||||
}
|
||||
|
||||
// Sortierung laden
|
||||
if(data.rslt.obj.attr("rel") !== "semester")
|
||||
{
|
||||
if(lvid!==undefined)
|
||||
loadSTPLSortierung(stpllvid);
|
||||
}
|
||||
else
|
||||
{
|
||||
$("#tab-sortierung").html("<p>Klicken Sie auf eine Lehrveranstaltung um die Sortierung innerhalb der Studienplanansicht im CIS zu ändern.</p>");
|
||||
}
|
||||
});
|
||||
|
||||
if(!isLVFilterLoaded)
|
||||
@@ -677,6 +688,68 @@ function loadLVKompatibilitaet(lvid)
|
||||
|
||||
});
|
||||
}
|
||||
/*
|
||||
* lädt die Sortierung einer Lehrveranstaltung innerhalb eines Studienplans
|
||||
* @param {type} lvid
|
||||
* @returns {undefined}
|
||||
*/
|
||||
function loadSTPLSortierung(stpllvid)
|
||||
{
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "../../soap/fhcomplete.php",
|
||||
data: {
|
||||
"typ": "json",
|
||||
"class": "studienplan",
|
||||
"method": "loadStudienplanLehrveranstaltung",
|
||||
"parameter_0":stpllvid
|
||||
},
|
||||
error: loadError
|
||||
}).success(function(data)
|
||||
{
|
||||
console.log(data);
|
||||
var html='';
|
||||
for(i in data.result)
|
||||
{
|
||||
if(data.result[i])
|
||||
{
|
||||
lvdata = data.result[i];
|
||||
html += 'Sortierung: <input type="number" id="stplSort" value="'+ClearNull(lvdata.sort)+'"><br/><input type="button" onclick="saveSortierung(\''+stpllvid+'\');" value="Speichern">';
|
||||
}
|
||||
}
|
||||
$("#tab-sortierung").html(html);
|
||||
});
|
||||
}
|
||||
|
||||
function saveSortierung(stpllvid)
|
||||
{
|
||||
var sort = $('#stplSort').val();
|
||||
if(sort === "")
|
||||
sort=null;
|
||||
|
||||
|
||||
console.log(sort);
|
||||
savedata = {
|
||||
"studienplan_lehrveranstaltung_id": stpllvid,
|
||||
"sort": sort
|
||||
};
|
||||
$.ajax(
|
||||
{
|
||||
dataType: "json",
|
||||
url: "../../soap/fhcomplete.php",
|
||||
type: "POST",
|
||||
data: {
|
||||
"typ": "json",
|
||||
"class": "studienplan",
|
||||
"method": "saveSortierung",
|
||||
"savedata": JSON.stringify(savedata)
|
||||
}
|
||||
}).success(function(d)
|
||||
{
|
||||
console.log(d);
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
|
||||
@@ -200,6 +200,7 @@ echo '
|
||||
<li><a href="#tab-lehrveranstaltungdetail">LV Details</a></li>
|
||||
<li><a href="#tab-regel">Regeln</a></li>
|
||||
<li><a href="#tab-kompatibel">Kompatibilität</a></li>
|
||||
<li><a href="#tab-sortierung">Sortierung</a></li>
|
||||
</ul>
|
||||
<div id="tab-lehrveranstaltungdetail">
|
||||
<p>Klicken Sie auf eine Lehrveranstaltung um die Details anzuzeigen</p>
|
||||
@@ -210,6 +211,9 @@ echo '
|
||||
<div id="tab-kompatibel">
|
||||
<p>Klicken Sie auf eine Lehrveranstaltung um die kompatiblen Lehrveranstaltungen anzuzeigen</p>
|
||||
</div>
|
||||
<div id="tab-sortierung">
|
||||
<p>Klicken Sie auf eine Lehrveranstaltung um die Sortierung innerhalb der Studienplanansicht im CIS zu ändern.</p>
|
||||
</div>
|
||||
</div>
|
||||
<!-- Tabs ende -->
|
||||
</td>
|
||||
|
||||
Reference in New Issue
Block a user