ILIAS  release_8 Revision v8.24
class.ilPortfolioPageGUI.php
Go to the documentation of this file.
1<?php
2
27{
28 public const EMBEDDED_NO_OUTPUT = -99;
29 protected bool $enable_comments;
30 protected int $portfolio_id;
31 protected \ILIAS\Portfolio\StandardGUIRequest $port_request;
32
33 protected bool $embedded = false;
35 protected ilTree $tree;
36 protected array $js_onload_code = array();
37 protected array $additional = array();
38 protected array $export_material = array("js" => array(), "images" => array(), "files" => array());
39 protected static int $initialized = 0;
40 protected static bool $calender_initialized = false;
41 protected int $requested_ppage;
42
43 public function __construct(
44 int $a_portfolio_id,
45 int $a_id = 0,
46 int $a_old_nr = 0,
47 bool $a_enable_comments = true
48 ) {
49 global $DIC;
50
51 $this->tpl = $DIC["tpl"];
52 $this->ctrl = $DIC->ctrl();
53 $this->user = $DIC->user();
54 $this->obj_definition = $DIC["objDefinition"];
55 $this->access = $DIC->access();
56 $this->tree = $DIC->repositoryTree();
57 $this->lng = $DIC->language();
58 $tpl = $DIC["tpl"];
59 $this->port_request = $DIC->portfolio()
60 ->internal()
61 ->gui()
62 ->standardRequest();
63
64 $this->portfolio_id = $a_portfolio_id;
65 $this->enable_comments = $a_enable_comments;
66
67 parent::__construct($this->getParentType(), $a_id, $a_old_nr);
68 $this->getPageObject()->setPortfolioId($this->portfolio_id);
69
70 // content style
71
72 $tpl->setCurrentBlock("SyntaxStyle");
74 "LOCATION_SYNTAX_STYLESHEET",
76 );
78
79 $tpl->setCurrentBlock("ContentStyle");
81 "LOCATION_CONTENT_STYLESHEET",
83 );
85 "LOCATION_ADDITIONAL_STYLESHEET",
87 );
89
90 $this->requested_ppage = $this->port_request->getPortfolioPageId();
91 }
92
93 public function getParentType(): string
94 {
95 return "prtf";
96 }
97
98 protected function getPageContentUserId(int $a_user_id): int
99 {
100 // user id from content-xml
101 return $a_user_id;
102 }
103
104 protected function getPortfolioPage(): ilPortfolioPage
105 {
107 $page = $this->getPageObject();
108 return $page;
109 }
110
111 public function executeCommand(): string
112 {
113 $ilCtrl = $this->ctrl;
115
116 $next_class = $this->ctrl->getNextClass($this);
117 $cmd = $this->ctrl->getCmd();
118
119 switch ($next_class) {
120 case "ilobjbloggui":
121 // #12879 - we need the wsp-id for the keywords
122 $wsp_tree = new ilWorkspaceTree($ilUser->getId());
123 $blog_obj_id = (int) $this->getPageObject()->getTitle();
124 $blog_node_id = $wsp_tree->lookupNodeId($blog_obj_id);
125
126 $blog_gui = new ilObjBlogGUI($blog_node_id, ilObject2GUI::WORKSPACE_NODE_ID);
127 $blog_gui->disableNotes(!$this->enable_comments);
128 $blog_gui->prtf_embed = true; // disables prepareOutput()/getStandardTemplate() in blog
129 $ilCtrl->forwardCommand($blog_gui);
130 return $blog_gui->getRenderedContent();
131
132 case "ilcalendarmonthgui":
133 $this->ctrl->saveParameter($this, "chuid");
134 // booking action
135 if ($cmd && $cmd !== "preview") {
137 if ($categories->getMode() === 0) {
138 $chuid = $this->port_request->getConsultationHourUserId();
139 if ($chuid > 0) {
140 $categories->setCHUserId($chuid);
141 }
142 $categories->initialize(ilCalendarCategories::MODE_PORTFOLIO_CONSULTATION, 0, true);
143 }
144
145 $req_seed = $this->port_request->getCalendarSeed();
146 if ($req_seed !== "") {
147 $seed = new ilDate($req_seed, IL_CAL_DATE);
148 } else {
149 $seed = new ilDate(time(), IL_CAL_UNIX);
150 }
151
152 $month_gui = new ilCalendarMonthGUI($seed);
153 return (string) $ilCtrl->forwardCommand($month_gui);
154 }
155
156 // calendar month navigation
157 //$ilCtrl->setParameter($this, "cmd", "preview");
158 return (string) self::EMBEDDED_NO_OUTPUT;
159 default:
160 $this->setPresentationTitle($this->getPageObject()->getTitle());
161 return (string) parent::executeCommand();
162 }
163 }
164
165 public function showPage(): string
166 {
168
169 if (!$this->getPageObject()) {
170 return "";
171 }
172
173 if ($this->getPageObject()->getType() === ilPortfolioPage::TYPE_BLOG) {
174 return $this->renderBlog($ilUser->getId(), (int) $this->getPageObject()->getTitle());
175 }
176
177 $this->setTemplateOutput(false);
178 // $this->setPresentationTitle($this->getPageObject()->getTitle());
179 return parent::showPage();
180 }
181
182 public function getTabs(string $a_activate = ""): void
183 {
184 if (!$this->embedded) {
185 parent::getTabs($a_activate);
186 }
187 }
188
192 public function setEmbedded(bool $a_value): void
193 {
194 $this->embedded = $a_value;
195 }
196
200 public function setAdditional(array $a_additional): void
201 {
202 $this->additional = $a_additional;
203 }
204
208 public function getAdditional(): array
209 {
210 return $this->additional;
211 }
212
213 public function getJsOnloadCode(): array
214 {
216 }
217
218 public function postOutputProcessing(string $a_output): string
219 {
220 $parts = array(
221 "Profile" => array("0-9", "a-z", "0-9a-z_;\W"), // user, mode, fields
222 "Verification" => array("0-9", "a-z", "0-9"), // user, type, id
223 "Blog" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
224 "BlogTeaser" => array("0-9", "0-9", "0-9;\W"), // user, blog id, posting ids
225 "Skills" => array("0-9", "0-9"), // user, skill id
226 "SkillsTeaser" => array("0-9", "0-9"), // user, skill id
227 "ConsultationHours" => array("0-9", "a-z", "0-9;\W"), // user, mode, group ids
228 "ConsultationHoursTeaser" => array("0-9", "a-z", "0-9;\W"), // user, mode, group ids
229 "MyCourses" => array("0-9", "a-z*"), // user, sort
230 "MyCoursesTeaser" => array("0-9", "a-z*") // user, sort
231 );
232
233 foreach ($parts as $type => $def) {
234 // #15732 - allow optional parts
235 $def_parts = array();
236 foreach ($def as $part) {
237 $is_opt = (substr($part, -1) === "*");
238 if (!$is_opt) {
239 $def_parts[] = "#";
240 $end_marker = "+";
241 } else {
242 $def_parts[] = "#*";
243 $end_marker = "*";
244 $part = substr($part, 0, -1);
245 }
246 $def_parts[] = "([" . $part . "]" . $end_marker . ")";
247 }
248 $def = implode("", $def_parts);
249
250 if (preg_match_all(
251 "/" . $this->pl_start . $type . $def . $this->pl_end . "/",
252 $a_output,
253 $blocks
254 )) {
255 foreach ($blocks[0] as $idx => $block) {
256 switch ($type) {
257 case "Profile":
258 case "Blog":
259 case "BlogTeaser":
260 case "Skills":
261 case "SkillsTeaser":
262 case "ConsultationHours":
263 case "ConsultationHoursTeaser":
264 case "MyCourses":
265 case "MyCoursesTeaser":
266 $subs = null;
267 if (trim(($blocks[3][$idx] ?? ""))) {
268 foreach (explode(";", $blocks[3][$idx]) as $sub) {
269 if (trim($sub)) {
270 $subs[] = trim($sub);
271 }
272 }
273 }
274 $snippet = $this->{"render" . $type}(
275 $blocks[1][$idx],
276 $blocks[2][$idx],
277 $subs
278 );
279 break;
280
281 default:
282 $snippet = $this->{"render" . $type}(
283 $blocks[1][$idx],
284 $blocks[2][$idx],
285 $blocks[3][$idx]
286 );
287 break;
288 }
289
290 $snippet = $this->renderPageElement($type, $snippet);
291 $a_output = str_replace($block, $snippet, $a_output);
292 }
293 }
294 }
295
296 $a_output = $this->makePlaceHoldersClickable($a_output);
297
298 return $a_output;
299 }
300
301 protected function renderPageElement(
302 string $a_type,
303 string $a_html
304 ): string {
305 return trim($a_html);
306 }
307
308 protected function renderTeaser(
309 string $a_type,
310 string $a_title,
311 string $a_options = ""
312 ): string {
313 $options = "";
314 if ($a_options) {
315 $options = '<div class="il_Footer">' . $this->lng->txt("prtf_page_element_teaser_settings") .
316 ": " . $a_options . '</div>';
317 }
318
319 return '<div style="margin:5px" class="ilBox"><h3>' . $a_title . '</h3>' .
320 '<div class="il_Description_no_margin">' . $this->lng->txt("prtf_page_element_teaser_" . $a_type) . '</div>' .
321 $options . '</div>';
322 }
323
324 protected function renderProfile(
325 int $a_user_id,
326 string $a_type,
327 array $a_fields = null
328 ): string {
329 $ilCtrl = $this->ctrl;
330
331 $user_id = $this->getPageContentUserId($a_user_id);
332
333 $pub_profile = new ilPublicUserProfileGUI($user_id);
334 $pub_profile->setEmbedded(true, ($this->getOutputMode() === "offline"));
335
336 // full circle: additional was set in the original public user profile call
337 $pub_profile->setAdditional($this->getAdditional());
338
339 if ($a_type === "manual" && is_array($a_fields) && count($a_fields) > 0) {
340 $prefs = array();
341 foreach ($a_fields as $field) {
342 $field = trim($field);
343 if ($field) {
344 $prefs["public_" . $field] = "y";
345 }
346 }
347
348 $pub_profile->setCustomPrefs($prefs);
349 }
350
351 if ($this->getOutputMode() !== "offline") {
352 return $ilCtrl->getHTML($pub_profile);
353 }
354
355 return $pub_profile->getEmbeddable();
356 }
357
361 protected function renderVerification(
362 int $a_user_id,
363 string $a_type,
364 int $a_id
365 ): string {
366 $objDefinition = $this->obj_definition;
367
368 $outputMode = $this->getOutputMode();
369
370 // not used
371 // $user_id = $this->getPageContentUserId($a_user_id);
372 if ($a_type === 'crta' && $outputMode === 'offline') {
373 $fileService = new ilPortfolioCertificateFileService();
374
375 $certificatePdfFile = $fileService->createCertificateFilePath($a_user_id, $a_id);
376 $this->export_material["files"][] = $certificatePdfFile;
377
378 $url = 'files/' . basename($certificatePdfFile);
379
380 $userCertificateRepository = new ilUserCertificateRepository();
381
382 return $this->createPersistentCertificateUrl($a_id, $userCertificateRepository, $url);
383 }
384
385 if ($a_type === 'crta' && $outputMode === 'print') {
386 $userCertificateRepository = new ilUserCertificateRepository();
387 $url = $this->getPagePermaLink();
388
389 return $this->createPersistentCertificateUrl($a_id, $userCertificateRepository, $url);
390 }
391
392 if ($a_type === 'crta') {
393 $this->ctrl->setParameter($this, "dlid", $a_id);
394 $url = $this->ctrl->getLinkTarget($this, "dl" . $a_type);
395 $this->ctrl->setParameter($this, "dlid", "");
396
397 $userCertificateRepository = new ilUserCertificateRepository();
398
399 return $this->createPersistentCertificateUrl($a_id, $userCertificateRepository, $url);
400 }
401
402 if (!ilObject::_exists($a_id)) {
403 return $this->lng->txt('deleted');
404 }
405
406 $class = "ilObj" . $objDefinition->getClassName($a_type) . "GUI";
407 $verification = new $class($a_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
408
409 if ($outputMode === "print") {
410 $url = $this->getPagePermaLink();
411 } elseif ($outputMode !== "offline") {
412 // direct download link
413 $this->ctrl->setParameter($this, "dlid", $a_id);
414 $url = $this->ctrl->getLinkTarget($this, "dl" . $a_type);
415 $this->ctrl->setParameter($this, "dlid", "");
416 } else {
417 $file = $verification->getObject()->getFilePath();
418 $url = "files/" . basename($file);
419
420 $this->export_material["files"][] = $file;
421 }
422
423 return $verification->render(true, $url);
424 }
425
426 protected function dltstv(): void
427 {
428 $id = $this->port_request->getVerificationId();
429 if ($id) {
431 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
432 }
433 }
434
435 protected function dlexcv(): void
436 {
437 $id = $this->port_request->getVerificationId();
438 if ($id) {
440 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
441 }
442 }
443
444 protected function dlcrsv(): void
445 {
446 $id = $this->port_request->getVerificationId();
447 if ($id) {
449 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
450 }
451 }
452
453 protected function dlcmxv(): void
454 {
455 $id = $this->port_request->getVerificationId();
456 if ($id) {
458 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
459 }
460 }
461
462 protected function dlltiv(): void
463 {
464 $id = $this->port_request->getVerificationId();
465 if ($id) {
467 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
468 }
469 }
470
471 protected function dlscov(): void
472 {
473 $id = $this->port_request->getVerificationId();
474 if ($id) {
476 $verification->downloadFromPortfolioPage($this->getPortfolioPage());
477 }
478 }
479
480 protected function dlcrta(): void
481 {
482 $objectId = $this->port_request->getVerificationId();
483 if ($objectId) {
485 $object->downloadFromPortfolioPage($this->getPortfolioPage(), $objectId, $this->user->getId());
486 }
487 }
488
489 protected function renderBlog(
490 int $a_user_id,
491 int $a_blog_id,
492 array $a_posting_ids = null
493 ): string {
494 $ilCtrl = $this->ctrl;
495
496 // not used
497 // $user_id = $this->getPageContentUserId($a_user_id);
498
499 // full blog (separate tab/page)
500 if (!$a_posting_ids) {
501 if (ilObject::_lookupType($a_blog_id) !== "blog") {
502 return "";
503 }
504 $blog = new ilObjBlogGUI($a_blog_id, ilObject2GUI::WORKSPACE_OBJECT_ID);
505 $blog->disableNotes(!$this->enable_comments);
506 $blog->setContentStyleSheet();
507
508 if ($this->getOutputMode() !== "offline") {
509 return $ilCtrl->getHTML($blog);
510 }
511 }
512 // embedded postings
513 else {
514 $html = array();
515
516 $html[] = ilObjBlog::_lookupTitle($a_blog_id);
517
518 foreach ($a_posting_ids as $post) {
519 $page = new ilBlogPostingGUI(0, null, $post);
520 if ($this->getOutputMode() !== "offline") {
521 $page->setOutputMode(ilPageObjectGUI::PREVIEW);
522 } else {
523 $page->setOutputMode("offline");
524 }
525 $html[] = $page->showPage();
526 }
527
528 return implode("\n", $html);
529 }
530 return "";
531 }
532
533 protected function renderBlogTeaser(
534 int $a_user_id,
535 int $a_blog_id,
536 array $a_posting_ids = null
537 ): string {
538 // not used
539 // $user_id = $this->getPageContentUserId($a_user_id);
540
541 $postings = "";
542 if ($a_posting_ids) {
543 $postings = array("<ul>");
544 foreach ($a_posting_ids as $post) {
546 $postings[] = "<li>" . $post->getTitle() . " - " .
547 ilDatePresentation::formatDate($post->getCreated()) . "</li>";
548 }
549 $postings[] = "</ul>";
550 $postings = implode("\n", $postings);
551 }
552
553 return $this->renderTeaser("blog", $this->lng->txt("obj_blog") . ' "' .
554 ilObject::_lookupTitle($a_blog_id) . '"', $postings);
555 }
556
557 protected function renderSkills(
558 int $a_user_id,
559 int $a_skills_id
560 ): string {
561 if ($this->getOutputMode() === "preview") {
562 return $this->renderSkillsTeaser($a_user_id, $a_skills_id);
563 }
564
565 $user_id = $this->getPageContentUserId($a_user_id);
566
567 $gui = new ilPersonalSkillsGUI();
568 if ($this->getOutputMode() === "offline") {
569 $gui->setOfflineMode("./files/");
570 }
571 return $gui->getSkillHTML($a_skills_id, $user_id);
572 }
573
574 protected function renderSkillsTeaser(
575 int $a_user_id,
576 int $a_skills_id
577 ): string {
578 // not used
579 // $user_id = $this->getPageContentUserId($a_user_id);
580
581 return $this->renderTeaser("skills", $this->lng->txt("skills") . ' "' .
582 ilSkillTreeNode::_lookupTitle($a_skills_id) . '"');
583 }
584
586 int $a_user_id,
587 string $a_mode,
588 ?array $a_group_ids = null
589 ): string {
590 // not used
591 // $user_id = $this->getPageContentUserId($a_user_id);
592 if ($a_mode === "auto") {
593 $mode = $this->lng->txt("cont_cach_mode_automatic");
594 $groups = null;
595 } else {
596 $mode = $this->lng->txt("cont_cach_mode_manual");
597
598 $groups = array();
599 foreach ($a_group_ids as $grp_id) {
600 $groups[] = ilConsultationHourGroups::lookupTitle($grp_id);
601 }
602 $groups = " (" . implode(", ", $groups) . ")";
603 }
604
605 $this->lng->loadLanguageModule("dateplaner");
606 return $this->renderTeaser(
607 "consultation_hours",
608 $this->lng->txt("app_consultation_hours"),
609 $mode . $groups
610 );
611 }
612
613 protected function renderConsultationHours(
614 int $a_user_id,
615 string $a_mode,
616 ?array $a_group_ids = null
617 ): string {
618 $ilUser = $this->user;
619 if ($this->getOutputMode() === "preview") {
620 return $this->renderConsultationHoursTeaser($a_user_id, $a_mode, $a_group_ids);
621 }
622
623 if ($this->getOutputMode() === "offline") {
624 return "";
625 }
626
627 if ($this->getOutputMode() === "print") {
628 return "";
629 }
630
631 $user_id = $this->getPageContentUserId($a_user_id);
632
633 // only if not owner
634 $bkid = 0;
635 if ($ilUser->getId() !== $user_id) {
636 $bkid = $user_id;
637 }
638 $this->ctrl->setParameter($this, "chuid", $user_id);
639
640 if ($a_mode !== "manual") {
641 $a_group_ids = null;
642 }
643 ilCalendarCategories::_getInstance()->setCHUserId($user_id);
644 if (!self::$calender_initialized) {
647 0,
648 true
649 );
650 self::$calender_initialized = true;
651 }
652
653 $seed = $this->port_request->getCalendarSeed();
654 if ($seed === "") {
655 $seed = new ilDate(time(), IL_CAL_UNIX);
656 } else {
657 $seed = new ilDate($seed, IL_CAL_DATE);
658 }
659
660 $month_gui = new ilCalendarMonthGUI($seed);
661 if ($bkid > 0) {
662 $month_gui->setBkId($bkid);
663 }
664 $month_gui->setConsulationHoursUserId($user_id);
665
666 // custom schedule filter: handle booking group ids
667 $filter = new ilCalendarScheduleFilterBookings($user_id, $a_group_ids);
668 $month_gui->addScheduleFilter($filter);
669
670 $this->tpl->addCss(ilUtil::getStyleSheetLocation('filesystem', 'delos.css', 'Services/Calendar'));
671
672 $this->lng->loadLanguageModule("dateplaner");
673 return '<h3>' . $this->lng->txt("app_consultation_hours") . '</h3>' .
674 $this->ctrl->getHTML($month_gui);
675 }
676
677 protected function isMyCoursesActive(): bool
678 {
679 $prfa_set = new ilSetting("prfa");
680 return (bool) $prfa_set->get("mycrs", true);
681 }
682
683 protected function renderMyCoursesTeaser(
684 int $a_user_id,
685 $a_default_sorting
686 ): string {
687 // not used
688 // $user_id = $this->getPageContentUserId($a_user_id);
689
690 $title = $this->isMyCoursesActive()
691 ? "my_courses"
692 : "my_courses_inactive";
693
694 return $this->renderTeaser(
695 $title,
696 $this->lng->txt("prtf_page_element_my_courses_title")
697 );
698 }
699
700 protected function renderMyCourses(
701 int $a_user_id,
702 string $a_default_sorting
703 ): string {
704 $ilAccess = $this->access;
705 $ilUser = $this->user;
706 $ilCtrl = $this->ctrl;
707
708 if ($this->getOutputMode() === "preview") {
709 return $this->renderMyCoursesTeaser($a_user_id, $a_default_sorting);
710 }
711
712 if (!$this->isMyCoursesActive()) {
713 return "";
714 }
715
716 $img_path = null;
718
719 $user_id = $this->getPageContentUserId($a_user_id);
720
721 // sorting pref
722 $req_sorting = $this->port_request->getCourseSorting();
723 if (in_array($req_sorting, array("alpha", "loc"))) {
724 $ilUser->writePref("prtf_mcrs_sort", $req_sorting);
725 }
726 $sorting = $ilUser->getPref("prtf_mcrs_sort");
727 if (!$sorting) {
728 $sorting = $a_default_sorting;
729 }
730
731 $data = $this->getCoursesOfUser($user_id, ($sorting === "loc"));
732 if (count($data)) {
733 if ($sorting !== "loc") {
734 $data = ilArrayUtil::sortArray($data, "title", "ASC");
735 } else {
736 $data = ilArrayUtil::sortArray($data, "path_sort", "ASC");
737 }
738
739 $tpl = new ilTemplate("tpl.pc_my_courses.html", true, true, "Modules/Portfolio");
740 $tpl->setVariable("TITLE", $this->lng->txt("prtf_page_element_my_courses_title"));
741 $tpl->setVariable("INFO", $this->lng->txt("prtf_page_element_my_courses_info")); // #14464
742
743 $this->lng->loadLanguageModule("trac");
744 $this->lng->loadLanguageModule("crs");
745
746 // sorting
747 if ($this->getOutputMode() !== "print") {
748 $options = array(
749 "alpha" => $this->lng->txt("cont_mycourses_sortorder_alphabetical"),
750 "loc" => $this->lng->txt("cont_mycourses_sortorder_location")
751 );
752 $tpl->setVariable(
753 "SORT_SELECT",
755 $sorting,
756 "srt",
757 $options,
758 false,
759 true,
760 0,
761 "",
762 ["onchange" => "form.submit()"]
763 )
764 );
765 $tpl->setVariable("SORT_FORM", $this->getCourseSortAction($ilCtrl));
766 }
767
768 $old_path = null;
769
770 foreach ($data as $course) {
771 if (($sorting === "loc") && $course["path"] != $old_path) {
772 $tpl->setCurrentBlock("path_bl");
773 $tpl->setVariable("PATH", $course["path"]);
774 $tpl->parseCurrentBlock();
775
776 $old_path = $course["path"];
777 }
778
779 if (isset($course["lp_status"])) {
780 $lp_icon_rendered = $lp_icons->renderIconForStatus($course["lp_status"]);
781
782 $tpl->setCurrentBlock("lp_bl");
783 $tpl->setVariable("LP_ICON", $lp_icon_rendered);
784 $tpl->parseCurrentBlock();
785 }
786
787 $do_links = false;
788 if ($ilUser->getId() !== ANONYMOUS_USER_ID) {
789 $do_links = $ilAccess->checkAccessOfUser($ilUser->getId(), "read", "", $course["ref_id"], "crs") ||
790 ($ilAccess->checkAccessOfUser($ilUser->getId(), "visible", "", $course["ref_id"], "crs") &&
791 $ilAccess->checkAccessOfUser($ilUser->getId(), "join", "", $course["ref_id"], "crs"));
792 }
793
794 if (isset($course["objectives"])) {
795 $loc_settings = ilLOSettings::getInstanceByObjId($course["obj_id"]);
796 $has_initial_test = (bool) $loc_settings->getInitialTest();
797
798 foreach ($course["objectives"] as $objtv) {
799 if ($do_links) {
800 $params = array("oobj" => $objtv["id"]);
801 $url = ilLink::_getLink($course["ref_id"], "crs", $params);
802
803 // #15510
804 $url .= "#objtv_acc_" . $objtv["id"];
805
806 if ($this->getOutputMode() !== "print") {
807 $tpl->touchBlock("objective_dnone");
808 }
809
810 $tpl->setCurrentBlock("objective_link_bl");
811
812 if (trim($objtv["desc"])) {
813 $desc = nl2br($objtv["desc"]);
814 $tt_id = "objtvtt_" . $objtv["id"] . "_" . (self::$initialized);
815
816 ilTooltipGUI::addTooltip($tt_id, $desc, "", "bottom center", "top center", false);
817
818 $tpl->setVariable("OBJECTIVE_LINK_ID", $tt_id);
819 }
820
821 $tpl->setVariable("OBJECTIVE_LINK_URL", $url);
822 $tpl->setVariable("OBJECTIVE_LINK_TITLE", $objtv["title"]);
823 } else {
824 $tpl->setCurrentBlock("objective_nolink_bl");
825 $tpl->setVariable("OBJECTIVE_NOLINK_TITLE", $objtv["title"]);
826 }
827 $tpl->parseCurrentBlock();
828
829 $objtv_icon = ilObject::_getIcon($objtv["id"], 'big', "lobj");
830 if ($img_path) {
831 $objtv_icon = $img_path . basename($objtv_icon);
832 }
833
834 $tpl->setCurrentBlock("objective_bl");
835 $tpl->setVariable("OBJTV_ICON_URL", $objtv_icon);
836 $tpl->setVariable("OBJTV_ICON_ALT", $this->lng->txt("crs_objectives"));
837
838 if (isset($objtv["type"])) {
839 $tpl->setVariable(
840 "LP_OBJTV_PROGRESS",
842 $has_initial_test,
843 $objtv["id"],
844 $objtv,
845 true,
846 false,
847 self::$initialized
848 )
849 );
850 }
851
852 $tpl->parseCurrentBlock();
853 }
854
855 $tpl->setCurrentBlock("objectives_bl");
856 $tpl->setVariable("OBJTV_LIST_CRS_ID", $course["obj_id"]);
857 $tpl->parseCurrentBlock();
858 }
859
860 // always check against current user
861 if ($do_links) {
862 $tpl->setCurrentBlock("course_link_bl");
863 $tpl->setVariable("COURSE_LINK_TITLE", $course["title"]);
864 $tpl->setVariable("COURSE_LINK_URL", ilLink::_getLink($course["ref_id"]));
865 } else {
866 $tpl->setCurrentBlock("course_nolink_bl");
867 $tpl->setVariable("COURSE_NOLINK_TITLE", $course["title"]);
868 }
869 $tpl->parseCurrentBlock();
870
871 $crs_icon = ilObject::_getIcon($course["obj_id"], 'small', 'crs');
872 if ($img_path) {
873 $crs_icon = $img_path . basename($crs_icon);
874 }
875
876 $tpl->setCurrentBlock("course_bl");
877
878 if (isset($course["objectives"])) {
879 $tpl->setVariable("TOGGLE_CLASS", "ilPCMyCoursesToggle");
880 } else {
881 $tpl->setVariable("NO_TOGGLE", ' style="visibility:hidden;"');
882 }
883
884 $tpl->setVariable("CRS_ICON_URL", $crs_icon);
885 $tpl->setVariable("CRS_ICON_ALT", $this->lng->txt("obj_crs"));
886 $tpl->parseCurrentBlock();
887 }
888
889 // #15508
890 if (!self::$initialized) {
891 $GLOBALS["tpl"]->addJavaScript("Modules/Portfolio/js/ilPortfolio.js");
892 $GLOBALS["tpl"]->addOnLoadCode("ilPortfolio.init()");
893 }
894 self::$initialized++;
895
896 return $tpl->get();
897 }
898 return "";
899 }
900
904 protected function getCourseSortAction(ilCtrl $ctrl): string
905 {
906 return $ctrl->getFormActionByClass("ilobjportfoliogui", "preview");
907 }
908
909 protected function getCoursesOfUser(
910 int $a_user_id,
911 bool $a_add_path = false
912 ): array {
913 $tree = $this->tree;
914
915 // see ilPDSelectedItemsBlockGUI
916
917 $items = ilParticipants::_getMembershipByType($a_user_id, ['crs']);
918
919 $repo_title = $tree->getNodeData(ROOT_FOLDER_ID);
920 $repo_title = $repo_title["title"];
921 if ($repo_title == "ILIAS") {
922 $repo_title = $this->lng->txt("repository");
923 }
924
925 $references = $lp_obj_refs = array();
926 foreach ($items as $obj_id) {
928 if (is_array($ref_id) && count($ref_id)) {
929 $ref_id = array_pop($ref_id);
930 if (!$tree->isDeleted($ref_id)) {
931 $visible = false;
932 $active = ilObjCourseAccess::_isActivated($obj_id, $visible, false);
933 if ($active && $visible) {
934 $references[$ref_id] = array(
935 'ref_id' => $ref_id,
936 'obj_id' => $obj_id,
937 'title' => ilObject::_lookupTitle($obj_id)
938 );
939
940 if ($a_add_path) {
941 $path = array();
942 foreach ($tree->getPathFull($ref_id) as $item) {
943 $path[] = $item["title"];
944 }
945 // top level comes first
946 if (count($path) === 2) {
947 $path[0] = 0;
948 } else {
949 $path[0] = 1;
950 }
951 $references[$ref_id]["path_sort"] = implode("__", $path);
952 array_shift($path);
953 array_pop($path);
954 if (!count($path)) {
955 array_unshift($path, $repo_title);
956 }
957 $references[$ref_id]["path"] = implode(" &rsaquo; ", $path);
958 }
959
960 $lp_obj_refs[$obj_id] = $ref_id;
961 }
962 }
963 }
964 }
965
966 // get lp data for valid courses
967
968 if (count($lp_obj_refs)) {
969 // listing the objectives should NOT depend on any LP status / setting
970 foreach ($lp_obj_refs as $obj_id => $ref_id) {
971 // only if set in DB (default mode is not relevant
973 $references[$ref_id]["objectives"] = $this->parseObjectives($obj_id, $a_user_id);
974 }
975 }
976
977 // LP must be active, personal and not anonymized
981 // see ilLPProgressTableGUI
982 $lp_data = ilTrQuery::getObjectsStatusForUser($a_user_id, $lp_obj_refs);
983 foreach ($lp_data as $item) {
984 $ref_id = $item["ref_ids"];
985 $references[$ref_id]["lp_status"] = $item["status"];
986 }
987 }
988 }
989
990 return $references;
991 }
992
993 protected function parseObjectives(
994 int $a_obj_id,
995 int $a_user_id
996 ): array {
997 $res = array();
998
999 // we need the collection for the correct order
1001 $coll_objtv = $coll_objtv->getItems();
1002 if ($coll_objtv) {
1003 // #13373
1004 $lo_results = $this->parseLOUserResults($a_obj_id, $a_user_id);
1005
1006 $lo_ass = ilLOTestAssignments::getInstance($a_obj_id);
1007
1008 $tmp = array();
1009
1010 foreach ($coll_objtv as $objective_id) {
1012 $title = ilCourseObjective::lookupObjectiveTitle($objective_id, true);
1013
1014 $tmp[$objective_id] = array(
1015 "id" => $objective_id,
1016 "title" => $title["title"],
1017 "desc" => $title["description"],
1018 "itest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_INITIAL),
1019 "qtest" => $lo_ass->getTestByObjective($objective_id, ilLOSettings::TYPE_TEST_QUALIFIED)
1020 );
1021
1022 if (array_key_exists($objective_id, $lo_results)) {
1023 $lo_result = $lo_results[$objective_id];
1024 $tmp[$objective_id]["user_id"] = $lo_result["user_id"];
1025 $tmp[$objective_id]["result_perc"] = $lo_result["result_perc"] ?? null;
1026 $tmp[$objective_id]["limit_perc"] = $lo_result["limit_perc"] ?? null;
1027 $tmp[$objective_id]["status"] = $lo_result["status"] ?? null;
1028 $tmp[$objective_id]["type"] = $lo_result["type"] ?? null;
1029 $tmp[$objective_id]["initial"] = $lo_result["initial"] ?? null;
1030 }
1031 }
1032
1033 // order
1034 foreach ($coll_objtv as $objtv_id) {
1035 $res[] = $tmp[$objtv_id];
1036 }
1037 }
1038
1039 return $res;
1040 }
1041
1042 // see ilContainerObjectiveGUI::parseLOUserResults()
1043 protected function parseLOUserResults(
1044 int $a_course_obj_id,
1045 int $a_user_id
1046 ): array {
1047 $res = array();
1048 $initial_status = "";
1049
1050 $lur = new ilLOUserResults($a_course_obj_id, $a_user_id);
1051 foreach ($lur->getCourseResultsForUserPresentation() as $objective_id => $types) {
1052 // show either initial or qualified for objective
1053 if (isset($types[ilLOUserResults::TYPE_INITIAL])) {
1054 $initial_status = $types[ilLOUserResults::TYPE_INITIAL]["status"];
1055 }
1056
1057 // qualified test has priority
1058 if (isset($types[ilLOUserResults::TYPE_QUALIFIED])) {
1059 $result = $types[ilLOUserResults::TYPE_QUALIFIED];
1060 $result["type"] = ilLOUserResults::TYPE_QUALIFIED;
1061 $result["initial"] = $types[ilLOUserResults::TYPE_INITIAL] ?? null;
1062 } else {
1063 $result = $types[ilLOUserResults::TYPE_INITIAL];
1064 $result["type"] = ilLOUserResults::TYPE_INITIAL;
1065 }
1066
1067 $result["initial_status"] = $initial_status;
1068
1069 $res[$objective_id] = $result;
1070 }
1071
1072 return $res;
1073 }
1074
1075 public function getExportMaterial(): array
1076 {
1077 return $this->export_material;
1078 }
1079
1080 public function makePlaceHoldersClickable(string $a_html): string
1081 {
1082 $ilCtrl = $this->ctrl;
1083 $lng = $this->lng;
1084 $ilUser = $this->user;
1085
1086 $end = 0;
1087 $start = strpos($a_html, "{{{{{PlaceHolder#");
1088 if (is_int($start)) {
1089 $end = strpos($a_html, "}}}}}", $start);
1090 }
1091 while ($end > 0) {
1092 $param = substr($a_html, $start + 17, $end - $start - 17);
1093 $param = explode("#", $param);
1094
1095 $html = $param[2];
1096 switch ($param[2]) {
1097 case "Text":
1098 $html = $lng->txt("cont_text_placeh");
1099 break;
1100
1101 case "Media":
1102 $html = $lng->txt("cont_media_placeh");
1103 break;
1104
1105 case "Question":
1106 $html = $lng->txt("cont_question_placeh");
1107 break;
1108
1109 case "Verification":
1110 $html = $lng->txt("cont_verification_placeh");
1111 break;
1112 }
1113
1114 // only if not owner
1115 if ($ilUser->getId() === ilObjPortfolio::_lookupOwner($this->portfolio_id)
1116 && $this->getOutputMode() === "presentation") {
1117 switch ($param[2]) {
1118 case "Text":
1119 $ilCtrl->setParameterByClass("ilportfoliopagegui", "prt_id", $this->port_request->getPortfolioId());
1120 $ilCtrl->setParameterByClass("ilportfoliopagegui", "ppage", $this->getId());
1121 $ilCtrl->setParameterByClass("ilportfoliopagegui", "pl_pc_id", $param[0]);
1122 $ilCtrl->setParameterByClass("ilportfoliopagegui", "pl_hier_id", $param[1]);
1123 $href = $ilCtrl->getLinkTargetByClass("ilportfoliopagegui", "insertJSAtPlaceholder");
1124 $html = "<a href='" . $href . "'>" . $html . "</a>";
1125 break;
1126
1127 case "Media":
1128 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "prt_id", $this->port_request->getPortfolioId());
1129 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "ppage", $this->getId());
1130 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "pl_pc_id", $param[0]);
1131 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "pl_hier_id", $param[1]);
1132 $ilCtrl->setParameterByClass("ilpcmediaobjectgui", "subCmd", "insertNew");
1133 $href = $ilCtrl->getLinkTargetByClass(array("ilPortfolioPageGUI", "ilPageEditorGUI", "ilPCPlaceHolderGUI", "ilpcmediaobjectgui"), "insert");
1134 $html = "<a href='" . $href . "'>" . $html . "</a>";
1135 break;
1136
1137 /* see #34170, may need a different change, keep code to monitor
1138 case "Verification":
1139 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "prt_id", $this->port_request->getPortfolioId());
1140 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "ppage", $this->getId());
1141 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "pl_pc_id", $param[0]);
1142 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "pl_hier_id", $param[1]);
1143 $ilCtrl->setParameterByClass("ilPCVerificationGUI", "subCmd", "insertNew");
1144 $href = $ilCtrl->getLinkTargetByClass(array("ilPortfolioPageGUI", "ilPageEditorGUI", "ilPCPlaceHolderGUI", "ilPCVerificationGUI"), "insert");
1145 $html = "<a href='" . $href . "'>" . $html . "</a>";
1146 break;
1147 */
1148 }
1149 }
1150
1151 $h2 = substr($a_html, 0, $start) .
1152 $html .
1153 substr($a_html, $end + 5);
1154 $a_html = $h2;
1155
1156 $start = strpos($a_html, "{{{{{PlaceHolder#", $start + 5);
1157 $end = 0;
1158 if (is_int($start)) {
1159 $end = strpos($a_html, "}}}}}", $start);
1160 }
1161 }
1162 return $a_html;
1163 }
1164
1165 public function getViewPageLink(): string
1166 {
1167 global $DIC;
1168
1169 $ctrl = $DIC->ctrl();
1170
1171 $ctrl->setParameterByClass("ilobjportfoliogui", "user_page", $this->requested_ppage);
1172 return $ctrl->getLinkTargetByClass("ilobjportfoliogui", "preview");
1173 }
1174
1175 public function getViewPageText(): string
1176 {
1177 return $this->lng->txt("preview");
1178 }
1179
1180 public function getPagePermaLink(): string
1181 {
1183 return ilLink::_getStaticLink($pid, "prtf", true, "_" . $this->getId());
1184 }
1185
1187 int $a_id,
1188 ilUserCertificateRepository $userCertificateRepository,
1189 string $url
1190 ): string {
1191 try {
1192 $presentation = $userCertificateRepository->fetchActiveCertificateForPresentation($this->user->getId(), $a_id);
1193 } catch (Exception $e) {
1194 return "";
1195 }
1196 $caption = $this->lng->txt('certificate') . ': ';
1197 $caption .= $this->lng->txt($presentation->getUserCertificate()->getObjType()) . ' ';
1198 $caption .= '"' . $presentation->getObjectTitle() . '"';
1199
1200 return '<div><a href="' . $url . '">' . $caption . '</a></div>';
1201 }
1202
1203 public function getCommentsHTMLExport(): string
1204 {
1205 $notes_gui = new ilNoteGUI(
1206 $this->portfolio_id,
1207 $this->getPageObject()->getId(),
1208 "pfpg"
1209 );
1210 $notes_gui->enablePublicNotes(true);
1211 $notes_gui->setRepositoryMode(false);
1212 $notes_gui->setExportMode();
1213 return $notes_gui->getCommentsHTML();
1214 }
1215
1216 public function finishEditing(): void
1217 {
1218 $this->ctrl->redirectByClass("ilObjPortfolioGUI", "view");
1219 }
1220}
$id
plugin.php for ilComponentBuildPluginInfoObjectiveTest::testAddPlugins
Definition: plugin.php:23
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
const IL_CAL_DATE
const IL_CAL_UNIX
static sortArray(array $array, string $a_array_sortby_key, string $a_array_sortorder="asc", bool $a_numeric=false, bool $a_keep_keys=false)
Class ilBlogPosting GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _getInstance($a_usr_id=0)
get singleton instance
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Calendar schedule filter for consultation hour bookings.
static lookupTitle(int $a_group_id)
Lookup group title.
static buildObjectiveProgressBar(bool $a_has_initial_test, int $a_objective_id, array $a_lo_result, bool $a_list_mode=false, bool $a_sub=false, string $a_tt_suffix=null)
Render progressbar(s) for given objective and result data.
static lookupObjectiveTitle(int $a_objective_id, bool $a_add_description=false)
Class ilCtrl provides processing control methods.
getFormActionByClass( $a_class, string $a_fallback_cmd=null, string $a_anchor=null, bool $is_async=false, bool $has_xml_style=false)
@inheritDoc
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
Class for single dates.
static getInstanceByObjId(int $a_obj_id)
static getInstance(int $a_container_id)
static getInstance(int $variant=ilLPStatusIcons::ICON_VARIANT_DEFAULT, ?\ILIAS\UI\Renderer $renderer=null, ?\ILIAS\UI\Factory $factory=null)
static formSelect( $selected, string $varname, array $options, bool $multiple=false, bool $direct_text=false, int $size=0, string $style_class="", array $attribs=[], bool $disabled=false)
Builds a select form field with options and shows the selected option first.
Notes GUI class.
Class ilObjBlogGUI.
static _isActivated(int $a_obj_id, ?bool &$a_visible_flag=null, bool $a_mind_member_view=true)
GUI class for course verification.
static _lookupViewMode(int $a_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getContentStylePath(int $a_style_id, bool $add_random=true, bool $add_token=true)
get content style path static (to avoid full reading)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
parses the objects.xml it handles the xml-description of all ilias objects
static _lookupType(int $id, bool $reference=false)
static _getIcon(int $obj_id=0, string $size="big", string $type="", bool $offline=false)
Get icon for repository item.
static _lookupOwner(int $obj_id)
Lookup owner user ID for object ID.
static _getAllReferences(int $id)
get all reference ids for object ID
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
static _lookupTitle(int $obj_id)
Class ilPageObjectGUI.
setPresentationTitle(string $a_title="")
setTemplateOutput(bool $a_output=true)
ilGlobalTemplateInterface $tpl
static _getMembershipByType(int $a_usr_id, array $a_type, bool $a_only_member_role=false)
get membership by type Get course or group membership
Personal skills GUI class.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getTabs(string $a_activate="")
renderConsultationHoursTeaser(int $a_user_id, string $a_mode, ?array $a_group_ids=null)
renderVerification(int $a_user_id, string $a_type, int $a_id)
getCourseSortAction(ilCtrl $ctrl)
Get course sort action.
__construct(int $a_portfolio_id, int $a_id=0, int $a_old_nr=0, bool $a_enable_comments=true)
postOutputProcessing(string $a_output)
Finalizing output processing.
renderBlogTeaser(int $a_user_id, int $a_blog_id, array $a_posting_ids=null)
renderMyCoursesTeaser(int $a_user_id, $a_default_sorting)
renderPageElement(string $a_type, string $a_html)
renderBlog(int $a_user_id, int $a_blog_id, array $a_posting_ids=null)
ilObjectDefinition $obj_definition
renderProfile(int $a_user_id, string $a_type, array $a_fields=null)
renderTeaser(string $a_type, string $a_title, string $a_options="")
renderMyCourses(int $a_user_id, string $a_default_sorting)
makePlaceHoldersClickable(string $a_html)
getCoursesOfUser(int $a_user_id, bool $a_add_path=false)
getPageContentUserId(int $a_user_id)
getAdditional()
Get Additonal Information.
setEmbedded(bool $a_value)
Set embedded mode: will suppress tabs.
setAdditional(array $a_additional)
Set Additonal Information.
renderSkillsTeaser(int $a_user_id, int $a_skills_id)
renderConsultationHours(int $a_user_id, string $a_mode, ?array $a_group_ids=null)
showPage()
display content of page
renderSkills(int $a_user_id, int $a_skills_id)
parseLOUserResults(int $a_course_obj_id, int $a_user_id)
ILIAS Portfolio StandardGUIRequest $port_request
createPersistentCertificateUrl(int $a_id, ilUserCertificateRepository $userCertificateRepository, string $url)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static findPortfolioForPage(int $a_page_id)
Get portfolio id of page id.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
special template class to simplify handling of ITX/PEAR
static addTooltip(string $a_el_id, string $a_text, string $a_container="", string $a_my="bottom center", string $a_at="top center", bool $a_use_htmlspecialchars=true)
static getObjectsStatusForUser(int $a_user_id, array $obj_refs)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getPathFull(int $a_endnode_id, int $a_startnode_id=0)
get path from a given startnode to a given endnode if startnode is not given the rootnode is startnod...
isDeleted(int $a_node_id)
This is a wrapper for isSaved() with a more useful name.
getNodeData(int $a_node_id, ?int $a_tree_pk=null)
get all information of a node.
static getStyleSheetLocation(string $mode="output", string $a_css_name="", string $a_css_location="")
get full style sheet file name (path inclusive) of current user
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
if(!file_exists(getcwd() . '/ilias.ini.php'))
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Definition: confirmReg.php:20
const ANONYMOUS_USER_ID
Definition: constants.php:27
const ROOT_FOLDER_ID
Definition: constants.php:32
try
Definition: cron.php:23
return['3gp', '7z', 'ai', 'aif', 'aifc', 'aiff', 'au', 'arw', 'avi', 'backup', 'bak', 'bas', 'bpmn', 'bpmn2', 'bmp', 'bib', 'bibtex', 'bz', 'bz2', 'c', 'c++', 'cc', 'cct', 'cdf', 'cer', 'class', 'cls', 'conf', 'cpp', 'crt', 'crs', 'crw', 'cr2', 'css', 'cst', 'csv', 'cur', 'db', 'dcr', 'des', 'dng', 'doc', 'docx', 'dot', 'dotx', 'dtd', 'dvi', 'el', 'eps', 'epub', 'f', 'f77', 'f90', 'flv', 'for', 'g3', 'gif', 'gl', 'gan', 'ggb', 'gsd', 'gsm', 'gtar', 'gz', 'gzip', 'h', 'hpp', 'htm', 'html', 'htmls', 'ibooks', 'ico', 'ics', 'ini', 'ipynb', 'java', 'jbf', 'jpeg', 'jpg', 'js', 'jsf', 'jso', 'json', 'latex', 'lang', 'less', 'log', 'lsp', 'ltx', 'm1v', 'm2a', 'm2v', 'm3u', 'm4a', 'm4v', 'markdown', 'm', 'mat', 'md', 'mdl', 'mdown', 'mid', 'min', 'midi', 'mobi', 'mod', 'mov', 'movie', 'mp2', 'mp3', 'mp4', 'mpa', 'mpeg', 'mpg', 'mph', 'mpga', 'mpp', 'mpt', 'mpv', 'mpx', 'mv', 'mw', 'mv4', 'nb', 'nbp', 'nef', 'nif', 'niff', 'obj', 'obm', 'odt', 'ods', 'odp', 'odg', 'odf', 'oga', 'ogg', 'ogv', 'old', 'p', 'pas', 'pbm', 'pcl', 'pct', 'pcx', 'pdf', 'pgm', 'pic', 'pict', 'png', 'por', 'pov', 'project', 'properties', 'ppa', 'ppm', 'pps', 'ppsx', 'ppt', 'pptx', 'ppz', 'ps', 'psd', 'pwz', 'qt', 'qtc', 'qti', 'qtif', 'r', 'ra', 'ram', 'rar', 'rast', 'rda', 'rev', 'rexx', 'ris', 'rf', 'rgb', 'rm', 'rmd', 'rmi', 'rmm', 'rmp', 'rt', 'rtf', 'rtx', 'rv', 's', 's3m', 'sav', 'sbs', 'sec', 'sdml', 'sgm', 'sgml', 'smi', 'smil', 'srt', 'sps', 'spv', 'stl', 'svg', 'swa', 'swf', 'swz', 'tar', 'tex', 'texi', 'texinfo', 'text', 'tgz', 'tif', 'tiff', 'ttf', 'txt', 'tmp', 'uvproj', 'vdf', 'vimeo', 'viv', 'vivo', 'vrml', 'vsdx', 'wav', 'webm', 'wmv', 'wmx', 'wmz', 'woff', 'wwd', 'xhtml', 'xif', 'xls', 'xlsx', 'xmind', 'xml', 'xsl', 'xsd', 'zip']
global $DIC
Definition: feed.php:28
$ilUser
Definition: imgupload.php:34
setCurrentBlock(string $part=self::DEFAULT_BLOCK)
Sets the template to the given block.
parseCurrentBlock(string $block_name=self::DEFAULT_BLOCK)
Parses the given block.
setVariable(string $variable, $value='')
Sets the given variable to the given value.
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
Definition: latex.php:41
$ref_id
Definition: ltiauth.php:67
if(! $DIC->user() ->getId()||!ilLTIConsumerAccess::hasCustomProviderCreationAccess()) $params
Definition: ltiregstart.php:33
$path
Definition: ltiservices.php:32
$res
Definition: ltiservices.php:69
$post
Definition: ltitoken.php:49
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$type
$url
$lng
$param
Definition: xapitoken.php:46