1<?php
2
3/* Copyright (c) 1998-2016 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5/**
6 * Learning Module news renderer
7 *
8 * @author Alex Killing <alex.killing@gmx.de>
9 * @version $Id$
10 * @ingroup ModuleLearningModule
11 */
12class ilLearningModuleNewsRendererGUI extends ilNewsDefaultRendererGUI
13{
14    /**
15     * Get object link
16     *
17     * @return string link href url
18     */
19    public function getObjectLink()
20    {
21        $n = $this->getNewsItem();
22        if ($n->getContextSubObjType() == "pg"
23            && $n->getContextSubObjId() > 0) {
24            //$add = "&target=pg_".$n->getContextSubObjId()."_".$this->getNewsRefId();
25            return ilLink::_getLink($n->getContextSubObjId() . "_" . $this->getNewsRefId(), "pg");
26        }
27        return ilLink::_getLink($this->getNewsRefId());
28    }
29}
30