Skip to content
Snippets Groups Projects
Commit 81d4d624 authored by David Siegfried's avatar David Siegfried
Browse files

remove obsolet functions, fixes #4002

Closes #4002

Merge request studip/studip!2851
parent 57bd2457
No related branches found
No related tags found
No related merge requests found
......@@ -18,6 +18,7 @@
- Die Funktionen `studip_json_encode()` und `studip_json_decode()` wurden entfernt. Stattdessen müssen die Methode `json_encode()` und `json_decode()` verwendet werden. ([Issue #3814](https://gitlab.studip.de/studip/studip/-/issues/3814))
- Die `MembersModel.php` wurde entfernt ([Issue #3811](https://gitlab.studip.de/studip/studip/-/issues/3811))
- Die `admission.inc.php` wurde entfernt. ([Issue #3812](https://gitlab.studip.de/studip/studip/-/issues/3812))
- Die folgenden Funktionen wurden aus der Datei `lib/functions.php` entfernt: `re_sort_dozenten()`, `re_sort_tutoren()` und `get_next_position()` ([Issue #4002](https://gitlab.studip.de/studip/studip/-/issues/4002))
- Die Methoden `CronjobScheduler::scheduleOnce()` sowie `CronjobTask::scheduleOnce()` wurden ersatzlos entfernt. ([Issue #4078](https://gitlab.studip.de/studip/studip/-/issues/4078))
- Die folgenden Klassen wurden innerhalb von Stud.IP verschoben. Da sie über den Autoloader geladen werden, kann jedes manuelle Einbinden ersatzlos entfernt werden. ([Issue #4105](https://gitlab.studip.de/studip/studip/-/issues/4105))
- `AuthenticatedController`
......
......@@ -504,64 +504,6 @@ function check_and_set_date($tag, $monat, $jahr, $stunde, $minute, &$arr, $field
return $check;
}
/**
* reset the order-positions for the lecturers in the passed seminar,
* starting at the passed position
*
* @param string $s_id the seminar to work on
* @param int $position the position to start with
* @deprecated since Stud.IP 5.3
*
* @return void
*/
function re_sort_dozenten($s_id, $position)
{
$query = "UPDATE seminar_user
SET position = position - 1
WHERE Seminar_id = ? AND status = 'dozent' AND position > ?";
$statement = DBManager::get()->prepare($query);
$statement->execute([$s_id, $position]);
}
/**
* reset the order-positions for the tutors in the passed seminar,
* starting at the passed position
*
* @param string $s_id the seminar to work on
* @param int $position the position to start with
* @deprecated since Stud.IP 5.3
*
* @return void
*/
function re_sort_tutoren($s_id, $position)
{
$query = "UPDATE seminar_user
SET position = position - 1
WHERE Seminar_id = ? AND status = 'tutor' AND position > ?";
$statement = DBManager::get()->prepare($query);
$statement->execute([$s_id, $position]);
}
/**
* return the highest position-number increased by one for the
* passed user-group in the passed seminar
*
* @param string $status can be on of 'tutor', 'dozent', ...
* @param string $seminar_id the seminar to work on
* @deprecated since Stud.IP 5.3
*
* @return int the next available position
*/
function get_next_position($status, $seminar_id)
{
$query = "SELECT MAX(position) + 1
FROM seminar_user
WHERE Seminar_id = ? AND status = ?";
$statement = DBManager::get()->prepare($query);
$statement->execute([$seminar_id, $status]);
return $statement->fetchColumn() ?: 0;
}
/**
* converts a string to a float, depending on the locale
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment