mirror of
https://github.com/FH-Complete/FHC-Core.git
synced 2026-07-21 08:52:21 +00:00
Refactor cronjob remindApplicantsOfPlacementTest
- renamed function - extend function with params $bcc and $from to set bcc-receivers and sender - changed function getWorkingDays to isDateWorkingDay - changed function getNextPlacementtestDate to getNextPlacementtests - extend function getNextPlacementtests with optional $days param
This commit is contained in:
@@ -474,22 +474,23 @@ class Reihungstest_model extends DB_Model
|
||||
}
|
||||
|
||||
/**
|
||||
* Loads the date of the next placement test to the given degree program
|
||||
* @param integer $studiengang_kz Kennzahl of degree program to load the next placement test date
|
||||
* @return string Returns date of the next placement test
|
||||
* Loads the dates of the next placement tests within $days days to the given degree program
|
||||
* @param integer $studiengang_kz Kennzahl of degree program to load the next placement tests
|
||||
* @param integer $days Number of days in the future to load
|
||||
* @return string Returns dates of the next placement test
|
||||
*/
|
||||
public function getNextPlacementtestDate($studiengang_kz)
|
||||
public function getNextPlacementtests($studiengang_kz, $days)
|
||||
{
|
||||
$query = '
|
||||
SELECT *
|
||||
FROM PUBLIC.tbl_reihungstest
|
||||
WHERE studiengang_kz = ?
|
||||
AND datum > now()
|
||||
AND datum <= now() + interval ?
|
||||
ORDER BY datum ASC
|
||||
LIMIT 1
|
||||
';
|
||||
|
||||
return $this->execQuery($query, array($studiengang_kz));
|
||||
return $this->execQuery($query, array($studiengang_kz, $days.' days'));
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user