elan-ev / studip-opencast-plugin

This is an Stud.IP plugin for Opencast
https://elan-ev.github.io/studip-opencast-plugin/
GNU General Public License v2.0
9 stars 20 forks source link

Series im OC-Plugin verknüpfen #583

Closed ferishili closed 2 years ago

ferishili commented 2 years ago

When importing/integrating another series into a course:

Superjamp commented 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.

Superjamp commented 2 years ago

wrong button :)

ferishili commented 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.

Not really, lecturers should be able to get a list of their previously created series in a dropdown to select from!

Superjamp commented 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.

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?)

ferishili commented 2 years ago

There is no table for that I am extracting it from StudIP resources!

Superjamp commented 2 years ago

@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;
    }
ferishili commented 2 years ago

My patch would be a hotfix and I am not aware of your work at tubs!

Superjamp commented 2 years ago

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.

ferishili commented 2 years ago

I will let you know when the PR for this issue is submitted and we can discuss it later on!