42        $this->lng = 
$DIC->language();
 
   43        $this->
help = $DIC[
"ilHelp"];
 
   45        $this->access = 
$DIC->access();
 
   46        $this->
user = $DIC->user();
 
   47        $this->ctrl = 
$DIC->ctrl();
 
   48        $this->
ui = $DIC->ui();
 
   50        $this->tool_context = 
$DIC->globalScreen()->tool()->context();
 
   55        $this->ctrl->saveParameter($this, 
"exc_back_ref_id");
 
   65        if ($a_perm == 
"create") {
 
   71        return $this->access_handler->checkAccess($a_perm, 
"", $a_node_id);
 
   82        $next_class = $this->ctrl->getNextClass($this);
 
   83        $cmd = $this->ctrl->getCmd(
"view");
 
   88            $this->ctrl->getLinkTargetByClass(
 
  100        switch ($next_class) {
 
  101            case "ilworkspaceaccessgui":
 
  104                    $this->tabs_gui->activateTab(
"share");
 
  106                    if ($this->access_handler->getPermissions($this->object->getId()) &&
 
  107                        !$this->object->isOnline()) {
 
  111                    $this->tpl->setPermanentLink(
"prtf", $this->object->getId());
 
  115                    $this->ctrl->forwardCommand($wspacc);
 
  119            case 'ilportfoliopagegui':
 
  131            case "ilobjstylesheetgui":
 
  132                $this->ctrl->setReturn($this, 
"editStyleProperties");
 
  133                $style_gui = 
new ilObjStyleSheetGUI(
"", $this->object->getStyleSheetId(), 
false, 
false);
 
  134                $style_gui->enableWrite(
true);
 
  135                $style_gui->omitLocator();
 
  136                if ($cmd == 
"create" || 
$_GET[
"new_type"] == 
"sty") {
 
  137                    $style_gui->setCreationMode(
true);
 
  140                if ($cmd == 
"confirmedDelete") {
 
  141                    $this->
object->setStyleSheetId(0);
 
  142                    $this->
object->update();
 
  145                $ret = $this->ctrl->forwardCommand($style_gui);
 
  147                if ($cmd == 
"save" || $cmd == 
"copyStyle" || $cmd == 
"importStyle") {
 
  149                    $this->
object->setStyleSheetId($style_id);
 
  150                    $this->
object->update();
 
  151                    $this->ctrl->redirectByClass(
"ilobjstylesheetgui", 
"edit");
 
  155            case "ilportfolioexercisegui":
 
  156                $this->ctrl->setReturn($this, 
"view");
 
  158                $this->ctrl->forwardCommand($gui);
 
  163                if ($cmd != 
"preview") {
 
  181        if (!is_object($this->
object) || $this->object->getId() <= 0) {
 
  186        $assignments = $pe->getAssignmentsOfPortfolio();
 
  187        if (count($assignments) > 0) {
 
  188            $ass_ids = array_map(
function (
$i) {
 
  201        $ilHelp->setScreenIdComponent(
"prtf");
 
  204            $this->tabs_gui->addTab(
 
  206                $this->lng->txt(
"content"),
 
  207                $this->ctrl->getLinkTarget($this, 
"view")
 
  210            $this->tabs_gui->addTab(
 
  212                $this->lng->txt(
"settings"),
 
  213                $this->ctrl->getLinkTarget($this, 
"edit")
 
  216            $this->tabs_gui->addNonTabbedLink(
 
  218                $this->lng->txt(
"preview"),
 
  219                $this->ctrl->getLinkTarget($this, 
"preview")
 
  222            $this->lng->loadLanguageModule(
"wsp");
 
  223            $this->tabs_gui->addTab(
 
  225                $this->lng->txt(
"wsp_permissions"),
 
  226                $this->ctrl->getLinkTargetByClass(
"ilworkspaceaccessgui", 
"share")
 
  233        if (!$this->creation_mode) {
 
  234            $this->ctrl->setParameter($this, 
"prt_id", $this->object->getId());
 
  237        parent::addLocatorItems();
 
  239        $this->tpl->setLocator();
 
  246        $title = $this->lng->txt(
"portfolio");
 
  248            $title .= 
": " . $this->
object->getTitle();
 
  250        $this->tpl->setTitle($title);
 
  251        $this->tpl->setTitleIcon(
 
  253            $this->lng->txt(
"portfolio")
 
  257            !$this->object->isOnline()) {
 
  258            $this->tpl->setAlertProperties(array(
 
  259                array(
"alert" => 
true,
 
  260                    "property" => $this->lng->txt(
"status"),
 
  261                    "value" => $this->lng->txt(
"offline"))
 
  281        $new_type = $_REQUEST[
"new_type"];
 
  284        $this->ctrl->saveParameter($this, 
"crtptrefid");
 
  286        $this->ctrl->saveParameter($this, 
"crtcb");
 
  289            $ilErr->raiseError($this->lng->txt(
"permission_denied"), 
$ilErr->MESSAGE);
 
  291            $this->lng->loadLanguageModule($new_type);
 
  292            $this->ctrl->setParameter($this, 
"new_type", $new_type);
 
  297            if (
$_GET[
"cpfl"] && isset($forms[self::CFORM_CLONE])) {
 
  298                $forms = array(self::CFORM_CLONE => $forms[self::CFORM_CLONE]);
 
  324            $root = 
$tree->readRootId();
 
  326                $root = 
$tree->getNodeData($root);
 
  327                foreach (
$tree->getSubTree($root) as $node) {
 
  328                    if ($node[
"type"] == 
"blog") {
 
  329                        $options[$node[
"obj_id"]] = $node[
"title"];
 
  334            if (!
sizeof($options)) {
 
  337                $this->lng->loadLanguageModule(
'pd');
 
  338                $url = $this->ctrl->getLinkTargetByClass(
"ilDashboardGUI", 
"jumpToWorkspace");
 
  339                $text = $this->lng->txt(
"mm_personal_and_shared_r");
 
  341                $text = sprintf($this->lng->txt(
"prtf_no_blogs_info"), $text);
 
  343                $mbox = 
$ui->factory()->messageBox()->info($text)
 
  344                    ->withLinks([
$ui->factory()->link()->standard(
 
  345                        $this->lng->txt(
"mm_personal_and_shared_r"),
 
  358        return array(self::CFORM_NEW => $this->
initCreateForm($a_new_type));
 
  365        $this->ctrl->setParameter($this, 
"new_type", $this->
getType());
 
  368        $form->setFormAction($this->ctrl->getFormAction($this));
 
  374        $ti->setRequired(
true);
 
  378        $main->setValue(
"mode_scratch");
 
  379        $form->addItem($main);
 
  381        $opt_scratch = 
new ilRadioOption($this->lng->txt(
"prtf_creation_mode_scratch"), 
"mode_scratch");
 
  382        $main->addOption($opt_scratch);
 
  388        $type->setRequired(
true);
 
  389        $opt_scratch->addSubItem(
$type);
 
  391        $type_page = 
new ilRadioOption($this->lng->txt(
"page"), 
"page");
 
  392        $type->addOption($type_page);
 
  396        $tf->setMaxLength(128);
 
  398        $tf->setRequired(
true);
 
  399        $type_page->addSubItem($tf);
 
  404            $options = array(0 => $this->lng->txt(
"none"));
 
  405            foreach ($templates as $templ) {
 
  406                $templ->readObject();
 
  407                $options[$templ->getId()] = $templ->getTitle();
 
  410            $use_template = 
new ilSelectInputGUI($this->lng->txt(
"prtf_use_page_layout"), 
"tmpl");
 
  411            $use_template->setRequired(
true);
 
  412            $use_template->setOptions($options);
 
  413            $type_page->addSubItem($use_template);
 
  420            $root = 
$tree->readRootId();
 
  422                $root = 
$tree->getNodeData($root);
 
  423                foreach (
$tree->getSubTree($root) as $node) {
 
  424                    if ($node[
"type"] == 
"blog") {
 
  425                        $options[$node[
"obj_id"]] = $node[
"title"];
 
  430            if (
sizeof($options)) {
 
  431                $type_blog = 
new ilRadioOption($this->lng->txt(
"obj_blog"), 
"blog");
 
  432                $type->addOption($type_blog);
 
  435                $obj->setRequired(
true);
 
  436                $obj->setOptions(array(
"" => $this->lng->txt(
"please_select")) + $options);
 
  437                $type_blog->addSubItem($obj);
 
  439                $type->setValue(
"page");
 
  446        $opt_tmpl = 
new ilRadioOption($this->lng->txt(
"prtf_creation_mode_template"), 
"mode_tmpl");
 
  447        $main->addOption($opt_tmpl);
 
  450        if (!
sizeof($templates)) {
 
  451            $opt_tmpl->setDisabled(
true);
 
  454            $tmpl->setRequired(
true);
 
  455            $tmpl->setOptions(array(
"" => $this->lng->txt(
"please_select")) + $templates);
 
  456            $opt_tmpl->addSubItem($tmpl);
 
  459            if ((
int) $_REQUEST[
"prtt_pre"]) {
 
  460                $tmpl->setValue((
int) $_REQUEST[
"prtt_pre"]);
 
  461                $main->setValue(
"mode_tmpl");
 
  466        $form->setTitle($this->lng->txt(
"prtf_create_portfolio"));
 
  467        $form->addCommandButton(
"save", $this->lng->txt(
"create"));
 
  468        $form->addCommandButton(
"toRepository", $this->lng->txt(
"cancel"));
 
  476        if ($form->checkInput()) {
 
  478            if ($form->getInput(
"mode") == 
"mode_tmpl") {
 
  479                $_REQUEST[
"pt"] = $form->getInput(
"title");
 
  480                $_REQUEST[
"prtt_pre"] = (int) $_REQUEST[
"prtt"];
 
  486        return parent::save();
 
  493        if (
$_POST[
"ptype"] == 
"page") {
 
  495            $page->setTitle(
$_POST[
"fpage"]);
 
  498            $layout_id = 
$_POST[
"tmpl"];
 
  501                $page->setXMLContent($layout_obj->getXMLContent());
 
  505            $page->setTitle(
$_POST[
"blog"]);
 
  509        ilUtil::sendSuccess($this->lng->txt(
"prtf_portfolio_created"), 
true);
 
  510        $this->ctrl->setParameter($this, 
"prt_id", $a_new_object->
getId());
 
  511        $this->ctrl->redirect($this, 
"view");
 
  519        $exc_ref_id = (int) $_REQUEST[
"exc_id"];
 
  521            $ilAccess->checkAccess(
"read", 
"", $exc_ref_id)) {
 
  525        $this->ctrl->redirectByClass(
"ilportfoliorepositorygui", 
"show");
 
  531        $form->setFormAction($this->ctrl->getFormAction($this));
 
  537        $ti->setRequired(
true);
 
  538        $ti->setValue($this->object->getTitle());
 
  551        $online->setChecked($this->object->isOnline());
 
  552        $form->addItem($online);
 
  556        $form->setTitle($this->lng->txt(
"prtf_edit_portfolio"));
 
  557        $form->addCommandButton(
"update", $this->lng->txt(
"save"));
 
  558        $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
 
  565        $a_values[
"online"] = $this->
object->isOnline();
 
  567        parent::getEditFormCustomValues($a_values);
 
  572        $this->
object->setOnline($a_form->
getInput(
"online"));
 
  579        parent::updateCustom($a_form);
 
  597        if (!$a_portfolio_id && $this->
object) {
 
  598            $a_portfolio_id = $this->
object->getId();
 
  601        $page->setPortfolioId($a_portfolio_id);
 
  614            $this->object->getId(),
 
  617            $this->object->hasPublicComments()
 
  625        return "ilportfoliopagegui";
 
  631        $a_tgt->setRequired(
true);
 
  634        $old = 
new ilRadioOption($this->lng->txt(
"prtf_existing_portfolio"), 
"old");
 
  635        $a_tgt->addOption($old);
 
  639        foreach ($all as $item) {
 
  640            $options[$item[
"id"]] = $item[
"title"];
 
  643        $prtf->setRequired(
true);
 
  644        $prtf->setOptions($options);
 
  645        $old->addSubItem($prtf);
 
  647        $new = 
new ilRadioOption($this->lng->txt(
"prtf_new_portfolio"), 
"new");
 
  648        $a_tgt->addOption($new);
 
  651        $tf->setMaxLength(128);
 
  653        $tf->setRequired(
true);
 
  654        $new->addSubItem($tf);
 
  671        $form->setFormAction($this->ctrl->getFormAction($this));
 
  675        $root = 
$tree->readRootId();
 
  677            $root = 
$tree->getNodeData($root);
 
  678            foreach (
$tree->getSubTree($root, 
true, 
"blog") as $node) {
 
  679                $options[$node[
"obj_id"]] = $node[
"title"];
 
  686        $radg->setInfo($this->lng->txt(
""));
 
  687        $radg->setValue(
"new");
 
  688        $radg->setInfo($this->lng->txt(
""));
 
  690        $op1 = 
new ilRadioOption($this->lng->txt(
"prtf_add_new_blog"), 
"new", $this->lng->txt(
"prtf_add_new_blog_info"));
 
  691        $radg->addOption($op1);
 
  692        $form->addItem($radg);
 
  696        $ti->setRequired(
true);
 
  697        $op1->addSubItem($ti);
 
  700        if (
sizeof($options)) {
 
  701            $op2 = 
new ilRadioOption($this->lng->txt(
"prtf_add_existing_blog"), 
"existing");
 
  702            $radg->addOption($op2);
 
  705            $obj->setOptions($options);
 
  706            $op2->addSubItem($obj);
 
  709        $form->setTitle($this->lng->txt(
"prtf_add_blog") . 
": " .
 
  710            $this->object->getTitle());
 
  711        $form->addCommandButton(
"saveBlog", $this->lng->txt(
"save"));
 
  712        $form->addCommandButton(
"view", $this->lng->txt(
"cancel"));
 
  727        if ($form->checkInput() && $this->checkPermissionBool(
"write")) {
 
  728            if ($form->getInput(
"creation_mode") == 
"existing") {
 
  731                $page->setTitle($form->getInput(
"blog"));
 
  735                $blog->setTitle($form->getInput(
"title"));
 
  742                if (!
$tree->getRootId()) {
 
  752                $page->setTitle($blog->getId());
 
  756            ilUtil::sendSuccess($this->lng->txt(
"prtf_blog_page_created"), 
true);
 
  757            $this->ctrl->redirect($this, 
"view");
 
  760        $this->tabs_gui->clearTargets();
 
  761        $this->tabs_gui->setBackTarget(
 
  762            $this->lng->txt(
"back"),
 
  763            $this->ctrl->getLinkTarget($this, 
"view")
 
  766        $form->setValuesByPost();
 
  767        $this->tpl->setContent($form->getHtml());
 
  777        $title = trim($_REQUEST[
"pt"]);
 
  778        $prtt_id = (int) $_REQUEST[
"prtt"];
 
  782        if (!
sizeof($templates) || !in_array($prtt_id, $templates)) {
 
  787        $this->ctrl->setParameter($this, 
"prtt", $prtt_id);
 
  793            $this->tpl->setContent($a_form->getHTML());
 
  804        if ((
int) $_REQUEST[
"exc_id"]) {
 
  805            $this->ctrl->setParameter($this, 
"exc_id", (
int) $_REQUEST[
"exc_id"]);
 
  806            $this->ctrl->setParameter($this, 
"ass_id", (
int) $_REQUEST[
"ass_id"]);
 
  810        $form->setFormAction($this->ctrl->getFormAction($this));
 
  814        $form->addItem($tmpl);
 
  817        $title->setValue($a_title);
 
  818        $form->addItem($title);
 
  822            $blog_options = array();
 
  824            $root = 
$tree->readRootId();
 
  826                $root = 
$tree->getNodeData($root);
 
  827                foreach (
$tree->getSubTree($root, 
true, 
"blog") as $node) {
 
  828                    $blog_options[$node[
"obj_id"]] = $node[
"title"];
 
  830                asort($blog_options);
 
  834        $has_form_content = 
false;
 
  837        $skill_ids = array();
 
  840            switch ($page[
"type"]) {
 
  844                    $source_page->buildDom(
true);
 
  847                    if (
sizeof($skill_ids)) {
 
  848                        $has_form_content = 
true;
 
  854                        $has_form_content = 
true;
 
  856                        $field_id = 
"blog_" . $page[
"id"];
 
  859                            $page[
"title"], $field_id);
 
  860                        $blog->setRequired(
true);
 
  861                        $blog->setValue(
"blog_create");
 
  862                        $form->addItem($blog);
 
  864                        $new_blog = 
new ilRadioOption($this->lng->txt(
"prtf_template_import_blog_create"), 
"blog_create");
 
  865                        $blog->addOption($new_blog);
 
  867                        $title = 
new ilTextInputGUI($this->lng->txt(
"title"), $field_id . 
"_create_title");
 
  868                        $title->setRequired(
true);
 
  869                        $new_blog->addSubItem($title);
 
  871                        if (
sizeof($blog_options)) {
 
  872                            $reuse_blog = 
new ilRadioOption($this->lng->txt(
"prtf_template_import_blog_reuse"), 
"blog_resuse");
 
  873                            $blog->addOption($reuse_blog);
 
  875                            $obj = 
new ilSelectInputGUI($this->lng->txt(
"obj_blog"), $field_id . 
"_reuse_blog");
 
  876                            $obj->setRequired(
true);
 
  877                            $obj->setOptions(array(
"" => $this->lng->txt(
"please_select")) + $blog_options);
 
  878                            $reuse_blog->addSubItem($obj);
 
  881                        $blog->addOption(
new ilRadioOption($this->lng->txt(
"prtf_template_import_blog_ignore"), 
"blog_ignore"));
 
  889            $skills->setInfo($this->lng->txt(
"prtf_template_import_new_skills"));
 
  890            $skills->setValue($skill_ids);
 
  891            foreach ($skill_ids as $skill_id) {
 
  894            $form->addItem($skills);
 
  897        if (!$has_form_content) {
 
  901        $form->setTitle($this->lng->txt(
"prtf_creation_mode") . 
": " . $this->lng->txt(
"prtf_creation_mode_template"));
 
  902        $form->addCommandButton(
"createPortfolioFromTemplateProcess", $this->lng->txt(
"continue"));
 
  903        $form->addCommandButton(
"toRepository", $this->lng->txt(
"cancel"));
 
  914        $title = trim($_REQUEST[
"pt"]);
 
  915        $prtt_id = (int) $_REQUEST[
"prtt"];
 
  919        if (!
sizeof($templates) || !in_array($prtt_id, $templates)) {
 
  926        if ($a_process_form) {
 
  927            $this->ctrl->setParameter($this, 
"prtt", $prtt_id);
 
  930            if ($form->checkInput()) {
 
  932                    switch ($page[
"type"]) {
 
  935                                $field_id = 
"blog_" . $page[
"id"];
 
  936                                switch ($form->getInput($field_id)) {
 
  938                                        $recipe[$page[
"id"]] = array(
"blog", 
"create",
 
  939                                            trim($form->getInput($field_id . 
"_create_title")));
 
  943                                        $recipe[$page[
"id"]] = array(
"blog", 
"reuse",
 
  944                                            (
int) $form->getInput($field_id . 
"_reuse_blog"));
 
  948                                        $recipe[$page[
"id"]] = array(
"blog", 
"ignore");
 
  956                $recipe[
"skills"] = (array) $form->getInput(
"skill_ids");
 
  958                $form->setValuesByPost();
 
  967        $target->setTitle($title);
 
  976        ilUtil::sendSuccess($this->lng->txt(
"prtf_portfolio_created_from_template"), 
true);
 
  977        $this->ctrl->setParameter($this, 
"prt_id", 
$target_id);
 
  978        $this->ctrl->redirect($this, 
"preview");
 
  986        $prtt_id = (int) $_REQUEST[
"prtt_pre"];
 
  993        if (!
sizeof($templates) || !in_array($prtt_id, $templates)) {
 
 1002        $target->setTitle($title);
 
 1011        ilUtil::sendSuccess($this->lng->txt(
"prtf_portfolio_created_from_template"), 
true);
 
 1012        $this->ctrl->setParameter($this, 
"prt_id", 
$target_id);
 
 1013        $this->ctrl->redirect($this, 
"preview");
 
 1017    public static function _goto($a_target)
 
 1024        $id = explode(
"_", $a_target);
 
 1026        $_GET[
"baseClass"] = 
"ilsharedresourceGUI";
 
 1027        $ctrl->setParameterByClass(
"ilobjportfoliogui", 
"prt_id", $id[0]);
 
 1028        if (
sizeof($id) == 2) {
 
 1029            $ctrl->setParameterByClass(
"ilobjportfoliogui", 
"user_page", $id[1]);
 
 1031        $ctrl->redirectByClass([
"ilsharedresourceGUI", 
"ilobjportfoliogui"], 
"preview");
 
 1039        $title = trim($_REQUEST[
"pt"]);
 
 1040        $prtt_id = (int) $_REQUEST[
"prtt"];
 
 1043        $ass_template_id = 0;
 
 1044        if ((
int) $_REQUEST[
"ass_id"] > 0) {
 
 1051            if (!
sizeof($templates) || !in_array($prtt_id, $templates)) {
 
 1052                if ($ass_template_id != $prtt_id) {
 
 1059            $skill_ids = array();
 
 1063                switch ($page[
"type"]) {
 
 1066                            $recipe[$page[
"id"]] = array(
"blog", 
"create", $page[
'title']);
 
 1071                        $source_page->buildDom(
true);
 
 1078                $recipe[
"skills"] = $skill_ids;
 
 1084        $target->setTitle($title);
 
 1096        $this->ctrl->setParameter($this, 
"prt_id", 
$target_id);
 
 1098            ilUtil::sendSuccess($this->lng->txt(
"prtf_portfolio_created_from_template"), 
true);
 
 1099            $this->ctrl->redirect($this, 
"preview");
 
 1101            ilUtil::sendSuccess($this->lng->txt(
"prtf_portfolio_created"), 
true);
 
 1102            $this->ctrl->redirect($this, 
"view");
 
 1111        $exc_ref_id = (int) $_REQUEST[
"exc_id"];
 
 1112        $ass_id = (int) $_REQUEST[
"ass_id"];
 
 1116            $ilAccess->checkAccess(
"read", 
"", $exc_ref_id)) {
 
 1119            if ($ass->getExerciseId() == $exc->getId() &&
 
 1123                $sub->addResourceObject($a_target_id);
 
 1136        $dom = $a_source_page->getDom();
 
 1138            $dom = $dom->myDOMDocument;
 
 1140        $xpath = 
new DOMXPath($dom);
 
 1141        $nodes = $xpath->query(
"//PageContent/Skills");
 
 1142        foreach ($nodes as $node) {
 
 1143            $skill_id = $node->getAttribute(
"Id");
 
 1144            if (!in_array($skill_id, $a_pskills)) {
 
 1145                $a_skill_ids[] = $skill_id;
 
 1152        return $a_skill_ids;
 
 1168        $tpl->setContent($form->getHTML());
 
 1181        $tabs = 
$DIC->tabs();
 
 1183        $tabs->clearTargets();
 
 1184        $tabs->setBackTarget(
$lng->txt(
"back"), $ilCtrl->getLinkTarget($this, 
"view"));
 
 1192        $form->setPreventDoubleSubmission(
false);
 
 1195        if ($this->declaration_authorship->getForUser($this->user) != 
"") {
 
 1196            $cb = 
new ilCheckboxInputGUI($this->lng->txt(
"prtf_decl_authorship"), 
"decl_author");
 
 1197            $cb->setInfo($this->declaration_authorship->getForUser($this->user));
 
 1198            $form->addItem($cb);
 
 1203        $cb->setInfo($this->lng->txt(
"prtf_signature_info"));
 
 1204        $form->addItem($cb);
 
 1209        $radg->setValue(
"all_pages");
 
 1211        $radg->addOption($op2);
 
 1213        $radg->addOption($op3);
 
 1216        $op3->addSubItem($nl);
 
 1218        foreach ($pages as $p) {
 
 1237                    $lng->txt(
"obj_blog")
 
 1240                foreach ($pages2 as $p2) {
 
 1254        $form->addItem($radg);
 
 1256        $form->addCommandButton(
"exportPDF", 
$lng->txt(
"prtf_pdf"));
 
 1257        if (DEVMODE == 
"1") {
 
 1258            $form->addCommandButton(
"exportPDFDev", 
$lng->txt(
"prtf_pdf") . 
" (DEV)");
 
 1261        $form->setTitle(
$lng->txt(
"prtf_print_options"));
 
 1262        $form->setFormAction($ilCtrl->getFormAction($this, 
"exportPDF"));
 
 1289        $html = preg_replace(
"/\?dummy\=[0-9]+/", 
"", $html);
 
 1290        $html = preg_replace(
"/\?vers\=[0-9A-Za-z\-]+/", 
"", $html);
 
 1292        $html = preg_replace(
"/src=\"\\.\\//ims", 
"src=\"" . ILIAS_HTTP_PATH . 
"/", $html);
 
 1293        $html = preg_replace(
"/href=\"\\.\\//ims", 
"href=\"" . ILIAS_HTTP_PATH . 
"/", $html);
 
 1318        $resource_collector = new \ILIAS\COPage\ResourcesCollector(
 
 1322        $resource_injector = new \ILIAS\COPage\ResourcesInjector($resource_collector);
 
 1324        $tpl->setBodyClass(
"ilPrtfPdfBody");
 
 1331        $resource_injector->inject(
$tpl);
 
 1337        $cover_tpl = 
new ilTemplate(
"tpl.prtf_cover.html", 
true, 
true, 
"Modules/Portfolio");
 
 1338        foreach ($pages as $page) {
 
 1340                if (
$_POST[
"sel_type"] == 
"selection" && (!is_array(
$_POST[
"obj_id"]) || !in_array($page[
"id"], 
$_POST[
"obj_id"]))) {
 
 1343                $cover_tpl->setCurrentBlock(
"content_item");
 
 1344                $cover_tpl->setVariable(
"ITEM_TITLE", $page[
"title"]);
 
 1345                $cover_tpl->parseCurrentBlock();
 
 1347                $cover_tpl->setCurrentBlock(
"content_item");
 
 1349                $cover_tpl->parseCurrentBlock();
 
 1353        if (
$_POST[
"signature"]) {
 
 1354            $cover_tpl->setCurrentBlock(
"signature");
 
 1355            $cover_tpl->setVariable(
"TXT_SIGNATURE", 
$lng->txt(
"prtf_signature_date"));
 
 1356            $cover_tpl->parseCurrentBlock();
 
 1359        if (
$_POST[
"decl_author"]) {
 
 1360            $cover_tpl->setCurrentBlock(
"decl_author");
 
 1361            $cover_tpl->setVariable(
 
 1363                nl2br($this->declaration_authorship->getForUser($this->user))
 
 1365            $cover_tpl->parseCurrentBlock();
 
 1368        $cover_tpl->setVariable(
"PORTFOLIO_TITLE", $this->object->getTitle());
 
 1371        $cover_tpl->setVariable(
"TXT_AUTHOR", 
$lng->txt(
"prtf_author"));
 
 1372        $cover_tpl->setVariable(
"TXT_LINK", 
$lng->txt(
"prtf_link"));
 
 1373        $cover_tpl->setVariable(
"TXT_DATE", 
$lng->txt(
"prtf_date_of_print"));
 
 1376        $author_str = $author[
"firstname"] . 
" " . $author[
"lastname"];
 
 1377        $cover_tpl->setVariable(
"AUTHOR", $author_str);
 
 1380        $cover_tpl->setVariable(
"LINK", $href);
 
 1384        $cover_tpl->setVariable(
"DATE", $date_str);
 
 1386        $page_content .= $cover_tpl->get();
 
 1387        $page_content .= 
'<p style="page-break-after:always;"></p>';
 
 1389        $page_head_tpl = 
new ilTemplate(
"tpl.prtf_page_head.html", 
true, 
true, 
"Modules/Portfolio");
 
 1390        $page_head_tpl->setVariable(
"AUTHOR", $author_str);
 
 1391        $page_head_tpl->setVariable(
"DATE", $date_str);
 
 1392        $page_head_str = $page_head_tpl->get();
 
 1394        foreach ($pages as $page) {
 
 1396                if (
$_POST[
"sel_type"] == 
"selection" && (!is_array(
$_POST[
"obj_id"]) || !in_array($page[
"id"], 
$_POST[
"obj_id"]))) {
 
 1401                $page_gui->setOutputMode(
"print");
 
 1402                $page_gui->setPresentationTitle($page[
"title"]);
 
 1403                $html = $this->ctrl->getHTML($page_gui);
 
 1404                $page_content .= $page_head_str . $html;
 
 1406                if ($a_pdf_export) {
 
 1407                    $page_content .= 
'<p style="page-break-after:always;"></p>';
 
 1411                foreach ($pages2 as $p2) {
 
 1412                    if (
$_POST[
"sel_type"] == 
"selection" && (!is_array(
$_POST[
"obj_id"]) || !in_array(
"b" . $p2[
"id"], 
$_POST[
"obj_id"]))) {
 
 1416                    $page_gui->setFileDownloadLink(
"#");
 
 1417                    $page_gui->setFullscreenLink(
"#");
 
 1418                    $page_gui->setSourcecodeDownloadScript(
"#");
 
 1419                    $page_gui->setOutputMode(
"print");
 
 1420                    $page_content .= $page_head_str . $page_gui->showPage(
ilObject::_lookupTitle($page[
"title"]) . 
": " . $page_gui->getBlogPosting()->getTitle());
 
 1422                    if ($a_pdf_export) {
 
 1423                        $page_content .= 
'<p style="page-break-after:always;"></p>';
 
 1429        $page_content = 
'<div class="ilInvisibleBorder">' . $page_content . 
'</div>';
 
 1431        if (!$a_pdf_export) {
 
 1432            $page_content .= 
'<script type="text/javascript" language="javascript1.2"> 
 1434                                        il.Util.addOnLoad(function () { 
 1441        $tpl->setVariable(
"CONTENT", $page_content);
 
 1443        if (!$a_pdf_export) {
 
 1444            $tpl->printToStdout(
false);
 
 1465        if (!$this->object->isOnline()) {
 
 1466            $f = 
$ui->factory();
 
 1467            $renderer = 
$ui->renderer();
 
 1469            $buttons = [
$f->button()->standard(
 
 1470                $lng->txt(
"prtf_set_online"),
 
 1471                $ctrl->getLinkTarget($this, 
"setOnlineAndShare")
 
 1474            return $renderer->render(
$f->messageBox()->info(
$lng->txt(
"prtf_no_offline_share_info"))
 
 1475                ->withButtons($buttons));
 
 1489            $this->
object->setOnline(
true);
 
 1490            $this->
object->update();
 
 1491            ilUtil::sendSuccess(
$lng->txt(
"prtf_has_been_set_online"), 
true);
 
 1493        $ilCtrl->redirectByClass(
"ilworkspaceaccessgui", 
"");
 
An exception for terminatinating execution or to throw for unit testing.
Class ilBlogPosting GUI class.
static getAllPostings($a_blog_id, $a_limit=1000, $a_offset=0)
Get all postings of blog.
This class represents an option in a checkbox group.
static formatDate(ilDateTime $date, $a_skip_day=false, $a_include_wd=false, $include_seconds=false)
Format a date @access public.
static setUseRelativeDates($a_status)
set use relative dates
Exercise submission //TODO: This class has to much static methods related to delivered "files".
special template class to simplify handling of ITX/PEAR
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
static _getStaticLink( $a_ref_id, $a_type='', $a_fallback_goto=true, $append="")
Get static link.
This class represents a non editable value in a property form.
static initJavascript($a_ajax_url, $a_type=IL_NOTE_PRIVATE, ilGlobalTemplateInterface $a_main_tpl=null)
Init javascript.
Portfolio view gui base class.
initEditCustomForm(ilPropertyFormGUI $a_form)
Add custom fields to update form.
getAdditional()
Get Additonal Information.
preview($a_return=false, $a_content=false, $a_show_notes=true)
Show user page.
Portfolio view gui class.
setOnlineAndShare()
Set online and switch to share screen.
triggerAssignmentTool()
Trigger assignment tool.
getType()
Functions that must be overwritten.
getSkillsToPortfolioAssignment($a_pskills, $a_skill_ids, $a_source_page)
getOfflineMessage()
Get offline message for sharing tab.
initEditForm()
Init object edit form.
exportPDFSelection()
Export PDF selection.
executeCommand()
execute command
getPageGUIInstance($a_page_id)
Get portfolio template page gui instance.
exportPDF($a_dev_mode=false)
create()
create new object form
saveBlog()
Create new portfolio blog page.
createPortfolioFromAssignment()
initCreateForm($a_new_type)
Init object creation form.
getPageInstance($a_page_id=null, $a_portfolio_id=null)
Get portfolio template page instance.
getCreateInfoMessage()
Get cereat info message.
afterSave(ilObject $a_new_object)
Post (successful) object creation hook.
printView($a_pdf_export=false)
getEditFormCustomValues(array &$a_values)
Add values to custom edit fields.
setTitleAndDescription()
called by prepare output
createPortfolioFromTemplate(ilPropertyFormGUI $a_form=null)
createFromTemplateDirect($title="")
Create portfolio template direct.
createPortfolioFromTemplateProcess($a_process_form=true)
updateCustom(ilPropertyFormGUI $a_form)
Insert custom update form values into object.
initCopyPageFormOptions(ilPropertyFormGUI $a_form)
setTabs()
create tabs (repository/workspace switch)
initBlogForm()
Init blog page form.
initPDFSelectionForm()
Init print view selection form.
initCreationForms($a_new_type)
Init creation froms.
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_node_id=null)
Check permission.
initCreatePortfolioFromTemplateForm($a_prtt_id, $a_title)
linkPortfolioToAssignment($a_target_id)
static getAvailablePortfolioTemplates($a_permission="read")
static setUserDefault($a_user_id, $a_portfolio_id=null)
Set the user default portfolio.
static getPortfoliosOfUser($a_user_id)
Get views of user.
Class ilObjStyleSheetGUI.
static getContentPrintStyle()
get content print style
static getSyntaxStylePath()
get syntax style path
static getContentStylePath($a_style_id, $add_random=true, $add_token=true)
get content style path
static _lookupName($a_user_id)
lookup user name
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
static _lookupOwner($a_id)
lookup object owner
getCreationFormsHTML(array $a_forms)
Get HTML for creation forms (accordion)
Class ilObject Basic functions for all objects.
const TITLE_LENGTH
max length of object title
static _lookupTitle($a_id)
lookup object title
static _lookupObjectId($a_ref_id)
lookup object id
getId()
get object id @access public
static prepareGenerationRequest($service, $purpose)
Prepare the content processing for a PDF generation request This function should be called as in a re...
static activeLayouts($a_special_page=false, $a_module=null)
Get active layouts.
static getSelectedUserSkills($a_user_id)
Get personal selected user skills.
Declaration of authorship (data gateway)
Class ilPortfolioExerciseGUI.
Exercise info for portfolios.
Portfolio page gui class.
static getAllPortfolioPages($a_portfolio_id)
Get pages of portfolio.
Page for portfolio template.
This class represents an option in a radio group.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
special template class to simplify handling of ITX/PEAR
This class represents a text property in a property form.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static redirect($a_script)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
static setTokenMaxLifetimeInSeconds($token_max_lifetime_in_seconds)
Access handler for personal workspace.
Tree handler for personal workspace.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc