Prüfungsprotokoll:

- new fields: beginnzeit, endezeit, Prüfungsantritt
- Einverständniserklärung: if not checked no save possible
- can be saved and freigegeben
- added phrases
This commit is contained in:
KarpAlex
2020-05-28 11:08:38 +02:00
parent 16c3ca6d0a
commit f1a346c545
8 changed files with 612 additions and 127 deletions
@@ -16,8 +16,9 @@ class Pruefungsprotokoll extends Auth_Controller
// Set required permissions
parent::__construct(
array(
'index' => 'lehre:r',
'Protokoll' => 'lehre:r'
'index' => 'lehre/pruefungsbeurteilung:r',
'Protokoll' => 'lehre/pruefungsbeurteilung:r',
'saveProtokoll' => 'lehre/pruefungsbeurteilung:rw',
)
);
@@ -25,12 +26,17 @@ class Pruefungsprotokoll extends Auth_Controller
$this->load->model('education/Abschlusspruefung_model', 'AbschlusspruefungModel');
$this->load->model('education/Abschlussbeurteilung_model', 'AbschlussbeurteilungModel');
$this->load->library('PermissionLib');
$this->load->library('AuthLib');
// Load language phrases
$this->loadPhrases(
array(
'ui',
'global',
'person',
'abschlusspruefung',
'global',
'person',
'password',
'lehre'
)
);
@@ -49,6 +55,7 @@ class Pruefungsprotokoll extends Auth_Controller
}
/**
* Show Pruefungsprotokoll.
*/
public function Protokoll()
{
@@ -57,13 +64,18 @@ class Pruefungsprotokoll extends Auth_Controller
if (!is_numeric($abschlusspruefung_id))
show_error('invalid abschlusspruefung');
$abschlusspruefung = $this->AbschlusspruefungModel->getAbschlusspruefung($abschlusspruefung_id);
$abschlusspruefung_saved = false;
$abschlusspruefung = $this->_getAbschlusspruefungBerechtigt($abschlusspruefung_id);
if (isError($abschlusspruefung))
show_error(getError($abschlusspruefung));
else
{
$abschlusspruefung = getData($abschlusspruefung);
$abschlusspruefung_saved = isset($abschlusspruefung->protokoll) && isset($abschlusspruefung->abschlussbeurteilung_kurzbz);
}
$this->AbschlussbeurteilungModel->addOrder("sort", "ASC");
$this->AbschlussbeurteilungModel->addOrder("(CASE WHEN abschlussbeurteilung_kurzbz = 'ausgezeichnet' THEN 1
WHEN abschlussbeurteilung_kurzbz = 'gut' THEN 2
WHEN abschlussbeurteilung_kurzbz = 'bestanden' THEN 3
@@ -80,12 +92,70 @@ class Pruefungsprotokoll extends Auth_Controller
$data = array(
'abschlusspruefung' => $abschlusspruefung,
'abschlussbeurteilung' => $abschlussbeurteilung
'abschlussbeurteilung' => $abschlussbeurteilung,
'abschlusspruefung_saved' => $abschlusspruefung_saved
);
$this->load->view('lehre/pruefungsprotokoll.php', $data);
}
/**
* Save Pruefungsprotokoll (including possible Freigabe)
*/
public function saveProtokoll()
{
$abschlusspruefung_id = $this->input->post('abschlusspruefung_id');
$data = $this->input->post('protocoldata');
if (isset($abschlusspruefung_id) && is_numeric($abschlusspruefung_id) && isset($data))
{
// check permission
$berechtigt = $this->_getAbschlusspruefungBerechtigt($abschlusspruefung_id);
if (isError($berechtigt))
$this->outputJsonError(getError($berechtigt));
else
{
$freigabe = isset($data['freigabedatum']) && $data['freigabedatum'];
if ($freigabe)
{
// Verify password
$password = $data['password'];
unset($data['password']);
if (!isEmptyString($password))
{
$result = $this->authlib->checkUserAuthByUsernamePassword($this->_uid, $password);
if (isError($result))
{
return $this->outputJsonError('Falsches Passwort'); // exit if password is incorrect
}
}
else
{
return $this->outputJsonError('Passwort fehlt');
}
}
$data = $this->_prepareAbschlusspruefungDataForSave($data);
$result = $this->AbschlusspruefungModel->update($abschlusspruefung_id, $data);
if (hasData($result))
{
$abschlusspruefung_id = getData($result);
$updateresult = array('abschlusspruefung_id' => $abschlusspruefung_id);
if ($freigabe)
$updateresult['freigabedatum'] = date_format(date_create($data['freigabedatum']), 'd.m.Y');
$this->outputJsonSuccess($updateresult);
}
else
$this->outputJsonError('Fehler beim Speichern des Prüfungsprotokolls');
}
}
else
$this->outputJsonError('Ungültige Parameter');
}
// -----------------------------------------------------------------------------------------------------------------
// Private methods
@@ -98,4 +168,53 @@ class Pruefungsprotokoll extends Auth_Controller
if (!$this->_uid) show_error('User authentification failed');
}
/**
* Retrieves an Abschlussprüfung, with permission check
* permission: admin, assistance of study programe or Vorsitz of the Prüfung
* @param $abschlusspruefung_id
* @return object success or error
*/
private function _getAbschlusspruefungBerechtigt($abschlusspruefung_id)
{
$result = error('Error when getting Abschlusspruefung');
if (isset($this->_uid))
{
$abschlusspruefung = $this->AbschlusspruefungModel->getAbschlusspruefung($abschlusspruefung_id);
if (hasData($abschlusspruefung))
{
$abschlusspruefung_data = getData($abschlusspruefung);
if ($this->permissionlib->isBerechtigt('admin') ||
(isset($abschlusspruefung_data->studiengang_kz) && $this->permissionlib->isBerechtigt('assistenz', 'suid', $abschlusspruefung_data->studiengang_kz))
|| $this->_uid === $abschlusspruefung_data->uid_vorsitz)
$result = $abschlusspruefung;
else
$result = error('Permission denied');
}
}
return $result;
}
/**
* Prepares Abschlussprüfung for save in database, replaces '' with null, sets Freigabedatum
* @param $data
* @return array
*/
private function _prepareAbschlusspruefungDataForSave($data)
{
$nullfields = array('uhrzeit', 'endezeit', 'abschlussbeurteilung_kurzbz', 'protokoll');
foreach ($data as $idx => $item)
{
if (in_array($idx, $nullfields) & $item === '')
$data[$idx] = null;
}
if (isset($data['freigabedatum']) && $data['freigabedatum'])
$data['freigabedatum'] = date('Y-m-d');
return $data;
}
}
@@ -26,12 +26,14 @@ class Abschlusspruefung_model extends DB_Model
$abschlusspruefungdata = array();
$this->addSelect('tbl_abschlusspruefung.datum, tbl_abschlusspruefung.abschlussbeurteilung_kurzbz,
studentpers.vorname AS vorname_student, studentpers.nachname AS nachname_student, studentpers.titelpre AS titelpre_student, studentpers.titelpost AS titelpost_student, studentben.uid AS uid_student, matrikelnr,
vorsitzenderpers.vorname AS vorname_vorsitz, vorsitzenderpers.nachname AS nachname_vorsitz, vorsitzenderpers.titelpre AS titelpre_vorsitz, vorsitzenderpers.titelpost AS titelpost_vorsitz,
erstprueferpers.vorname AS vorname_erstpruefer, erstprueferpers.nachname AS nachname_erstpruefer, erstprueferpers.titelpre AS titelpre_erstpruefer, erstprueferpers.titelpost AS titelpost_erstpruefer,
zweitprueferpers.vorname AS vorname_zweitpruefer, zweitprueferpers.nachname AS nachname_zweitpruefer, zweitprueferpers.titelpre AS titelpre_zweitpruefer, zweitprueferpers.titelpost AS titelpost_zweitpruefer
');
$this->addSelect('tbl_abschlusspruefung.abschlusspruefung_id, tbl_abschlusspruefung.datum, tbl_abschlusspruefung.abschlussbeurteilung_kurzbz, tbl_abschlusspruefung.uhrzeit AS pruefungsbeginn, tbl_abschlusspruefung.endezeit AS pruefungsende,
tbl_abschlusspruefung.freigabedatum, tbl_abschlusspruefung_antritt.bezeichnung AS pruefungsantritt_bezeichnung, tbl_abschlusspruefung_antritt.bezeichnung_english AS pruefungsantritt_bezeichnung_english, tbl_abschlusspruefung.protokoll,
studentpers.vorname AS vorname_student, studentpers.nachname AS nachname_student, studentpers.titelpre AS titelpre_student, studentpers.titelpost AS titelpost_student, studentben.uid AS uid_student, matrikelnr,
vorsitzenderben.uid AS uid_vorsitz, vorsitzenderpers.vorname AS vorname_vorsitz, vorsitzenderpers.nachname AS nachname_vorsitz, vorsitzenderpers.titelpre AS titelpre_vorsitz, vorsitzenderpers.titelpost AS titelpost_vorsitz,
erstprueferpers.vorname AS vorname_erstpruefer, erstprueferpers.nachname AS nachname_erstpruefer, erstprueferpers.titelpre AS titelpre_erstpruefer, erstprueferpers.titelpost AS titelpost_erstpruefer,
zweitprueferpers.vorname AS vorname_zweitpruefer, zweitprueferpers.nachname AS nachname_zweitpruefer, zweitprueferpers.titelpre AS titelpre_zweitpruefer, zweitprueferpers.titelpost AS titelpost_zweitpruefer
');
$this->addJoin('lehre.tbl_abschlusspruefung_antritt', 'pruefungsantritt_kurzbz', 'LEFT');
$this->addJoin('public.tbl_benutzer studentben', 'tbl_abschlusspruefung.student_uid = studentben.uid');
$this->addJoin('public.tbl_person studentpers', 'studentben.person_id = studentpers.person_id');
$this->addJoin('public.tbl_student', 'studentben.uid = tbl_student.student_uid');
+108 -39
View File
@@ -4,17 +4,28 @@ $this->load->view(
array(
'title' => 'Pruefungsprotokoll',
'jquery' => true,
'jqueryui' => true,
'bootstrap' => true,
'fontawesome' => true,
'dialoglib' => true,
'ajaxlib' => true,
'sbadmintemplate' => true,
'phrases' => array(
'pruefungsprotokoll' => array(
'freigegebenAm'
),
'ui' => array(
'stunde',
'minute'
)
),
'customCSSs' => array(
'public/css/sbadmin2/admintemplate_contentonly.css',
'public/css/lehre/pruefungsprotokoll.css'
),
'customJSs' => array(
'public/js/bootstrapper.js'
'public/js/lehre/pruefungsprotokoll.js',
'vendor/fgelinas/timepicker/jquery.ui.timepicker.js'
)
)
);
@@ -25,8 +36,10 @@ $this->load->view(
<div class="container-fluid">
<?php if (isset($abschlusspruefung)):
$studiengangstyp_name = $abschlusspruefung->studiengangstyp == 'b' ? 'Bachelor' : 'Master';
$pruefung_name = $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'PruefungBachelor') : $this->p->t('abschlusspruefung', 'PruefungMaster');
$arbeit_name = $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'ArbeitBachelor') : $this->p->t('abschlusspruefung', 'ArbeitMaster');
$pruefung_name = $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'pruefungBachelor') : $this->p->t('abschlusspruefung', 'pruefungMaster');
$arbeit_name = $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'arbeitBachelor') : $this->p->t('abschlusspruefung', 'arbeitMaster');
$protokolltextvorlage = $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'pruefungsnotizenBachelor') : $this->p->t('abschlusspruefung', 'pruefungsnotizenMaster');
$protokolltext = isset($abschlusspruefung->protokoll) ? $abschlusspruefung->protokoll : $protokolltextvorlage;
?>
<div class="row">
<div class="col-lg-12">
@@ -34,8 +47,8 @@ $this->load->view(
<?php echo $this->p->t('abschlusspruefung', 'Protokoll') ?>&nbsp;<?php echo $pruefung_name ?>
</h3>
<p>
<?php echo $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'AbgehaltenAmBachelor') : $this->p->t('abschlusspruefung', 'AbgehaltenAmMaster'); ?>
<?php echo $abschlusspruefung->studiengangbezeichnung?>,&nbsp;<?php echo $this->p->t('abschlusspruefung', 'Studiengangskennzahl') ?>&nbsp;
<?php echo $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'abgehaltenAmBachelor') : $this->p->t('abschlusspruefung', 'abgehaltenAmMaster'); ?>
<?php echo $abschlusspruefung->studiengangbezeichnung?>,&nbsp;<?php echo $this->p->t('abschlusspruefung', 'studiengangskennzahl') ?>&nbsp;
<?php echo $abschlusspruefung->studiengang_kz ?>
</p>
</div>
@@ -45,95 +58,118 @@ $this->load->view(
<h4>
<?php echo $abschlusspruefung->titelpre_student . ' ' . $abschlusspruefung->vorname_student . ' ' . $abschlusspruefung->nachname_student . ' ' . $abschlusspruefung->titelpost_student?>
</h4>
<p><?php echo $this->p->t('abschlusspruefung', 'Personenkennzeichen') ?>: <?php echo $abschlusspruefung->matrikelnr ?></p>
<p><?php echo $this->p->t('abschlusspruefung', 'personenkennzeichen') ?>: <?php echo $abschlusspruefung->matrikelnr ?></p>
<br />
<form>
<input type="hidden" name="abschlusspruefung_id" value="<?php echo $abschlusspruefung->abschlusspruefung_id;?>" id="abschlusspruefung_id">
<form id="protocolform">
<table class="table-condensed table-bordered table-responsive" id="protocoltbl">
<tr>
<td colspan="3">
<td colspan="6">
<?php echo $this->p->t('abschlusspruefung', 'Pruefungssenat') ?>
<?php echo $this->p->t('abschlusspruefung', 'pruefungssenat') ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'Vorsitz') ?>
<?php echo $this->p->t('abschlusspruefung', 'vorsitz') ?>
</td>
<td colspan="2">
<td colspan="5">
<?php echo $abschlusspruefung->titelpre_vorsitz . ' ' . $abschlusspruefung->vorname_vorsitz . ' ' . $abschlusspruefung->nachname_vorsitz . ' ' . $abschlusspruefung->titelpost_vorsitz ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'Erstpruefer') ?>
<?php echo $this->p->t('abschlusspruefung', 'erstpruefer') ?>
</td>
<td colspan="2">
<td colspan="5">
<?php echo $abschlusspruefung->titelpre_erstpruefer . ' ' . $abschlusspruefung->vorname_erstpruefer . ' ' . $abschlusspruefung->nachname_erstpruefer . ' ' . $abschlusspruefung->titelpost_erstpruefer ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'Zweitpruefer') ?>
<?php echo $this->p->t('abschlusspruefung', 'zweitpruefer') ?>
</td>
<td colspan="2">
<td colspan="5">
<?php echo $abschlusspruefung->titelpre_zweitpruefer . ' ' . $abschlusspruefung->vorname_zweitpruefer . ' ' . $abschlusspruefung->nachname_zweitpruefer . ' ' . $abschlusspruefung->titelpost_zweitpruefer ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'Pruefungsdatum') ?>
<td class="namecellwidth">
<?php echo $this->p->t('abschlusspruefung', 'pruefungsdatum') ?>
</td>
<td colspan="2">
<td class="datevalcellwidth">
<?php echo date_format(date_create($abschlusspruefung->datum), 'd.m.Y'); ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'EinverstaendniserklaerungName') ?>
<td class="cellbg namecellwidth">
<?php echo $this->p->t('abschlusspruefung', 'pruefungsbeginn') ?>
</td>
<td colspan="2">
<input type="checkbox" checked>
<?php echo $this->p->t('abschlusspruefung', 'EinverstaendniserklaerungText') ?>
<td class="timecellwidth">
<input class="timepicker form-control" name="pruefungsbeginn" id="pruefungsbeginn" value="<?php echo isEmptyString($abschlusspruefung->pruefungsbeginn) ? '' : date_format(date_create($abschlusspruefung->pruefungsbeginn), 'H:i') ?>">
</td>
<td class="cellbg namecellwidth">
<?php echo $this->p->t('abschlusspruefung', 'pruefungsende') ?>
</td>
<td class="timecellwidth">
<input class="timepicker form-control" name="pruefungsende" id="pruefungsende" value="<?php echo isEmptyString($abschlusspruefung->pruefungsbeginn) ? '' : date_format(date_create($abschlusspruefung->pruefungsende), 'H:i') ?>">
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'ThemaBeurteilung') ?>&nbsp;<?php echo $arbeit_name ?>
<?php echo $this->p->t('abschlusspruefung', 'pruefungsantritt') ?>
</td>
<td colspan="5">
<?php echo $abschlusspruefung->pruefungsantritt_bezeichnung; ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'einverstaendniserklaerungName') ?>
</td>
<td colspan="5">
<input type="checkbox" checked id="verfCheck">
<?php echo $this->p->t('abschlusspruefung', 'einverstaendniserklaerungText') ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'themaBeurteilung') ?>&nbsp;<?php echo $arbeit_name ?>
</td>
<td colspan="4">
<?php echo isset($abschlusspruefung->abschlussarbeit_titel) ? $abschlusspruefung->abschlussarbeit_titel : '' ?>
</td>
<td>
<?php echo $this->p->t('abschlusspruefung', 'Note') ?>: <?php echo isset($abschlusspruefung->abschlussarbeit_note) ? $abschlusspruefung->abschlussarbeit_note : '' ?>
<?php echo $this->p->t('lehre', 'note') ?>: <?php echo isset($abschlusspruefung->abschlussarbeit_note) ? $abschlusspruefung->abschlussarbeit_note : '' ?>
</td>
</tr>
<tr>
<td>
<?php echo $this->p->t('abschlusspruefung', 'Pruefungsgegenstand') ?>
<?php echo $this->p->t('abschlusspruefung', 'pruefungsgegenstand') ?>
</td>
<td colspan="2">
<td colspan="5">
<?php echo ($abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'PruefungsgegenstandBachelor') : $this->p->t('abschlusspruefung', 'PruefungsgegenstandMaster')) ?>
</td>
</tr>
<tr>
<td colspan="3">
<?php echo $this->p->t('abschlusspruefung', 'Notizen') ?>
<td colspan="6">
<?php echo $this->p->t('global', 'notizen') ?>
</td>
</tr>
<tr>
<td colspan="3">
<textarea rows="15" cols="107"><?php echo $abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'PruefungsnotizenBachelor') : $this->p->t('abschlusspruefung', 'PruefungsnotizenMaster'); ?></textarea>
<td colspan="6">
<textarea id="protokoll" name="protokoll" class="form-control" rows="15" cols="107"><?php echo $protokolltext ?></textarea>
</td>
</tr>
<tr>
<td colspan="3">
<?php echo ($abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'BeurteilungKriterienBachelor') : $this->p->t('abschlusspruefung', 'BeurteilungKriterienMaster')) ?>
<td colspan="6">
<?php echo ($abschlusspruefung->studiengangstyp == 'b' ? $this->p->t('abschlusspruefung', 'beurteilungKriterienBachelor') : $this->p->t('abschlusspruefung', 'beurteilungKriterienMaster')) ?>
</td>
</tr>
<tr>
<td colspan="3">
<?php echo $this->p->t('abschlusspruefung', 'Beurteilung') ?>:
<select>
<td colspan="6">
<?php echo $this->p->t('abschlusspruefung', 'beurteilung') ?>:
<select name="abschlussbeurteilung_kurzbz" id="abschlussbeurteilung_kurzbz" class="form-control">
<option value="">-- <?php echo $this->p->t('ui', 'bitteWaehlen'); ?> --</option>
<?php foreach ($abschlussbeurteilung as $beurteilung):
$selected = $beurteilung->abschlussbeurteilung_kurzbz == $abschlusspruefung->abschlussbeurteilung_kurzbz ? " selected" : "" ?>
<option value="<?php echo $beurteilung->abschlussbeurteilung_kurzbz; ?>"<?php echo $selected ?>><?php echo $beurteilung->bezeichnung; ?> </option>
@@ -146,7 +182,40 @@ $this->load->view(
<br />
</div>
</div>
<?php endif; ?>
<div class="row">
<div class="col-lg-12 text-right">
<p>
<?php $freigegeben = isset($abschlusspruefung->freigabedatum); ?>
<button id="saveProtocolBtn" class="btn btn-default"<?php echo $freigegeben ? " disabled" : "" ?>><?php echo $this->p->t('ui', 'speichern') ?></button>
</p>
</div>
</div>
<hr id="hrbottom">
<div class="row">
<div class="col-lg-12">
<span id="freigegebenText">
<?php
if ($freigegeben)
echo '&nbsp;&nbsp;' . $this->p->t('abschlusspruefung', 'freigegebenAm') . ' ' . date_format(date_create($abschlusspruefung->freigabedatum), 'd.m.Y')
?>
</span>
</div>
</div>
<br />
<div class="row">
<div class="col-lg-8">
<div class="input-group">
<input id="username" type="hidden" value=""><!-- this is to prevent Chrome autofilling a random input field with the username-->
<input id="password" type="password" autocomplete="new-password" class="form-control" placeholder="CIS-<?php echo ucfirst($this->p->t('password', 'password')); ?>">
<span class="input-group-btn">
<button id="freigebenProtocolBtn" class="btn btn-default"><?php echo $this->p->t('abschlusspruefung', 'ueberpruefenFreigeben') ?></button>
</span>
</div>
</div>
</div>
<br />
<br />
<?php endif; ?>
</div>
</div>
</div>
+28 -2
View File
@@ -1,3 +1,11 @@
/* threshold for form full screen */
@media (max-width:1075px) {
#page-wrapper {
margin-right: 0;
margin-left: 0;
}
}
#protocoltbl textarea {
/* notiz field should stay in table */
-webkit-box-sizing: border-box;
@@ -6,6 +14,24 @@
width: 100%;
}
#protocoltbl td:nth-child(1) {
#protocoltbl td:nth-child(1), .cellbg {
background-color: #f5f5f5;
}
}
.timecellwidth {
width: 20%;
}
.namecellwidth {
width: 15%;
}
.datevalcellwidth {
width: 10%;
}
#hrbottom {
border-top: 2px solid #eee;
margin-top: 10px;
margin-bottom: 10px;
}
@@ -3,7 +3,8 @@
@media (min-width:768px) {
#page-wrapper {
margin-right: 250px;
margin-right: 180px;
margin-left: 180px;
margin-top: 8px;
border: 1px solid #e7e7e7;
}
+1 -1
View File
@@ -9,7 +9,7 @@ $(document).ready(function() {
var Bootstrapper = {
bootstraphtml: function ()
{
$("input[type=text], select").addClass("form-control");
$("input[type=text], select, textarea").addClass("form-control");
$("button, input[type=button]").addClass("btn btn-default");
$("table").addClass("table-condensed");
}
+135
View File
@@ -0,0 +1,135 @@
const CALLED_PATH = FHC_JS_DATA_STORAGE_OBJECT.called_path;
$("document").ready(function() {
$("#saveProtocolBtn, #freigebenProtocolBtn").click(
function() {
var data = {
abschlussbeurteilung_kurzbz: $("#abschlussbeurteilung_kurzbz").val(),
protokoll: $("#protokoll").val(),
uhrzeit: $("#pruefungsbeginn").val(),
endezeit: $("#pruefungsende").val()
}
if ($(this).prop("id") === 'freigebenProtocolBtn')
{
data.freigabedatum = true;
data.password = $("#password").val();
}
if ($("#verfCheck").prop('checked'))
{
var checkFields = Pruefungsprotokoll.checkFields(data, $("#verfCheck").prop('checked'));
$("#protocolform td").removeClass('has-error');
if (checkFields.length > 0)
{
var errortext = '';
for (var i = 0; i < checkFields.length; i++)
{
var error = checkFields[i];
$.each(error, function(i, n)
{
console.log($("#"+i).closest('td'));
$("#"+i).closest('td').addClass('has-error');
if (errortext !== '')
errortext += '; ';
errortext += n;
});
}
FHC_DialogLib.alertError(errortext);
return;
}
}
Pruefungsprotokoll.saveProtokoll($("#abschlusspruefung_id").val(),data);
}
)
$("#verfCheck").change(
function() { // if student not mentally and physically fit (checkbox), no form entry
if ($(this).prop('checked'))
{
$("#abschlussbeurteilung_kurzbz, #pruefungsbeginn, #pruefungsende").prop('disabled', false);
$("#abschlussbeurteilung_kurzbz").val($("#abschlussbeurteilung_kurzbz option").first().val());
}
else
{
$("#abschlussbeurteilung_kurzbz, #pruefungsbeginn, #pruefungsende").prop('disabled', true).val(null);
}
$("#pruefungsbeginn").val(null);
$("#pruefungsende").val(null);
}
);
$( ".timepicker" ).timepicker({
showPeriodLabels: false,
hours: {starts: 7,ends: 22},
timeFormat: 'hh:mm',
defaultTime: '',
hourText: FHC_PhrasesLib.t("ui", "stunde"),
minuteText: FHC_PhrasesLib.t("ui", "minute"),
rows: 4
});
})
var Pruefungsprotokoll = {
// -----------------------------------------------------------------------------------------------------------------
// ajax calls
saveProtokoll: function(abschlusspruefung_id, data)
{
FHC_AjaxClient.ajaxCallPost(
CALLED_PATH + '/saveProtokoll',
{
abschlusspruefung_id: abschlusspruefung_id,
protocoldata: data
},
{
successCallback: function(data, textStatus, jqXHR) {
if (FHC_AjaxClient.hasData(data))
{
var dataresponse = FHC_AjaxClient.getData(data);
if (dataresponse.freigabedatum)
{
$("#saveProtocolBtn").prop("disabled", true);
$("#freigegebenText").html('&nbsp;&nbsp;' + FHC_PhrasesLib.t("pruefungsprotokoll", "freigegebenAm") +
'&nbsp;' + dataresponse.freigabedatum)
}
FHC_DialogLib.alertSuccess("Prüfung erfolgreich gespeichert!");
}
else if(FHC_AjaxClient.isError(data))
{
FHC_DialogLib.alertError(FHC_AjaxClient.getError(data));
}
},
errorCallback: function() {
FHC_DialogLib.alertError("Fehler beim Speichern der Prüfung");
},
veilTimeout: 0
}
);
},
checkFields: function(data)
{
var errors = [];
if (data.abschlussbeurteilung_kurzbz == "")
errors.push({"abschlussbeurteilung_kurzbz": "Abschlussbeurteilung darf nicht leer sein!"}); // TODO phrases
var zeitregex = /^[0-2][0-9]:[0-5][0-9]$/;
if (data.uhrzeit == "")
errors.push({"pruefungsbeginn": "Beginnzeit darf nicht leer sein!"});
else if(!zeitregex.test(data.uhrzeit))
errors.push({"pruefungsbeginn": "Beginnzeit muss Format Stunden:Minuten haben!"});
if (data.endezeit == "")
errors.push({"pruefungsende": "Endzeit darf nicht leer sein!"});
else if(!zeitregex.test(data.endezeit))
errors.push({"pruefungsende": "Endzeit muss Format Stunden:Minuten haben!"});
return errors;
}
}
+205 -72
View File
@@ -5334,6 +5334,46 @@ When on hold, the date is only a reminder.',
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'stunde',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Stunde',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Hour',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'ui',
'phrase' => 'minute',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Minute',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Minute',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'global',
@@ -6809,7 +6849,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'PruefungBachelor',
'phrase' => 'pruefungBachelor',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6829,7 +6869,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'PruefungMaster',
'phrase' => 'pruefungMaster',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6849,7 +6889,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'ArbeitBachelor',
'phrase' => 'arbeitBachelor',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6869,7 +6909,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'ArbeitMaster',
'phrase' => 'arbeitMaster',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6889,7 +6929,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Protokoll',
'phrase' => 'protokoll',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6909,7 +6949,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'AbgehaltenAmBachelor',
'phrase' => 'abgehaltenAmBachelor',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6929,7 +6969,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'AbgehaltenAmMaster',
'phrase' => 'abgehaltenAmMaster',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6949,7 +6989,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Studiengangskennzahl',
'phrase' => 'studiengangskennzahl',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6969,7 +7009,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Personenkennzeichen',
'phrase' => 'personenkennzeichen',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -6989,7 +7029,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Pruefungssenat',
'phrase' => 'pruefungssenat',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7009,7 +7049,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Vorsitz',
'phrase' => 'vorsitz',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7029,7 +7069,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Erstpruefer',
'phrase' => 'erstpruefer',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7049,7 +7089,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Zweitpruefer',
'phrase' => 'zweitpruefer',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7069,7 +7109,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Pruefungsdatum',
'phrase' => 'pruefungsdatum',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7089,7 +7129,67 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'EinverstaendniserklaerungName',
'phrase' => 'pruefungsbeginn',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Prüfungsbeginn',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Time of Start',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'pruefungsende',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Prüfungsende',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Time of Finish',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'pruefungsantritt',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Prüfungsantritt',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Examination Attempt',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'einverstaendniserklaerungName',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7109,7 +7209,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'EinverstaendniserklaerungText',
'phrase' => 'einverstaendniserklaerungText',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7121,7 +7221,7 @@ When on hold, the date is only a reminder.',
),
array(
'sprache' => 'English',
'text' => '',
'text' => 'The student confirms being in a healthy physical and mental condition and that the technical requirements are met for taking the exam.',
'description' => '',
'insertvon' => 'system'
)
@@ -7130,7 +7230,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'ThemaBeurteilung',
'phrase' => 'themaBeurteilung',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7150,27 +7250,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Note',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Note',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Grade',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Pruefungsgegenstand',
'phrase' => 'pruefungsgegenstand',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7190,27 +7270,7 @@ When on hold, the date is only a reminder.',
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Notizen',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Notizen',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Notes',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'PruefungsnotizenBachelor',
'phrase' => 'pruefungsnotizenBachelor',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7254,7 +7314,7 @@ Any unusual occurrences
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'PruefungsnotizenMaster',
'phrase' => 'pruefungsnotizenMaster',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7300,7 +7360,7 @@ Any unusual occurrences
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'PruefungsgegenstandBachelor',
'phrase' => 'pruefungsgegenstandBachelor',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7320,7 +7380,7 @@ Any unusual occurrences
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'PruefungsgegenstandMaster',
'phrase' => 'pruefungsgegenstandMaster',
'insertvon' => 'system',
'phrases' => array(
array(
@@ -7340,12 +7400,12 @@ Any unusual occurrences
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'BeurteilungKriterienBachelor',
'phrase' => 'beurteilungKriterienBachelor',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Beurteilung und Kriterien Bachelorprüfung<br />
'text' => 'Beurteilung und Kriterien Bachelorprüfung<br /><br />
<ul>
<li>
Mit ausgezeichnetem Erfolg bestanden<br />
@@ -7368,7 +7428,24 @@ Any unusual occurrences
),
array(
'sprache' => 'English',
'text' => '',
'text' => 'Assesment and criteria Bachelor Examination<br /><br />
<ul>
<li>
Passed with distinction<br />
Der oder die KandidatIn ist in der Lage, Wissen aus verschiedenen Lernbereichen fachlich korrekt in einem weit über das Wesentliche hinausgehenden Ausmaß souverän auf neue Situationen anzuwenden, und das noch dazu auf einem sehr hohen argumentativen Niveau.
</li>
<li>
Passed with merit<br />
Der oder die KandidatIn ist in der Lage, Wissen aus verschiedenen Lernbereichen fachlich korrekt in einem über das Wesentliche hinausgehenden Ausmaß auf neue Situationen anzuwenden, und das noch dazu auf einem hohen argumentativen Niveau.
</li>
<li>
Passed<br />
Alle Lehrveranstaltungen (einschl. Bachelorarbeit) und Bachelorprüfung wurden positiv beurteilt.
</li>
<li>
Failed
</li>
</ul>',
'description' => '',
'insertvon' => 'system'
)
@@ -7377,12 +7454,12 @@ Any unusual occurrences
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'BeurteilungKriterienMaster',
'phrase' => 'beurteilungKriterienMaster',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Beurteilung und Kriterien Masterprüfung<br />
'text' => 'Beurteilung und Kriterien Masterprüfung<br /><br />
<ul>
<li>
Mit ausgezeichnetem Erfolg bestanden<br />
@@ -7405,7 +7482,24 @@ Any unusual occurrences
),
array(
'sprache' => 'English',
'text' => '',
'text' => '\'Assesment and criteria Masters Examination<br /><br />
<ul>
<li>
Passed with distinction<br />
Der oder die KandidatIn ist in der Lage, Wissen aus verschiedenen Lernbereichen fachlich korrekt in einem weit über das Wesentliche hinausgehenden Ausmaß souverän auf neue Situationen anzuwenden, und das noch dazu auf einem sehr hohen argumentativen Niveau.
</li>
<li>
Passed with merit<br />
Der oder die KandidatIn ist in der Lage, Wissen aus verschiedenen Lernbereichen fachlich korrekt in einem über das Wesentliche hinausgehenden Ausmaß auf neue Situationen anzuwenden, und das noch dazu auf einem hohen argumentativen Niveau.
</li>
<li>
Passed<br />
Alle Lehrveranstaltungen (einschl. Bachelorarbeit) und Bachelorprüfung wurden positiv beurteilt.
</li>
<li>
Failed
</li>
</ul>\'',
'description' => '',
'insertvon' => 'system'
)
@@ -7414,13 +7508,12 @@ Any unusual occurrences
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'Beurteilung',
'phrase' => 'beurteilung',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Beurteilung
',
'text' => 'Beurteilung',
'description' => '',
'insertvon' => 'system'
),
@@ -7431,6 +7524,46 @@ Any unusual occurrences
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'ueberpruefenFreigeben',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Überprüfen und Freigeben',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Check and Approve',
'description' => '',
'insertvon' => 'system'
)
)
),
array(
'app' => 'core',
'category' => 'abschlusspruefung',
'phrase' => 'freigegebenAm',
'insertvon' => 'system',
'phrases' => array(
array(
'sprache' => 'German',
'text' => 'Freigegeben am',
'description' => '',
'insertvon' => 'system'
),
array(
'sprache' => 'English',
'text' => 'Approved on',
'description' => '',
'insertvon' => 'system'
)
)
)
);