Adaptierung Vorlage Notenliste.xls um Nachprüfung und Termin3

This commit is contained in:
ma0068
2022-10-18 09:17:07 +02:00
parent 8754c46575
commit 47d3ab33e7
6 changed files with 84 additions and 15 deletions
@@ -98,9 +98,9 @@ if($stsem=='')
//$note = $_REQUEST["note"];
if(!$rechte->isBerechtigt('admin',0) &&
!$rechte->isBerechtigt('admin',$lv_obj->studiengang_kz) &&
!$rechte->isBerechtigt('lehre',$lv_obj->studiengang_kz))
if(!$rechte->isBerechtigt('admin', 0) &&
!$rechte->isBerechtigt('admin', $lv_obj->studiengang_kz) &&
!$rechte->isBerechtigt('lehre', $lv_obj->studiengang_kz))
{
$qry = "SELECT lehreinheit_id FROM lehre.tbl_lehrveranstaltung JOIN lehre.tbl_lehreinheit USING(lehrveranstaltung_id)
JOIN lehre.tbl_lehreinheitmitarbeiter USING(lehreinheit_id)
@@ -117,11 +117,11 @@ if(!$rechte->isBerechtigt('admin',0) &&
}
}
function savenote($db,$lvid, $student_uid, $note, $punkte=null)
function savenote($db, $lvid, $student_uid, $note, $punkte = null)
{
global $stsem, $user, $p, $noten_anmerkung;
$jetzt = date("Y-m-d H:i:s");
$punkte = str_replace(',','.',$punkte);
$punkte = str_replace(',', '.', $punkte);
//Ermitteln ob der Student diesem Kurs zugeteilt ist
$qry = "SELECT 1 FROM campus.vw_student_lehrveranstaltung WHERE uid=".$db->db_add_param($student_uid)." AND lehrveranstaltung_id=".$db->db_add_param($lvid, FHC_INTEGER);
if($result = $db->db_query($qry))
@@ -207,13 +207,12 @@ if (isset($_REQUEST["submit"]))
$note = $_REQUEST["note"];
$punkte = (isset($_REQUEST["punkte"])?$_REQUEST["punkte"]:'');
$response = savenote($db,$lvid, $student_uid, $note, $punkte);
$response = savenote($db, $lvid, $student_uid, $note, $punkte);
echo $response;
}
else
{
foreach ($_POST as $row=>$val)
foreach ($_POST as $row => $val)
{
if(mb_strstr(mb_strtolower($row), 'matrikelnr_'))
{
@@ -232,7 +231,7 @@ if (isset($_REQUEST["submit"]))
$response.="\nNote oder Punkte fehlen";
continue;
}
$punkte=str_replace(',','.', $punkte);
$punkte=str_replace(',', '.', $punkte);
//check ob statt Matrikelnummer nicht bereits student_uid (Moodle Grade Import) vorliegt..
$student = new student();
@@ -241,7 +240,7 @@ if (isset($_REQUEST["submit"]))
//UID ermitteln
if(!$student_uid = $student->getUidFromMatrikelnummer($matrikelnummer))
{
$response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht',array($matrikelnummer));
$response.="\n".$p->t('benotungstool/studentMitMatrikelnummerExistiertNicht', array($matrikelnummer));
continue;
}
}
@@ -268,7 +267,7 @@ if (isset($_REQUEST["submit"]))
}
}
$val=savenote($db,$lvid, $student_uid, $note, $punkte);
$val=savenote($db, $lvid, $student_uid, $note, $punkte);
if($val!='neu' && $val!='update' && $val!='update_f')
$response.=$val;
}
@@ -749,6 +749,7 @@ foreach ($noten_obj->result as $row)
}
?>
for(row in rows)
{
zeile = rows[row].split(" ");
@@ -779,6 +780,7 @@ foreach ($noten_obj->result as $row)
}
}
if (alertMsg != "")
alert(alertMsg);
@@ -1306,7 +1308,7 @@ if (defined("CIS_GESAMTNOTE_PRUEFUNG_MOODLE_LE_NOTE") && CIS_GESAMTNOTE_PRUEFUNG
foreach ($addon_obj->result as $row)
{
if (file_exists('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php'))
include ('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php');
include('../../../../addons/' . $row->kurzbz . '/cis/grades.inc.php');
}
}
}
@@ -105,6 +105,7 @@ if (isset($_REQUEST['sammel']) && $_REQUEST["sammel"] == 1)
$note = null;
$punkte = null;
$datum = null;
$response = '';
if(isset($_POST['note_'.$id]))
$note = $_POST['note_'.$id];
elseif(isset($_POST['punkte_'.$id]))
+67
View File
@@ -35,6 +35,7 @@ require_once('../../../include/note.class.php');
require_once('../../../include/notenschluessel.class.php');
require_once('../../../include/Excel/excel.php');
require_once('../../../include/phrasen.class.php');
require_once('../../../include/pruefung.class.php');
$uid = get_uid();
@@ -191,6 +192,19 @@ else
}
//Studenten holen
//Spaltengruppe für Nachprüfung
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2)
{
$worksheet->write($lines,8,$p->t('benotungstool/nachpruefung'),$format_bold);
}
//Spaltengruppe für 2.Nebensprüfungstermin
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3)
{
$worksheet->write($lines,12,$p->t('benotungstool/nachpruefung2'),$format_bold);
}
$lines++;
$worksheet->write($lines,1,$p->t('global/uid'),$format_border_bottom);
$worksheet->write($lines,2,$p->t('global/nachname'),$format_border_bottom);
@@ -203,6 +217,26 @@ else
else
$worksheet->write($lines,6,$p->t('benotungstool/note'),$format_border_bottom);
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2)
{
$worksheet->write($lines,8,$p->t('global/uid'),$format_border_bottom);
$worksheet->write($lines,9,$p->t('global/datum'),$format_border_bottom);
if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE)
$worksheet->write($lines,10,$p->t('benotungstool/punkte'),$format_border_bottom);
else
$worksheet->write($lines,10,$p->t('benotungstool/note'),$format_border_bottom);
}
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3)
{
$worksheet->write($lines,12,$p->t('global/uid'),$format_border_bottom);
$worksheet->write($lines,13,$p->t('global/uid'),$format_border_bottom);
if(defined('CIS_GESAMTNOTE_PUNKTE') && CIS_GESAMTNOTE_PUNKTE)
$worksheet->write($lines,14,$p->t('benotungstool/punkte'),$format_border_bottom);
else
$worksheet->write($lines,14,$p->t('benotungstool/note'),$format_border_bottom);
}
$stsem_obj = new studiensemester();
$stsem_obj->load($stsem);
$stsemdatumvon = $stsem_obj->start;
@@ -282,6 +316,39 @@ else
$worksheet->write($lines,4,'="'.$elem->semester.$elem->verband.$elem->gruppe.'"');
$worksheet->write($lines,5,'="'.trim($elem->matrikelnr).'"',$format_highlight);
$worksheet->write($lines,6, $note, $format_highlightright);
// Nachprüfung
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN2') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN2)
{
$worksheet->write($lines,8, $elem->uid, $format_highlightright);
$pr = new Pruefung();
$pr->getPruefungen($elem->uid, "Termin2", $lvid, $sem);
$output2 = $pr->result;
if ($output2)
{
$resultPr = $output2[0];
$worksheet->write($lines,9, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright);
$worksheet->write($lines,10, $resultPr->note, $format_highlightright);
}
}
// Nachprüfung
if (defined('CIS_GESAMTNOTE_PRUEFUNG_TERMIN3') && CIS_GESAMTNOTE_PRUEFUNG_TERMIN3)
{
$worksheet->write($lines,12, $elem->uid, $format_highlightright);
$pr = new Pruefung();
$pr->getPruefungen($elem->uid, "Termin3", $lvid, $sem);
$output3 = $pr->result;
if ($output3)
{
$resultPr = $output3[0];
$worksheet->write($lines,13, date('d.m.Y', strtotime($resultPr->datum)), $format_highlightright);
$worksheet->write($lines,14, $resultPr->note, $format_highlightright);
}
}
$i++;
$lines++;
}
+2 -2
View File
@@ -172,8 +172,8 @@ $this->phrasen['benotungstool/eingetrageneNoten']='Eingetragene Noten';
$this->phrasen['benotungstool/zeunis']='Zeugnis';
$this->phrasen['benotungstool/handbuch']='Handbuch';
$this->phrasen['benotungstool/punkte']='Punkte';
$this->phrasen['benotungstool/importAnweisung']='Kopieren Sie die Spalten Personenkennzeichen und Note aus der Notenliste (bzw. StudentenUid und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein';
$this->phrasen['benotungstool/importAnweisungNachp']='Kopieren Sie die Spalten Personenkennzeichen, Datum und Note aus der Notenliste (bzw. StudentenUid, Datum und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein';
$this->phrasen['benotungstool/importAnweisung']='Kopieren Sie die Spalten StudentenUid und Note aus der Notenliste (bzw. StudentenUid und Note aus dem MoodleExport) und fügen Sie diese in folgendes Feld ein';
$this->phrasen['benotungstool/importAnweisungNachp']='Kopieren Sie die Spalten StudentenUid (bzw. Personenkennzeichen), Datum und Note aus der Notenliste bzw. dem Moodle Export File und fügen Sie diese in folgendes Feld ein';
$this->phrasen['benotungstool/pruefung']='Prüfung';
$this->phrasen['benotungstool/notenlisteImport']='Notenliste für den LV-Noten-Import (Excel)';
$this->phrasen['benotungstool/bearbeitetvon']='Bearbeitet von';
+1 -1
View File
@@ -171,7 +171,7 @@ $this->phrasen['benotungstool/zeunis']='Transcript';
$this->phrasen['benotungstool/handbuch']='Handbook';
$this->phrasen['benotungstool/punkte']='Points';
$this->phrasen['benotungstool/importAnweisung']='Copy the columns "personal identifier" and "grade" from the grade list (or "student ID number" and "grade" from the moodle export file) and insert them in the following field';
$this->phrasen['benotungstool/importAnweisungNachp']='Copy the columns "personal identifier", "date" and "grade" from the grade list (or "student ID number", "date" and "grade" from the moodle export file) and insert them in the following field';
$this->phrasen['benotungstool/importAnweisungNachp']='Copy the columns "student ID number" (or "personal identifier"), "date" and "grade" from the grade list or from the moodle export file and insert them in the following field';
$this->phrasen['benotungstool/pruefung']='Examination';
$this->phrasen['benotungstool/notenlisteImport']='Grade list for the subject grade import (Excel)';
$this->phrasen['benotungstool/geaenderteNotenVorhanden']='There are changed grades. Please send the changes to the assistant by clicking "Approval"';