Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
O
Opencast
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Uni Osnabrück
Plugins
Opencast
Commits
31fdd342
Commit
31fdd342
authored
2 months ago
by
Elmar Ludwig
Browse files
Options
Downloads
Patches
Plain Diff
add workaround for github #1295
parent
0a3888e6
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
lib/Routes/Opencast/UserRoles.php
+8
-9
8 additions, 9 deletions
lib/Routes/Opencast/UserRoles.php
with
8 additions
and
9 deletions
lib/Routes/Opencast/UserRoles.php
+
8
−
9
View file @
31fdd342
...
@@ -68,15 +68,14 @@ class UserRoles extends OpencastController
...
@@ -68,15 +68,14 @@ class UserRoles extends OpencastController
// Admin users have permissions on videos of all administrated courses
// Admin users have permissions on videos of all administrated courses
else
if
(
$GLOBALS
[
'perm'
]
->
have_perm
(
'admin'
,
$user_id
))
{
else
if
(
$GLOBALS
[
'perm'
]
->
have_perm
(
'admin'
,
$user_id
))
{
$sem_user
=
new
\Seminar_User
(
$user_id
);
$plugin_id
=
\PluginEngine
::
getPlugin
(
'OpencastV3'
)
->
getPluginId
();
$stmt
=
\DBManager
::
get
()
->
prepare
(
"SELECT seminar_id FROM seminar_inst
$nobody
=
$GLOBALS
[
'user'
];
JOIN Institute USING(institut_id)
$GLOBALS
[
'user'
]
=
$sem_user
;
JOIN user_inst ON user_inst.institut_id IN (fakultaets_id, seminar_inst.institut_id)
JOIN tools_activated ON seminar_id = range_id AND range_type = 'course'
$filter
=
\AdminCourseFilter
::
get
();
WHERE user_id = :user_id AND plugin_id = :plugin_id GROUP BY seminar_id"
);
$courses
=
array_column
(
$filter
->
getCourses
(),
'seminar_id'
);
$stmt
->
execute
([
':user_id'
=>
$user_id
,
':plugin_id'
=>
$plugin_id
]);
$courses
=
$stmt
->
fetchAll
(
\PDO
::
FETCH_COLUMN
);
$GLOBALS
[
'user'
]
=
$nobody
;
foreach
(
$courses
as
$course_id
)
{
foreach
(
$courses
as
$course_id
)
{
$roles
[
$course_id
.
'_Instructor'
]
=
$course_id
.
'_Instructor'
;
$roles
[
$course_id
.
'_Instructor'
]
=
$course_id
.
'_Instructor'
;
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment