mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-06-01 20:29:29 +00:00
benotungstool changed for uid
This commit is contained in:
@@ -32,7 +32,6 @@ 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())
|
||||
@@ -72,10 +71,7 @@ if (isset($_GET["download_abgabe"])){
|
||||
$uid = $_GET['uid'];
|
||||
$ueb = new uebung();
|
||||
|
||||
if(!$student = new student($uid))
|
||||
die("Der Student wurde nicht gefunden!");
|
||||
|
||||
$ueb->load_studentuebung($student->prestudent_id, $uebung_id);
|
||||
$ueb->load_studentuebung($uid, $uebung_id);
|
||||
$ueb->load_abgabe($ueb->abgabe_id);
|
||||
$filename = BENOTUNGSTOOL_PATH."abgabe/".$ueb->abgabedatei;
|
||||
header('Content-Type: application/octet-stream');
|
||||
@@ -220,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, vw_student.prestudent_id, vorname, nachname, matrikelnr,
|
||||
vw_student.uid, vorname, nachname, matrikelnr,
|
||||
tbl_studentlehrverband.semester, tbl_studentlehrverband.verband, tbl_studentlehrverband.gruppe
|
||||
FROM
|
||||
campus.vw_student, public.tbl_benutzergruppe, lehre.tbl_lehreinheitgruppe,
|
||||
@@ -290,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 prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
WHERE uebung_id=".$db->db_add_param($row_ueb->uebung_id)." AND uid=".$db->db_add_param($row_stud->uid)." AND vorbereitet=true";
|
||||
if($result = $db->db_query($qry))
|
||||
{
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -312,7 +308,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 prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER);
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND uid=".$db->db_add_param($row_stud->uid);
|
||||
if($result = $db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
$mitarbeit=$row->mitarbeit;
|
||||
@@ -432,7 +428,7 @@ if(isset($_GET['output']) && $_GET['output']=='xls')
|
||||
$lehreinheit_id = $_GET['lehreinheit_id'];
|
||||
$gruppe_bez = 'Alle Studienrende';
|
||||
|
||||
$qry_stud = "SELECT uid, prestudent_id, vorname, nachname, matrikelnr FROM campus.vw_student_lehrveranstaltung JOIN campus.vw_student using(uid)
|
||||
$qry_stud = "SELECT uid, vorname, nachname, matrikelnr FROM campus.vw_student_lehrveranstaltung JOIN campus.vw_student using(uid)
|
||||
WHERE studiensemester_kurzbz = ".$db->db_add_param($stsem)." AND lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." ORDER BY nachname, vorname";
|
||||
|
||||
//Alle Studenten die dieser Lehreinheit zugeordnet sind
|
||||
@@ -496,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->prestudent_id, $row_bsp->beispiel_id);
|
||||
$studentbeispiel_obj->load_studentbeispiel($row_stud->uid, $row_bsp->beispiel_id);
|
||||
if($studentbeispiel_obj->vorbereitet)
|
||||
$punkte = $row_bsp->punkte;
|
||||
else
|
||||
@@ -511,7 +507,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 prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER);
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND uid=".$db->db_add_param($row_stud->uid);
|
||||
if($result = $db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
$worksheet->write($zeile,++$spalte,($row->mitarbeit_heute!=''?$row->mitarbeit_heute:'0'));
|
||||
@@ -522,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.prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER)." AND
|
||||
tbl_studentbeispiel.uid=".$db->db_add_param($row_stud->uid)." 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
|
||||
@@ -538,7 +534,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 prestudent_id=".$db->db_add_param($row_stud->prestudent_id, FHC_INTEGER)." AND lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER);
|
||||
WHERE uid=".$db->db_add_param($row_stud->uid)." 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'));
|
||||
@@ -604,12 +600,9 @@ function addUser(student_uid)
|
||||
else
|
||||
$vorbereitet=false;
|
||||
|
||||
if(!$student = new student($uid))
|
||||
die("Der Student wurde nicht gefunden!");
|
||||
|
||||
$bsp_obj = new beispiel();
|
||||
|
||||
if(!$bsp_obj->studentbeispiel_exists($student->prestudent_id,$bsp->beispiel_id))
|
||||
|
||||
if(!$bsp_obj->studentbeispiel_exists($uid,$bsp->beispiel_id))
|
||||
{
|
||||
$new=true;
|
||||
$bsp_obj->insertamum = date('Y-m-d H:i:s');
|
||||
@@ -617,12 +610,12 @@ function addUser(student_uid)
|
||||
}
|
||||
else
|
||||
{
|
||||
$bsp_obj->load_studentbeispiel($student->prestudent_id, $bsp->beispiel_id);
|
||||
$bsp_obj->load_studentbeispiel($uid, $bsp->beispiel_id);
|
||||
$new=false;
|
||||
}
|
||||
|
||||
|
||||
$bsp_obj->prestudent_id = $student->prestudent_id;
|
||||
$bsp_obj->uid = $uid;
|
||||
$bsp_obj->beispiel_id = $bsp->beispiel_id;
|
||||
$bsp_obj->vorbereitet = $vorbereitet;
|
||||
$bsp_obj->updateamum = date('Y-m-d H:i:s');
|
||||
@@ -634,12 +627,10 @@ function addUser(student_uid)
|
||||
}
|
||||
else
|
||||
{
|
||||
if(!$student = new student($uid))
|
||||
die("Der Student wurde nicht gefunden!");
|
||||
|
||||
if (!$uebung_obj->load_studentuebung($student->prestudent_id,$uebung_id))
|
||||
if (!$uebung_obj->load_studentuebung($uid,$uebung_id))
|
||||
{
|
||||
$uebung_obj->prestudent_id = $student->prestudent_id;
|
||||
$uebung_obj->uid = $uid;
|
||||
$uebung_obj->mitarbeiter_uid = $user;
|
||||
$uebung_obj->abgabe_id = null;
|
||||
$uebung_obj->note = $_POST['update_'.$uid.'_note'];
|
||||
@@ -655,7 +646,7 @@ function addUser(student_uid)
|
||||
}
|
||||
else
|
||||
{
|
||||
$uebung_obj->load_studentuebung($student->prestudent_id,$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");
|
||||
@@ -729,7 +720,7 @@ function addUser(student_uid)
|
||||
$gruppe_bez = 'Alle Studierende';
|
||||
//Alle Studenten die dieser lehreinheit zugeordnet sind
|
||||
// studentenquery
|
||||
$qry_stud = "SELECT uid, prestudent_id, vorname, nachname, matrikelnr FROM campus.vw_student_lehrveranstaltung JOIN campus.vw_student using(uid)
|
||||
$qry_stud = "SELECT uid, vorname, nachname, matrikelnr FROM campus.vw_student_lehrveranstaltung JOIN campus.vw_student using(uid)
|
||||
WHERE studiensemester_kurzbz = ".$db->db_add_param($stsem)." AND lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." ORDER BY nachname, vorname";
|
||||
/*
|
||||
$qry_stud = "SELECT vw_student.uid, vorname, nachname FROM campus.vw_student, public.tbl_benutzergruppe, lehre.tbl_lehreinheitgruppe
|
||||
@@ -796,7 +787,7 @@ function addUser(student_uid)
|
||||
|
||||
$filename = '';
|
||||
$su_obj = new uebung($uebung_id);
|
||||
$su_obj->load_studentuebung($row_stud->prestudent_id, $uebung_id);
|
||||
$su_obj->load_studentuebung($row_stud->uid, $uebung_id);
|
||||
if ($su_obj->abgabe_id)
|
||||
{
|
||||
$su_obj->load_abgabe($su_obj->abgabe_id);
|
||||
@@ -810,7 +801,7 @@ function addUser(student_uid)
|
||||
if (!$uebung_obj->beispiele)
|
||||
{
|
||||
$studentuebung_obj = new uebung();
|
||||
$studentuebung_obj->load_studentuebung($row_stud->prestudent_id,$uebung_id);
|
||||
$studentuebung_obj->load_studentuebung($row_stud->uid,$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";
|
||||
|
||||
}
|
||||
@@ -819,7 +810,7 @@ function addUser(student_uid)
|
||||
foreach($beispiel_obj->beispiele as $row_bsp)
|
||||
{
|
||||
$studentbeispiel_obj = new beispiel();
|
||||
$studentbeispiel_obj->load_studentbeispiel($row_stud->prestudent_id, $row_bsp->beispiel_id);
|
||||
$studentbeispiel_obj->load_studentbeispiel($row_stud->uid, $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";
|
||||
}
|
||||
}
|
||||
|
||||
@@ -426,7 +426,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->prestudent_id);
|
||||
$studentnote->calc_gesamtnote($lehreinheit_id,$stsem,$row_stud->uid);
|
||||
//echo $studentnote->debug;
|
||||
$legesamtnote = new legesamtnote($lehreinheit_id);
|
||||
if (!$legesamtnote->load($row_stud->prestudent_id,$lehreinheit_id))
|
||||
|
||||
@@ -345,7 +345,7 @@ if(isset($uebung_id) && $uebung_id!='')
|
||||
</td>
|
||||
</tr>';
|
||||
$i=0;
|
||||
$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";
|
||||
$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 uid";
|
||||
if($result_cnt = $db->db_query($qry_cnt))
|
||||
$gesamt=$db->db_num_rows($result_cnt);
|
||||
|
||||
|
||||
@@ -40,7 +40,6 @@ require_once('../../../../include/legesamtnote.class.php');
|
||||
require_once('../../../../include/lvgesamtnote.class.php');
|
||||
require_once('../../../../include/zeugnisnote.class.php');
|
||||
require_once('../../../../include/phrasen.class.php');
|
||||
require_once('../../../../include/student.class.php');
|
||||
include('functions.inc.php');
|
||||
|
||||
$sprache = getSprache();
|
||||
@@ -99,13 +98,10 @@ $uebung_id = (isset($_GET['uebung_id'])?$_GET['uebung_id']:'');
|
||||
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($student->prestudent_id, $uebung_id);
|
||||
$ueb->load_studentuebung($user, $uebung_id);
|
||||
$ueb->load_abgabe($ueb->abgabe_id);
|
||||
$filename = BENOTUNGSTOOL_PATH."abgabe/".$ueb->abgabedatei;
|
||||
header('Content-Type: application/octet-stream');
|
||||
@@ -183,14 +179,11 @@ if (isset($_POST["abgabe"]))
|
||||
$uebung_obj = new uebung();
|
||||
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
$uebung_obj->load_studentuebung($user, $uebung_id);
|
||||
|
||||
$uebung_obj->load_studentuebung($student->prestudent_id, $uebung_id);
|
||||
|
||||
if ($uebung_obj->errormsg != "")
|
||||
{
|
||||
$uebung_obj->prestudent_id = $student->prestudent_id;
|
||||
$uebung_obj->uid = $user;
|
||||
$uebung_obj->mitarbeiter_uid = null;
|
||||
$uebung_obj->abgabe_id = null;
|
||||
$uebung_obj->uebung_id = $uebung_id;
|
||||
@@ -530,10 +523,8 @@ 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($student->prestudent_id, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($user, $row->beispiel_id))
|
||||
{
|
||||
$stud_bsp_obj->new=false;
|
||||
}
|
||||
@@ -552,7 +543,7 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
$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->prestudent_id = $student->prestudent_id;
|
||||
$stud_bsp_obj->uid = $user;
|
||||
$stud_bsp_obj->beispiel_id = $row->beispiel_id;
|
||||
|
||||
if(!$row->check_anzahl_studentbeispiel($row->beispiel_id))
|
||||
@@ -560,7 +551,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($student->prestudent_id, $row->beispiel_id))
|
||||
if($hlp->load_studentbeispiel($user, $row->beispiel_id))
|
||||
{
|
||||
if($hlp->vorbereitet!=$stud_bsp_obj->vorbereitet)
|
||||
{
|
||||
@@ -624,11 +615,8 @@ 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 prestudent_id = ".$db->db_add_param($student->prestudent_id, FHC_INTEGER);
|
||||
$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 uid = ".$db->db_add_param($user);
|
||||
if($result_cnt = $db->db_query($qry_cnt))
|
||||
if($row_cnt = $db->db_fetch_object($result_cnt))
|
||||
$anzahl = $row_cnt->anzahl;
|
||||
@@ -690,8 +678,6 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
{
|
||||
$bsp_voll = false;
|
||||
$stud_bsp_obj = new beispiel();
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
if ($uebung_obj->maxstd > 0)
|
||||
{
|
||||
@@ -699,7 +685,7 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
if ($stud_bsp_obj->anzahl_studentbeispiel >= $uebung_obj->maxstd)
|
||||
$bsp_voll = true;
|
||||
}
|
||||
if($stud_bsp_obj->load_studentbeispiel($student->prestudent_id, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($user, $row->beispiel_id))
|
||||
{
|
||||
$vorbereitet = $stud_bsp_obj->vorbereitet;
|
||||
$probleme = $stud_bsp_obj->probleme;
|
||||
@@ -777,11 +763,8 @@ 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 prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER)." 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 uid=".$db->db_add_param($user)." AND vorbereitet=true";
|
||||
$punkte_eingetragen=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -804,19 +787,16 @@ 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.prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
tbl_studentbeispiel.uid=".$db->db_add_param($user)." 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 prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER)." AND liste_id = ".$db->db_add_param($liste_id, FHC_INTEGER);
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND uid=".$db->db_add_param($user)." 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))
|
||||
@@ -824,7 +804,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 prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER);
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND uid=".$db->db_add_param($user);
|
||||
$mitarbeit=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -904,7 +884,7 @@ if (!isset($_GET["notenuebersicht"]))
|
||||
</td>
|
||||
</tr>';
|
||||
$i=0;
|
||||
$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";
|
||||
$qry_cnt = "SELECT distinct uid FROM campus.tbl_studentbeispiel JOIN campus.tbl_beispiel USING(beispiel_id) WHERE uebung_id=".$db->db_add_param($uebung_id)." GROUP BY uid";
|
||||
if($result_cnt = $db->db_query($qry_cnt))
|
||||
$gesamt=$db->db_num_rows($result_cnt);
|
||||
|
||||
@@ -1065,10 +1045,7 @@ else
|
||||
if(count($subuebung_obj->uebungen) >= 0)
|
||||
{
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_l1_note($row->uebung_id, $student->prestudent_id, $lehreinheit_id);
|
||||
$l1note->calc_l1_note($row->uebung_id, $user, $lehreinheit_id);
|
||||
if ($l1note->negativ)
|
||||
$l1_note = 5;
|
||||
else
|
||||
@@ -1109,20 +1086,16 @@ else
|
||||
echo " </td>\n";
|
||||
if ($subrow->beispiele)
|
||||
{
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_punkte($subrow->uebung_id, $student->prestudent_id);
|
||||
$l1note->calc_punkte($subrow->uebung_id, $user);
|
||||
echo " <td align='center'>".$l1note->punkte_gesamt."</td>";
|
||||
echo " <td align='center'></td>\n";
|
||||
echo " <td align='center'></td>\n";
|
||||
}
|
||||
else if ($subrow->abgabe)
|
||||
{
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_note($subrow->uebung_id, $student->prestudent_id);
|
||||
$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";
|
||||
@@ -1139,10 +1112,7 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
$l1note->calc_gesamtnote($lehreinheit_id, $stsem, $student->prestudent_id);
|
||||
$l1note->calc_gesamtnote($lehreinheit_id, $stsem, $user);
|
||||
if ($l1note->negativ)
|
||||
$gesamtnote = 5;
|
||||
else
|
||||
@@ -1158,10 +1128,8 @@ else
|
||||
|
||||
$legesamtnote = new legesamtnote($lehreinheit_id);
|
||||
|
||||
if(!$student = new student($user))
|
||||
die($p->t('benotungstool/studentWurdeNichtGefunden'));
|
||||
|
||||
if (!$legesamtnote->load($student->prestudent_id, $lehreinheit_id))
|
||||
if (!$legesamtnote->load($user, $lehreinheit_id))
|
||||
{
|
||||
$lenote = null;
|
||||
}
|
||||
@@ -1169,7 +1137,7 @@ else
|
||||
{
|
||||
$lenote = $legesamtnote->note;
|
||||
}
|
||||
if ($lvgesamtnote = new lvgesamtnote($lehrveranstaltung_id,$student->prestudent_id,$stsem))
|
||||
if ($lvgesamtnote = new lvgesamtnote($lehrveranstaltung_id,$user,$stsem))
|
||||
{
|
||||
$lvnote = $lvgesamtnote->note;
|
||||
}
|
||||
|
||||
@@ -77,16 +77,13 @@ $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"])){
|
||||
$file=$_GET["download_abgabe"];
|
||||
$uebung_id = $_GET["uebung_id"];
|
||||
$ueb = new uebung();
|
||||
$ueb->load_studentuebung($prestudent_id, $uebung_id);
|
||||
$ueb->load_studentuebung($uid, $uebung_id);
|
||||
$ueb->load_abgabe($ueb->abgabe_id);
|
||||
$filename = BENOTUNGSTOOL_PATH."abgabe/".$ueb->abgabedatei;
|
||||
header('Content-Type: application/octet-stream');
|
||||
@@ -121,12 +118,12 @@ if (isset($_FILES["abgabedatei"]))
|
||||
$abgabepfad = BENOTUNGSTOOL_PATH."abgabe/".$abgabedatei;
|
||||
|
||||
$uebung_obj = new uebung();
|
||||
$uebung_obj->load_studentuebung($student->prestudent_id, $uebung_id);
|
||||
$uebung_obj->load_studentuebung($student_uid, $uebung_id);
|
||||
|
||||
|
||||
if ($uebung_obj->errormsg != "")
|
||||
{
|
||||
$uebung_obj->prestudent_id = $student->prestudent_id;
|
||||
$uebung_obj->uid = $student->uid;
|
||||
$uebung_obj->mitarbeiter_uid = null;
|
||||
$uebung_obj->abgabe_id = null;
|
||||
$uebung_obj->uebung_id = $uebung_id;
|
||||
@@ -336,7 +333,7 @@ if(isset($_POST['submit']))
|
||||
if(isset($punkte) && is_numeric($punkte) && !isset($_POST['abgabe']))
|
||||
{
|
||||
$ueb_obj = new uebung();
|
||||
if($ueb_obj->load_studentuebung($prestudent_id, $uebung_id))
|
||||
if($ueb_obj->load_studentuebung($uid, $uebung_id))
|
||||
$ueb_obj->new = false;
|
||||
else
|
||||
{
|
||||
@@ -351,7 +348,7 @@ if(isset($_POST['submit']))
|
||||
$ueb_obj->updatevon = $user;
|
||||
$ueb_obj->mitarbeiter_uid = $user;
|
||||
$ueb_obj->uebung_id = $uebung_id;
|
||||
$ueb_obj->student->prestudent_id = $prestudent_id;
|
||||
$ueb_obj->student_uid = $uid;
|
||||
|
||||
if(!$ueb_obj->studentuebung_save())
|
||||
$error = true;
|
||||
@@ -364,7 +361,7 @@ if(isset($_POST['submit']))
|
||||
{
|
||||
$stud_bsp_obj = new beispiel();
|
||||
|
||||
if($stud_bsp_obj->load_studentbeispiel($prestudent_id, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($uid, $row->beispiel_id))
|
||||
{
|
||||
$stud_bsp_obj->new=false;
|
||||
}
|
||||
@@ -378,7 +375,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->prestudent_id = $prestudent_id;
|
||||
$stud_bsp_obj->uid = $uid;
|
||||
$stud_bsp_obj->beispiel_id = $row->beispiel_id;
|
||||
|
||||
if(!$stud_bsp_obj->studentbeispiel_save())
|
||||
@@ -403,7 +400,7 @@ if(isset($_POST['submit']))
|
||||
{
|
||||
$note = $_POST['note'];
|
||||
$ueb_obj = new uebung();
|
||||
if($ueb_obj->load_studentuebung($prestudent_id, $uebung_id))
|
||||
if($ueb_obj->load_studentuebung($uid, $uebung_id))
|
||||
$ueb_obj->new = false;
|
||||
else
|
||||
{
|
||||
@@ -418,7 +415,7 @@ if(isset($_POST['submit']))
|
||||
$ueb_obj->updatevon = $user;
|
||||
$ueb_obj->mitarbeiter_uid = $user;
|
||||
$ueb_obj->uebung_id = $uebung_id;
|
||||
$ueb_obj->prestudent_id = $student->prestudent_id;
|
||||
$ueb_obj->student_uid = $uid;
|
||||
|
||||
if(!$ueb_obj->studentuebung_save())
|
||||
$error = true;
|
||||
@@ -574,7 +571,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
|
||||
$ueb_obj = new uebung();
|
||||
$ueb_obj->load($uebung_id);
|
||||
if($ueb_obj->load_studentuebung($prestudent_id, $uebung_id))
|
||||
if($ueb_obj->load_studentuebung($uid, $uebung_id))
|
||||
{
|
||||
$anmerkung = $ueb_obj->anmerkung;
|
||||
$mitarbeit = $ueb_obj->mitarbeitspunkte;
|
||||
@@ -610,7 +607,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
foreach ($bsp_obj->beispiele as $row)
|
||||
{
|
||||
$stud_bsp_obj = new beispiel();
|
||||
if($stud_bsp_obj->load_studentbeispiel($prestudent_id, $row->beispiel_id))
|
||||
if($stud_bsp_obj->load_studentbeispiel($uid, $row->beispiel_id))
|
||||
{
|
||||
$vorbereitet = $stud_bsp_obj->vorbereitet;
|
||||
$probleme = $stud_bsp_obj->probleme;
|
||||
@@ -633,7 +630,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
|
||||
|
||||
|
||||
$ueb_obj->load_studentuebung($prestudent_id, $uebung_id);
|
||||
$ueb_obj->load_studentuebung($uid, $uebung_id);
|
||||
if ($ueb_obj->abgabe_id)
|
||||
{
|
||||
$ueb_obj->load_abgabe($ueb_obj->abgabe_id);
|
||||
@@ -658,7 +655,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 prestudent_id=".$db->db_add_param($prestudent_id, FHC_INTEGER)." 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 uid=".$db->db_add_param($uid)." AND vorbereitet=true";
|
||||
$punkte_eingetragen=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -682,7 +679,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.prestudent_id=".$db->db_add_param($prestudent_id, FHC_INTEGER)." AND vorbereitet=true";
|
||||
tbl_studentbeispiel.uid=".$db->db_add_param($uid)." AND vorbereitet=true";
|
||||
$punkte_eingetragen_alle=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -690,7 +687,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 prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER)." and liste_id=".$db->db_add_param($liste_id);
|
||||
WHERE lehreinheit_id=".$db->db_add_param($lehreinheit_id, FHC_INTEGER)." AND uid=".$db->db_add_param($student->uid)." 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 +695,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 prestudent_id=".$db->db_add_param($student->prestudent_id, FHC_INTEGER);
|
||||
WHERE uebung_id=".$db->db_add_param($uebung_id, FHC_INTEGER)." AND uid=".$db->db_add_param($student->uid);
|
||||
$mitarbeit=0;
|
||||
if($result=$db->db_query($qry))
|
||||
if($row = $db->db_fetch_object($result))
|
||||
@@ -766,7 +763,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
}
|
||||
else if (is_numeric($_GET['uebung_id']))
|
||||
{
|
||||
$ueb_obj->load_studentuebung($prestudent_id, $uebung_id);
|
||||
$ueb_obj->load_studentuebung($uid, $uebung_id);
|
||||
if ($ueb_obj->abgabe_id)
|
||||
{
|
||||
$ueb_obj->load_abgabe($ueb_obj->abgabe_id);
|
||||
@@ -776,7 +773,7 @@ if(isset($_GET['uid']) && $_GET['uid']!='')
|
||||
$filename='';
|
||||
//Abgaben benoten
|
||||
$studentnote = new studentnote($lehreinheit_id,$stsem,$uid,$uebung_id);
|
||||
$studentnote->calc_note($uebung_id, $prestudent_id);
|
||||
$studentnote->calc_note($uebung_id, $uid);
|
||||
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>";
|
||||
|
||||
Reference in New Issue
Block a user