This commit is contained in:
Stefan Puraner
2013-12-17 09:32:49 +00:00
parent 9a022a539f
commit f4772c19cf
5 changed files with 63 additions and 25 deletions
@@ -264,6 +264,13 @@ echo '<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>';
</template>
</menulist>
</row>
<row>
<label value="Credit Points" control="student-konto-textbox-credit_points"/>
<hbox>
<textbox id="student-konto-textbox-credit_points" disabled="true" maxlength="9" size="9"/>
<spacer flex="1" />
</hbox>
</row>
</rows>
</grid>
<hbox>
+7 -3
View File
@@ -57,6 +57,7 @@ class konto extends basis_db
public $standardbetrag;
public $standardtext;
public $aktiv;
public $credit_points;
/**
* Konstruktor
@@ -83,7 +84,7 @@ class konto extends basis_db
return false;
}
$qry = "SELECT tbl_konto.*, anrede, titelpost, titelpre, nachname, vorname, vornamen
$qry = "SELECT tbl_konto.*, anrede, titelpost, titelpre, nachname, vorname, vornamen, credit_points
FROM public.tbl_konto JOIN public.tbl_person USING (person_id) WHERE buchungsnr='$buchungsnr'";
if($this->db_query($qry))
@@ -111,6 +112,7 @@ class konto extends basis_db
$this->nachname = $row->nachname;
$this->vorname = $row->vorname;
$this->vornamen = $row->vornamen;
$this->credit_points = $row->credit_points;
return true;
}
else
@@ -186,7 +188,7 @@ class konto extends basis_db
{
//Neuen Datensatz einfuegen
$qry='BEGIN;INSERT INTO public.tbl_konto (person_id, studiengang_kz, studiensemester_kurzbz, buchungsnr_verweis, betrag, buchungsdatum, buchungstext, mahnspanne, buchungstyp_kurzbz, updateamum, updatevon, insertamum, insertvon, ext_id) VALUES('.
$qry='BEGIN;INSERT INTO public.tbl_konto (person_id, studiengang_kz, studiensemester_kurzbz, buchungsnr_verweis, betrag, buchungsdatum, buchungstext, mahnspanne, buchungstyp_kurzbz, updateamum, updatevon, insertamum, insertvon, ext_id, credit_points) VALUES('.
$this->addslashes($this->person_id).', '.
$this->addslashes($this->studiengang_kz).', '.
$this->addslashes($this->studiensemester_kurzbz).', '.
@@ -200,7 +202,8 @@ class konto extends basis_db
$this->addslashes($this->updatevon).', '.
$this->addslashes($this->insertamum).', '.
$this->addslashes($this->insertvon).', '.
$this->addslashes($this->ext_id).');';
$this->addslashes($this->ext_id).', '.
$this->addslashes($this->credit_points).');';
}
else
{
@@ -220,6 +223,7 @@ class konto extends basis_db
' insertamum='.$this->addslashes($this->insertamum).','.
' insertvon='.$this->addslashes($this->insertvon).','.
' ext_id='.$this->addslashes($this->ext_id).
' credit_points='.$this->addslashes($this->credit_points).
" WHERE buchungsnr='".addslashes($this->buchungsnr)."';";
}
+1
View File
@@ -125,6 +125,7 @@ function drawrow($row)
<KONTO:buchungstext><![CDATA[".$row->buchungstext."]]></KONTO:buchungstext>
<KONTO:mahnspanne><![CDATA[".$row->mahnspanne."]]></KONTO:mahnspanne>
<KONTO:buchungstyp_kurzbz><![CDATA[".$row->buchungstyp_kurzbz."]]></KONTO:buchungstyp_kurzbz>
<KONTO:credit_points><![CDATA[".$row->credit_points."]]></KONTO:credit_points>
<KONTO:updateamum><![CDATA[".$row->updateamum."]]></KONTO:updateamum>
<KONTO:updatevon><![CDATA[".$row->updatevon."]]></KONTO:updatevon>
<KONTO:insertamum><![CDATA[".$row->insertamum."]]></KONTO:insertamum>
+37 -20
View File
@@ -85,7 +85,7 @@ function loadStudienordnung()
error: loadError
}).success(function(data)
{
console.log(data);
// console.log(data);
if(data.error=='true')
{
alert('Fehler:'+data.errormsg);
@@ -142,7 +142,7 @@ function loadStudienplanSTO(neue_studienordnung_id,bezeichnung)
error: loadError
}).success(function(data)
{
console.log(data);
// console.log(data);
if(data.error=='true')
{
alert('Fehler:'+data.errormsg);
@@ -249,7 +249,6 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
"check_move": function(m) {
if(m.r.attr("rel")==="semester" && (m.p === "inside" || m.p === "before"))
{
console.log("test");
return true;
}
@@ -273,9 +272,9 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
},
grid: {
columns: [
{width: 300, header: "Lehrveranstaltung", value: "bezeichnung", source: "metadata"},
{width: 50, header: "ECTS", value: "ects", source: "metadata"},
{width: 120, header: "Semesterstunden", value: "semesterstunden", source: "metadata"}
{width: 300, header: "Lehrveranstaltung", value: "bezeichnung", source: "metadata", headerClass: "header_lv"},
{width: 50, header: "ECTS", value: "ects", source: "metadata", wideCellClass: "col_ects", headerClass: "header_ects"},
{width: 120, header: "Semesterstunden", value: "semesterstunden", source: "metadata", cellClass: "col_semesterstunden"}
],
resizable: true
},
@@ -349,6 +348,17 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
writeOverallSum(nodes);
}).bind("loaded.jstree", function(event, data)
{
// $(".col_ects").css("width", "5%");
// $(".header_ects").css("width", "5%");
// $(".col_ects").css("min-width", "50px");
// $(".header_ects").css("min-width", "50px");
//
// $("#data").find(".jstree-grid-col-0").each(function(index){
// $(this).css("width", "40%");
//// console.log(this);
// });
// $(".header_lv").css("width", "40%");
var root = data.inst.get_container_ul();
var nodes = root[0].childNodes;
// console.log(nodes);
@@ -396,12 +406,26 @@ function loadLehrveranstaltungSTPL(studienplan_id, bezeichnung, max_semester)
}
// Regeln laden
if(stpllvid!==undefined)
LVRegelnloadRegeln(stpllvid);
if(data.rslt.obj.attr("rel") !== "semester")
{
if(stpllvid!==undefined)
LVRegelnloadRegeln(stpllvid);
}
else
{
$("#tab-regel").html("<p>Klicken Sie auf eine Lehrveranstaltung um die Regeln anzuzeigen</p>");
}
// Kompatibilitaet laden
if(lvid!==undefined)
loadLVKompatibilitaet(lvid);
if(data.rslt.obj.attr("rel") !== "semester")
{
if(lvid!==undefined)
loadLVKompatibilitaet(lvid);
}
else
{
$("#tab-kompatibel").html("<p>Klicken Sie auf eine Lehrveranstaltung um die kompatiblen Lehrveranstaltungen anzuzeigen</p>");
}
});
/* }
else
@@ -493,7 +517,7 @@ function LoadLVDetails(lvid, stpllvid)
error: loadError
}).success(function(data)
{
lvdata = data.result[0]
lvdata = data.result[0];
var html = "Bezeichnung: "+lvdata.bezeichnung;
html+="<br>Kurzbezeichnung: "+lvdata.kurzbz;
html+="<br>ID: "+lvdata.lehrveranstaltung_id;
@@ -955,7 +979,7 @@ function deleteLehrveranstaltungFromStudienplan(lehrveranstaltung_studienplan_id
}
}).success(function(data)
{
console.log(data);
// console.log(data);
});
}
@@ -1094,32 +1118,25 @@ function saveStudienplan()
*/
function writeEctsSum(parent)
{
// console.log($(parent).children("li").length);
// console.log($(parent).children("ul").children());
for(var i=0; i<$(parent).children("ul").children().length; i++)
{
// console.log($(parent).children("ul").children().length);
if($(parent).children("ul").children().length > 0)
{
writeEctsSum($(parent).children("ul").children()[i]);
}
}
// console.log($(parent).attr("rel"));
if($(parent).attr("rel") === "semester")
{
var cells = $(parent).find(".jstree-grid-col-1");
// console.log(cells);
var sum = 0;
for(var j=1; j<cells.length; j++)
{
if(!isNaN(parseFloat(cells[j].childNodes[0].innerHTML)))
{
sum+=parseFloat(cells[j].childNodes[0].innerHTML);
// console.log(sum);
}
}
cells[0].childNodes[0].innerHTML = "<b>"+sum+"</b>";
// console.log(cells[0].childNodes[0]);
}
}
+11 -2
View File
@@ -58,6 +58,15 @@ echo '<!DOCTYPE html>
<script src="studienordnung_lvregel.js" type="text/javascript"></script>
<script src="studienordnung.js" type="text/javascript"></script>
<style type="text/css">
.col_ects {
//width: auto;
}
.header_ects {
//width: auto !important;
}
</style>
<script type="text/javascript">
$(function()
@@ -168,7 +177,7 @@ echo '
&nbsp;
</div>
<div id="treeWrapper">
<div id="data" style="min-height: 10px;">
<div id="data" style="min-height: 10px; min-width: 800px;">
&nbsp;
</div>
</div>
@@ -195,7 +204,7 @@ echo '
<p>Klicken Sie auf eine Lehrveranstaltung um die Regeln anzuzeigen</p>
</div>
<div id="tab-kompatibel">
<p>Kompatibilität</p>
<p>Klicken Sie auf eine Lehrveranstaltung um die kompatiblen Lehrveranstaltungen anzuzeigen</p>
</div>
</div>
<!-- Tabs ende -->