Skip to content
Snippets Groups Projects
Commit 890bf4e4 authored by Elmar Ludwig's avatar Elmar Ludwig Committed by David Siegfried
Browse files

fix conditions for showing oer suggestions, re #1048

Closes #1048

Merge request studip/studip!616
parent 5ee33892
No related branches found
No related tags found
No related merge requests found
...@@ -302,9 +302,9 @@ class StandardFile implements FileType, ArrayAccess ...@@ -302,9 +302,9 @@ class StandardFile implements FileType, ArrayAccess
); );
} }
if (Config::get()->OER_ENABLE_SUGGESTIONS && if (Config::get()->OERCAMPUS_ENABLED && Config::get()->OER_ENABLE_SUGGESTIONS &&
($this->getTermsOfUse()->id === 'SELFMADE_NONPUB' || $this->getTermsOfUse()->id === 'FREE_LICENSE') && $GLOBALS['user']->id !== 'nobody' && $this->fileref->user_id !== $GLOBALS['user']->id &&
$this->fileref->getAuthorName() != User::findCurrent()->getFullName('no_title_rev') in_array($this->fileref->content_terms_of_use_id, ['SELFMADE_NONPUB', 'FREE_LICENSE'])
) { ) {
$actionMenu->addLink( $actionMenu->addLink(
URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id), URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id),
......
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