示例#1
0
 function getNotificationObjects($course_id, $since, $user_id)
 {
     $this->setupAutoload();
     if (ForumPerm::has('view', $course_id, $user_id)) {
         $postings = ForumEntry::getLatestSince($course_id, $since);
         $contents = array();
         foreach ($postings as $post) {
             $obj = get_object_name($course_id, 'sem');
             $summary = sprintf(_('%s hat im Forum der Veranstaltung "%s" einen Forenbeitrag verfasst.'), get_fullname($post['user_id']), $obj['name']);
             $contents[] = new ContentElement(_('Forum: ') . $obj['name'], $summary, formatReady($post['content']), $post['user_id'], $post['author'], PluginEngine::getURL($this, array(), 'index/index/' . $post['topic_id'] . '?cid=' . $course_id . '#' . $post['topic_id']), $post['mkdate']);
         }
     }
     return $contents;
 }