mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-25 16:44:28 +00:00
studenten in spezialgruppen ohne stsem rausfiltern
prozent/punkte-toggle
This commit is contained in:
@@ -234,7 +234,7 @@ class lvgesamtnote
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->errormsg = "Fehler beim Speichern des Datensatzes";
|
||||
$this->errormsg = "Fehler beim Speichern des Datensatzes: ".pg_last_error($this->conn);
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -169,7 +169,27 @@ class studentnote
|
||||
//if ($punkte_gesamt > 0)
|
||||
if ($beispiele)
|
||||
{
|
||||
$qry = "SELECT min(note) as note from campus.tbl_notenschluesseluebung where punkte <= '".$punkte_gesamt."' and uebung_id = '".$ueb1->uebung_id."'";
|
||||
|
||||
if ($ueb1->prozent == 't')
|
||||
{
|
||||
$qry = "SELECT sum(tbl_beispiel.punkte) as punktegesamt_alle FROM campus.tbl_beispiel, campus.tbl_uebung
|
||||
WHERE tbl_uebung.uebung_id=tbl_beispiel.uebung_id AND
|
||||
tbl_uebung.lehreinheit_id='$lehreinheit_id' and tbl_uebung.liste_id = '$ueb1->uebung_id'";
|
||||
$punkte_moeglich=1;
|
||||
if($result=pg_query($conn, $qry))
|
||||
if($row = pg_fetch_object($result))
|
||||
$punkte_moeglich = $row->punktegesamt_alle;
|
||||
$punkte_ns = $punkte_gesamt/$punkte_moeglich*100;
|
||||
}
|
||||
else
|
||||
$punkte_ns = $punkte_gesamt;
|
||||
|
||||
//Prozentpunkte
|
||||
$qry = "SELECT min(note) as note from campus.tbl_notenschluesseluebung where punkte <= '".$punkte_ns."' and uebung_id = '".$ueb1->uebung_id."'";
|
||||
|
||||
// Punkteanzahl
|
||||
//$qry = "SELECT min(note) as note from campus.tbl_notenschluesseluebung where punkte <= '".$punkte_gesamt."' and uebung_id = '".$ueb1->uebung_id."'";
|
||||
|
||||
if($result=pg_query($this->conn, $qry))
|
||||
{
|
||||
if($row = pg_fetch_object($result))
|
||||
|
||||
@@ -48,7 +48,8 @@ class uebung
|
||||
var $liste_id; //integer
|
||||
var $maxbsp; //smallint
|
||||
var $maxstd; //smallint
|
||||
var $nummer; //smallint
|
||||
var $nummer; //smallint
|
||||
var $prozent;
|
||||
|
||||
//Studentuebung
|
||||
var $student_uid; // varchar(16)
|
||||
@@ -128,7 +129,8 @@ class uebung
|
||||
$this->liste_id = $row->liste_id;
|
||||
$this->maxbsp = $row->maxbsp;
|
||||
$this->maxstd = $row->maxstd;
|
||||
$this->nummer = $row->nummer;
|
||||
$this->nummer = $row->nummer;
|
||||
$this->prozent = $row->prozent;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
@@ -143,6 +145,18 @@ class uebung
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
function toggle_prozent_punkte($uebung_id)
|
||||
{
|
||||
$qry = "update campus.tbl_uebung set prozent = not prozent where uebung_id = '".$uebung_id."'";
|
||||
if(pg_query($this->conn, $qry))
|
||||
return true;
|
||||
else
|
||||
{
|
||||
return false;
|
||||
$this->errormsg = "toggle misslungen";
|
||||
}
|
||||
}
|
||||
|
||||
function load_studentuebung($student_uid, $uebung_id)
|
||||
{
|
||||
@@ -272,7 +286,8 @@ class uebung
|
||||
$uebung_obj->liste_id = $row->liste_id;
|
||||
$uebung_obj->maxstd = $row->maxstd;
|
||||
$uebung_obj->maxbsp = $row->maxbsp;
|
||||
$uebung_obj->nummer = $row->nummer;
|
||||
$uebung_obj->nummer = $row->nummer;
|
||||
$uebung_obj->prozent = $row->prozent;
|
||||
|
||||
$this->uebungen[] = $uebung_obj;
|
||||
}
|
||||
|
||||
@@ -226,6 +226,7 @@ class zeugnisnote
|
||||
}
|
||||
|
||||
if(pg_send_query($this->conn, $qry))
|
||||
//if(pg_query($this->conn, $qry))
|
||||
{
|
||||
if ($result=pg_get_result($this->conn))
|
||||
return true;
|
||||
|
||||
Reference in New Issue
Block a user