diff options
| author | Elmar Ludwig <elmar.ludwig@uni-osnabrueck.de> | 2022-05-12 14:04:12 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2022-05-12 14:04:12 +0000 |
| commit | 890bf4e455192dadda001200dac5bcf8a16bbfc3 (patch) | |
| tree | de960ec9e542987ef39f69720d0a112caa226ce4 /lib/filesystem | |
| parent | 5ee338926e606a0c755b5cdeb36b40addfb72dc2 (diff) | |
fix conditions for showing oer suggestions, re #1048
Closes #1048
Merge request studip/studip!616
Diffstat (limited to 'lib/filesystem')
| -rw-r--r-- | lib/filesystem/StandardFile.php | 6 |
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), |
