From f4772c19cfccf7c84133fde9316c35cf39bdb1f2 Mon Sep 17 00:00:00 2001 From: Stefan Puraner Date: Tue, 17 Dec 2013 09:32:49 +0000 Subject: [PATCH] --- content/student/studentkontooverlay.xul.php | 7 +++ include/konto.class.php | 10 ++-- rdf/konto.rdf.php | 1 + vilesci/lehre/studienordnung.js | 57 +++++++++++++-------- vilesci/lehre/studienordnung.php | 13 ++++- 5 files changed, 63 insertions(+), 25 deletions(-) diff --git a/content/student/studentkontooverlay.xul.php b/content/student/studentkontooverlay.xul.php index f09d78f2e..b39fea879 100644 --- a/content/student/studentkontooverlay.xul.php +++ b/content/student/studentkontooverlay.xul.php @@ -264,6 +264,13 @@ echo ''; + + diff --git a/include/konto.class.php b/include/konto.class.php index 3cb2bc235..5d14e9482 100644 --- a/include/konto.class.php +++ b/include/konto.class.php @@ -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)."';"; } diff --git a/rdf/konto.rdf.php b/rdf/konto.rdf.php index 0236c26f8..fe226d9fe 100644 --- a/rdf/konto.rdf.php +++ b/rdf/konto.rdf.php @@ -125,6 +125,7 @@ function drawrow($row) buchungstext."]]> mahnspanne."]]> buchungstyp_kurzbz."]]> + credit_points."]]> updateamum."]]> updatevon."]]> insertamum."]]> diff --git a/vilesci/lehre/studienordnung.js b/vilesci/lehre/studienordnung.js index 407f05d2a..20b724868 100644 --- a/vilesci/lehre/studienordnung.js +++ b/vilesci/lehre/studienordnung.js @@ -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("

Klicken Sie auf eine Lehrveranstaltung um die Regeln anzuzeigen

"); + } + // Kompatibilitaet laden - if(lvid!==undefined) - loadLVKompatibilitaet(lvid); + if(data.rslt.obj.attr("rel") !== "semester") + { + if(lvid!==undefined) + loadLVKompatibilitaet(lvid); + } + else + { + $("#tab-kompatibel").html("

Klicken Sie auf eine Lehrveranstaltung um die kompatiblen Lehrveranstaltungen anzuzeigen

"); + } }); /* } 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+="
Kurzbezeichnung: "+lvdata.kurzbz; html+="
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"; - // console.log(cells[0].childNodes[0]); } } diff --git a/vilesci/lehre/studienordnung.php b/vilesci/lehre/studienordnung.php index 231607b80..0d3d9b8b8 100644 --- a/vilesci/lehre/studienordnung.php +++ b/vilesci/lehre/studienordnung.php @@ -58,6 +58,15 @@ echo ' +