mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-01 10:59:28 +00:00
campus.tbl_studentuebung changed for eine_uid
This commit is contained in:
@@ -71,7 +71,11 @@ if (isset($_GET["download_abgabe"])){
|
||||
$uebung_id = $_GET["uebung_id"];
|
||||
$uid = $_GET['uid'];
|
||||
$ueb = new uebung();
|
||||
$ueb->load_studentuebung($uid, $uebung_id);
|
||||
|
||||
if(!$student = new student($uid))
|
||||
die("Der Student wurde nicht gefunden!");
|
||||
|
||||
$ueb->load_studentuebung($student->prestudent_id, $uebung_id);
|
||||
$ueb->load_abgabe($ueb->abgabe_id);
|
||||
$filename = BENOTUNGSTOOL_PATH."abgabe/".$ueb->abgabedatei;
|
||||
header('Content-Type: application/octet-stream');
|
||||
@@ -308,7 +312,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
|
||||
//mitarbeit
|
||||
$qry = "SELECT sum(mitarbeitspunkte) as mitarbeit FROM campus.tbl_studentuebung JOIN campus.tbl_uebung USING(uebung_id)
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND student_uid=".$db->db_add_param($row_stud->uid);
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER);
|
||||
if($result = $db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
$mitarbeit=$row->mitarbeit;
|
||||
@@ -507,7 +511,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
|
||||
//mitarbeit heute
|
||||
$qry = "SELECT sum(mitarbeitspunkte) as mitarbeit_heute FROM campus.tbl_studentuebung
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND student_uid=".$db->db_add_param($row_stud->uid);
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER);
|
||||
if($result = $db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
$worksheet->write($zeile,++$spalte,($row->mitarbeit_heute!=''?$row->mitarbeit_heute:'0'));
|
||||
@@ -534,7 +538,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
|
||||
//mitarbeit insgesamt
|
||||
$qry = "SELECT sum(mitarbeitspunkte) as mitarbeit_heute FROM campus.tbl_studentuebung JOIN campus.tbl_uebung USING(uebung_id)
|
||||
WHERE student_uid=".$db->db_add_param($row_stud->uid)." AND lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
WHERE prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER)." AND lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
if($result = $db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
$worksheet->write($zeile,++$spalte,($row->mitarbeit_heute!=''?$row->mitarbeit_heute:'0'));
|
||||
@@ -630,9 +634,12 @@ function addUser(student_uid)
|
||||
}
|
||||
else
|
||||
{
|
||||
if (!$uebung_obj->load_studentuebung($uid,$uebung_id))
|
||||
if(!$student = new student($uid))
|
||||
die("Der Student wurde nicht gefunden!");
|
||||
|
||||
if (!$uebung_obj->load_studentuebung($student->prestudent_id,$uebung_id))
|
||||
{
|
||||
$uebung_obj->student_uid = $uid;
|
||||
$uebung_obj->prestudent_id = $student->prestudent_id;
|
||||
$uebung_obj->mitarbeiter_uid = $user;
|
||||
$uebung_obj->abgabe_id = null;
|
||||
$uebung_obj->note = $_POST['update_'.$uid.'_note'];
|
||||
@@ -648,7 +655,7 @@ function addUser(student_uid)
|
||||
}
|
||||
else
|
||||
{
|
||||
$uebung_obj->load_studentuebung($uid,$uebung_id);
|
||||
$uebung_obj->load_studentuebung($student->prestudent_id,$uebung_id);
|
||||
$uebung_obj->mitarbeiter_uid = $user;
|
||||
$uebung_obj->note = $_POST['update_'.$uid.'_note'];
|
||||
$uebung_obj->benotungsdatum = date("Y-m-d H:i:s");
|
||||
@@ -789,7 +796,7 @@ function addUser(student_uid)
|
||||
|
||||
$filename = '';
|
||||
$su_obj = new uebung($uebung_id);
|
||||
$su_obj->load_studentuebung($row_stud->uid, $uebung_id);
|
||||
$su_obj->load_studentuebung($row_stud->prestudent_id, $uebung_id);
|
||||
if ($su_obj->abgabe_id)
|
||||
{
|
||||
$su_obj->load_abgabe($su_obj->abgabe_id);
|
||||
@@ -803,7 +810,7 @@ function addUser(student_uid)
|
||||
if (!$uebung_obj->beispiele)
|
||||
{
|
||||
$studentuebung_obj = new uebung();
|
||||
$studentuebung_obj->load_studentuebung($row_stud->uid,$uebung_id);
|
||||
$studentuebung_obj->load_studentuebung($row_stud->prestudent_id,$uebung_id);
|
||||
echo "<td align='center'><input type='text' name='update_".$row_stud->uid."_note' onchange=\"addUser('$row_stud->uid');\" value='".$studentuebung_obj->note."' size='3'></td>\n";
|
||||
|
||||
}
|
||||
|
||||
@@ -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');
|
||||
|
||||
@@ -424,7 +424,7 @@ if($result_stud = $db->db_query($qry_stud))
|
||||
while($row_stud = $db->db_fetch_object($result_stud))
|
||||
{
|
||||
$studentnote = new studentnote();
|
||||
$studentnote->calc_gesamtnote($lehreinheit_id,$stsem,$row_stud->uid);
|
||||
$studentnote->calc_gesamtnote($lehreinheit_id,$stsem,$row_stud->prestudent_id);
|
||||
//echo $studentnote->debug;
|
||||
$legesamtnote = new legesamtnote($lehreinheit_id);
|
||||
if (!$legesamtnote->load($row_stud->uid,$lehreinheit_id))
|
||||
|
||||
@@ -96,11 +96,16 @@ $datum_obj = new datum();
|
||||
$uebung_id = (isset($_GET['uebung_id'])?$_GET['uebung_id']:'');
|
||||
|
||||
//Abgabedatei ausliefern
|
||||
if (isset($_GET["download_abgabe"])){
|
||||
if (isset($_GET["download_abgabe"]))
|
||||
{
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$file=$_GET["download_abgabe"];
|
||||
$uebung_id = $_GET["uebung_id"];
|
||||
$ueb = new uebung();
|
||||
$ueb->load_studentuebung($user, $uebung_id);
|
||||
$ueb->load_studentuebung($student->prestudent_id, $uebung_id);
|
||||
$ueb->load_abgabe($ueb->abgabe_id);
|
||||
$filename = BENOTUNGSTOOL_PATH."abgabe/".$ueb->abgabedatei;
|
||||
header('Content-Type: application/octet-stream');
|
||||
@@ -176,11 +181,16 @@ if (isset($_POST["abgabe"]))
|
||||
$abgabepfad = BENOTUNGSTOOL_PATH."abgabe/".$abgabedatei;
|
||||
|
||||
$uebung_obj = new uebung();
|
||||
$uebung_obj->load_studentuebung($user, $uebung_id);
|
||||
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$uebung_obj->load_studentuebung($student->prestudent_id, $uebung_id);
|
||||
|
||||
if ($uebung_obj->errormsg != "")
|
||||
{
|
||||
$uebung_obj->student_uid = $user;
|
||||
$uebung_obj->prestudent_id = $student->prestudent_id;
|
||||
$uebung_obj->mitarbeiter_uid = null;
|
||||
$uebung_obj->abgabe_id = null;
|
||||
$uebung_obj->uebung_id = $uebung_id;
|
||||
@@ -767,8 +777,11 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
$punkte_gesamt = $row->punktegesamt;
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
//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($user)." 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($student->prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
$punkte_eingetragen=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -791,15 +804,19 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
tbl_uebung.uebung_id=tbl_beispiel.uebung_id AND
|
||||
tbl_uebung.lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND
|
||||
tbl_uebung.liste_id = ".$db->db_add_param($liste_id, FHC_INTEGER)." AND
|
||||
tbl_studentbeispiel.student_uid=".$db->db_add_param($user)." AND vorbereitet=true";
|
||||
tbl_studentbeispiel.prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
$punkte_eingetragen_alle=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
$punkte_eingetragen_alle = ($row->punkteeingetragen_alle!=''?$row->punkteeingetragen_alle:0);
|
||||
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
//Mitarbeitspunkte
|
||||
$qry = "SELECT sum(mitarbeitspunkte) as mitarbeitspunkte FROM campus.tbl_studentuebung JOIN campus.tbl_uebung USING(uebung_id)
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND student_uid=".$db->db_add_param($user)." AND liste_id = ".$db->db_add_param($liste_id, FHC_INTEGER);
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER)." AND liste_id = ".$db->db_add_param($liste_id, FHC_INTEGER);
|
||||
$mitarbeit_alle=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -807,7 +824,7 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
|
||||
//Mitarbeitspunkte
|
||||
$qry = "SELECT mitarbeitspunkte FROM campus.tbl_studentuebung
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND student_uid=".$db->db_add_param($user);
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER);
|
||||
$mitarbeit=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -887,7 +904,7 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
</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)." 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)." GROUP BY prestudent_id";
|
||||
if($result_cnt = $db->db_query($qry_cnt))
|
||||
$gesamt=$db->db_num_rows($result_cnt);
|
||||
|
||||
@@ -1048,8 +1065,10 @@ else
|
||||
if(count($subuebung_obj->uebungen) >= 0)
|
||||
{
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_l1_note($row->uebung_id, $user, $lehreinheit_id);
|
||||
$l1note->calc_l1_note($row->uebung_id, $student->prestudent_id, $lehreinheit_id);
|
||||
if ($l1note->negativ)
|
||||
$l1_note = 5;
|
||||
else
|
||||
@@ -1090,17 +1109,23 @@ else
|
||||
echo " </td>\n";
|
||||
if ($subrow->beispiele)
|
||||
{
|
||||
$l1note->calc_punkte($subrow->uebung_id, $user);
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_punkte($subrow->uebung_id, $student->prestudent_id);
|
||||
echo " <td align='center'>".$l1note->punkte_gesamt."</td>";
|
||||
echo " <td align='center'></td>\n";
|
||||
echo " <td align='center'></td>\n";
|
||||
echo " <td align='center'></td>\n";
|
||||
echo " <td align='center'></td>\n";
|
||||
}
|
||||
else if ($subrow->abgabe)
|
||||
{
|
||||
$l1note->calc_note($subrow->uebung_id, $user);
|
||||
echo " <td align='center'></td>\n";
|
||||
echo " <td align='center'>".$l1note->note."</td>";
|
||||
echo " <td align='center'></td>\n";
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_note($subrow->uebung_id, $student->prestudent_id);
|
||||
echo " <td align='center'></td>\n";
|
||||
echo " <td align='center'>".$l1note->note."</td>";
|
||||
echo " <td align='center'></td>\n";
|
||||
}
|
||||
echo " </tr>\n"; /*
|
||||
if($datum_obj->mktime_fromtimestamp($subrow->freigabevon)<time() && $datum_obj->mktime_fromtimestamp($subrow->freigabebis)>time())
|
||||
@@ -1113,7 +1138,11 @@ else
|
||||
|
||||
}
|
||||
}
|
||||
$l1note->calc_gesamtnote($lehreinheit_id, $stsem, $user);
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_gesamtnote($lehreinheit_id, $stsem, $student->prestudent_id);
|
||||
if ($l1note->negativ)
|
||||
$gesamtnote = 5;
|
||||
else
|
||||
|
||||
@@ -86,7 +86,7 @@ if (isset($_GET["download_abgabe"])){
|
||||
$file=$_GET["download_abgabe"];
|
||||
$uebung_id = $_GET["uebung_id"];
|
||||
$ueb = new uebung();
|
||||
$ueb->load_studentuebung($uid, $uebung_id);
|
||||
$ueb->load_studentuebung($prestudent_id, $uebung_id);
|
||||
$ueb->load_abgabe($ueb->abgabe_id);
|
||||
$filename = BENOTUNGSTOOL_PATH."abgabe/".$ueb->abgabedatei;
|
||||
header('Content-Type: application/octet-stream');
|
||||
@@ -121,12 +121,12 @@ if (isset($_FILES["abgabedatei"]))
|
||||
$abgabepfad = BENOTUNGSTOOL_PATH."abgabe/".$abgabedatei;
|
||||
|
||||
$uebung_obj = new uebung();
|
||||
$uebung_obj->load_studentuebung($student_uid, $uebung_id);
|
||||
$uebung_obj->load_studentuebung($student->prestudent_id, $uebung_id);
|
||||
|
||||
|
||||
if ($uebung_obj->errormsg != "")
|
||||
{
|
||||
$uebung_obj->student_uid = $student_uid;
|
||||
$uebung_obj->prestudent_id = $student->prestudent_id;
|
||||
$uebung_obj->mitarbeiter_uid = null;
|
||||
$uebung_obj->abgabe_id = null;
|
||||
$uebung_obj->uebung_id = $uebung_id;
|
||||
@@ -336,7 +336,7 @@ if(isset($_POST['submit']))
|
||||
if(isset($punkte) && is_numeric($punkte) && !isset($_POST['abgabe']))
|
||||
{
|
||||
$ueb_obj = new uebung();
|
||||
if($ueb_obj->load_studentuebung($uid, $uebung_id))
|
||||
if($ueb_obj->load_studentuebung($prestudent_id, $uebung_id))
|
||||
$ueb_obj->new = false;
|
||||
else
|
||||
{
|
||||
@@ -351,7 +351,7 @@ if(isset($_POST['submit']))
|
||||
$ueb_obj->updatevon = $user;
|
||||
$ueb_obj->mitarbeiter_uid = $user;
|
||||
$ueb_obj->uebung_id = $uebung_id;
|
||||
$ueb_obj->student_uid = $uid;
|
||||
$ueb_obj->student->prestudent_id = $prestudent_id;
|
||||
|
||||
if(!$ueb_obj->studentuebung_save())
|
||||
$error = true;
|
||||
@@ -403,7 +403,7 @@ if(isset($_POST['submit']))
|
||||
{
|
||||
$note = $_POST['note'];
|
||||
$ueb_obj = new uebung();
|
||||
if($ueb_obj->load_studentuebung($uid, $uebung_id))
|
||||
if($ueb_obj->load_studentuebung($prestudent_id, $uebung_id))
|
||||
$ueb_obj->new = false;
|
||||
else
|
||||
{
|
||||
@@ -418,7 +418,7 @@ if(isset($_POST['submit']))
|
||||
$ueb_obj->updatevon = $user;
|
||||
$ueb_obj->mitarbeiter_uid = $user;
|
||||
$ueb_obj->uebung_id = $uebung_id;
|
||||
$ueb_obj->student_uid = $uid;
|
||||
$ueb_obj->prestudent_id = $student->prestudent_id;
|
||||
|
||||
if(!$ueb_obj->studentuebung_save())
|
||||
$error = true;
|
||||
@@ -574,7 +574,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
|
||||
$ueb_obj = new uebung();
|
||||
$ueb_obj->load($uebung_id);
|
||||
if($ueb_obj->load_studentuebung($uid, $uebung_id))
|
||||
if($ueb_obj->load_studentuebung($prestudent_id, $uebung_id))
|
||||
{
|
||||
$anmerkung = $ueb_obj->anmerkung;
|
||||
$mitarbeit = $ueb_obj->mitarbeitspunkte;
|
||||
@@ -633,7 +633,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
|
||||
|
||||
|
||||
$ueb_obj->load_studentuebung($uid, $uebung_id);
|
||||
$ueb_obj->load_studentuebung($prestudent_id, $uebung_id);
|
||||
if ($ueb_obj->abgabe_id)
|
||||
{
|
||||
$ueb_obj->load_abgabe($ueb_obj->abgabe_id);
|
||||
@@ -690,7 +690,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
|
||||
//Mitarbeitspunkte
|
||||
$qry = "SELECT sum(mitarbeitspunkte) as mitarbeitspunkte FROM campus.tbl_studentuebung JOIN campus.tbl_uebung USING(uebung_id)
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND student_uid=".$db->db_add_param($uid)." and liste_id=".$db->db_add_param($liste_id);
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER)." and liste_id=".$db->db_add_param($liste_id);
|
||||
$mitarbeit_alle=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -698,7 +698,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
|
||||
//Mitarbeitspunkte
|
||||
$qry = "SELECT mitarbeitspunkte FROM campus.tbl_studentuebung
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND student_uid=".$db->db_add_param($uid);
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER);
|
||||
$mitarbeit=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -766,7 +766,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
}
|
||||
else if (is_numeric($_GET['uebung_id']))
|
||||
{
|
||||
$ueb_obj->load_studentuebung($uid, $uebung_id);
|
||||
$ueb_obj->load_studentuebung($prestudent_id, $uebung_id);
|
||||
if ($ueb_obj->abgabe_id)
|
||||
{
|
||||
$ueb_obj->load_abgabe($ueb_obj->abgabe_id);
|
||||
@@ -776,7 +776,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
$filename='';
|
||||
//Abgaben benoten
|
||||
$studentnote = new studentnote($lehreinheit_id,$stsem,$uid,$uebung_id);
|
||||
$studentnote->calc_note($uebung_id, $uid);
|
||||
$studentnote->calc_note($uebung_id, $prestudent_id);
|
||||
echo "<span class='studentnote'>".$p->t('benotungstool/note').": ".$studentnote->note." (Gewicht: ".$ueb_obj->gewicht.")</span><br><br>";
|
||||
if ($filename != '')
|
||||
echo $p->t('benotungstool/abgabedatei').": <a href='studentenpunkteverwalten.php?lvid=$lvid&stsem=$stsem&lehreinheit_id=$lehreinheit_id&uebung_id=$uebung_id&uid=$uid&download_abgabe=$filename'>".$filename."</a><br><br>";
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
+43
-29
@@ -55,7 +55,7 @@ class uebung extends basis_db
|
||||
public $prozent;
|
||||
|
||||
//Studentuebung
|
||||
public $student_uid; // varchar(16)
|
||||
public $prestudent_id; // integer
|
||||
public $mitarbeiter_uid; // varchar(16)
|
||||
public $abgabe_id; // integer
|
||||
public $note; // smalint
|
||||
@@ -156,19 +156,32 @@ class uebung extends basis_db
|
||||
/**
|
||||
* Laedt eine Studentuebung Zuordnung
|
||||
*
|
||||
* @param $student_uid
|
||||
* @param $prestudent_id
|
||||
* @param $uebung_id
|
||||
* @return boolean
|
||||
*/
|
||||
public function load_studentuebung($student_uid, $uebung_id)
|
||||
public function load_studentuebung($prestudent_id, $uebung_id)
|
||||
{
|
||||
$qry = "SELECT * FROM campus.tbl_studentuebung WHERE student_uid=".$this->db_add_param($student_uid)." AND uebung_id=".$this->db_add_param($uebung_id, FHC_INTEGER).";";
|
||||
if(!is_numeric($prestudent_id))
|
||||
{
|
||||
$this->errormsg = 'Prestudent_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
if(!is_numeric($uebung_id))
|
||||
{
|
||||
$this->errormsg = 'Uebung_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
|
||||
|
||||
$qry = "SELECT * FROM campus.tbl_studentuebung WHERE prestudent_id=".$this->db_add_param($prestudent_id, FHC_INTEGER)." AND uebung_id=".$this->db_add_param($uebung_id, FHC_INTEGER).";";
|
||||
|
||||
if($this->db_query($qry))
|
||||
{
|
||||
if($row = $this->db_fetch_object())
|
||||
{
|
||||
$this->student_uid = $row->student_uid;
|
||||
$this->prestudent_id = $row->prestudent_id;
|
||||
$this->mitarbeiter_uid = $row->mitarbeiter_uid;
|
||||
$this->abgabe_id = $row->abgabe_id;
|
||||
$this->uebung_id = $row->uebung_id;
|
||||
@@ -475,9 +488,9 @@ class uebung extends basis_db
|
||||
$this->errormsg = 'Uebung_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
if($this->student_uid=='')
|
||||
if(!is_numeric($this->prestudent_id))
|
||||
{
|
||||
$this->errormsg = 'Student_uid muss eingetragen werden';
|
||||
$this->errormsg = 'Prestudent_id muss eine gueltige Zahl sein';
|
||||
return false;
|
||||
}
|
||||
return true;
|
||||
@@ -500,10 +513,10 @@ class uebung extends basis_db
|
||||
|
||||
if($new)
|
||||
{
|
||||
$qry = 'INSERT INTO campus.tbl_studentuebung(student_uid, mitarbeiter_uid, abgabe_id, uebung_id,
|
||||
$qry = 'INSERT INTO campus.tbl_studentuebung(prestudent_id, mitarbeiter_uid, abgabe_id, uebung_id,
|
||||
note, mitarbeitspunkte, punkte, anmerkung, benotungsdatum, updateamum,
|
||||
updatevon, insertamum, insertvon) VALUES('.
|
||||
$this->db_add_param($this->student_uid).','.
|
||||
$this->db_add_param($this->prestudent_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->mitarbeiter_uid).','.
|
||||
$this->db_add_param($this->abgabe_id, FHC_INTEGER).','.
|
||||
$this->db_add_param($this->uebung_id, FHC_INTEGER).','.
|
||||
@@ -520,17 +533,18 @@ class uebung extends basis_db
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE campus.tbl_studentuebung SET'.
|
||||
' mitarbeiter_uid='.$this->db_add_param($this->mitarbeiter_uid).','.
|
||||
' abgabe_id='.$this->db_add_param($this->abgabe_id, FHC_INTEGER).','.
|
||||
' uebung_id='.$this->db_add_param($this->uebung_id, FHC_INTEGER).','.
|
||||
' note='.$this->db_add_param($this->note).','.
|
||||
' mitarbeitspunkte='.$this->db_add_param($this->mitarbeitspunkte).','.
|
||||
' punkte='.$this->db_add_param($this->punkte).','.
|
||||
' anmerkung='.$this->db_add_param($this->anmerkung).','.
|
||||
' benotungsdatum='.$this->db_add_param($this->benotungsdatum).','.
|
||||
' updateamum='.$this->db_add_param($this->updateamum).','.
|
||||
' updatevon='.$this->db_add_param($this->updatevon).
|
||||
" WHERE uebung_id=".$this->db_add_param($this->uebung_id, FHC_INTEGER)." AND student_uid=".$this->db_add_param($this->student_uid).";";
|
||||
' mitarbeiter_uid='.$this->db_add_param($this->mitarbeiter_uid).','.
|
||||
' abgabe_id='.$this->db_add_param($this->abgabe_id, FHC_INTEGER).','.
|
||||
' uebung_id='.$this->db_add_param($this->uebung_id, FHC_INTEGER).','.
|
||||
' note='.$this->db_add_param($this->note).','.
|
||||
' mitarbeitspunkte='.$this->db_add_param($this->mitarbeitspunkte).','.
|
||||
' punkte='.$this->db_add_param($this->punkte).','.
|
||||
' anmerkung='.$this->db_add_param($this->anmerkung).','.
|
||||
' benotungsdatum='.$this->db_add_param($this->benotungsdatum).','.
|
||||
' updateamum='.$this->db_add_param($this->updateamum).','.
|
||||
' updatevon='.$this->db_add_param($this->updatevon).
|
||||
" WHERE uebung_id=".$this->db_add_param($this->uebung_id, FHC_INTEGER).
|
||||
" AND prestudent_id=".$this->db_add_param($this->prestudent_id, FHC_INTEGER).";";
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -559,17 +573,17 @@ class uebung extends basis_db
|
||||
if($new)
|
||||
{
|
||||
$qry = 'INSERT INTO campus.tbl_abgabe(abgabedatei, abgabezeit, anmerkung) VALUES('.
|
||||
$this->db_add_param($this->abgabedatei).','.
|
||||
$this->db_add_param($this->abgabezeit).','.
|
||||
$this->db_add_param($this->abgabe_anmerkung).');';
|
||||
$this->db_add_param($this->abgabedatei).','.
|
||||
$this->db_add_param($this->abgabezeit).','.
|
||||
$this->db_add_param($this->abgabe_anmerkung).');';
|
||||
}
|
||||
else
|
||||
{
|
||||
$qry = 'UPDATE campus.tbl_abgabe SET'.
|
||||
' abgabedatei='.$this->db_add_param($this->abgabedatei).','.
|
||||
' abgabezeit='.$this->db_add_param($this->abgabezeit).','.
|
||||
' anmerkung='.$this->db_add_param($this->abgabe_anmerkung).
|
||||
" WHERE abgabe_id=".$this->db_add_param($this->abgabe_id, FHC_INTEGER).";";
|
||||
' abgabedatei='.$this->db_add_param($this->abgabedatei).','.
|
||||
' abgabezeit='.$this->db_add_param($this->abgabezeit).','.
|
||||
' anmerkung='.$this->db_add_param($this->abgabe_anmerkung).
|
||||
" WHERE abgabe_id=".$this->db_add_param($this->abgabe_id, FHC_INTEGER).";";
|
||||
}
|
||||
|
||||
if($this->db_query($qry))
|
||||
@@ -705,7 +719,7 @@ class uebung extends basis_db
|
||||
return false;
|
||||
}
|
||||
else
|
||||
return true;
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
@@ -717,7 +731,7 @@ class uebung extends basis_db
|
||||
{
|
||||
$this->errormsg = 'Fehler bei einer Abfrage';
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
||||
@@ -37,6 +37,7 @@ array
|
||||
"bis.tbl_bisio",
|
||||
"campus.tbl_lvgesamtnote",
|
||||
"campus.tbl_studentbeispiel",
|
||||
"campus.tbl_studentuebung",
|
||||
);
|
||||
|
||||
if(!isset($_POST["action"]) || $_POST["action"] != "start")
|
||||
|
||||
Reference in New Issue
Block a user