4 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
24 protected $export_material = array(
"js"=>array(),
"images"=>array(),
"files"=>array());
31 function __construct($a_portfolio_id, $a_id = 0, $a_old_nr = 0, $a_enable_comments =
true)
35 $this->portfolio_id = (int)$a_portfolio_id;
36 $this->enable_comments = (bool)$a_enable_comments;
38 parent::__construct($this->
getParentType(), $a_id, $a_old_nr);
42 include_once(
"./Services/Style/classes/class.ilObjStyleSheet.php");
44 $tpl->setCurrentBlock(
"SyntaxStyle");
45 $tpl->setVariable(
"LOCATION_SYNTAX_STYLESHEET",
47 $tpl->parseCurrentBlock();
49 $tpl->setCurrentBlock(
"ContentStyle");
50 $tpl->setVariable(
"LOCATION_CONTENT_STYLESHEET",
52 $tpl->parseCurrentBlock();
73 $next_class = $this->ctrl->getNextClass($this);
74 $cmd = $this->ctrl->getCmd();
80 include_once
"Services/PersonalWorkspace/classes/class.ilWorkspaceTree.php";
83 $blog_node_id = $wsp_tree->lookupNodeId($blog_obj_id);
85 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
87 $blog_gui->disableNotes(!$this->enable_comments);
88 return $ilCtrl->forwardCommand($blog_gui);
90 case "ilcalendarmonthgui":
94 include_once(
'./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
96 return $ilCtrl->forwardCommand($month_gui);
101 $ilCtrl->setParameter($this,
"cmd",
"preview");
102 return self::EMBEDDED_NO_OUTPUT;
105 case "ilpageobjectgui":
106 die(
"Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
111 return parent::executeCommand();
137 $output = parent::showPage();
153 parent::getTabs($a_activate);
164 $this->embedded = (bool)$a_value;
174 $this->additional = $a_additional;
195 "Profile" => array(
"0-9",
"a-z",
"0-9a-z_;\W"),
196 "Verification" => array(
"0-9",
"a-z",
"0-9"),
197 "Blog" => array(
"0-9",
"0-9",
"0-9;\W"),
198 "BlogTeaser" => array(
"0-9",
"0-9",
"0-9;\W"),
199 "Skills" => array(
"0-9",
"0-9"),
200 "SkillsTeaser" => array(
"0-9",
"0-9"),
201 "ConsultationHours" => array(
"0-9",
"a-z",
"0-9;\W"),
202 "ConsultationHoursTeaser" => array(
"0-9",
"a-z",
"0-9;\W"),
203 "MyCourses" => array(
"0-9",
"a-z*"),
204 "MyCoursesTeaser" => array(
"0-9",
"a-z*")
207 foreach($parts as $type => $def)
210 $def_parts = array();
211 foreach($def as $part)
213 $is_opt = (substr($part, -1) ==
"*");
223 $part = substr($part, 0, -1);
225 $def_parts[] =
"([".$part.
"]".$end_marker.
")";
227 $def = implode(
"", $def_parts);
230 "/".$this->pl_start.$type.$def.$this->pl_end.
"/",
233 foreach($blocks[0] as $idx => $block)
242 case "ConsultationHours":
243 case "ConsultationHoursTeaser":
245 case "MyCoursesTeaser":
247 if(trim($blocks[3][$idx]))
249 foreach(explode(
";", $blocks[3][$idx]) as $sub)
253 $subs[] = trim($sub);
257 $snippet = $this->{
"render".$type}($blocks[1][$idx],
258 $blocks[2][$idx], $subs);
262 $snippet = $this->{
"render".$type}($blocks[1][$idx],
263 $blocks[2][$idx], $blocks[3][$idx]);
268 $a_output = str_replace($block, $snippet, $a_output);
278 return trim($a_html);
286 $options =
'<div class="il_Footer">'.$this->lng->txt(
"prtf_page_element_teaser_settings").
287 ": ".$a_options.
'</div>';
290 return '<div style="margin:5px" class="ilBox"><h3>'.$a_title.
'</h3>'.
291 '<div class="il_Description_no_margin">'.$this->lng->txt(
"prtf_page_element_teaser_".$a_type).
'</div>'.
295 protected function renderProfile($a_user_id, $a_type, array $a_fields = null)
305 $this->export_material[
"js"][] =
"http://maps.google.com/maps/api/js?sensor=false";
306 $this->export_material[
"js"][] =
"./Services/Maps/js/ServiceGoogleMaps.js";
307 $this->export_material[
"js"][] =
"./Services/Maps/js/OpenLayers.js";
308 $this->export_material[
"js"][] =
"./Services/Maps/js/ServiceOpenLayers.js";
311 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
313 $pub_profile->setEmbedded(
true, ($this->
getOutputMode() ==
"offline"));
318 if($a_type ==
"manual" &&
sizeof($a_fields))
321 foreach($a_fields as $field)
323 $field = trim($field);
326 $prefs[
"public_".$field] =
"y";
330 $pub_profile->setCustomPrefs($prefs);
335 return $ilCtrl->getHTML($pub_profile);
339 return $pub_profile->getEmbeddable();
345 global $objDefinition;
350 $class =
"ilObj".$objDefinition->getClassName($a_type).
"GUI";
351 include_once $objDefinition->getLocation($a_type).
"/class.".$class.
".php";
357 $this->ctrl->setParameter($this,
"dlid", $a_id);
358 $url = $this->ctrl->getLinkTarget($this,
"dl".$a_type);
359 $this->ctrl->setParameter($this,
"dlid",
"");
363 $file = $verification->object->getFilePath();
366 $this->export_material[
"files"][] =
$file;
369 return $verification->render(
true,
$url);
377 include_once
"Modules/Test/classes/class.ilObjTestVerificationGUI.php";
379 $verification->downloadFromPortfolioPage($this->
getPageObject());
388 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
390 $verification->downloadFromPortfolioPage($this->
getPageObject());
399 include_once
"Modules/Course/classes/Verification/class.ilObjCourseVerificationGUI.php";
401 $verification->downloadFromPortfolioPage($this->
getPageObject());
410 include_once
"Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php";
412 $verification->downloadFromPortfolioPage($this->
getPageObject());
416 protected function renderBlog($a_user_id, $a_blog_id, array $a_posting_ids = null)
426 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
428 $blog->disableNotes(!$this->enable_comments);
429 $blog->setContentStyleSheet();
433 return $ilCtrl->getHTML($blog);
445 include_once
"Modules/Blog/classes/class.ilObjBlog.php";
448 include_once
"Modules/Blog/classes/class.ilBlogPostingGUI.php";
449 foreach($a_posting_ids as $post)
458 $page->setOutputMode(
"offline");
460 $html[] = $page->showPage();
463 return implode(
"\n",
$html);
475 $postings = array(
"<ul>");
476 include_once
"Modules/Blog/classes/class.ilBlogPosting.php";
477 foreach($a_posting_ids as $post)
480 $postings[] =
"<li>".$post->getTitle().
" - ".
483 $postings[] =
"</ul>";
484 $postings = implode(
"\n", $postings);
487 return $this->
renderTeaser(
"blog", $this->lng->txt(
"obj_blog").
' "'.
500 include_once
"Services/Skill/classes/class.ilPersonalSkillsGUI.php";
504 $gui->setOfflineMode(
"./files/");
506 $html = $gui->getSkillHTML($a_skills_id, $user_id);
510 $js = $gui->getTooltipsJs();
513 $this->js_onload_code = array_merge($this->js_onload_code,
$js);
525 include_once
"Services/Skill/classes/class.ilSkillTreeNode.php";
527 return $this->
renderTeaser(
"skills", $this->lng->txt(
"skills").
' "'.
536 if($a_mode ==
"auto")
538 $mode = $this->lng->txt(
"cont_cach_mode_automatic");
543 $mode = $this->lng->txt(
"cont_cach_mode_manual");
545 include_once
"Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php";
547 foreach($a_group_ids as $grp_id)
551 $groups =
" (".implode(
", ", $groups).
")";
554 $this->lng->loadLanguageModule(
"dateplaner");
556 $this->lng->txt(
"app_consultation_hours"), $mode.$groups);
576 if($ilUser->getId() != $user_id)
578 $_GET[
"bkid"] = $user_id;
581 if($a_mode !=
"manual")
586 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
599 include_once(
'./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
603 include_once(
'./Services/Calendar/classes/class.ilCalendarScheduleFilterBookings.php');
605 $month_gui->addScheduleFilter($filter);
609 $this->lng->loadLanguageModule(
"dateplaner");
610 return '<h3>'.$this->lng->txt(
"app_consultation_hours").
'</h3>'.
611 $this->ctrl->getHTML($month_gui);
617 return (
bool)$prfa_set->get(
"mycrs",
true);
627 :
"my_courses_inactive";
630 $this->lng->txt(
"prtf_page_element_my_courses_title"));
650 $this->export_material[
"images"][] =
"./templates/default/images/icon_crs.svg";
651 $this->export_material[
"images"][] =
"./templates/default/images/icon_lobj.svg";
652 $this->export_material[
"images"][] =
"./templates/default/images/scorm/complete.svg";
653 $this->export_material[
"images"][] =
"./templates/default/images/scorm/not_attempted.svg";
654 $this->export_material[
"images"][] =
"./templates/default/images/scorm/failed.svg";
655 $this->export_material[
"images"][] =
"./templates/default/images/scorm/incomplete.svg";
657 $img_path =
"images/";
664 in_array(
$_POST[
"srt"], array(
"alpha",
"loc")))
666 $ilUser->writePref(
"prtf_mcrs_sort",
$_POST[
"srt"]);
668 $sorting = $ilUser->getPref(
"prtf_mcrs_sort");
671 $sorting = $a_default_sorting;
677 if($sorting !=
"loc")
686 $tpl =
new ilTemplate(
"tpl.pc_my_courses.html",
true,
true,
"Modules/Portfolio");
687 $tpl->setVariable(
"TITLE", $this->lng->txt(
"prtf_page_element_my_courses_title"));
688 $tpl->setVariable(
"INFO", $this->lng->txt(
"prtf_page_element_my_courses_info"));
690 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
691 $this->lng->loadLanguageModule(
"trac");
692 $this->lng->loadLanguageModule(
"crs");
694 include_once(
"./Services/Container/classes/class.ilContainerObjectiveGUI.php");
695 include_once(
"./Services/Link/classes/class.ilLink.php");
699 "alpha" => $this->lng->txt(
"cont_mycourses_sortorder_alphabetical"),
700 "loc" => $this->lng->txt(
"cont_mycourses_sortorder_location")
703 array(
"onchange"=>
"form.submit()")));
704 $tpl->setVariable(
"SORT_FORM", $ilCtrl->getFormActionByClass(
"ilobjportfoliogui",
"preview"));
708 foreach(
$data as $course)
710 if($sorting ==
"loc")
712 if($course[
"path"] != $old_path)
714 $tpl->setCurrentBlock(
"path_bl");
715 $tpl->setVariable(
"PATH", $course[
"path"]);
716 $tpl->parseCurrentBlock();
718 $old_path = $course[
"path"];
722 if(isset($course[
"lp_status"]))
729 $lp_icon = $img_path.basename($lp_icon);
732 $tpl->setCurrentBlock(
"lp_bl");
733 $tpl->setVariable(
"LP_ICON_URL", $lp_icon);
734 $tpl->setVariable(
"LP_ICON_ALT", $lp_alt);
735 $tpl->parseCurrentBlock();
739 if($ilUser->getId() != ANONYMOUS_USER_ID)
741 $do_links = $ilAccess->checkAccessOfUser($ilUser->getId(),
"read",
"", $course[
"ref_id"],
"crs") ||
742 ($ilAccess->checkAccessOfUser($ilUser->getId(),
"visible",
"", $course[
"ref_id"],
"crs") &&
743 $ilAccess->checkAccessOfUser($ilUser->getId(),
"join",
"", $course[
"ref_id"],
"crs"));
746 if(isset($course[
"objectives"]))
748 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
750 $has_initial_test = (bool)$loc_settings->getInitialTest();
752 foreach($course[
"objectives"] as $objtv)
756 $params = array(
"oobj"=>$objtv[
"id"]);
760 $url .=
"#objtv_acc_".$objtv[
"id"];
762 $tpl->setCurrentBlock(
"objective_link_bl");
764 if(trim($objtv[
"desc"]))
766 $desc = nl2br($objtv[
"desc"]);
767 $tt_id =
"objtvtt_".$objtv[
"id"].
"_".((int)self::$initialized);
769 include_once
"Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
770 ilToolTipGUI::addTooltip($tt_id, $desc,
"",
"bottom center",
"top center",
false);
772 $tpl->setVariable(
"OBJECTIVE_LINK_ID", $tt_id);
775 $tpl->setVariable(
"OBJECTIVE_LINK_URL",
$url);
776 $tpl->setVariable(
"OBJECTIVE_LINK_TITLE", $objtv[
"title"]);
777 $tpl->parseCurrentBlock();
781 $tpl->setCurrentBlock(
"objective_nolink_bl");
782 $tpl->setVariable(
"OBJECTIVE_NOLINK_TITLE", $objtv[
"title"]);
783 $tpl->parseCurrentBlock();
789 $objtv_icon = $img_path.basename($objtv_icon);
792 $tpl->setCurrentBlock(
"objective_bl");
793 $tpl->setVariable(
"OBJTV_ICON_URL", $objtv_icon);
794 $tpl->setVariable(
"OBJTV_ICON_ALT", $this->lng->txt(
"crs_objectives"));
798 $tpl->setVariable(
"LP_OBJTV_PROGRESS",
802 $tpl->parseCurrentBlock();
805 $tpl->setCurrentBlock(
"objectives_bl");
806 $tpl->setVariable(
"OBJTV_LIST_CRS_ID", $course[
"obj_id"]);
807 $tpl->parseCurrentBlock();
813 $tpl->setCurrentBlock(
"course_link_bl");
814 $tpl->setVariable(
"COURSE_LINK_TITLE", $course[
"title"]);
816 $tpl->parseCurrentBlock();
820 $tpl->setCurrentBlock(
"course_nolink_bl");
821 $tpl->setVariable(
"COURSE_NOLINK_TITLE", $course[
"title"]);
822 $tpl->parseCurrentBlock();
828 $crs_icon = $img_path.basename($crs_icon);
831 $tpl->setCurrentBlock(
"course_bl");
833 if(isset($course[
"objectives"]))
835 $tpl->setVariable(
"TOGGLE_CLASS",
"ilPCMyCoursesToggle");
839 $tpl->setVariable(
"NO_TOGGLE",
' style="visibility:hidden;"');
842 $tpl->setVariable(
"CRS_ICON_URL", $crs_icon);
843 $tpl->setVariable(
"CRS_ICON_ALT", $this->lng->txt(
"obj_crs"));
844 $tpl->parseCurrentBlock();
848 if(!self::$initialized)
850 $GLOBALS[
"tpl"]->addJavaScript(
"Modules/Portfolio/js/ilPortfolio.js");
851 $GLOBALS[
"tpl"]->addOnLoadCode(
"ilPortfolio.init()");
853 self::$initialized++;
865 include_once
'Modules/Course/classes/class.ilObjCourseAccess.php';
866 include_once
'Services/Membership/classes/class.ilParticipants.php';
869 $repo_title = $tree->getNodeData(ROOT_FOLDER_ID);
870 $repo_title = $repo_title[
"title"];
871 if($repo_title ==
"ILIAS")
873 $repo_title = $this->lng->txt(
"repository");
876 $references = $lp_obj_refs = array();
877 foreach($items as $obj_id)
887 if($active && $visible)
898 foreach($tree->getPathFull(
$ref_id) as $item)
900 $path[] = $item[
"title"];
903 if(
sizeof(
$path) == 2)
911 $references[
$ref_id][
"path_sort"] = implode(
"__",
$path);
916 array_unshift(
$path, $repo_title);
918 $references[
$ref_id][
"path"] = implode(
" › ",
$path);
921 $lp_obj_refs[$obj_id] =
$ref_id;
929 if(
sizeof($lp_obj_refs))
932 include_once
'Modules/Course/classes/class.ilObjCourse.php';
933 foreach($lp_obj_refs as $obj_id =>
$ref_id)
943 include_once
"Services/Tracking/classes/class.ilObjUserTracking.php";
949 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
950 include_once
"Services/Tracking/classes/class.ilLPStatusFactory.php";
952 foreach($lp_data as $item)
955 $references[
$ref_id][
"lp_status"] = $item[
"status"];
968 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
969 include_once
"Services/Tracking/classes/collection/class.ilLPCollectionOfObjectives.php";
971 $coll_objtv = $coll_objtv->getItems();
977 include_once
"Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
982 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
983 foreach($coll_objtv as $objective_id)
987 $tmp[$objective_id] = array(
988 "id" => $objective_id,
989 "title" => $title[
"title"],
990 "desc" => $title[
"description"],
995 if(array_key_exists($objective_id, $lo_results))
997 $lo_result = $lo_results[$objective_id];
998 $tmp[$objective_id][
"user_id"] = $lo_result[
"user_id"];
999 $tmp[$objective_id][
"result_perc"] = $lo_result[
"result_perc"];
1000 $tmp[$objective_id][
"limit_perc"] = $lo_result[
"limit_perc"];
1001 $tmp[$objective_id][
"status"] = $lo_result[
"status"];
1002 $tmp[$objective_id][
"type"] = $lo_result[
"type"];
1003 $tmp[$objective_id][
"initial"] = $lo_result[
"initial"];
1008 foreach($coll_objtv as $objtv_id)
1010 $res[] = $tmp[$objtv_id];
1022 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1024 foreach($lur->getCourseResultsForUserPresentation() as $objective_id => $types)
1045 $result[
"initial_status"] = $initial_status;
getCoursesOfUser($a_user_id, $a_add_path=false)
static getInstanceByObjId($a_obj_id)
get singleton instance
static getInstance($a_container_id)
Get instance by container id.
renderBlog($a_user_id, $a_blog_id, array $a_posting_ids=null)
static lookupObjectiveTitle($a_objective_id, $a_add_description=false)
const IL_CRS_VIEW_OBJECTIVE
__construct($a_portfolio_id, $a_id=0, $a_old_nr=0, $a_enable_comments=true)
Constructor.
getPageObject()
Get Page Object.
Calendar schedule filter for consultation hour bookings.
LP collection of objectives.
static _lookupTitle($a_id)
setTemplateOutput($a_output=true)
static lookupTitle($a_group_id)
Lookup group title.
static getStyleSheetLocation($mode="output", $a_css_name="", $a_css_location="")
get full style sheet file name (path inclusive) of current user
static _hasLearningProgressLearner()
renderMyCourses($a_user_id, $a_default_sorting)
getAdditional()
Get Additonal Information.
Class ilBlogPosting GUI class.
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
setEmbedded($a_value)
Set embedded mode: will suppress tabs.
_getImagePathForStatus($a_status)
Get image path for status.
static _lookupTitle($a_id)
lookup object title
Portfolio page gui class.
static getTypeIconPath($a_type, $a_obj_id, $a_size='small')
Get type icon path path Return image path for icon_xxx.pngs Or (if enabled) path to custom icon Depre...
static sortArray($array, $a_array_sortby, $a_array_sortorder=0, $a_numeric=false, $a_keep_keys=false)
sortArray
getPageContentUserId($a_user_id)
getSyntaxStylePath()
get syntax style path
static _getAllReferences($a_id)
get all reference ids of object
Tree handler for personal workspace.
postOutputProcessing($a_output)
Personal skills GUI class.
static _enabledUserRelatedData()
check wether user related tracking is enabled or not
GUI class for course verification.
GUI class for public user profile presentation.
static _enabledLearningProgress()
check wether learing progress is enabled or not
if(!is_array($argv)) $options
getTabs($a_activate="")
Set all tabs.
static formSelect($selected, $varname, $options, $multiple=false, $direct_text=false, $size="0", $style_class="", $attribs="", $disabled=false)
Builds a select form field with options and shows the selected option first.
GUI class for exercise verification.
renderSkills($a_user_id, $a_skills_id)
renderBlogTeaser($a_user_id, $a_blog_id, array $a_posting_ids=null)
_getStatusText($a_status, $a_lng=null)
Get status alt text.
special template class to simplify handling of ITX/PEAR
static formatDate(ilDateTime $date)
Format a date public.
renderSkillsTeaser($a_user_id, $a_skills_id)
setPresentationTitle($a_title="")
const MODE_PORTFOLIO_CONSULTATION
static _getInstance($a_usr_id=0)
get singleton instance
const WORKSPACE_OBJECT_ID
static buildObjectiveProgressBar($a_has_initial_test, $a_objective_id, array $a_lo_result, $a_list_mode=false, $a_sub=false, $a_tt_suffix=null)
Render progressbar(s) for given objective and result data.
static _lookupTitle($a_obj_id, $a_tref_id=0)
Lookup Title.
GUI class for test verification.
renderMyCoursesTeaser($a_user_id, $a_default_sorting)
getContentStylePath($a_style_id)
get content style path
setAdditional($a_additional)
Set Additonal Information.
renderTeaser($a_type, $a_title, $a_options=null)
renderVerification($a_user_id, $a_type, $a_id)
getObjectsStatusForUser($a_user_id, array $obj_refs)
parseObjectives($a_obj_id, $a_user_id)
const TYPE_TEST_QUALIFIED
if($_REQUEST['ilias_path']) define('ILIAS_HTTP_PATH' $_REQUEST['ilias_path']
renderPageElement($a_type, $a_html)
$GLOBALS['PHPCAS_CLIENT']
This global variable is used by the interface class phpCAS.
static _isActivated($a_obj_id, &$a_visible_flag=null, $a_mind_member_view=true)
Is activated?
renderProfile($a_user_id, $a_type, array $a_fields=null)
& executeCommand()
execute command
GUI class for scorm verification.
parseLOUserResults($a_course_obj_id, $a_user_id)
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
renderConsultationHoursTeaser($a_user_id, $a_mode, $a_group_ids)
renderConsultationHours($a_user_id, $a_mode, $a_group_ids)