31 protected \ilLanguage
$lng;
43 bool $include_signature =
false,
44 array $selected_pages = null,
45 bool $include_declaration =
false 54 $this->include_declaration = $include_declaration;
55 $this->port_request = $DIC->portfolio()
66 $c->declaration_of_authorship = $decl;
79 $form = new \ilPropertyFormGUI();
82 if ($this->declaration_of_authorship &&
83 $this->declaration_of_authorship->getForUser($this->user) !==
"") {
84 $cb = new \ilCheckboxInputGUI($this->
lng->txt(
"prtf_decl_authorship"),
"decl_author");
85 $cb->setInfo($this->declaration_of_authorship->getForUser($this->user));
90 $cb = new \ilCheckboxInputGUI($this->
lng->txt(
"prtf_signature"),
"signature");
91 $cb->setInfo($this->
lng->txt(
"prtf_signature_info"));
96 $radg = new \ilRadioGroupInputGUI($lng->txt(
"prtf_print_selection"),
"sel_type");
97 $radg->setValue(
"all_pages");
98 $op2 = new \ilRadioOption($lng->txt(
"prtf_all_pages"),
"all_pages");
99 $radg->addOption($op2);
100 $op3 = new \ilRadioOption($lng->txt(
"prtf_selected_pages"),
"selection");
101 $radg->addOption($op3);
103 $nl = new \ilNestedListInputGUI(
"",
"obj_id");
104 $op3->addSubItem($nl);
106 foreach ($pages as $p) {
125 $lng->txt(
"obj_blog")
128 foreach ($pages2 as $p2) {
142 $form->addItem($radg);
144 $form->addCommandButton(
"showPrintView", $lng->txt(
"exp_show_print_view"));
146 $form->setTitle($lng->txt(
"prtf_print_options"));
147 $form->setFormAction(
148 $ilCtrl->getFormActionByClass(
166 function (
$tpl) use ($resource_injector) {
167 $resource_injector->inject(
$tpl);
184 $cover_tpl = new \ilTemplate(
185 "tpl.prtf_cover.html",
190 foreach ($pages as $page) {
192 if (is_array($this->selected_pages) &&
193 !in_array($page[
"id"], $this->selected_pages)) {
196 $cover_tpl->setCurrentBlock(
"content_item");
197 $cover_tpl->setVariable(
"ITEM_TITLE", $page[
"title"]);
199 $cover_tpl->setCurrentBlock(
"content_item");
202 $cover_tpl->parseCurrentBlock();
205 if ($this->include_signature) {
206 $cover_tpl->setCurrentBlock(
"signature");
207 $cover_tpl->setVariable(
"TXT_SIGNATURE", $lng->txt(
"prtf_signature_date"));
208 $cover_tpl->parseCurrentBlock();
211 if (!is_null($this->declaration_of_authorship) && $this->include_declaration) {
212 $cover_tpl->setCurrentBlock(
"decl_author");
213 $cover_tpl->setVariable(
215 nl2br($this->declaration_of_authorship->getForUser($this->user))
217 $cover_tpl->parseCurrentBlock();
220 $cover_tpl->setVariable(
"PORTFOLIO_TITLE", $this->portfolio->getTitle());
223 $cover_tpl->setVariable(
"TXT_AUTHOR", $lng->txt(
"prtf_author"));
224 $cover_tpl->setVariable(
"TXT_LINK", $lng->txt(
"prtf_link"));
225 $cover_tpl->setVariable(
"TXT_DATE", $lng->txt(
"prtf_date_of_print"));
228 $author_str = $author[
"firstname"] .
" " . $author[
"lastname"];
229 $cover_tpl->setVariable(
"AUTHOR", $author_str);
232 $cover_tpl->setVariable(
"LINK", $href);
236 $cover_tpl->setVariable(
"DATE", $date_str);
238 $print_pages[] = $cover_tpl->get();
240 $page_head_tpl = new \ilTemplate(
"tpl.prtf_page_head.html",
true,
true,
"Modules/Portfolio");
241 $page_head_tpl->setVariable(
"AUTHOR", $author_str);
242 $page_head_tpl->setVariable(
"DATE", $date_str);
243 $page_head_str = $page_head_tpl->get();
245 foreach ($pages as $page) {
247 if (is_array($this->selected_pages) &&
248 !in_array($page[
"id"], $this->selected_pages)) {
252 $page_gui = new \ilPortfolioPageGUI($this->portfolio->getId(), $page[
"id"]);
254 $page_gui->setPresentationTitle($page[
"title"]);
255 $html = $this->
ctrl->getHTML($page_gui);
256 $print_pages[] = $page_head_str . $html;
259 foreach ($pages2 as $p2) {
260 if ($this->port_request->getPrintSelectedType() ===
"selection" &&
261 (!in_array(
"b" . $p2[
"id"], $this->port_request->getObjIds()))) {
264 $page_gui = new \ilBlogPostingGUI(0, null, $p2[
"id"]);
265 $page_gui->setFileDownloadLink(
"#");
266 $page_gui->setFullscreenLink(
"#");
267 $page_gui->setSourcecodeDownloadScript(
"#");
269 $print_pages[] = $page_head_str . $page_gui->showPage(\
ilObject::_lookupTitle($page[
"title"]) .
": " . $page_gui->getBlogPosting()->getTitle());
static getAllPortfolioPages(int $a_portfolio_id)
Get pages of portfolio.
static getAllPostings(int $a_blog_id, int $a_limit=1000, int $a_offset=0)
Get all postings of blog.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
ilObjPortfolio $portfolio
static getImagePath(string $img, string $module_path="", string $mode="output", bool $offline=false)
get image path (for images located in a template directory)
ilPortfolioDeclarationOfAuthorship $declaration_of_authorship
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false)
static _lookupName(int $a_user_id)
lookup user name
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
getOutputMode()
Get output mode.
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...
Injects resources into a template.
static _lookupTitle(int $obj_id)
static _getStaticLink(?int $a_ref_id, string $a_type='', bool $a_fallback_goto=true, string $append="")
Get static link.
Collects all js/css/onload resources necessary for page rendering.
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...
withDeclarationOfAuthorship(\ilPortfolioDeclarationOfAuthorship $decl, \ilObjUser $user)
getSelectionForm()
form which is featured in the modal form target is modified to open in new window (not yet possible w...
__construct(\ilLanguage $lng, \ilCtrl $ctrl, \ilObjPortfolio $portfolio, bool $include_signature=false, array $selected_pages=null, bool $include_declaration=false)
if($DIC->http() ->request() ->getMethod()=="GET" &&isset($DIC->http() ->request() ->getQueryParams()['tex'])) $tpl
static setUseRelativeDates(bool $a_status)
set use relative dates
StandardGUIRequest $port_request