4 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
5 include_once(
"./Services/Portfolio/classes/class.ilPortfolioPage.php");
26 function __construct($a_portfolio_id, $a_id = 0, $a_old_nr = 0, $a_enable_comments =
true)
30 $this->portfolio_id = (int)$a_portfolio_id;
31 $this->enable_comments = (bool)$a_enable_comments;
36 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
38 $tpl->setCurrentBlock(
"SyntaxStyle");
39 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
41 $tpl->parseCurrentBlock();
43 $tpl->setCurrentBlock(
"ContentStyle");
44 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
46 $tpl->parseCurrentBlock();
57 if(!$ilSetting->get(
'disable_wsp_certificates'))
70 if($skmg_set->get(
"enable_skmg"))
96 $next_class = $this->ctrl->getNextClass($this);
97 $cmd = $this->ctrl->getCmd();
103 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
106 $blog_node_id = $wsp_tree->lookupNodeId($blog_obj_id);
108 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
110 $blog_gui->disableNotes(!$this->enable_comments);
111 return $ilCtrl->forwardCommand($blog_gui);
113 case "ilpageobjectgui":
116 $page_gui->setPresentationTitle($this->
getPageObject()->getTitle());
117 return $ilCtrl->forwardCommand($page_gui);
175 $this->embedded = (bool)$a_value;
185 $this->additional = $a_additional;
201 "Profile" => array(
"0-9",
"a-z",
"a-z_;\W"),
202 "Verification" => array(
"0-9",
"a-z",
"0-9"),
203 "Blog" => array(
"0-9",
"0-9",
"0-9;\W"),
204 "BlogTeaser" => array(
"0-9",
"0-9",
"0-9;\W"),
205 "Skills" => array(
"0-9",
"0-9"),
206 "SkillsTeaser" => array(
"0-9",
"0-9")
209 foreach($parts as $type => $def)
211 $def = implode(
"]+)#([", $def);
212 if(preg_match_all(
"/".$this->pl_start.$type.
"#([".$def.
213 "]+)".$this->pl_end.
"/", $a_output, $blocks))
215 foreach($blocks[0] as $idx => $block)
225 if(trim($blocks[3][$idx]))
227 foreach(explode(
";", $blocks[3][$idx]) as $sub)
231 $subs[] = trim($sub);
235 $snippet = $this->{
"render".$type}($blocks[1][$idx],
236 $blocks[2][$idx], $subs);
240 $snippet = $this->{
"render".$type}($blocks[1][$idx],
241 $blocks[2][$idx], $blocks[3][$idx]);
245 $a_output = str_replace($block, $snippet, $a_output);
253 protected function renderProfile($a_user_id, $a_type, array $a_fields = null)
257 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
259 $pub_profile->setEmbedded(
true, ($this->
getOutputMode() ==
"offline"));
264 if($a_type ==
"manual" &&
sizeof($a_fields))
266 foreach($a_fields as $field)
268 $field = trim($field);
271 $prefs[
"public_".$field] =
"y";
275 $pub_profile->setCustomPrefs($prefs);
280 return $ilCtrl->getHTML($pub_profile);
284 return $pub_profile->getEmbeddable();
290 global $objDefinition;
292 $class =
"ilObj".$objDefinition->getClassName($a_type).
"GUI";
293 include_once $objDefinition->getLocation($a_type).
"/class.".$class.
".php";
297 $this->ctrl->setParameter($this,
"dlid", $a_id);
298 $url = $this->ctrl->getLinkTarget($this,
"dl".$a_type);
299 $this->ctrl->setParameter($this,
"dlid",
"");
301 return $verification->render(
true, $url);
309 include_once
"Modules/Test/classes/class.ilObjTestVerificationGUI.php";
311 $verification->downloadFromPortfolioPage($this->
getPageObject());
320 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
322 $verification->downloadFromPortfolioPage($this->
getPageObject());
326 protected function renderBlog($a_user_id, $a_blog_id, array $a_posting_ids = null)
335 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
337 $blog->disableNotes(!$this->enable_comments);
341 return $ilCtrl->getHTML($blog);
353 include_once
"Modules/Blog/classes/class.ilObjBlog.php";
356 include_once
"Modules/Blog/classes/class.ilBlogPostingGUI.php";
357 foreach($a_posting_ids as $post)
366 $page->setOutputMode(
"offline");
368 $html[] = $page->showPage();
371 return implode(
"\n", $html);
382 $postings = array(
"<ul>");
383 include_once
"Modules/Blog/classes/class.ilBlogPosting.php";
384 foreach($a_posting_ids as $post)
387 $postings[] =
"<li>".$post->getTitle().
" - ".
390 $postings[] =
"</ul>";
391 $postings = implode(
"\n", $postings);
394 return "<div style=\"margin:5px\">".$lng->txt(
"obj_blog").
": \"".
400 include_once
"Services/Skill/classes/class.ilPersonalSkillsGUI.php";
404 $gui->setOfflineMode(
"./files/");
406 $html = $gui->getSkillHTML($a_skills_id, $a_user_id);
410 $js = $gui->getTooltipsJs();
413 $this->js_onload_code = array_merge($this->js_onload_code, $js);
424 include_once
"Services/Skill/classes/class.ilSkillTreeNode.php";
426 return "<div style=\"margin:5px\">".$lng->txt(
"skills").
": \"".