Closed ferishili closed 2 years ago
You mean for multiconnected series, right?
At tubs we are showing the User there connected seminar->series with edit permissions.
The problem with this is that we don't know the permissions if the user has deleted the old connection.
wrong button :)
You mean for multiconnected series, right? At tubs we are showing the User there connected seminar->series with edit permissions. The problem with this is that we don't know the permissions if the user has deleted the old connection.
Not really, lecturers should be able to get a list of their previously created series in a dropdown to select from!
You mean for multiconnected series, right? At tubs we are showing the User there connected seminar->series with edit permissions. The problem with this is that we don't know the permissions if the user has deleted the old connection.
Not really, lecturers should be able to get a list of their previously created series in a dropdown to select from!
Is this already saved by us? (which table?)
There is no table for that I am extracting it from StudIP resources!
@ferishili Ok, but isn't that what I already do? (locally at tubs)
private function getUserSeries()
{
$stmt = DBManager::get()->prepare("SELECT oc_seminar_series.series_id, oc_seminar_series.seminar_id FROM seminar_user JOIN oc_seminar_series ON oc_seminar_series.seminar_id=seminar_user.Seminar_id WHERE seminar_user.user_id = ?");
$stmt->execute([$GLOBALS['user']->id]);
$result = $stmt->fetchAll(PDO::FETCH_ASSOC);
$re = [];
foreach ($result as $value) {
if (OCPerm::editAllowed($value['seminar_id'])) {
$re[] = $value['series_id'];
}
}
return $re;
}
My patch would be a hotfix and I am not aware of your work at tubs!
Okay, I definitly dont think that this needs to be a hotfix. 😅
Just wondering how you are going to implement that, because I'm using the sql query shown.
With the disadvantage of requiring already connected series.
I will let you know when the PR for this issue is submitted and we can discuss it later on!
When importing/integrating another series into a course: