mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-16 22:42:16 +00:00
tbl_studentbeispiel changed for eine_uid
This commit is contained in:
@@ -16,8 +16,9 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at> and
|
||||
* Andreas Moik <moik@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
@@ -31,6 +32,7 @@ require_once('../../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../../include/uebung.class.php');
|
||||
require_once('../../../../include/beispiel.class.php');
|
||||
require_once('../../../../include/datum.class.php');
|
||||
require_once('../../../../include/student.class.php');
|
||||
include_once('../../../../include/Excel/excel.php');
|
||||
|
||||
if (!$db = new basis_db())
|
||||
@@ -214,7 +216,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
$gruppe_bez = 'Alle Studienrende';
|
||||
//Alle Studenten die dieser Lehreinheit zugeordnet sind
|
||||
$qry_stud = "SELECT
|
||||
vw_student.uid, vorname, nachname, matrikelnr,
|
||||
vw_student.uid, vw_student.prestudent_id, vorname, nachname, matrikelnr,
|
||||
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe
|
||||
FROM
|
||||
campus.vw_student, public.tbl_benutzergruppe, lehre.tbl_lehreinheitgruppe,
|
||||
@@ -284,7 +286,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
foreach($ueb_obj->uebungen as $row_ueb)
|
||||
{
|
||||
$qry = "SELECT sum(punkte) as punkte FROM campus.tbl_studentbeispiel JOIN campus.tbl_beispiel USING(beispiel_id)
|
||||
WHERE uebung_id=".$db->db_add_param($row_ueb->uebung_id)." AND student_uid=".$db->db_add_param($row_stud->uid)." AND vorbereitet=true";
|
||||
WHERE uebung_id=".$db->db_add_param($row_ueb->uebung_id)." AND prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -490,7 +492,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
foreach($beispiel_obj->beispiele as $row_bsp)
|
||||
{
|
||||
$studentbeispiel_obj = new beispiel();
|
||||
$studentbeispiel_obj->load_studentbeispiel($row_stud->uid, $row_bsp->beispiel_id);
|
||||
$studentbeispiel_obj->load_studentbeispiel($row_stud->prestudent_id, $row_bsp->beispiel_id);
|
||||
if($studentbeispiel_obj->vorbereitet)
|
||||
$punkte = $row_bsp->punkte;
|
||||
else
|
||||
@@ -516,7 +518,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
|
||||
//punkte insgesamt
|
||||
$qry = "SELECT sum(tbl_beispiel.punkte) AS gesamt_ohne_mitarbeit FROM campus.tbl_uebung, campus.tbl_beispiel, campus.tbl_studentbeispiel WHERE
|
||||
tbl_studentbeispiel.student_uid=".$db->db_add_param($row_stud->uid)." AND
|
||||
tbl_studentbeispiel.prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER)." AND
|
||||
tbl_studentbeispiel.vorbereitet=true AND
|
||||
tbl_uebung.lehreinheit_id=".$db->db_add_param($uebung_obj->lehreinheit_id, FHC_INTEGER)." AND
|
||||
tbl_uebung.uebung_id=tbl_beispiel.uebung_id AND
|
||||
@@ -589,30 +591,34 @@ function addUser(student_uid)
|
||||
{
|
||||
if($uid!='')
|
||||
{
|
||||
if ($uebung_obj->beispiele)
|
||||
{
|
||||
if ($uebung_obj->beispiele)
|
||||
{
|
||||
foreach($beispiel_obj->beispiele as $bsp)
|
||||
{
|
||||
if(isset($_POST['update_'.$uid.'_'.$bsp->beispiel_id]))
|
||||
$vorbereitet=true;
|
||||
else
|
||||
$vorbereitet=false;
|
||||
|
||||
|
||||
if(!$student = new student($uid))
|
||||
die("Der Student wurde nicht gefunden!");
|
||||
|
||||
$bsp_obj = new beispiel();
|
||||
|
||||
if(!$bsp_obj->studentbeispiel_exists($uid,$bsp->beispiel_id))
|
||||
if(!$bsp_obj->studentbeispiel_exists($student->prestudent_id,$bsp->beispiel_id))
|
||||
{
|
||||
$new=true;
|
||||
$bsp_obj->insertamum = date('Y-m-d H:i:s');
|
||||
$bsp_obj->insertvon = $user;
|
||||
}
|
||||
else
|
||||
{
|
||||
$bsp_obj->load_studentbeispiel($uid, $bsp->beispiel_id);
|
||||
{
|
||||
$bsp_obj->load_studentbeispiel($student->prestudent_id, $bsp->beispiel_id);
|
||||
$new=false;
|
||||
}
|
||||
|
||||
$bsp_obj->student_uid = $uid;
|
||||
|
||||
|
||||
$bsp_obj->prestudent_id = $student->prestudent_id;
|
||||
$bsp_obj->beispiel_id = $bsp->beispiel_id;
|
||||
$bsp_obj->vorbereitet = $vorbereitet;
|
||||
$bsp_obj->updateamum = date('Y-m-d H:i:s');
|
||||
@@ -638,20 +644,20 @@ function addUser(student_uid)
|
||||
$uebung_obj->updatevon = null;
|
||||
$uebung_obj->insertamum = date("Y-m-d H:i:s");
|
||||
$uebung_obj->insertvon = $user;
|
||||
$new = true;
|
||||
$new = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$uebung_obj->load_studentuebung($uid,$uebung_id);
|
||||
$uebung_obj->load_studentuebung($uid,$uebung_id);
|
||||
$uebung_obj->mitarbeiter_uid = $user;
|
||||
$uebung_obj->note = $_POST['update_'.$uid.'_note'];
|
||||
$uebung_obj->benotungsdatum = date("Y-m-d H:i:s");
|
||||
$uebung_obj->updateamum = date("Y-m-d H:i:s");
|
||||
$uebung_obj->updatevon = $user;
|
||||
$new = false;
|
||||
$new = false;
|
||||
}
|
||||
$uebung_obj->studentuebung_save($new);
|
||||
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -806,7 +812,7 @@ function addUser(student_uid)
|
||||
foreach($beispiel_obj->beispiele as $row_bsp)
|
||||
{
|
||||
$studentbeispiel_obj = new beispiel();
|
||||
$studentbeispiel_obj->load_studentbeispiel($row_stud->uid, $row_bsp->beispiel_id);
|
||||
$studentbeispiel_obj->load_studentbeispiel($row_stud->prestudent_id, $row_bsp->beispiel_id);
|
||||
echo "<td align='center'><input type='checkbox' name='update_".$row_stud->uid."_".$row_bsp->beispiel_id."' onClick=\"addUser('$row_stud->uid');\" ".($studentbeispiel_obj->vorbereitet?'checked':'').">".($studentbeispiel_obj->probleme?'<i><small>P</small></i>':'')."</td>\n";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -16,9 +16,10 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at >
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl < rudolf.hangl@technikum-wien.at >,
|
||||
* Gerald Simane-Sequens < gerald.simane-sequens@technikum-wien.at > and
|
||||
* Andreas Moik <moik@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
@@ -344,7 +345,7 @@ if(isset($uebung_id) && $uebung_id!='')
|
||||
</td>
|
||||
</tr>';
|
||||
$i=0;
|
||||
$qry_cnt = "SELECT distinct student_uid FROM campus.tbl_studentbeispiel JOIN campus.tbl_beispiel USING(beispiel_id) WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." GROUP BY student_uid";
|
||||
$qry_cnt = "SELECT distinct prestudent_id FROM campus.tbl_studentbeispiel JOIN campus.tbl_beispiel USING(beispiel_id) WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." GROUP BY prestudent_id";
|
||||
if($result_cnt = $db->db_query($qry_cnt))
|
||||
$gesamt=$db->db_num_rows($result_cnt);
|
||||
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at> and
|
||||
* Andreas Moik <moik@technikum-wien.at>.
|
||||
*/
|
||||
// ********************
|
||||
// * Studentenansicht fuers Kreuzerltool
|
||||
@@ -519,8 +520,10 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
foreach ($bsp_obj->beispiele as $row)
|
||||
{
|
||||
$stud_bsp_obj = new beispiel();
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
if($stud_bsp_obj->load_studentbeispiel($user, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($student->prestudent_id, $row->beispiel_id))
|
||||
{
|
||||
$stud_bsp_obj->new=false;
|
||||
}
|
||||
@@ -534,10 +537,12 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
if (isset($_POST['solved_'.$row->beispiel_id]))
|
||||
$stud_bsp_obj->vorbereitet = ($_POST['solved_'.$row->beispiel_id]==1?true:false);
|
||||
|
||||
|
||||
|
||||
$stud_bsp_obj->probleme = (isset($_POST['problem_'.$row->beispiel_id])?true:false);
|
||||
$stud_bsp_obj->updateamum = date('Y-m-d H:i:s');
|
||||
$stud_bsp_obj->updatevon = $user;
|
||||
$stud_bsp_obj->student_uid = $user;
|
||||
$stud_bsp_obj->prestudent_id = $student->prestudent_id;
|
||||
$stud_bsp_obj->beispiel_id = $row->beispiel_id;
|
||||
|
||||
if(!$row->check_anzahl_studentbeispiel($row->beispiel_id))
|
||||
@@ -545,7 +550,7 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
if (($row->anzahl_studentbeispiel >= $ueb_hlp_obj->maxstd) && ($stud_bsp_obj->vorbereitet==true) && ($ueb_hlp_obj->maxstd != null)) //isset($_POST['problem_'.$row->beispiel_id]) && $stud_bsp_obj->new ||
|
||||
{
|
||||
$hlp = new beispiel();
|
||||
if($hlp->load_studentbeispiel($user, $row->beispiel_id))
|
||||
if($hlp->load_studentbeispiel($student->prestudent_id, $row->beispiel_id))
|
||||
{
|
||||
if($hlp->vorbereitet!=$stud_bsp_obj->vorbereitet)
|
||||
{
|
||||
@@ -609,8 +614,11 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
$anmerkung = mb_str_replace("\n", "<br>", $anmerkung);
|
||||
if ($uebung_obj->beispiele)
|
||||
{
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$qry_cnt = "SELECT count(*) as anzahl FROM campus.tbl_studentbeispiel WHERE beispiel_id IN (SELECT beispiel_id from campus.tbl_beispiel where uebung_id =".$db->db_add_param($uebung_id, FHC_INTEGER).") AND vorbereitet=true and student_uid = ".$db->db_add_param($user);
|
||||
|
||||
$qry_cnt = "SELECT count(*) as anzahl FROM campus.tbl_studentbeispiel WHERE beispiel_id IN (SELECT beispiel_id from campus.tbl_beispiel where uebung_id =".$db->db_add_param($uebung_id, FHC_INTEGER).") AND vorbereitet=true and prestudent_id = ".$db->db_add_param($student->prestudent_id, FHC_INTEGER);
|
||||
if($result_cnt = $db->db_query($qry_cnt))
|
||||
if($row_cnt = $db->db_fetch_object($result_cnt))
|
||||
$anzahl = $row_cnt->anzahl;
|
||||
@@ -670,15 +678,18 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
|
||||
foreach ($bsp_obj->beispiele as $row)
|
||||
{
|
||||
$bsp_voll = false;
|
||||
$bsp_voll = false;
|
||||
$stud_bsp_obj = new beispiel();
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
if ($uebung_obj->maxstd > 0)
|
||||
{
|
||||
$stud_bsp_obj->check_anzahl_studentbeispiel($row->beispiel_id);
|
||||
if ($stud_bsp_obj->anzahl_studentbeispiel >= $uebung_obj->maxstd)
|
||||
$bsp_voll = true;
|
||||
}
|
||||
if($stud_bsp_obj->load_studentbeispiel($user, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($student->prestudent_id, $row->beispiel_id))
|
||||
{
|
||||
$vorbereitet = $stud_bsp_obj->vorbereitet;
|
||||
$probleme = $stud_bsp_obj->probleme;
|
||||
|
||||
@@ -16,8 +16,9 @@
|
||||
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307, USA.
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at> and
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>.
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at> and
|
||||
* Andreas Moik <moik@technikum-wien.at>.
|
||||
*/
|
||||
|
||||
require_once('../../../../config/cis.config.inc.php');
|
||||
@@ -31,6 +32,7 @@ require_once('../../../../include/benutzerberechtigung.class.php');
|
||||
require_once('../../../../include/uebung.class.php');
|
||||
require_once('../../../../include/beispiel.class.php');
|
||||
require_once('../../../../include/studentnote.class.php');
|
||||
require_once('../../../../include/student.class.php');
|
||||
require_once('../../../../include/datum.class.php');
|
||||
require_once('functions.inc.php');
|
||||
require_once('../../../../include/phrasen.class.php');
|
||||
@@ -75,6 +77,9 @@ $datum_obj = new datum();
|
||||
|
||||
$uebung_id = (isset($_GET['uebung_id'])?$_GET['uebung_id']:'');
|
||||
$uid = (isset($_GET['uid'])?$_GET['uid']:'');
|
||||
if(!$student = new student($uid))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
$prestudent_id = $student->prestudent_id;
|
||||
|
||||
//Abgabedatei ausliefern
|
||||
if (isset($_GET["download_abgabe"])){
|
||||
@@ -104,7 +109,7 @@ if (isset($_FILES["abgabedatei"]))
|
||||
{
|
||||
//echo $_FILES["abgabedatei"];
|
||||
$abgabedatei_up = $_FILES["abgabedatei"]["tmp_name"];
|
||||
|
||||
|
||||
if ($abgabedatei_up)
|
||||
{
|
||||
$student_uid = $uid;
|
||||
@@ -359,7 +364,7 @@ if(isset($_POST['submit']))
|
||||
{
|
||||
$stud_bsp_obj = new beispiel();
|
||||
|
||||
if($stud_bsp_obj->load_studentbeispiel($uid, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($prestudent_id, $row->beispiel_id))
|
||||
{
|
||||
$stud_bsp_obj->new=false;
|
||||
}
|
||||
@@ -373,7 +378,7 @@ if(isset($_POST['submit']))
|
||||
$stud_bsp_obj->probleme = (isset($_POST['problem_'.$row->beispiel_id])?true:false);
|
||||
$stud_bsp_obj->updateamum = date('Y-m-d H:i:s');
|
||||
$stud_bsp_obj->updatevon = $user;
|
||||
$stud_bsp_obj->student_uid = $uid;
|
||||
$stud_bsp_obj->prestudent_id = $prestudent_id;
|
||||
$stud_bsp_obj->beispiel_id = $row->beispiel_id;
|
||||
|
||||
if(!$stud_bsp_obj->studentbeispiel_save())
|
||||
@@ -605,7 +610,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
foreach ($bsp_obj->beispiele as $row)
|
||||
{
|
||||
$stud_bsp_obj = new beispiel();
|
||||
if($stud_bsp_obj->load_studentbeispiel($uid, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($prestudent_id, $row->beispiel_id))
|
||||
{
|
||||
$vorbereitet = $stud_bsp_obj->vorbereitet;
|
||||
$probleme = $stud_bsp_obj->probleme;
|
||||
@@ -653,7 +658,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
$punkte_gesamt = $row->punktegesamt;
|
||||
|
||||
//Eingetragen diese Kreuzerlliste
|
||||
$qry = "SELECT sum(punkte) as punkteeingetragen FROM campus.tbl_beispiel JOIN campus.tbl_studentbeispiel USING(beispiel_id) WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND student_uid=".$db->db_add_param($uid)." AND vorbereitet=true";
|
||||
$qry = "SELECT sum(punkte) as punkteeingetragen FROM campus.tbl_beispiel JOIN campus.tbl_studentbeispiel USING(beispiel_id) WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND prestudent_id=".$db->db_add_param($prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
$punkte_eingetragen=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -677,7 +682,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
tbl_uebung.uebung_id=tbl_beispiel.uebung_id AND
|
||||
tbl_uebung.lehreinheit_id=".$db->db_add_param($lehreinheit_id)." AND
|
||||
tbl_uebung.liste_id = ".$db->db_add_param($liste_id)." AND
|
||||
tbl_studentbeispiel.student_uid=".$db->db_add_param($uid)." AND vorbereitet=true";
|
||||
tbl_studentbeispiel.prestudent_id=".$db->db_add_param($prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
$punkte_eingetragen_alle=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
|
||||
+512
-501
File diff suppressed because it is too large
Load Diff
@@ -17,8 +17,9 @@
|
||||
*
|
||||
* Authors: Christian Paminger <christian.paminger@technikum-wien.at>,
|
||||
* Andreas Oesterreicher <andreas.oesterreicher@technikum-wien.at>,
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at> and
|
||||
* gerald Raab <gerald.raab@technikum-wien.at>.
|
||||
* Rudolf Hangl <rudolf.hangl@technikum-wien.at>,
|
||||
* Gerald Raab <gerald.raab@technikum-wien.at> and
|
||||
* Andreas Moik <moik@technikum-wien.at>.
|
||||
*/
|
||||
/**
|
||||
* Notenverwaltung fuer das Kreuzerltool
|
||||
@@ -67,20 +68,20 @@ class studentnote extends basis_db
|
||||
$beispiele = false;
|
||||
|
||||
$ueb1_obj = new uebung();
|
||||
$ueb1_obj->load_uebung($lehreinheit_id,1);
|
||||
$ueb1_obj->load_uebung($lehreinheit_id,1);
|
||||
foreach($ueb1_obj->uebungen as $ueb1)
|
||||
{
|
||||
$this->calc_l1_note($ueb1->uebung_id, $student_uid, $lehreinheit_id);
|
||||
$note_x_gewicht_l1 += ($this->l1_note * $this->l1_gewicht);
|
||||
$gewichte_l1 += $this->l1_gewicht;
|
||||
if ($this->negativ)
|
||||
if ($this->negativ)
|
||||
$negativ_all = $this->negativ;
|
||||
if ($this->fehlt)
|
||||
if ($this->fehlt)
|
||||
$fehlt_all = $this->fehlt;
|
||||
|
||||
}
|
||||
if ($gewichte_l1 > 0)
|
||||
{
|
||||
{
|
||||
$this->studentgesamtnote = ($note_x_gewicht_l1 / $gewichte_l1);
|
||||
$this->negativ = $negativ_all;
|
||||
$this->fehlt = $fehlt_all;
|
||||
@@ -116,25 +117,25 @@ class studentnote extends basis_db
|
||||
$punkte_eingetragen = 0;
|
||||
$l1_gewicht = 0;
|
||||
$ueb1 = new uebung($uebung_id);
|
||||
|
||||
$ueb_obj = new uebung();
|
||||
|
||||
$ueb_obj = new uebung();
|
||||
$ueb_obj->load_uebung($lehreinheit_id, 2, $uebung_id);
|
||||
if ($ueb_obj->uebungen)
|
||||
{
|
||||
$note_x_gewicht = 0;
|
||||
$gewichte = 0;
|
||||
$punkte_gesamt = 0;
|
||||
|
||||
|
||||
foreach ($ueb_obj->uebungen as $ueb)
|
||||
{
|
||||
if ($ueb->abgabe && !$ueb->beispiele)
|
||||
{
|
||||
{
|
||||
if ($this->calc_note($ueb->uebung_id, $student_uid))
|
||||
{
|
||||
if (is_numeric($this->note))
|
||||
{
|
||||
if ($ueb->positiv && $this->note == 5)
|
||||
$negativ = true;
|
||||
$negativ = true;
|
||||
$note_x_gewicht += ($this->note * $this->gewicht);
|
||||
$gewichte += $this->gewicht;
|
||||
}
|
||||
@@ -148,11 +149,11 @@ class studentnote extends basis_db
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->calc_punkte($ueb->uebung_id, $student_uid);
|
||||
$this->calc_punkte($ueb->uebung_id, $student_uid);
|
||||
$punkte_gesamt += $this->punkte_gesamt;
|
||||
$punkte_mitarbeit += $this->punkte_mitarbeit;
|
||||
$punkte_eingetragen += $this->punkte_eingetragen;
|
||||
$beispiele = true;
|
||||
$beispiele = true;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -166,16 +167,16 @@ class studentnote extends basis_db
|
||||
{
|
||||
|
||||
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=".$this->db_add_param($lehreinheit_id, FHC_INTEGER)." and tbl_uebung.liste_id = ".$this->db_add_param($ueb1->uebung_id, FHC_INTEGER);
|
||||
$punkte_moeglich=1;
|
||||
if($this->db_query($qry))
|
||||
if($row = $this->db_fetch_object())
|
||||
$punkte_moeglich = $row->punktegesamt_alle;
|
||||
$punkte_moeglich = $row->punktegesamt_alle;
|
||||
if ($punkte_moeglich == 0)
|
||||
$punkte_moeglich = 1;
|
||||
$punkte_moeglich = 1;
|
||||
$punkte_ns = $punkte_gesamt/$punkte_moeglich*100;
|
||||
}
|
||||
else
|
||||
@@ -186,29 +187,29 @@ class studentnote extends basis_db
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
$note = $row->note;
|
||||
if($row = $this->db_fetch_object())
|
||||
$note = $row->note;
|
||||
else
|
||||
$note = 5;
|
||||
}
|
||||
if ($ueb1->positiv && ($note == 5))
|
||||
$negativ = true;
|
||||
$l1_note = $note;
|
||||
$negativ = true;
|
||||
$l1_note = $note;
|
||||
|
||||
if ($note != null)
|
||||
if ($note != null)
|
||||
$l1_gewicht = $ueb1->gewicht;
|
||||
else
|
||||
$l1_gewicht = 0;
|
||||
$l1_gewicht = 0;
|
||||
}
|
||||
if ($ueb1->positiv && $beispiele && ($punkte_gesamt == 0))
|
||||
$negativ = true;
|
||||
}
|
||||
else
|
||||
{
|
||||
$s = new uebung();
|
||||
$s = new uebung();
|
||||
$s->load_studentuebung($student_uid, $ueb1->uebung_id);
|
||||
if ($s->note && $ueb1->gewicht)
|
||||
{
|
||||
{
|
||||
if ($s->note == 5 && $ueb1->positiv)
|
||||
$negativ = true;
|
||||
$l1_note= $s->note;
|
||||
@@ -223,7 +224,7 @@ class studentnote extends basis_db
|
||||
}
|
||||
|
||||
if ($l1_gewicht > 0)
|
||||
{
|
||||
{
|
||||
$this->l1_note = $l1_note;
|
||||
$this->l1_gewicht = $l1_gewicht;
|
||||
$this->negativ = $negativ;
|
||||
@@ -267,17 +268,17 @@ class studentnote extends basis_db
|
||||
$ueb->load($uebung_id);
|
||||
|
||||
if($ueb->load_studentuebung($student_uid, $uebung_id))
|
||||
{
|
||||
$this->note = $ueb->note;
|
||||
{
|
||||
$this->note = $ueb->note;
|
||||
$this->gewicht = $ueb->gewicht;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
}
|
||||
else
|
||||
{
|
||||
$this->note = null;
|
||||
$this->gewicht = 0;
|
||||
return true;
|
||||
}
|
||||
$this->gewicht = 0;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -311,9 +312,9 @@ class studentnote extends basis_db
|
||||
$punkte_eingetragen = ($row->punkteeingetragen!=''?$row->punkteeingetragen:0);
|
||||
|
||||
if($ueb->load_studentuebung($student_uid, $uebung_id))
|
||||
{
|
||||
$mitarbeit = $ueb->mitarbeitspunkte;
|
||||
}
|
||||
{
|
||||
$mitarbeit = $ueb->mitarbeitspunkte;
|
||||
}
|
||||
|
||||
$punkte_gesamt = $punkte_eingetragen + $mitarbeit;
|
||||
|
||||
@@ -321,8 +322,7 @@ class studentnote extends basis_db
|
||||
$this->punkte_eingetragen = $punkte_eingetragen;
|
||||
$this->punkte_mitarbeit = $mitarbeit;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
+723
-722
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user