1<?php
2
3/* Copyright (c) 1998-2013 ILIAS open source, Extended GPL, see docs/LICENSE */
4
5include_once("./Services/COPage/classes/class.ilPageConfig.php");
6
7/**
8 * Portfolio page configuration
9 *
10 * @author Alex Killing <alex.killing@gmx.de>
11 * @version $Id$
12 * @ingroup ModulesPortfolio
13 */
14class ilPortfolioPageConfig extends ilPageConfig
15{
16    /**
17     * @var ilSetting
18     */
19    protected $settings;
20
21    /**
22     * @var ilRbacSystem
23     */
24    protected $rbacsystem;
25
26    /**
27     * Init
28     */
29    public function init()
30    {
31        global $DIC;
32
33        $this->settings = $DIC->settings();
34        $this->rbacsystem = $DIC->rbac()->system();
35
36        $ilSetting = $this->settings;
37        $rbacsystem = $this->rbacsystem;
38
39        $prfa_set = new ilSetting("prfa");
40        $this->setPreventHTMLUnmasking(!(bool) $prfa_set->get("mask", false));
41
42        $this->setEnableInternalLinks(true);
43        $this->setIntLinkFilterWhiteList(true);
44        $this->addIntLinkFilter("User");
45        $this->addIntLinkFilter("PortfolioPage");
46        $this->removeIntLinkFilter("File");
47        $this->setIntLinkHelpDefaultId($_GET["prt_id"], false);
48        $this->setIntLinkHelpDefaultType("PortfolioPage");
49        $this->setEnablePCType("Profile", true);
50        $this->setEditLockSupport(false);
51
52        if (!$ilSetting->get('disable_wsp_certificates')) {
53            $this->setEnablePCType("Verification", true);
54        }
55        $skmg_set = new ilSetting("skmg");
56        if ($skmg_set->get("enable_skmg")) {
57            $this->setEnablePCType("Skills", true);
58        }
59
60        include_once './Services/Calendar/classes/class.ilCalendarUserSettings.php';
61        $settings = ilCalendarSettings::_getInstance();
62        if ($settings->isEnabled() &&
63            $rbacsystem->checkAccess('add_consultation_hours', $settings->getCalendarSettingsId()) &&
64            $settings->areConsultationHoursEnabled()) {
65            $this->setEnablePCType("ConsultationHours", true);
66        }
67
68        $prfa_set = new ilSetting("prfa");
69        if ($prfa_set->get("mycrs", true)) {
70            $this->setEnablePCType("MyCourses", true);
71        }
72
73        $mset = new ilSetting("mobs");
74        if ($mset->get("mep_activate_pages")) {
75            $this->setEnablePCType("ContentInclude", true);
76        }
77
78        $this->setEnablePCType("LearningHistory", true);
79    }
80}
81