Deactivated: einzelne Empehlungsanfrage-Mails an Lektoren deaktiviert

This commit is contained in:
Cris
2023-06-20 10:45:38 +02:00
parent 4e22b1ac1c
commit 82019bb77f
2 changed files with 15 additions and 36 deletions
@@ -242,7 +242,7 @@ class approveAnrechnungDetail extends Auth_Controller
$empfehlungsanfrage_an = !isEmptyArray($result) ? implode(', ', array_column($result, 'fullname')) : '';
// Request Recommendation
if($this->anrechnunglib->requestRecommendation($anrechnung_id))
if ($this->anrechnunglib->requestRecommendation($anrechnung_id))
{
$retval[]= array(
'anrechnung_id' => $anrechnung_id,
@@ -254,31 +254,23 @@ class approveAnrechnungDetail extends Auth_Controller
);
}
/**
* Send mails to lectors
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
* even if they are required for more recommendations
* */
if (!isEmptyArray($retval))
{
if ($this->config->item('send_mail') === TRUE)
{
$this->_sendSanchoMailToLectors($anrechnung_id);
}
// Output json to ajax
return $this->outputJsonSuccess($retval);
}
// Output json to ajax
if ($empfehlungsanfrage_an == '')
{
$this->terminateWithJsonError(
"Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
);
}
if (isEmptyArray($retval))
{
$this->terminateWithJsonError(
"Empfehlung wurde nicht angefordert,\nDer LV sind keine LektorInnen zugeteilt."
);
$this->terminateWithJsonError("Empfehlung wurde nicht angefordert");
}
$this->terminateWithJsonError($this->p->t('ui', 'errorNichtAusgefuehrt'));
else
{
// Output json to ajax
return $this->outputJsonSuccess($retval);
}
}
/**
@@ -249,19 +249,6 @@ class approveAnrechnungUebersicht extends Auth_Controller
}
}
/**
* Send mails
* NOTE: mails are sent at the end to ensure sending only ONE mail to each LV-Leitung or lector
* even if they are required for more recommendations
* */
if (!isEmptyArray($retval))
{
if ($this->config->item('send_mail') === TRUE)
{
$this->_sendSanchoMail($retval);
}
}
// Output json to ajax
if (isEmptyArray($retval))
{
@@ -273,7 +260,7 @@ class approveAnrechnungUebersicht extends Auth_Controller
$this->terminateWithJsonError('Es wurden keine Empfehlungen angefordert');
}
return $this->outputJsonSuccess($retval);
$this->outputJsonSuccess($retval);
}
/**