aboutsummaryrefslogtreecommitdiff
path: root/lib/filesystem/StandardFile.php
diff options
context:
space:
mode:
authorElmar Ludwig <elmar.ludwig@uni-osnabrueck.de>2022-05-12 14:04:12 +0000
committerDavid Siegfried <david.siegfried@uni-vechta.de>2022-05-12 14:04:12 +0000
commit890bf4e455192dadda001200dac5bcf8a16bbfc3 (patch)
treede960ec9e542987ef39f69720d0a112caa226ce4 /lib/filesystem/StandardFile.php
parent5ee338926e606a0c755b5cdeb36b40addfb72dc2 (diff)
fix conditions for showing oer suggestions, re #1048
Closes #1048 Merge request studip/studip!616
Diffstat (limited to 'lib/filesystem/StandardFile.php')
-rw-r--r--lib/filesystem/StandardFile.php6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php
index 3f9ae39..73ba43b 100644
--- a/lib/filesystem/StandardFile.php
+++ b/lib/filesystem/StandardFile.php
@@ -302,9 +302,9 @@ class StandardFile implements FileType, ArrayAccess
);
}
- if (Config::get()->OER_ENABLE_SUGGESTIONS &&
- ($this->getTermsOfUse()->id === 'SELFMADE_NONPUB' || $this->getTermsOfUse()->id === 'FREE_LICENSE') &&
- $this->fileref->getAuthorName() != User::findCurrent()->getFullName('no_title_rev')
+ if (Config::get()->OERCAMPUS_ENABLED && Config::get()->OER_ENABLE_SUGGESTIONS &&
+ $GLOBALS['user']->id !== 'nobody' && $this->fileref->user_id !== $GLOBALS['user']->id &&
+ in_array($this->fileref->content_terms_of_use_id, ['SELFMADE_NONPUB', 'FREE_LICENSE'])
) {
$actionMenu->addLink(
URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id),