diff options
| author | Michaela Brückner <brueckner@data-quest.de> | 2022-05-10 12:44:28 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2022-05-10 12:44:28 +0000 |
| commit | c8da48845c56af15fa0a183526bf056681507507 (patch) | |
| tree | ee1a1a52388b6cfc9702d02bc9151ec8402c4de0 /lib/filesystem/StandardFile.php | |
| parent | ad396a8233352243a030f8a6b6276bd2be201842 (diff) | |
Resolve "OER Vorschläge von Studierenden"
Closes #852
Merge request studip/studip!464
Diffstat (limited to 'lib/filesystem/StandardFile.php')
| -rw-r--r-- | lib/filesystem/StandardFile.php | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/lib/filesystem/StandardFile.php b/lib/filesystem/StandardFile.php index 0e09090..74e538a 100644 --- a/lib/filesystem/StandardFile.php +++ b/lib/filesystem/StandardFile.php @@ -301,6 +301,19 @@ class StandardFile implements FileType, ArrayAccess ['data-dialog' => '1'] ); } + + 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') + ) { + $actionMenu->addLink( + URLHelper::getURL('dispatch.php/file/suggest_oer/' . $this->fileref->id), + _('Material für OER Campus vorschlagen'), + Icon::create('oer-campus'), + ['data-dialog' => 'reload-on-close'] + ); + } + if (Context::isCourse() && Feedback::isActivated()) { if (Feedback::hasCreatePerm(Context::getId())) { $actionMenu->addLink( |
