mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-25 07:59:28 +00:00
campus.tbl_studentuebung changed for eine_uid
This commit is contained in:
@@ -53,9 +53,9 @@ class studentnote extends basis_db
|
||||
*
|
||||
* @param $lehreinheit_id
|
||||
* @param $ss Studiensemester
|
||||
* @param $student_uid
|
||||
* @param $prestudent_id
|
||||
*/
|
||||
public function calc_gesamtnote($lehreinheit_id, $ss, $student_uid)
|
||||
public function calc_gesamtnote($lehreinheit_id, $ss, $prestudent_id)
|
||||
{
|
||||
$studentgesamtnote = 0;
|
||||
$counter = 0;
|
||||
@@ -71,7 +71,7 @@ class studentnote extends basis_db
|
||||
$ueb1_obj->load_uebung($lehreinheit_id,1);
|
||||
foreach($ueb1_obj->uebungen as $ueb1)
|
||||
{
|
||||
$this->calc_l1_note($ueb1->uebung_id, $student_uid, $lehreinheit_id);
|
||||
$this->calc_l1_note($ueb1->uebung_id, $prestudent_id, $lehreinheit_id);
|
||||
$note_x_gewicht_l1 += ($this->l1_note * $this->l1_gewicht);
|
||||
$gewichte_l1 += $this->l1_gewicht;
|
||||
if ($this->negativ)
|
||||
@@ -98,11 +98,26 @@ class studentnote extends basis_db
|
||||
* ?? berechnet irgendwas...
|
||||
*
|
||||
* @param $uebung_id
|
||||
* @param $student_uid
|
||||
* @param $prestudent_id
|
||||
* @param lehreinheit_id
|
||||
*/
|
||||
public function calc_l1_note($uebung_id, $student_uid, $lehreinheit_id)
|
||||
public function calc_l1_note($uebung_id, $prestudent_id, $lehreinheit_id)
|
||||
{
|
||||
if(!is_numeric($uebung_id))
|
||||
{
|
||||
$this->errormsg='Uebung_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
if(!is_numeric($prestudent_id))
|
||||
{
|
||||
$this->errormsg='Prestudent_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
if(!is_numeric($lehreinheit_id))
|
||||
{
|
||||
$this->errormsg='Lehreinheit_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
$studentgesamtnote = 0;
|
||||
$counter = 0;
|
||||
$gewichte = 0;
|
||||
@@ -130,7 +145,7 @@ class studentnote extends basis_db
|
||||
{
|
||||
if ($ueb->abgabe && !$ueb->beispiele)
|
||||
{
|
||||
if ($this->calc_note($ueb->uebung_id, $student_uid))
|
||||
if ($this->calc_note($ueb->uebung_id, $prestudent_id))
|
||||
{
|
||||
if (is_numeric($this->note))
|
||||
{
|
||||
@@ -149,7 +164,7 @@ class studentnote extends basis_db
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->calc_punkte($ueb->uebung_id, $student_uid);
|
||||
$this->calc_punkte($ueb->uebung_id, $prestudent_id);
|
||||
$punkte_gesamt += $this->punkte_gesamt;
|
||||
$punkte_mitarbeit += $this->punkte_mitarbeit;
|
||||
$punkte_eingetragen += $this->punkte_eingetragen;
|
||||
@@ -207,7 +222,7 @@ class studentnote extends basis_db
|
||||
else
|
||||
{
|
||||
$s = new uebung();
|
||||
$s->load_studentuebung($student_uid, $ueb1->uebung_id);
|
||||
$s->load_studentuebung($prestudent_id, $ueb1->uebung_id);
|
||||
if ($s->note && $ueb1->gewicht)
|
||||
{
|
||||
if ($s->note == 5 && $ueb1->positiv)
|
||||
@@ -248,16 +263,21 @@ class studentnote extends basis_db
|
||||
|
||||
/**
|
||||
* berechnet die note der übung
|
||||
* @param uebung_id, student_uid
|
||||
* @param uebung_id, prestudent_id
|
||||
* setzt this->note, this->gewicht
|
||||
*/
|
||||
public function calc_note($uebung_id, $student_uid)
|
||||
public function calc_note($uebung_id, $prestudent_id)
|
||||
{
|
||||
if(!is_numeric($uebung_id))
|
||||
{
|
||||
$this->errormsg='Uebung_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
else if(!is_numeric($prestudent_id))
|
||||
{
|
||||
$this->errormsg='Prestudent_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$note = null;
|
||||
@@ -267,7 +287,7 @@ class studentnote extends basis_db
|
||||
$ueb = new uebung();
|
||||
$ueb->load($uebung_id);
|
||||
|
||||
if($ueb->load_studentuebung($student_uid, $uebung_id))
|
||||
if($ueb->load_studentuebung($prestudent_id, $uebung_id))
|
||||
{
|
||||
$this->note = $ueb->note;
|
||||
$this->gewicht = $ueb->gewicht;
|
||||
@@ -285,16 +305,21 @@ class studentnote extends basis_db
|
||||
|
||||
/**
|
||||
* berechnet die punkte der übung (kreuzerlliste)
|
||||
* @param uebung_id, student_uid
|
||||
* @param uebung_id, prestudent_id
|
||||
* setzt this->punkte_gesamt
|
||||
*/
|
||||
public function calc_punkte($uebung_id, $student_uid)
|
||||
public function calc_punkte($uebung_id, $prestudent_id)
|
||||
{
|
||||
if(!is_numeric($uebung_id))
|
||||
{
|
||||
$this->errormsg='Uebung_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
else if(!is_numeric($prestudent_id))
|
||||
{
|
||||
$this->errormsg='Prestudent_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
$note = null;
|
||||
@@ -305,13 +330,13 @@ class studentnote extends basis_db
|
||||
|
||||
//Eingetragen diese Kreuzerlliste
|
||||
$qry = "SELECT sum(punkte) as punkteeingetragen FROM campus.tbl_beispiel JOIN campus.tbl_studentbeispiel USING(beispiel_id)
|
||||
WHERE uebung_id=".$this->db_add_param($uebung_id, FHC_INTEGER)." AND student_uid=".$this->db_add_param($student_uid)." AND vorbereitet=true";
|
||||
WHERE uebung_id=".$this->db_add_param($uebung_id, FHC_INTEGER)." AND prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
$punkte_eingetragen=0;
|
||||
if($this->db_query($qry))
|
||||
if($row = $this->db_fetch_object())
|
||||
$punkte_eingetragen = ($row->punkteeingetragen!=''?$row->punkteeingetragen:0);
|
||||
|
||||
if($ueb->load_studentuebung($student_uid, $uebung_id))
|
||||
if($ueb->load_studentuebung($prestudent_id, $uebung_id))
|
||||
{
|
||||
$mitarbeit = $ueb->mitarbeitspunkte;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user