mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-22 01:12:17 +00:00
if only 1 prestudent with prio null - possible to increase (set) prio to 1
This commit is contained in:
@@ -362,13 +362,17 @@ class Prestudent_model extends DB_Model
|
||||
|
||||
$bewerberarr = $this->getBewerber($person_id, $studiensemester);
|
||||
|
||||
//Prio can be added when prio is null and there is only one prestudent
|
||||
if (count($bewerberarr) === 1 && !isset($prestudent->retval[0]->priorisierung) && $change < 0)
|
||||
return true;
|
||||
|
||||
if (count($bewerberarr) <= 1)
|
||||
return false;
|
||||
|
||||
if (!isset($prestudent->retval[0]->priorisierung))
|
||||
{
|
||||
if ($change < 0)
|
||||
return true; //null values can be changed to priority numbers, when there are other bewerber
|
||||
return true; //null values can be changed to priority numbers (prority increase)
|
||||
else
|
||||
return false;
|
||||
}
|
||||
@@ -390,6 +394,7 @@ class Prestudent_model extends DB_Model
|
||||
}
|
||||
}
|
||||
|
||||
//no prio change when prestudent has max or min prio
|
||||
if (($currprio === $priomax && $change < 0) || ($currprio === $priomin && $change > 0))
|
||||
{
|
||||
return false;
|
||||
@@ -459,7 +464,7 @@ class Prestudent_model extends DB_Model
|
||||
|
||||
if (is_null($prestudent->retval[0]->priorisierung))
|
||||
{
|
||||
//if null value before, add lowest prio
|
||||
//if null value, add as prio 1
|
||||
$newprio = isset($neighbour->priorisierung) ? intval($neighbour->priorisierung) + 1 : 1;
|
||||
|
||||
$result = $this->PrestudentModel->update(
|
||||
|
||||
@@ -25,8 +25,13 @@
|
||||
|
||||
if (!$first)
|
||||
echo '<br/>';
|
||||
|
||||
if (isEmptyString($studiensemester)):
|
||||
?>
|
||||
<h4 class="headercolorbg text-center"><?php echo $studiensemester; ?></h4>
|
||||
<h4 class="headercolorbg text-center">ohne Semester</h4>
|
||||
<?php else: ?>
|
||||
<h4 class="headercolorbg text-center"><?php echo $studiensemester; ?></h4>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<div class="panel panel-default">
|
||||
<div class="panel-heading">
|
||||
@@ -54,7 +59,6 @@
|
||||
<?php
|
||||
$changeup = isset($zgvpruefung->changeup) && $zgvpruefung->changeup === true;
|
||||
$changedown = isset($zgvpruefung->changedown) && $zgvpruefung->changedown === true;
|
||||
if ($numberinteressenten[$studiensemester] > 1):
|
||||
echo ' | ' . ucfirst($this->p->t('infocenter', 'priorisierung')) . ': ';
|
||||
echo isset($zgvpruefung->priorisierung) ? $zgvpruefung->priorisierung : $this->p->t('global', 'nichtvorhanden');
|
||||
if ($changeup): ?>
|
||||
@@ -63,7 +67,6 @@
|
||||
<?php if ($changedown): ?>
|
||||
<span class="fa fa-caret-down priodown" id="priodown_<?php echo $zgvpruefung->prestudent_id ?>" style="font-size: 19px; cursor: pointer;"></span>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user