blob: f5439470d81907487ae16239bdf2ce0baa0378ee (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
|
<?php
/**
* @author Till Glöggler <tgloeggl@uos.de>
* @author André Klaßen <klassen@elan-ev.de>
* @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']);
$route = \URLHelper::getURL('api.php/forum_entry/' . $post['topic_id'], NULL, true);
$activity->object_url = [
$url => _('Zum Forum der Veranstaltung')
];
$activity->object_route = $route;
return true;
}
/**
* {@inheritdoc}
*/
public static function getLexicalField()
{
return _('einen Forenbeitrag');
}
}
|