* @author André Klaßen * @license GPL 2 or later3 */ namespace Studip\Activity; class ForumProvider implements ActivityProvider { /** * get the details for the passed activity * * @param object $activity the activity to fill with details, passed by reference */ public function getActivityDetails($activity) { $post = \ForumEntry::getEntry($activity->object_id); if (!$post) { return false; } $activity->content = formatReady($post['content']); $url = \URLHelper::getURL('dispatch.php/course/forum/index/index/' . $post['topic_id'] .'?cid='. $post['seminar_id'] .'&highlight_topic='. $post['topic_id'] .'#'. $post['topic_id']); $activity->object_url = [ $url => _('Zum Forum der Veranstaltung') ]; return true; } /** * {@inheritdoc} */ public static function getLexicalField() { return _('einen Forenbeitrag'); } }