4 include_once(
"./Services/COPage/classes/class.ilPageObjectGUI.php");
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/Content/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 $blog_gui->prtf_embed =
true;
89 return $ilCtrl->forwardCommand($blog_gui);
91 case "ilcalendarmonthgui":
95 include_once(
'./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
97 return $ilCtrl->forwardCommand($month_gui);
102 $ilCtrl->setParameter($this,
"cmd",
"preview");
103 return self::EMBEDDED_NO_OUTPUT;
106 case "ilpageobjectgui":
107 die(
"Deprecated. ilPortfolioPage gui forwarding to ilpageobject");
112 return parent::executeCommand();
154 parent::getTabs($a_activate);
165 $this->embedded = (bool)$a_value;
175 $this->additional = $a_additional;
196 "Profile" =>
array(
"0-9",
"a-z",
"0-9a-z_;\W"),
197 "Verification" =>
array(
"0-9",
"a-z",
"0-9"),
198 "Blog" =>
array(
"0-9",
"0-9",
"0-9;\W"),
199 "BlogTeaser" =>
array(
"0-9",
"0-9",
"0-9;\W"),
200 "Skills" =>
array(
"0-9",
"0-9"),
201 "SkillsTeaser" =>
array(
"0-9",
"0-9"),
202 "ConsultationHours" =>
array(
"0-9",
"a-z",
"0-9;\W"),
203 "ConsultationHoursTeaser" =>
array(
"0-9",
"a-z",
"0-9;\W"),
204 "MyCourses" =>
array(
"0-9",
"a-z*"),
205 "MyCoursesTeaser" =>
array(
"0-9",
"a-z*")
208 foreach($parts as $type => $def)
211 $def_parts =
array();
212 foreach($def as $part)
214 $is_opt = (substr($part, -1) ==
"*");
224 $part = substr($part, 0, -1);
226 $def_parts[] =
"([".$part.
"]".$end_marker.
")";
228 $def = implode(
"", $def_parts);
231 "/".$this->pl_start.$type.$def.$this->pl_end.
"/",
234 foreach($blocks[0] as $idx => $block)
243 case "ConsultationHours":
244 case "ConsultationHoursTeaser":
246 case "MyCoursesTeaser":
248 if(trim($blocks[3][$idx]))
250 foreach(explode(
";", $blocks[3][$idx]) as $sub)
254 $subs[] = trim($sub);
258 $snippet = $this->{
"render".$type}($blocks[1][$idx],
259 $blocks[2][$idx], $subs);
263 $snippet = $this->{
"render".$type}($blocks[1][$idx],
264 $blocks[2][$idx], $blocks[3][$idx]);
269 $a_output = str_replace($block, $snippet, $a_output);
279 return trim($a_html);
287 $options =
'<div class="il_Footer">'.$this->lng->txt(
"prtf_page_element_teaser_settings").
288 ": ".$a_options.
'</div>';
291 return '<div style="margin:5px" class="ilBox"><h3>'.$a_title.
'</h3>'.
292 '<div class="il_Description_no_margin">'.$this->lng->txt(
"prtf_page_element_teaser_".
$a_type).
'</div>'.
306 $this->export_material[
"js"][] =
"http://maps.google.com/maps/api/js?sensor=false";
307 $this->export_material[
"js"][] =
"./Services/Maps/js/ServiceGoogleMaps.js";
308 $this->export_material[
"js"][] =
"./Services/Maps/js/OpenLayers.js";
309 $this->export_material[
"js"][] =
"./Services/Maps/js/ServiceOpenLayers.js";
312 include_once(
"./Services/User/classes/class.ilPublicUserProfileGUI.php");
314 $pub_profile->setEmbedded(
true, ($this->
getOutputMode() ==
"offline"));
319 if(
$a_type ==
"manual" &&
sizeof($a_fields))
322 foreach($a_fields as $field)
324 $field = trim($field);
327 $prefs[
"public_".$field] =
"y";
331 $pub_profile->setCustomPrefs($prefs);
336 return $ilCtrl->getHTML($pub_profile);
340 return $pub_profile->getEmbeddable();
346 global $objDefinition;
351 $class =
"ilObj".$objDefinition->getClassName(
$a_type).
"GUI";
352 include_once $objDefinition->getLocation(
$a_type).
"/class.".$class.
".php";
358 $this->ctrl->setParameter($this,
"dlid", $a_id);
359 $url = $this->ctrl->getLinkTarget($this,
"dl".
$a_type);
360 $this->ctrl->setParameter($this,
"dlid",
"");
364 $file = $verification->object->getFilePath();
367 $this->export_material[
"files"][] =
$file;
370 return $verification->render(
true,
$url);
378 include_once
"Modules/Test/classes/class.ilObjTestVerificationGUI.php";
380 $verification->downloadFromPortfolioPage($this->
getPageObject());
389 include_once
"Modules/Exercise/classes/class.ilObjExerciseVerificationGUI.php";
391 $verification->downloadFromPortfolioPage($this->
getPageObject());
400 include_once
"Modules/Course/classes/Verification/class.ilObjCourseVerificationGUI.php";
402 $verification->downloadFromPortfolioPage($this->
getPageObject());
411 include_once
"Modules/ScormAicc/classes/Verification/class.ilObjSCORMVerificationGUI.php";
413 $verification->downloadFromPortfolioPage($this->
getPageObject());
427 include_once
"Modules/Blog/classes/class.ilObjBlogGUI.php";
429 $blog->disableNotes(!$this->enable_comments);
430 $blog->setContentStyleSheet();
434 return $ilCtrl->getHTML($blog);
446 include_once
"Modules/Blog/classes/class.ilObjBlog.php";
449 include_once
"Modules/Blog/classes/class.ilBlogPostingGUI.php";
450 foreach($a_posting_ids as $post)
459 $page->setOutputMode(
"offline");
461 $html[] = $page->showPage();
464 return implode(
"\n",
$html);
476 $postings =
array(
"<ul>");
477 include_once
"Modules/Blog/classes/class.ilBlogPosting.php";
478 foreach($a_posting_ids as $post)
481 $postings[] =
"<li>".$post->getTitle().
" - ".
484 $postings[] =
"</ul>";
485 $postings = implode(
"\n", $postings);
488 return $this->
renderTeaser(
"blog", $this->lng->txt(
"obj_blog").
' "'.
501 include_once
"Services/Skill/classes/class.ilPersonalSkillsGUI.php";
505 $gui->setOfflineMode(
"./files/");
507 $html = $gui->getSkillHTML($a_skills_id, $user_id);
511 $js = $gui->getTooltipsJs();
514 $this->js_onload_code = array_merge($this->js_onload_code,
$js);
526 include_once
"Services/Skill/classes/class.ilSkillTreeNode.php";
528 return $this->
renderTeaser(
"skills", $this->lng->txt(
"skills").
' "'.
537 if($a_mode ==
"auto")
539 $mode = $this->lng->txt(
"cont_cach_mode_automatic");
544 $mode = $this->lng->txt(
"cont_cach_mode_manual");
546 include_once
"Services/Calendar/classes/ConsultationHours/class.ilConsultationHourGroups.php";
548 foreach($a_group_ids as $grp_id)
552 $groups =
" (".implode(
", ", $groups).
")";
555 $this->lng->loadLanguageModule(
"dateplaner");
557 $this->lng->txt(
"app_consultation_hours"), $mode.$groups);
577 if($ilUser->getId() != $user_id)
579 $_GET[
"bkid"] = $user_id;
582 if($a_mode !=
"manual")
587 include_once(
'./Services/Calendar/classes/class.ilCalendarCategories.php');
591 if(!$_REQUEST[
"seed"])
600 include_once(
'./Services/Calendar/classes/class.ilCalendarMonthGUI.php');
604 include_once(
'./Services/Calendar/classes/class.ilCalendarScheduleFilterBookings.php');
606 $month_gui->addScheduleFilter($filter);
610 $this->lng->loadLanguageModule(
"dateplaner");
611 return '<h3>'.$this->lng->txt(
"app_consultation_hours").
'</h3>'.
612 $this->ctrl->getHTML($month_gui);
618 return (
bool)$prfa_set->get(
"mycrs",
true);
628 :
"my_courses_inactive";
631 $this->lng->txt(
"prtf_page_element_my_courses_title"));
651 $this->export_material[
"images"][] =
"./templates/default/images/icon_crs.svg";
652 $this->export_material[
"images"][] =
"./templates/default/images/icon_lobj.svg";
653 $this->export_material[
"images"][] =
"./templates/default/images/scorm/complete.svg";
654 $this->export_material[
"images"][] =
"./templates/default/images/scorm/not_attempted.svg";
655 $this->export_material[
"images"][] =
"./templates/default/images/scorm/failed.svg";
656 $this->export_material[
"images"][] =
"./templates/default/images/scorm/incomplete.svg";
658 $img_path =
"images/";
667 $ilUser->writePref(
"prtf_mcrs_sort",
$_POST[
"srt"]);
669 $sorting = $ilUser->getPref(
"prtf_mcrs_sort");
672 $sorting = $a_default_sorting;
678 if($sorting !=
"loc")
687 $tpl =
new ilTemplate(
"tpl.pc_my_courses.html",
true,
true,
"Modules/Portfolio");
688 $tpl->setVariable(
"TITLE", $this->lng->txt(
"prtf_page_element_my_courses_title"));
689 $tpl->setVariable(
"INFO", $this->lng->txt(
"prtf_page_element_my_courses_info"));
691 include_once(
"./Services/Tracking/classes/class.ilLearningProgressBaseGUI.php");
692 $this->lng->loadLanguageModule(
"trac");
693 $this->lng->loadLanguageModule(
"crs");
695 include_once(
"./Services/Container/classes/class.ilContainerObjectiveGUI.php");
696 include_once(
"./Services/Link/classes/class.ilLink.php");
700 "alpha" => $this->lng->txt(
"cont_mycourses_sortorder_alphabetical"),
701 "loc" => $this->lng->txt(
"cont_mycourses_sortorder_location")
704 array(
"onchange"=>
"form.submit()")));
710 foreach(
$data as $course)
712 if($sorting ==
"loc")
714 if($course[
"path"] != $old_path)
716 $tpl->setCurrentBlock(
"path_bl");
717 $tpl->setVariable(
"PATH", $course[
"path"]);
718 $tpl->parseCurrentBlock();
720 $old_path = $course[
"path"];
724 if(isset($course[
"lp_status"]))
731 $lp_icon = $img_path.basename($lp_icon);
734 $tpl->setCurrentBlock(
"lp_bl");
735 $tpl->setVariable(
"LP_ICON_URL", $lp_icon);
736 $tpl->setVariable(
"LP_ICON_ALT", $lp_alt);
737 $tpl->parseCurrentBlock();
741 if($ilUser->getId() != ANONYMOUS_USER_ID)
743 $do_links = $ilAccess->checkAccessOfUser($ilUser->getId(),
"read",
"", $course[
"ref_id"],
"crs") ||
744 ($ilAccess->checkAccessOfUser($ilUser->getId(),
"visible",
"", $course[
"ref_id"],
"crs") &&
745 $ilAccess->checkAccessOfUser($ilUser->getId(),
"join",
"", $course[
"ref_id"],
"crs"));
748 if(isset($course[
"objectives"]))
750 include_once
'./Modules/Course/classes/Objectives/class.ilLOSettings.php';
752 $has_initial_test = (bool)$loc_settings->getInitialTest();
754 foreach($course[
"objectives"] as $objtv)
762 $url .=
"#objtv_acc_".$objtv[
"id"];
764 $tpl->setCurrentBlock(
"objective_link_bl");
766 if(trim($objtv[
"desc"]))
768 $desc = nl2br($objtv[
"desc"]);
769 $tt_id =
"objtvtt_".$objtv[
"id"].
"_".((int)self::$initialized);
771 include_once
"Services/UIComponent/Tooltip/classes/class.ilTooltipGUI.php";
772 ilToolTipGUI::addTooltip($tt_id, $desc,
"",
"bottom center",
"top center",
false);
774 $tpl->setVariable(
"OBJECTIVE_LINK_ID", $tt_id);
777 $tpl->setVariable(
"OBJECTIVE_LINK_URL",
$url);
778 $tpl->setVariable(
"OBJECTIVE_LINK_TITLE", $objtv[
"title"]);
779 $tpl->parseCurrentBlock();
783 $tpl->setCurrentBlock(
"objective_nolink_bl");
784 $tpl->setVariable(
"OBJECTIVE_NOLINK_TITLE", $objtv[
"title"]);
785 $tpl->parseCurrentBlock();
791 $objtv_icon = $img_path.basename($objtv_icon);
794 $tpl->setCurrentBlock(
"objective_bl");
795 $tpl->setVariable(
"OBJTV_ICON_URL", $objtv_icon);
796 $tpl->setVariable(
"OBJTV_ICON_ALT", $this->lng->txt(
"crs_objectives"));
800 $tpl->setVariable(
"LP_OBJTV_PROGRESS",
804 $tpl->parseCurrentBlock();
807 $tpl->setCurrentBlock(
"objectives_bl");
808 $tpl->setVariable(
"OBJTV_LIST_CRS_ID", $course[
"obj_id"]);
809 $tpl->parseCurrentBlock();
815 $tpl->setCurrentBlock(
"course_link_bl");
816 $tpl->setVariable(
"COURSE_LINK_TITLE", $course[
"title"]);
818 $tpl->parseCurrentBlock();
822 $tpl->setCurrentBlock(
"course_nolink_bl");
823 $tpl->setVariable(
"COURSE_NOLINK_TITLE", $course[
"title"]);
824 $tpl->parseCurrentBlock();
830 $crs_icon = $img_path.basename($crs_icon);
833 $tpl->setCurrentBlock(
"course_bl");
835 if(isset($course[
"objectives"]))
837 $tpl->setVariable(
"TOGGLE_CLASS",
"ilPCMyCoursesToggle");
841 $tpl->setVariable(
"NO_TOGGLE",
' style="visibility:hidden;"');
844 $tpl->setVariable(
"CRS_ICON_URL", $crs_icon);
845 $tpl->setVariable(
"CRS_ICON_ALT", $this->lng->txt(
"obj_crs"));
846 $tpl->parseCurrentBlock();
850 if(!self::$initialized)
852 $GLOBALS[
"tpl"]->addJavaScript(
"Modules/Portfolio/js/ilPortfolio.js");
853 $GLOBALS[
"tpl"]->addOnLoadCode(
"ilPortfolio.init()");
855 self::$initialized++;
869 return $ctrl->getFormActionByClass(
"ilobjportfoliogui",
"preview");
879 include_once
'Modules/Course/classes/class.ilObjCourseAccess.php';
880 include_once
'Services/Membership/classes/class.ilParticipants.php';
883 $repo_title = $tree->getNodeData(ROOT_FOLDER_ID);
884 $repo_title = $repo_title[
"title"];
885 if($repo_title ==
"ILIAS")
887 $repo_title = $this->lng->txt(
"repository");
890 $references = $lp_obj_refs =
array();
891 foreach($items as $obj_id)
901 if($active && $visible)
912 foreach($tree->getPathFull(
$ref_id) as $item)
914 $path[] = $item[
"title"];
917 if(
sizeof(
$path) == 2)
925 $references[
$ref_id][
"path_sort"] = implode(
"__",
$path);
930 array_unshift(
$path, $repo_title);
932 $references[
$ref_id][
"path"] = implode(
" › ",
$path);
935 $lp_obj_refs[$obj_id] =
$ref_id;
943 if(
sizeof($lp_obj_refs))
946 include_once
'Modules/Course/classes/class.ilObjCourse.php';
947 foreach($lp_obj_refs as $obj_id =>
$ref_id)
957 include_once
"Services/Tracking/classes/class.ilObjUserTracking.php";
963 include_once
"Services/Tracking/classes/class.ilTrQuery.php";
964 include_once
"Services/Tracking/classes/class.ilLPStatusFactory.php";
966 foreach($lp_data as $item)
969 $references[
$ref_id][
"lp_status"] = $item[
"status"];
982 include_once
"Services/Tracking/classes/class.ilLPObjSettings.php";
983 include_once
"Services/Tracking/classes/collection/class.ilLPCollectionOfObjectives.php";
985 $coll_objtv = $coll_objtv->getItems();
991 include_once
"Modules/Course/classes/Objectives/class.ilLOTestAssignments.php";
996 include_once
"Modules/Course/classes/class.ilCourseObjective.php";
997 foreach($coll_objtv as $objective_id)
1001 $tmp[$objective_id] =
array(
1002 "id" => $objective_id,
1003 "title" =>
$title[
"title"],
1004 "desc" =>
$title[
"description"],
1009 if(array_key_exists($objective_id, $lo_results))
1011 $lo_result = $lo_results[$objective_id];
1012 $tmp[$objective_id][
"user_id"] = $lo_result[
"user_id"];
1013 $tmp[$objective_id][
"result_perc"] = $lo_result[
"result_perc"];
1014 $tmp[$objective_id][
"limit_perc"] = $lo_result[
"limit_perc"];
1015 $tmp[$objective_id][
"status"] = $lo_result[
"status"];
1016 $tmp[$objective_id][
"type"] = $lo_result[
"type"];
1017 $tmp[$objective_id][
"initial"] = $lo_result[
"initial"];
1022 foreach($coll_objtv as $objtv_id)
1024 $res[] = $tmp[$objtv_id];
1036 include_once
"Modules/Course/classes/Objectives/class.ilLOUserResults.php";
1038 foreach($lur->getCourseResultsForUserPresentation() as $objective_id => $types)
1059 $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 _getImagePathForStatus($a_status)
Get image path for status.
executeCommand()
execute command
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 _getStatusText($a_status, $a_lng=null)
Get status alt text.
static _getMembershipByType($a_usr_id, $a_type, $a_only_member_role=false)
get membership by type Get course or group membership
$GLOBALS['loaded']
Global hash that tracks already loaded includes.
setEmbedded($a_value)
Set embedded mode: will suppress tabs.
static _lookupTitle($a_id)
lookup object title
Portfolio page gui class.
static _lookupViewMode($a_id)
lookup view mode of container
static getObjectsStatusForUser($a_user_id, array $obj_refs)
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)
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
if(!is_dir( $entity_dir)) exit("Fatal Error ([A-Za-z0-9]+)\+" &#(? foreach( $entity_files as $file) $output
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)
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 getSyntaxStylePath()
get syntax style path
static _getInstance($a_usr_id=0)
get singleton instance
Create styles array
The data for the language used.
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.
static getContentStylePath($a_style_id)
get content style path
GUI class for test verification.
renderMyCoursesTeaser($a_user_id, $a_default_sorting)
setAdditional($a_additional)
Set Additonal Information.
renderTeaser($a_type, $a_title, $a_options=null)
renderVerification($a_user_id, $a_type, $a_id)
parseObjectives($a_obj_id, $a_user_id)
const TYPE_TEST_QUALIFIED
Add data(end) time
Method that wraps PHPs time in order to allow simulations with the workflow.
if(!file_exists("$old.txt")) if($old===$new) if(file_exists("$new.txt")) $file
renderPageElement($a_type, $a_html)
getCourseSortAction($ctrl)
Get course sort action.
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)
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)