Class ilObjCourseGUI. More...
Inheritance diagram for ilObjCourseGUI:
Collaboration diagram for ilObjCourseGUI:Public Member Functions | |
| ilObjCourseGUI () | |
| Constructor public. | |
| gatewayObject () | |
| memberGatewayObject () | |
| Gateway for member administration commands. | |
| sendMailToSelectedUsersObject () | |
| cancelMemberObject () | |
| canceledObject is called when operation is canceled, method links back public | |
| createObject () | |
| create new object form | |
| importFileObject () | |
| renderObject () | |
| render the object | |
| viewObject () | |
| list childs of current object | |
| infoScreenObject () | |
| this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed | |
| infoScreen () | |
| show information screen | |
| listStructureObject () | |
| deleteStarterObject () | |
| selectStarterObject () | |
| addStarterObject () | |
| editInfoObject () | |
| Edit info page informations. | |
| confirmDeleteInfoFilesObject () | |
| show info file donfimation table | |
| deleteInfoFilesObject () | |
| Delete info files. | |
| initInfoEditor () | |
| init info editor | |
| updateInfoObject () | |
| updateObject () | |
| updates object entry in object_data | |
| editObject () | |
| edit object | |
| editCourseIconsObject () | |
| edit container icons | |
| sendFileObject () | |
| updateCourseIconsObject () | |
| update container icons | |
| setSubTabs ($a_tab) | |
| set sub tabs | |
| removeSmallIconObject () | |
| remove small icon | |
| removeBigIconObject () | |
| remove big icon | |
| removeTinyIconObject () | |
| remove small icon | |
| saveObject () | |
| save object public | |
| downloadArchivesObject () | |
| __readMemberData ($ids, $role= 'admin') | |
| membersObject () | |
| updateMembersObject () | |
| __renderAdminsTable () | |
| __renderTutorsTable () | |
| __renderMembersTable () | |
| __showWaitingList () | |
| __showSubscribers () | |
| editMemberObject () | |
| updateMemberObject () | |
| assignMembersObject () | |
| addFromWaitingList () | |
| performRemoveFromWaitingListObject () | |
| addSubscribers () | |
| autoFillObject () | |
| deleteSubscribers () | |
| removeFromWaitingList () | |
| unsubscribeObject () | |
| performUnsubscribeObject () | |
| deleteMembersObject () | |
| removeMembersObject () | |
| removeSubscribersObject () | |
| searchUserObject () | |
| __appendToStoredResults ($a_result) | |
| cancelSearchObject () | |
| searchObject () | |
| listUsersGroupObject () | |
| listUsersRoleObject () | |
| getTabs (&$tabs_gui) | |
| common tabs for all container objects (should be called at the end of child getTabs() method | |
| fetchPrintSubscriberData ($a_members) | |
| fetchPrintMemberData ($a_members) | |
| printMembersObject () | |
| membersGalleryObject () | |
| & | __initTableGUI () |
| __setTableGUIBasicData (&$tbl, &$result_set, $from="") | |
| standard implementation for tables use 'from' variable use different initial setting of table | |
| __showEditMemberTable ($a_result_set) | |
| __showSearchUserTable ($a_result_set, $a_user_ids=NULL, $a_cmd="search") | |
| __showSearchGroupTable ($a_result_set, $a_grp_ids=NULL) | |
| __showSearchRoleTable ($a_result_set, $a_role_ids) | |
| __showDeleteMembersTable ($a_result_set) | |
| __showRemoveFromWaitingListTable ($a_result_set) | |
| __showDeleteSubscriberTable ($a_result_set) | |
| __showSubscribersTable ($a_result_set, $a_subscriber_ids=NULL) | |
| __showWaitingListTable ($a_result_set, $a_waiting_list_ids=NULL) | |
| __search ($a_search_string, $a_search_for) | |
| __getDateSelect ($a_type, $a_varname, $a_selected) | |
| __toUnix ($a_time_arr) | |
| __unsetSessionVariables () | |
| mailMembersObject () | |
| & | executeCommand () |
| execute command note: this method is overwritten in all container objects | |
| _forwards () | |
| cciObjectivesObject () | |
| cciObjectivesEditObject () | |
| cciObjectivesAskResetObject () | |
| cciResetObject () | |
| initConditionHandlerGUI ($item_id) | |
| addLocatorItems () | |
| should be overwritten to add object specific items (repository items are preloaded) | |
| _goto ($a_target) | |
| goto target course | |
| toUnix ($date, $time=array()) | |
| __prepareDateSelect ($a_unix_time) | |
| __prepareTimeSelect ($a_unix_time) | |
| editMapSettingsObject () | |
| Edit Map Settings. | |
| saveMapSettingsObject () | |
| membersMapObject () | |
| Members map. | |
Private Member Functions | |
| checkAgreement () | |
| Check agreement and redirect if it is not accepted. | |
| forwardToAgreement () | |
| Forward to CourseAgreementGUI. | |
Class ilObjCourseGUI.
ilObjCourseGUI: ilCourseRegisterGUI, ilPaymentPurchaseGUI, ilCourseObjectivesGUI ilObjCourseGUI: ilObjCourseGroupingGUI, ilMDEditorGUI, ilInfoScreenGUI, ilLearningProgressGUI, ilPermissionGUI ilObjCourseGUI: ilRepositorySearchGUI, ilConditionHandlerInterface ilObjCourseGUI: ilCourseContentGUI, ilObjUserGUI, ilMemberExportGUI ilObjCourseGUI: ilCourseUserFieldsGUI, ilCourseAgreementGUI, ilEventAdministrationGUI
Definition at line 45 of file class.ilObjCourseGUI.php.
| ilObjCourseGUI::__appendToStoredResults | ( | $ | a_result | ) |
Definition at line 2851 of file class.ilObjCourseGUI.php.
References $_SESSION.
Referenced by __search(), listUsersGroupObject(), and listUsersRoleObject().
{
$tmp_array = array();
foreach($a_result as $result)
{
if(is_array($result))
{
$tmp_array[] = $result['id'];
}
elseif($result)
{
$tmp_array[] = $result;
}
}
// merge results
$_SESSION['crs_usr_search_result'] = array_unique(array_merge((array) $_SESSION['crs_usr_search_result'],$tmp_array));
return $_SESSION['crs_usr_search_result'];
}
Here is the caller graph for this function:| ilObjCourseGUI::__getDateSelect | ( | $ | a_type, | |
| $ | a_varname, | |||
| $ | a_selected | |||
| ) |
Definition at line 4207 of file class.ilObjCourseGUI.php.
References formSelect().
{
switch($a_type)
{
case "minute":
for($i=0;$i<=60;$i++)
{
$days[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
case "hour":
for($i=0;$i<24;$i++)
{
$days[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
case "day":
for($i=1;$i<32;$i++)
{
$days[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$days,false,true);
case "month":
for($i=1;$i<13;$i++)
{
$month[$i] = $i < 10 ? "0".$i : $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$month,false,true);
case "year":
for($i = date("Y",time());$i < date("Y",time()) + 3;++$i)
{
$year[$i] = $i;
}
return ilUtil::formSelect($a_selected,$a_varname,$year,false,true);
}
}
Here is the call graph for this function:| & ilObjCourseGUI::__initTableGUI | ( | ) |
Reimplemented from ilObjectGUI.
Definition at line 3598 of file class.ilObjCourseGUI.php.
Referenced by __showDeleteMembersTable(), __showDeleteSubscriberTable(), __showEditMemberTable(), __showRemoveFromWaitingListTable(), __showSearchGroupTable(), __showSearchRoleTable(), __showSearchUserTable(), __showSubscribersTable(), and __showWaitingListTable().
{
include_once "./Services/Table/classes/class.ilTableGUI.php";
return new ilTableGUI(0,false);
}
Here is the caller graph for this function:| ilObjCourseGUI::__prepareDateSelect | ( | $ | a_unix_time | ) |
Definition at line 4748 of file class.ilObjCourseGUI.php.
Referenced by editObject().
{
return array('y' => date('Y',$a_unix_time),
'm' => date('n',$a_unix_time),
'd' => date('d',$a_unix_time));
}
Here is the caller graph for this function:| ilObjCourseGUI::__prepareTimeSelect | ( | $ | a_unix_time | ) |
Definition at line 4755 of file class.ilObjCourseGUI.php.
Referenced by editObject().
{
return array('h' => date('G',$a_unix_time),
'm' => date('i',$a_unix_time),
's' => date('s',$a_unix_time));
}
Here is the caller graph for this function:| ilObjCourseGUI::__readMemberData | ( | $ | ids, | |
| $ | role = 'admin' | |||
| ) |
Definition at line 1542 of file class.ilObjCourseGUI.php.
References ilLPStatusWrapper::_getCompleted(), ilLPStatusWrapper::_getInProgress(), ilLPStatusWrapper::_getNotAttempted(), ilObjUser::_lookupLogin(), and ilObjUser::_lookupName().
Referenced by __renderAdminsTable(), __renderMembersTable(), and __renderTutorsTable().
{
if($this->show_tracking)
{
include_once 'Services/Tracking/classes/class.ilLPStatusWrapper.php';
$completed = ilLPStatusWrapper::_getCompleted($this->object->getId());
$in_progress = ilLPStatusWrapper::_getInProgress($this->object->getId());
$not_attempted = ilLPStatusWrapper::_getNotAttempted($this->object->getId());
}
foreach($ids as $usr_id)
{
switch($role)
{
case 'member':
if(0)
{
continue(2);
}
break;
}
$name = ilObjUser::_lookupName($usr_id);
$tmp_data['firstname'] = $name['firstname'];
$tmp_data['lastname'] = $name['lastname'];
$tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
$tmp_data['passed'] = $this->object->members_obj->hasPassed($usr_id) ? 1 : 0;
$tmp_data['notification'] = $this->object->members_obj->isNotificationEnabled($usr_id) ? 1 : 0;
$tmp_data['blocked'] = $this->object->members_obj->isBlocked($usr_id) ? 1 : 0;
$tmp_data['usr_id'] = $usr_id;
$tmp_data['login'] = ilObjUser::_lookupLogin($usr_id);
if($this->show_tracking)
{
if(in_array($usr_id,$completed))
{
$tmp_data['progress'] = $this->lng->txt('trac_completed');
}
elseif(in_array($usr_id,$in_progress))
{
$tmp_data['progress'] = $this->lng->txt('trac_in_progress');
}
else
{
$tmp_data['progress'] = $this->lng->txt('trac_not_attempted');
}
}
$members[] = $tmp_data;
}
return $members ? $members : array();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__renderAdminsTable | ( | ) |
Definition at line 1739 of file class.ilObjCourseGUI.php.
References $_GET, $_SESSION, $tbl, __readMemberData(), ilUtil::sortArray(), and ilUtil::switchColor().
Referenced by membersObject().
{
$this->tpl->setVariable("TXT_ADMINISTRATORS",$this->lng->txt('crs_administrators'));
if($_SESSION['crs_admin_hide'])
{
$this->tpl->setVariable("ADMIN_HIDE_TEXT",$this->lng->txt('show_details'));
$this->ctrl->setParameter($this,'admin_show_details',1);
$this->tpl->setVariable("ADMIN_HIDE",$this->ctrl->getLinkTarget($this,'members'));
$this->ctrl->clearParameters($this);
return true;
}
$this->tpl->setVariable('ADMIN_SAVE',$this->lng->txt('save_status'));
$this->tpl->setVariable("ADMIN_HIDE_TEXT",$this->lng->txt('hide_details'));
$this->ctrl->setParameter($this,'admin_show_details',0);
$this->tpl->setVariable("ADMIN_HIDE",$this->ctrl->getLinkTarget($this,'members'));
$this->ctrl->clearParameters($this);
$admin_tpl = new ilTemplate('tpl.table.html',true,true);
$admin_tpl->addBlockfile('TBL_CONTENT','tbl_content','tpl.member_admin_row.html','Modules/Course');
$all_admins_data = $this->__readMemberData($admins = $this->object->members_obj->getAdmins(),'admin');
$sorted_admins = ilUtil::sortArray($all_admins_data,$_GET["admin_sort_by"],$_GET["admin_sort_order"]);
#$sliced_admins = array_slice($sorted_admins,$_GET['admin_offset'],$_GET['limit']);
$sliced_admins = $sorted_admins;
$counter = 0;
foreach($sliced_admins as $admin)
{
$admin_tpl->setCurrentBlock("link");
$this->ctrl->setParameter($this,'member_id',$admin['usr_id']);
$admin_tpl->setVariable('LINK_NAME',$this->ctrl->getLinkTarget($this,'editMember'));
$admin_tpl->setVariable("LINK_TXT",$this->lng->txt('edit'));
$admin_tpl->parseCurrentBlock();
$this->ctrl->clearParameters($this);
if($this->timings_enabled)
{
$admin_tpl->setCurrentBlock("link");
$this->ctrl->setParameterByClass('ilcoursecontentgui','member_id',$admin['usr_id']);
$admin_tpl->setVariable('LINK_NAME',$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','showUserTimings'));
$admin_tpl->setVariable("LINK_TXT",$this->lng->txt('timings_timings'));
$admin_tpl->parseCurrentBlock();
$this->ctrl->clearParametersByClass('ilcoursecontentgui');
}
$admin_tpl->setCurrentBlock("tbl_content");
if($admin['passed'])
{
$admin_tpl->setVariable("CHECKED_PASSED",'checked="checked"');
}
if($admin['notification'])
{
$admin_tpl->setVariable("CHECKED_NOTIFICATION",'checked="checked"');
}
if($this->show_tracking)
{
$admin_tpl->setVariable("VAL_PROGRESS",$admin['progress']);
}
$admin_tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$admin_tpl->setVariable("USER_ID",$admin['usr_id']);
$admin_tpl->setVariable("LASTNAME",$admin['lastname']);
$admin_tpl->setVariable("FIRSTNAME",$admin['firstname']);
$admin_tpl->setVariable("LOGIN",$admin['login']);
$admin_tpl->parseCurrentBlock();
}
$tbl = new ilTableGUI($admins,false);
$tbl->setTemplate($admin_tpl);
if($this->show_tracking)
{
$tbl->setHeaderNames(array('',
$this->lng->txt('name'),
$this->lng->txt('login'),
$this->lng->txt('learning_progress'),
$this->lng->txt('crs_passed'),
$this->lng->txt('crs_notification'),''));
$tbl->setHeaderVars(array("",
"lastname",
"login",
"progress",
"passed",
"notification",''),
$this->ctrl->getParameterArray($this,'members'));
}
else
{
$tbl->setHeaderNames(array('',
$this->lng->txt('name'),
$this->lng->txt('login'),
$this->lng->txt('crs_passed'),
$this->lng->txt('crs_notification'),''));
$tbl->setHeaderVars(array("",
"lastname",
"login",
"passed",
"notification",''),
$this->ctrl->getParameterArray($this,'members'));
}
$tbl->setOrderColumn($_GET["admin_sort_by"]);
$tbl->setOrderDirection($_GET["admin_sort_order"]);
$tbl->setLimit(0);
$tbl->setMaxCount(count($admins));
$tbl->setColumnWidth(array('1%'));
$tbl->setPrefix('admin_');
$tbl->disable('table');
$tbl->disable('form');
$tbl->disable('title');
$tbl->disable('icon');
$tbl->disable('content');
$tbl->enable('select_all');
$tbl->setFormName("cmd");
$tbl->setSelectAllCheckbox("admin_ids");
$this->tpl->setVariable("ADMINISTRATORS",$tbl->render());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__renderMembersTable | ( | ) |
Definition at line 1989 of file class.ilObjCourseGUI.php.
References $_GET, $_SESSION, $tbl, __readMemberData(), ilUtil::sortArray(), and ilUtil::switchColor().
Referenced by membersObject().
{
$all_members_data = $this->__readMemberData($members = $this->object->members_obj->getMembers(),'member');
if(!count($all_members_data))
{
return false;
}
$this->tpl->setVariable("TXT_MEMBERS",$this->lng->txt('crs_members'));
if($_SESSION['crs_member_hide'])
{
$this->tpl->setVariable("MEMBER_HIDE_TEXT",$this->lng->txt('show_details'));
$this->ctrl->setParameter($this,'member_show_details',1);
$this->tpl->setVariable("MEMBER_HIDE",$this->ctrl->getLinkTarget($this,'members'));
$this->ctrl->clearParameters($this);
return true;
}
$this->tpl->setCurrentBlock('member_action');
$this->tpl->setVariable('MEMBER_SAVE',$this->lng->txt('save_status'));
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("MEMBER_HIDE_TEXT",$this->lng->txt('hide_details'));
$this->ctrl->setParameter($this,'member_show_details',0);
$this->tpl->setVariable("MEMBER_HIDE",$this->ctrl->getLinkTarget($this,'members'));
$this->ctrl->clearParameters($this);
$member_tpl = new ilTemplate('tpl.table.html',true,true);
$member_tpl->addBlockfile('TBL_CONTENT','tbl_content','tpl.member_member_row.html','Modules/Course');
$sorted_members = ilUtil::sortArray($all_members_data,$_GET["member_sort_by"],$_GET["member_sort_order"]);
$sliced_members = array_slice($sorted_members,$_GET['offset'],$_GET['limit']);
$counter = 0;
foreach($sliced_members as $member)
{
$member_tpl->setCurrentBlock("link");
$this->ctrl->setParameter($this,'member_id',$member['usr_id']);
$member_tpl->setVariable('LINK_NAME',$this->ctrl->getLinkTarget($this,'editMember'));
$member_tpl->setVariable("LINK_TXT",$this->lng->txt('edit'));
$member_tpl->parseCurrentBlock();
$this->ctrl->clearParameters($this);
if($this->timings_enabled)
{
$member_tpl->setCurrentBlock("link");
$this->ctrl->setParameterByClass('ilcoursecontentgui','member_id',$member['usr_id']);
$member_tpl->setVariable('LINK_NAME',$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','showUserTimings'));
$member_tpl->setVariable("LINK_TXT",$this->lng->txt('timings_timings'));
$member_tpl->parseCurrentBlock();
$this->ctrl->clearParametersByClass('ilcoursecontentgui');
}
$member_tpl->setCurrentBlock("tbl_content");
if($member['passed'])
{
$member_tpl->setVariable("CHECKED_PASSED",'checked="checked"');
}
if($this->object->members_obj->isAdmin($member['usr_id']) or $this->object->members_obj->isTutor($member['usr_id']))
{
$member_tpl->setVariable('BLOCKED_DISABLED','disabled="disabled" ');
}
elseif($member['blocked'])
{
$member_tpl->setVariable("CHECKED_BLOCKED",'checked="checked"');
}
if($this->show_tracking)
{
$member_tpl->setVariable("VAL_PROGRESS",$member['progress']);
}
$member_tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$member_tpl->setVariable("USER_ID",$member['usr_id']);
$member_tpl->setVariable("LASTNAME",$member['lastname']);
$member_tpl->setVariable("FIRSTNAME",$member['firstname']);
$member_tpl->setVariable("LOGIN",$member['login']);
$member_tpl->parseCurrentBlock();
}
$tbl = new ilTableGUI($members,false);
$tbl->setTemplate($member_tpl);
if($this->show_tracking)
{
$tbl->setHeaderNames(array('',
$this->lng->txt('name'),
$this->lng->txt('login'),
$this->lng->txt('learning_progress'),
$this->lng->txt('crs_passed'),
$this->lng->txt('crs_blocked'),''));
$tbl->setHeaderVars(array("",
"lastname",
"login",
"progress",
"passed",
"blocked",''),
$this->ctrl->getParameterArray($this,'members'));
}
else
{
$tbl->setHeaderNames(array('',
$this->lng->txt('name'),
$this->lng->txt('login'),
$this->lng->txt('crs_passed'),
$this->lng->txt('crs_blocked'),''));
$tbl->setHeaderVars(array("",
"lastname",
"login",
"passed",
"blocked",''),
$this->ctrl->getParameterArray($this,'members'));
}
$tbl->setOrderColumn($_GET["member_sort_by"]);
$tbl->setOrderDirection($_GET["member_sort_order"]);
$tbl->setLimit($_GET['limit']);
$tbl->setOffset($_GET["offset"]);
$tbl->setMaxCount(count($members));
$tbl->setColumnWidth(array('1%'));
$tbl->setPrefix('member_');
$tbl->disable('table');
$tbl->disable('form');
$tbl->disable('title');
$tbl->disable('icon');
$tbl->disable('content');
$tbl->enable('select_all');
$tbl->setFormName("cmd");
$tbl->setSelectAllCheckbox("member_ids");
$this->tpl->setVariable("MEMBERS",$tbl->render());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__renderTutorsTable | ( | ) |
Definition at line 1862 of file class.ilObjCourseGUI.php.
References $_GET, $_SESSION, $tbl, __readMemberData(), ilUtil::sortArray(), and ilUtil::switchColor().
Referenced by membersObject().
{
$all_tutors_data = $this->__readMemberData($tutors = $this->object->members_obj->getTutors(),'tutor');
if(!count($all_tutors_data))
{
return false;
}
$this->tpl->setVariable("TXT_TUTORS",$this->lng->txt('crs_tutors'));
if($_SESSION['crs_tutor_hide'])
{
$this->tpl->setVariable("TUTOR_HIDE_TEXT",$this->lng->txt('show_details'));
$this->ctrl->setParameter($this,'tutor_show_details',1);
$this->tpl->setVariable("TUTOR_HIDE",$this->ctrl->getLinkTarget($this,'members'));
$this->ctrl->clearParameters($this);
return true;
}
$this->tpl->setCurrentBlock('tutor_action');
$this->tpl->setVariable('TUTOR_SAVE',$this->lng->txt('save_status'));
$this->tpl->parseCurrentBlock();
$this->tpl->setVariable("TUTOR_HIDE_TEXT",$this->lng->txt('hide_details'));
$this->ctrl->setParameter($this,'tutor_show_details',0);
$this->tpl->setVariable("TUTOR_HIDE",$this->ctrl->getLinkTarget($this,'members'));
$this->ctrl->clearParameters($this);
$tutor_tpl = new ilTemplate('tpl.table.html',true,true);
$tutor_tpl->addBlockfile('TBL_CONTENT','tbl_content','tpl.member_tutor_row.html','Modules/Course');
$sorted_tutors = ilUtil::sortArray($all_tutors_data,$_GET["tutor_sort_by"],$_GET["tutor_sort_order"]);
#$sliced_tutors = array_slice($sorted_tutors,$_GET['tutor_offset'],$_GET['limit']);
$sliced_tutors = $sorted_tutors;
$counter = 0;
foreach($sliced_tutors as $tutor)
{
$tutor_tpl->setCurrentBlock("link");
$this->ctrl->setParameter($this,'member_id',$tutor['usr_id']);
$tutor_tpl->setVariable('LINK_NAME',$this->ctrl->getLinkTarget($this,'editMember'));
$tutor_tpl->setVariable("LINK_TXT",$this->lng->txt('edit'));
$tutor_tpl->parseCurrentBlock();
$this->ctrl->clearParameters($this);
if($this->timings_enabled)
{
$tutor_tpl->setCurrentBlock("link");
$this->ctrl->setParameterByClass('ilcoursecontentgui','member_id',$tutor['usr_id']);
$tutor_tpl->setVariable('LINK_NAME',$this->ctrl->getLinkTargetByClass('ilcoursecontentgui','showUserTimings'));
$tutor_tpl->setVariable("LINK_TXT",$this->lng->txt('timings_timings'));
$tutor_tpl->parseCurrentBlock();
$this->ctrl->clearParametersByClass('ilcoursecontentgui');
}
$tutor_tpl->setCurrentBlock("tbl_content");
if($tutor['passed'])
{
$tutor_tpl->setVariable("CHECKED_PASSED",'checked="checked"');
}
if($tutor['notification'])
{
$tutor_tpl->setVariable("CHECKED_NOTIFICATION",'checked="checked"');
}
if($this->show_tracking)
{
$tutor_tpl->setVariable("VAL_PROGRESS",$tutor['progress']);
}
$tutor_tpl->setVariable("CSS_ROW",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$tutor_tpl->setVariable("USER_ID",$tutor['usr_id']);
$tutor_tpl->setVariable("LASTNAME",$tutor['lastname']);
$tutor_tpl->setVariable("FIRSTNAME",$tutor['firstname']);
$tutor_tpl->setVariable("LOGIN",$tutor['login']);
$tutor_tpl->parseCurrentBlock();
}
$tbl = new ilTableGUI($tutors,false);
$tbl->setTemplate($tutor_tpl);
if($this->show_tracking)
{
$tbl->setHeaderNames(array('',
$this->lng->txt('name'),
$this->lng->txt('login'),
$this->lng->txt('learning_progress'),
$this->lng->txt('crs_passed'),
$this->lng->txt('crs_notification'),''));
$tbl->setHeaderVars(array("",
"lastname",
"login",
"progress",
"passed",
"notification",''),
$this->ctrl->getParameterArray($this,'members'));
}
else
{
$tbl->setHeaderNames(array('',
$this->lng->txt('name'),
$this->lng->txt('login'),
$this->lng->txt('crs_passed'),
$this->lng->txt('crs_notification'),''));
$tbl->setHeaderVars(array("",
"lastname",
"login",
"passed",
"notification",''),
$this->ctrl->getParameterArray($this,'members'));
}
$tbl->setOrderColumn($_GET["tutor_sort_by"]);
$tbl->setOrderDirection($_GET["tutor_sort_order"]);
$tbl->setLimit(0);
$tbl->setMaxCount(count($tutors));
$tbl->setColumnWidth(array('1%'));
$tbl->setPrefix('tutor_');
$tbl->disable('table');
$tbl->disable('form');
$tbl->disable('title');
$tbl->disable('icon');
$tbl->disable('content');
$tbl->enable('select_all');
$tbl->setFormName("cmd");
$tbl->setSelectAllCheckbox("tutor_ids");
$this->tpl->setVariable("TUTORS",$tbl->render());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__search | ( | $ | a_search_string, | |
| $ | a_search_for | |||
| ) |
Definition at line 4172 of file class.ilObjCourseGUI.php.
References $_SESSION, __appendToStoredResults(), and ilUtil::sendInfo().
Referenced by searchObject().
{
include_once("./classes/class.ilSearch.php");
$this->lng->loadLanguageModule("content");
$search =& new ilSearch($_SESSION["AccountId"]);
$search->setPerformUpdate(false);
$search->setMinWordLength(1);
$search->setSearchString($a_search_string);
$search->setCombination("and");
$search->setSearchFor(array(0 => $a_search_for));
$search->setSearchType('new');
$message = '';
if($search->validate($message))
{
$search->performSearch();
}
else
{
ilUtil::sendInfo($message,true);
$this->ctrl->redirect($this,"searchUser");
}
if($a_search_for == 'usr')
{
$this->__appendToStoredResults($search->getResultByType($a_search_for));
return $_SESSION['crs_usr_search_result'];
}
return $search->getResultByType($a_search_for);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__setTableGUIBasicData | ( | &$ | tbl, | |
| &$ | result_set, | |||
| $ | a_from = "" | |||
| ) |
standard implementation for tables use 'from' variable use different initial setting of table
Reimplemented from ilObjectGUI.
Definition at line 3606 of file class.ilObjCourseGUI.php.
Referenced by __showDeleteMembersTable(), __showDeleteSubscriberTable(), __showEditMemberTable(), __showRemoveFromWaitingListTable(), __showSearchGroupTable(), __showSearchRoleTable(), __showSearchUserTable(), __showSubscribersTable(), and __showWaitingListTable().
{
switch($from)
{
case "members":
$offset = $_GET["update_members"] ? $_GET["offset"] : 0;
$order = $_GET["update_members"] ? $_GET["sort_by"] : 'login';
$direction = $_GET["update_members"] ? $_GET["sort_order"] : '';
break;
case "subscribers":
$offset = $_GET["update_subscribers"] ? $_GET["offset"] : 0;
$order = $_GET["update_subscribers"] ? $_GET["sort_by"] : 'sub_time';
$direction = $_GET["update_subscribers"] ? $_GET["sort_order"] : '';
break;
case "group":
$offset = $_GET["offset"];
$order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
$direction = $_GET["sort_order"];
break;
case "role":
$offset = $_GET["offset"];
$order = $_GET["sort_by"] ? $_GET["sort_by"] : "title";
$direction = $_GET["sort_order"];
break;
default:
$offset = $_GET["offset"];
// init sort_by (unfortunatly sort_by is preset with 'title'
if ($_GET["sort_by"] == "title" or empty($_GET["sort_by"]))
{
$_GET["sort_by"] = "login";
}
$order = $_GET["sort_by"];
$direction = $_GET["sort_order"];
break;
}
$tbl->setOrderColumn($order);
$tbl->setOrderDirection($direction);
$tbl->setOffset($offset);
$tbl->setLimit($_GET["limit"]);
$tbl->setMaxCount(count($result_set));
$tbl->setFooter("tblfooter",$this->lng->txt("previous"),$this->lng->txt("next"));
$tbl->setData($result_set);
}
Here is the caller graph for this function:| ilObjCourseGUI::__showDeleteMembersTable | ( | $ | a_result_set | ) |
Definition at line 3905 of file class.ilObjCourseGUI.php.
References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), and ilUtil::getImagePath().
Referenced by deleteMembersObject().
{
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","removeMembers");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("crs_delete_member"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","cancelMember");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("cancel"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",4);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_delete_members"),"icon_usr_b.gif",$this->lng->txt("crs_header_delete_members"));
$tbl->setHeaderNames(array($this->lng->txt("username"),
$this->lng->txt("firstname"),
$this->lng->txt("lastname"),
$this->lng->txt("role")));
$tbl->setHeaderVars(array("login",
"firstname",
"lastname",
"role"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("25%","25%","25%","25%"));
$this->__setTableGUIBasicData($tbl,$a_result_set);
$tbl->disable('sort');
$tbl->render();
$this->tpl->setVariable("EDIT_MEMBER_TABLE",$tbl->tpl->get());
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showDeleteSubscriberTable | ( | $ | a_result_set | ) |
Definition at line 4001 of file class.ilObjCourseGUI.php.
References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), and ilUtil::getImagePath().
Referenced by deleteSubscribers().
{
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","removeSubscribers");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","cancelMember");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("cancel"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",4);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_delete_subscribers"),"icon_usr_b.gif",$this->lng->txt("crs_header_delete_members"));
$tbl->setHeaderNames(array($this->lng->txt("username"),
$this->lng->txt("firstname"),
$this->lng->txt("lastname"),
$this->lng->txt("crs_time")));
$tbl->setHeaderVars(array("login",
"firstname",
"lastname",
"sub_time"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("25%","25%","25%","25%"));
$this->__setTableGUIBasicData($tbl,$a_result_set);
$tbl->render();
$this->tpl->setVariable("EDIT_MEMBER_TABLE",$tbl->tpl->get());
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showEditMemberTable | ( | $ | a_result_set | ) |
Definition at line 3657 of file class.ilObjCourseGUI.php.
References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), and ilUtil::getImagePath().
Referenced by editMemberObject().
{
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
// SET FORMACTION
$tpl->setCurrentBlock("tbl_form_header");
$this->ctrl->setParameter($this,"member_id",(int) $_GET["member_id"]);
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("plain_button");
$tpl->setVariable("PBTN_NAME","updateMember");
$tpl->setVariable("PBTN_VALUE",$this->lng->txt("save"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("plain_button");
$tpl->setVariable("PBTN_NAME","members");
$tpl->setVariable("PBTN_VALUE",$this->lng->txt("cancel"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",6);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_edit_members"),"icon_usr.gif",$this->lng->txt("crs_header_members"));
$tbl->setHeaderNames(array($this->lng->txt("name"),
$this->lng->txt("login"),
$this->lng->txt('crs_passed'),
$this->lng->txt("crs_notification"),
$this->lng->txt("crs_blocked"),
$this->lng->txt("crs_role_status")));
$tbl->setHeaderVars(array("name",
"login",
"passed",
"notification",
"blocked",
"role"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("16%","16%","16%","16%","16%"));
$this->__setTableGUIBasicData($tbl,$a_result_set);
$tbl->disable('sort');
$tbl->disable('numinfo');
$tbl->render();
$this->tpl->setVariable("EDIT_MEMBER_TABLE",$tbl->tpl->get());
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showRemoveFromWaitingListTable | ( | $ | a_result_set | ) |
Definition at line 3955 of file class.ilObjCourseGUI.php.
References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), and ilUtil::getImagePath().
Referenced by removeFromWaitingList().
{
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","cancelMember");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("cancel"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","performRemoveFromWaitingList");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("delete"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",4);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_remove_from_waiting_list"),"icon_usr_b.gif",
$this->lng->txt("crs_header_remove_from_waiting_list"));
$tbl->setHeaderNames(array($this->lng->txt("username"),
$this->lng->txt("firstname"),
$this->lng->txt("lastname"),
$this->lng->txt("crs_time")));
$tbl->setHeaderVars(array("login",
"firstname",
"lastname",
"sub_time"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("25%","25%","25%","25%"));
$this->__setTableGUIBasicData($tbl,$a_result_set);
$tbl->render();
$this->tpl->setVariable("EDIT_MEMBER_TABLE",$tbl->tpl->get());
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showSearchGroupTable | ( | $ | a_result_set, | |
| $ | a_grp_ids = NULL | |||
| ) |
Definition at line 3790 of file class.ilObjCourseGUI.php.
References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI::__showButton(), ilUtil::array_php2js(), and ilUtil::getImagePath().
Referenced by searchObject().
{
$this->__showButton('searchUser',$this->lng->txt("back"));
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","listUsersGroup");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("crs_list_users"));
$tpl->parseCurrentBlock();
if (!empty($a_grp_ids))
{
// set checkbox toggles
$tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
$tpl->setVariable("JS_VARNAME","group");
$tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($a_grp_ids));
$tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",5);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_edit_members"),"icon_usr_b.gif",$this->lng->txt("crs_header_edit_members"));
$tbl->setHeaderNames(array("",
$this->lng->txt("obj_grp"),
$this->lng->txt("crs_count_members")));
$tbl->setHeaderVars(array("",
"title",
"nr_members"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "search",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("","80%","19%"));
$this->__setTableGUIBasicData($tbl,$a_result_set,"group");
$tbl->render();
$this->tpl->setVariable("SEARCH_RESULT_TABLE",$tbl->tpl->get());
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showSearchRoleTable | ( | $ | a_result_set, | |
| $ | a_role_ids | |||
| ) |
Definition at line 3845 of file class.ilObjCourseGUI.php.
References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI::__showButton(), ilUtil::array_php2js(), and ilUtil::getImagePath().
Referenced by searchObject().
{
$this->__showButton('searchUser',$this->lng->txt("back"));
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","searchUser");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("back"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","listUsersRole");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("crs_list_users"));
$tpl->parseCurrentBlock();
if (!empty($a_role_ids))
{
// set checkbox toggles
$tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
$tpl->setVariable("JS_VARNAME","role");
$tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($a_role_ids));
$tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",5);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_edit_members"),"icon_usr_b.gif",$this->lng->txt("crs_header_edit_members"));
$tbl->setHeaderNames(array("",
$this->lng->txt("obj_grp"),
$this->lng->txt("crs_count_members")));
$tbl->setHeaderVars(array("",
"title",
"nr_members"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "search",
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("","80%","19%"));
$this->__setTableGUIBasicData($tbl,$a_result_set,"role");
$tbl->render();
$this->tpl->setVariable("SEARCH_RESULT_TABLE",$tbl->tpl->get());
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showSearchUserTable | ( | $ | a_result_set, | |
| $ | a_user_ids = NULL, |
|||
| $ | a_cmd = "search" | |||
| ) |
Definition at line 3714 of file class.ilObjCourseGUI.php.
References $_GET, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilObjectGUI::__showButton(), ilUtil::array_php2js(), and ilUtil::getImagePath().
Referenced by listUsersGroupObject(), listUsersRoleObject(), and searchObject().
{
$return_to = "searchUser";
if ($a_cmd == "listUsersRole" or $a_cmd == "listUsersGroup")
{
$return_to = "search";
}
$this->__showButton($return_to,$this->lng->txt("back"));
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
// SET FORMACTION
$tpl->setCurrentBlock("tbl_form_header");
$tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_btn");
$tpl->setVariable("BTN_NAME","assignMembers");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("add"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("plain_button");
$tpl->setVariable("PBTN_NAME",'searchUser');
$tpl->setVariable("PBTN_VALUE",$this->lng->txt('append_search'));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("plain_button");
$tpl->setVariable("PBTN_NAME",'cancelSearch');
$tpl->setVariable("PBTN_VALUE",$this->lng->txt("crs_new_search"));
$tpl->parseCurrentBlock();
if (!empty($a_user_ids))
{
// set checkbox toggles
$tpl->setCurrentBlock("tbl_action_toggle_checkboxes");
$tpl->setVariable("JS_VARNAME","user");
$tpl->setVariable("JS_ONCLICK",ilUtil::array_php2js($a_user_ids));
$tpl->setVariable("TXT_CHECKALL", $this->lng->txt("check_all"));
$tpl->setVariable("TXT_UNCHECKALL", $this->lng->txt("uncheck_all"));
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",5);
$tpl->setVariable("IMG_ARROW",ilUtil::getImagePath("arrow_downright.gif"));
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_header_edit_members"),"icon_usr_b.gif",$this->lng->txt("crs_header_edit_members"));
$tbl->setHeaderNames(array("",
$this->lng->txt("username"),
$this->lng->txt("firstname"),
$this->lng->txt("lastname")));
$tbl->setHeaderVars(array("",
"login",
"firstname",
"lastname"),
array("ref_id" => $this->object->getRefId(),
"cmd" => $a_cmd,
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array("","33%","33%","33%"));
$this->__setTableGUIBasicData($tbl,$a_result_set);
$tbl->render();
$this->tpl->setVariable("SEARCH_RESULT_TABLE",$tbl->tpl->get());
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showSubscribers | ( | ) |
Definition at line 2165 of file class.ilObjCourseGUI.php.
References __showSubscribersTable(), ilUtil::formCheckbox(), and ilObjectFactory::getInstanceByObjId().
Referenced by membersObject().
{
if(count($this->object->members_obj->getSubscribers()))
{
$counter = 0;
$f_result = array();
foreach($this->object->members_obj->getSubscribers() as $member_id)
{
$member_data = $this->object->members_obj->getSubscriberData($member_id);
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$subscriber_ids[$counter] = $member_id;
$f_result[$counter][] = ilUtil::formCheckbox(0,"subscriber[]",$member_id);
$f_result[$counter][] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLogin();
#$f_result[$counter][] = ilFormat::formatUnixTime($member_data["time"],true);
$f_result[$counter][] = date('Y-m-d H:i:s',$member_data['time']);
unset($tmp_obj);
++$counter;
}
}
$this->__showSubscribersTable($f_result,$subscriber_ids);
} // END SUBSCRIBERS
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showSubscribersTable | ( | $ | a_result_set, | |
| $ | a_subscriber_ids = NULL | |||
| ) |
Definition at line 4048 of file class.ilObjCourseGUI.php.
References $_GET, ilObjectGUI::$actions, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilUtil::formSelect(), and ilUtil::getImagePath().
Referenced by __showSubscribers().
{
$actions = array("addSubscribers" => $this->lng->txt("crs_add_subscribers"),
"deleteSubscribers" => $this->lng->txt("crs_delete_subscribers"));
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
// SET FOOTER BUTTONS
$tpl->setCurrentBlock("tbl_action_row");
// BUTTONS FOR ADD USER
$tpl->setCurrentBlock("plain_button");
$tpl->setVariable("PBTN_NAME","autoFill");
$tpl->setVariable("PBTN_VALUE",$this->lng->txt("crs_auto_fill"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("plain_buttons");
$tpl->parseCurrentBlock();
$tpl->setVariable("COLUMN_COUNTS",4);
$tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$tpl->setCurrentBlock("tbl_action_select");
$tpl->setVariable("SELECT_ACTION",ilUtil::formSelect(1,"action",$actions,false,true));
$tpl->setVariable("BTN_NAME","gateway");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("execute"));
$tpl->parseCurrentBlock();
$tbl->enable('select_all');
$tbl->setFormName("subscriber_form");
$tbl->setSelectAllCheckbox("subscriber");
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("TPLPATH",$this->tpl->tplPath);
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_subscribers"),"icon_usr.gif",$this->lng->txt("crs_header_members"));
$tbl->setHeaderNames(array('',
$this->lng->txt("name"),
$this->lng->txt("login"),
$this->lng->txt("crs_time")));
$tbl->setHeaderVars(array("",
"name",
"login",
"sub_time"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"update_subscribers" => 1,
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array('1%'));
$this->__setTableGUIBasicData($tbl,$a_result_set,"subscribers");
$tbl->render();
$this->tpl->setCurrentBlock('sub_wait_table');
$this->tpl->setVariable('SUB_WAIT_NAME','subscriber_form');
$this->tpl->setVariable('SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
$this->tpl->setVariable("SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
$this->tpl->parseCurrentBlock();
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showWaitingList | ( | ) |
Definition at line 2121 of file class.ilObjCourseGUI.php.
References __showWaitingListTable(), ilObjCourseGrouping::_getGroupingCourseIds(), ilCourseParticipants::_getInstanceByObjId(), ilObject::_lookupTitle(), ilUtil::formCheckbox(), and ilObjectFactory::getInstanceByObjId().
Referenced by membersObject().
{
include_once './Modules/Course/classes/class.ilObjCourseGrouping.php';
$this->object->initCourseMemberObject();
$this->object->initWaitingList();
if($this->object->waiting_list_obj->getCountUsers())
{
$counter = 0;
$f_result = array();
foreach($this->object->waiting_list_obj->getAllUsers() as $waiting_data)
{
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($waiting_data['usr_id'],false))
{
$waiting_list_ids[] = $waiting_data['usr_id'];
$message = '';
// Check if user is member in course grouping
foreach(ilObjCourseGrouping::_getGroupingCourseIds($this->object->getRefId(),
$this->object->getId()) as $course_data)
{
$tmp_members = ilCourseParticipants::_getInstanceByObjId($course_data['id']);
if($course_data['id'] != $this->object->getId() and
$tmp_members->isGroupingMember($tmp_obj->getId(),$course_data['unique']))
{
$message .= ('<br /><font class="alert">'.$this->lng->txt('crs_member_of').' ');
$message .= (ilObject::_lookupTitle($course_data['id'])."</font>");
}
}
$f_result[$counter][] = ilUtil::formCheckbox(0,"waiting_list[]",$waiting_data['usr_id']);
$f_result[$counter][] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname().$message;
$f_result[$counter][] = $tmp_obj->getLogin();
#$f_result[$counter][] = ilFormat::formatUnixTime($waiting_data["time"],true);
$f_result[$counter][] = date('Y-m-d H:i:s',$waiting_data['time']);
unset($tmp_obj);
++$counter;
}
}
$this->__showWaitingListTable($f_result,$waiting_list_ids);
} // END waiting list
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__showWaitingListTable | ( | $ | a_result_set, | |
| $ | a_waiting_list_ids = NULL | |||
| ) |
Definition at line 4113 of file class.ilObjCourseGUI.php.
References $_GET, ilObjectGUI::$actions, $tbl, ilObjectGUI::$tpl, __initTableGUI(), __setTableGUIBasicData(), ilUtil::formSelect(), and ilUtil::getImagePath().
Referenced by __showWaitingList().
{
$actions = array("addFromWaitingList" => $this->lng->txt("crs_add_subscribers"),
"removeFromWaitingList" => $this->lng->txt("crs_delete_from_waiting_list"));
$tbl =& $this->__initTableGUI();
$tpl =& $tbl->getTemplateObject();
$tbl->enable('select_all');
$tbl->setFormName("wait_form");
$tbl->setSelectAllCheckbox("waiting_list");
// SET FOOTER BUTTONS
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("COLUMN_COUNTS",5);
$tpl->setVariable("IMG_ARROW", ilUtil::getImagePath("arrow_downright.gif"));
$tpl->setCurrentBlock("tbl_action_select");
$tpl->setVariable("SELECT_ACTION",ilUtil::formSelect(1,"action",$actions,false,true));
$tpl->setVariable("BTN_NAME","gateway");
$tpl->setVariable("BTN_VALUE",$this->lng->txt("execute"));
$tpl->parseCurrentBlock();
$tpl->setCurrentBlock("tbl_action_row");
$tpl->setVariable("TPLPATH",$this->tpl->tplPath);
$tpl->parseCurrentBlock();
$tbl->setTitle($this->lng->txt("crs_waiting_list"),"icon_usr.gif",$this->lng->txt("crs_waiting_list"));
$tbl->setHeaderNames(array('',
$this->lng->txt("name"),
$this->lng->txt("login"),
$this->lng->txt("crs_time")));
$tbl->setHeaderVars(array("",
"name",
"login",
"sub_time"),
array("ref_id" => $this->object->getRefId(),
"cmd" => "members",
"update_subscribers" => 1,
"cmdClass" => "ilobjcoursegui",
"cmdNode" => $_GET["cmdNode"]));
$tbl->setColumnWidth(array('1%'));
$this->__setTableGUIBasicData($tbl,$a_result_set,"subscribers");
$tbl->render();
$this->tpl->setCurrentBlock('sub_wait_table');
$this->tpl->setVariable('SUB_WAIT_NAME','wait_form');
$this->tpl->setVariable('SUB_WAIT_FORMACTION',$this->ctrl->getFormAction($this));
$this->tpl->setVariable("SUB_WAIT_TABLE_CONTENT",$tbl->tpl->get());
$this->tpl->parseCurrentBlock();
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::__toUnix | ( | $ | a_time_arr | ) |
Definition at line 4248 of file class.ilObjCourseGUI.php.
{
return mktime($a_time_arr["hour"],
$a_time_arr["minute"],
$a_time_arr["second"],
$a_time_arr["month"],
$a_time_arr["day"],
$a_time_arr["year"]);
}
| ilObjCourseGUI::__unsetSessionVariables | ( | ) |
Definition at line 4257 of file class.ilObjCourseGUI.php.
References $_SESSION.
Referenced by cancelMemberObject(), and searchUserObject().
{
unset($_SESSION["crs_delete_member_ids"]);
unset($_SESSION["crs_delete_subscriber_ids"]);
unset($_SESSION["crs_search_str"]);
unset($_SESSION["crs_search_for"]);
unset($_SESSION["crs_group"]);
unset($_SESSION["crs_role"]);
unset($_SESSION["crs_archives"]);
}
Here is the caller graph for this function:| ilObjCourseGUI::_forwards | ( | ) |
Definition at line 4614 of file class.ilObjCourseGUI.php.
{
return array("ilCourseRegisterGUI",'ilConditionHandlerInterface');
}
| ilObjCourseGUI::_goto | ( | $ | a_target | ) |
goto target course
Definition at line 4704 of file class.ilObjCourseGUI.php.
References $_GET, $ilErr, ilObjectGUI::$lng, ilObject::_lookupObjId(), ilObject::_lookupTitle(), exit, and ilUtil::sendInfo().
{
global $ilAccess, $ilErr, $lng;
if ($ilAccess->checkAccess("read", "", $a_target))
{
$_GET["cmd"] = "frameset";
$_GET["ref_id"] = $a_target;
include("repository.php");
exit;
}
else
{
// to do: force flat view
if ($ilAccess->checkAccess("visible", "", $a_target))
{
$_GET["cmd"] = "infoScreen";
$_GET["ref_id"] = $a_target;
include("repository.php");
exit;
}
else
{
if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
$_GET["cmd"] = "frameset";
$_GET["target"] = "";
$_GET["ref_id"] = ROOT_FOLDER_ID;
ilUtil::sendInfo(sprintf($lng->txt("msg_no_perm_read_item"),
ilObject::_lookupTitle(ilObject::_lookupObjId($a_target))), true);
include("repository.php");
exit;
}
}
}
$ilErr->raiseError($lng->txt("msg_no_perm_read"), $ilErr->FATAL);
}
Here is the call graph for this function:| ilObjCourseGUI::addFromWaitingList | ( | ) |
Definition at line 2335 of file class.ilObjCourseGUI.php.
References ilObjectFactory::getInstanceByObjId(), membersObject(), searchObject(), and ilUtil::sendInfo().
Referenced by gatewayObject().
{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["waiting_list"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_users_selected"));
$this->membersObject();
return false;
}
$this->object->initCourseMemberObject();
$this->object->initWaitingList();
$added_users = 0;
foreach($_POST["waiting_list"] as $user_id)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id))
{
continue;
}
if($this->object->members_obj->isAssigned($user_id))
{
continue;
}
$this->object->members_obj->add($user_id,IL_CRS_MEMBER);
$this->object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
$this->object->waiting_list_obj->removeFromList($user_id);
++$added_users;
}
if($added_users)
{
ilUtil::sendInfo($this->lng->txt("crs_users_added"));
$this->membersObject();
return true;
}
else
{
ilUtil::sendInfo($this->lng->txt("crs_users_already_assigned"));
$this->searchObject();
return false;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::addLocatorItems | ( | ) |
should be overwritten to add object specific items (repository items are preloaded)
Reimplemented from ilObjectGUI.
Definition at line 4690 of file class.ilObjCourseGUI.php.
{
global $ilLocator;
switch ($this->ctrl->getCmd())
{
default:
#$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""));
break;
}
}
| ilObjCourseGUI::addStarterObject | ( | ) |
Definition at line 678 of file class.ilObjCourseGUI.php.
References ilCourseStart::add(), listStructureObject(), selectStarterObject(), and ilUtil::sendInfo().
{
include_once './Modules/Course/classes/class.ilCourseStart.php';
global $rbacsystem;
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!count($_POST['starter']))
{
ilUtil::sendInfo($this->lng->txt('crs_select_one_object'));
$this->selectStarterObject();
return false;
}
$crs_start =& new ilCourseStart($this->object->getRefId(),$this->object->getId());
$added = 0;
foreach($_POST['starter'] as $item_ref_id)
{
if(!$crs_start->exists($item_ref_id))
{
++$added;
$crs_start->add($item_ref_id);
}
}
if($added)
{
ilUtil::sendInfo($this->lng->txt('crs_added_starters'));
$this->listStructureObject();
return true;
}
else
{
ilUtil::sendInfo($this->lng->txt('crs_starters_already_assigned'));
$this->selectStarterObject();
return false;
}
}
Here is the call graph for this function:| ilObjCourseGUI::addSubscribers | ( | ) |
Definition at line 2417 of file class.ilObjCourseGUI.php.
References membersObject(), and ilUtil::sendInfo().
Referenced by gatewayObject().
{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["subscriber"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_subscribers_selected"));
$this->membersObject();
return false;
}
$this->object->initCourseMemberObject();
if(!$this->object->members_obj->assignSubscribers($_POST["subscriber"]))
{
ilUtil::sendInfo($this->object->getMessage());
$this->membersObject();
return false;
}
else
{
// SEND NOTIFICATION
foreach($_POST["subscriber"] as $usr_id)
{
$this->object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_SUBSCRIBER,$usr_id);
}
}
ilUtil::sendInfo($this->lng->txt("crs_subscribers_assigned"));
$this->membersObject();
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::assignMembersObject | ( | ) |
Definition at line 2290 of file class.ilObjCourseGUI.php.
References $_SESSION, ilObjectFactory::getInstanceByObjId(), and ilUtil::sendInfo().
{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["user"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_users_selected"));
return false;
}
$this->object->initCourseMemberObject();
$added_users = 0;
foreach($_POST["user"] as $user_id)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user_id))
{
continue;
}
if($this->object->members_obj->isAssigned($user_id))
{
continue;
}
$this->object->members_obj->add($user_id,IL_CRS_MEMBER);
$this->object->members_obj->sendNotification($this->object->members_obj->NOTIFY_ACCEPT_USER,$user_id);
++$added_users;
}
if($added_users)
{
ilUtil::sendInfo($this->lng->txt("crs_users_added"),true);
unset($_SESSION["crs_search_str"]);
unset($_SESSION["crs_search_for"]);
unset($_SESSION['crs_usr_search_result']);
$this->ctrl->redirect($this,'members');
}
ilUtil::sendInfo($this->lng->txt("crs_users_already_assigned"));
return false;
}
Here is the call graph for this function:| ilObjCourseGUI::autoFillObject | ( | ) |
Definition at line 2457 of file class.ilObjCourseGUI.php.
References membersObject(), and ilUtil::sendInfo().
{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->object->initCourseMemberObject();
if($this->object->getSubscriptionMaxMembers() and
$this->object->getSubscriptionMaxMembers() <= $this->object->members_obj->getCountMembers())
{
ilUtil::sendInfo($this->lng->txt("crs_max_members_reached"));
$this->membersObject();
return false;
}
if($number = $this->object->members_obj->autoFillSubscribers())
{
ilUtil::sendInfo($this->lng->txt("crs_number_users_added")." ".$number);
}
else
{
ilUtil::sendInfo($this->lng->txt("crs_no_users_added"));
}
$this->membersObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::cancelMemberObject | ( | ) |
canceledObject is called when operation is canceled, method links back public
Definition at line 139 of file class.ilObjCourseGUI.php.
References ilObjectGUI::$return_location, __unsetSessionVariables(), ilUtil::redirect(), and ilUtil::sendInfo().
{
$this->__unsetSessionVariables();
$return_location = "members";
ilUtil::sendInfo($this->lng->txt("action_aborted"),true);
ilUtil::redirect($this->ctrl->getLinkTarget($this,$return_location));
}
Here is the call graph for this function:| ilObjCourseGUI::cancelSearchObject | ( | ) |
Definition at line 2871 of file class.ilObjCourseGUI.php.
References $_SESSION, and searchUserObject().
{
$_SESSION['crs_usr_search_result'] = array();
$_SESSION['crs_search_str'] = '';
$this->searchUserObject();
}
Here is the call graph for this function:| ilObjCourseGUI::cciObjectivesAskResetObject | ( | ) |
Definition at line 4640 of file class.ilObjCourseGUI.php.
{
$this->tabs_gui->setTabActive('learners_view');
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_objectives_ask_reset();
return true;;
}
| ilObjCourseGUI::cciObjectivesEditObject | ( | ) |
Definition at line 4630 of file class.ilObjCourseGUI.php.
{
$this->tabs_gui->setTabActive('edit_content');
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_view();
return true;
}
| ilObjCourseGUI::cciObjectivesObject | ( | ) |
Definition at line 4620 of file class.ilObjCourseGUI.php.
{
$this->tabs_gui->setTabActive('learners_view');
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_objectives();
return true;;
}
| ilObjCourseGUI::cciResetObject | ( | ) |
Definition at line 4650 of file class.ilObjCourseGUI.php.
References ilUtil::sendInfo().
{
$this->tabs_gui->setTabActive('learners_view');
global $ilUser;
include_once './Modules/Course/classes/class.ilCourseObjectiveResult.php';
$tmp_obj_res =& new ilCourseObjectiveResult($ilUser->getId());
$tmp_obj_res->reset($this->object->getId());
ilUtil::sendInfo($this->lng->txt('crs_objectives_reseted'));
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->cci_obj->cci_objectives();
}
Here is the call graph for this function:| ilObjCourseGUI::checkAgreement | ( | ) | [private] |
Check agreement and redirect if it is not accepted.
private
Definition at line 4565 of file class.ilObjCourseGUI.php.
References ilCourseUserData::_checkRequired(), ilPrivacySettings::_getInstance(), ilCourseAgreement::_hasAccepted(), and ilCourseDefinedFieldDefinition::_hasFields().
Referenced by viewObject().
{
global $ilUser,$ilAccess;
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
return true;
}
// Disable aggrement if is not member of course
if(!$this->object->members_obj->isAssigned($ilUser->getId()))
{
return true;
}
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Modules/Course/classes/class.ilCourseAgreement.php');
$privacy = ilPrivacySettings::_getInstance();
// Check agreement
if(($privacy->confirmationRequired() or ilCourseDefinedFieldDefinition::_hasFields($this->object->getId()))
and !ilCourseAgreement::_hasAccepted($ilUser->getId(),$this->object->getId()))
{
return false;
}
// Check required fields
include_once('Modules/Course/classes/Export/class.ilCourseUserData.php');
if(!ilCourseUserData::_checkRequired($ilUser->getId(),$this->object->getId()))
{
return false;
}
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::confirmDeleteInfoFilesObject | ( | ) |
show info file donfimation table
public
Definition at line 781 of file class.ilObjCourseGUI.php.
References $file, editInfoObject(), ilUtil::sendInfo(), and setSubTabs().
{
if(!count($_POST['file_id']))
{
ilUtil::sendInfo($this->lng->txt('select_one'));
$this->editInfoObject();
return false;
}
$this->setSubTabs('properties');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_info_settings');
include_once("Services/Utilities/classes/class.ilConfirmationGUI.php");
$c_gui = new ilConfirmationGUI();
// set confirm/cancel commands
$c_gui->setFormAction($this->ctrl->getFormAction($this, "deleteInfoFiles"));
$c_gui->setHeaderText($this->lng->txt("info_delete_sure"));
$c_gui->setCancel($this->lng->txt("cancel"), "editInfo");
$c_gui->setConfirm($this->lng->txt("confirm"), "deleteInfoFiles");
// add items to delete
include_once('Modules/Course/classes/class.ilCourseFile.php');
foreach($_POST["file_id"] as $file_id)
{
$file = new ilCourseFile($file_id);
$c_gui->addItem("file_id[]", $file_id, $file->getFileName());
}
$this->tpl->setContent($c_gui->getHTML());
}
Here is the call graph for this function:| ilObjCourseGUI::createObject | ( | ) |
create new object form
public
Reimplemented from ilObjectGUI.
Definition at line 149 of file class.ilObjCourseGUI.php.
References $_GET, ilObjectGUI::fillCloneTemplate(), and ilUtil::getImagePath().
{
global $rbacsystem;
// CHECK ACCESS
if(!$rbacsystem->checkAccess("create",$_GET["ref_id"],'crs'))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_create"),$this->ilias->error_obj->MESSAGE);
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_create.html",'Modules/Course');
$this->tpl->setVariable("FORMACTION",'repository.php?ref_id='.$_GET["ref_id"].'&cmd=post&new_type=crs');
$this->tpl->setVariable("TXT_HEADER", $this->lng->txt("crs_new"));
$this->tpl->setVariable("TYPE_IMG",
ilUtil::getImagePath("icon_crs.gif"));
$this->tpl->setVariable("ALT_IMG", $this->lng->txt("obj_crs"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("crs_add"));
$this->tpl->setVariable("CMD_SUBMIT", "save");
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
$this->tpl->setVariable("TXT_TITLE",$this->lng->txt('title'));
$this->tpl->setVariable("TXT_DESC",$this->lng->txt('desc'));
// IMPORT
$this->tpl->setVariable("TXT_IMPORT_CRS", $this->lng->txt("import_crs"));
$this->tpl->setVariable("TXT_CRS_FILE", $this->lng->txt("file"));
$this->tpl->setVariable("TXT_IMPORT", $this->lng->txt("import"));
// get the value for the maximal uploadable filesize from the php.ini (if available)
$umf=get_cfg_var("upload_max_filesize");
// get the value for the maximal post data from the php.ini (if available)
$pms=get_cfg_var("post_max_size");
// use the smaller one as limit
$max_filesize=min($umf, $pms);
if (!$max_filesize)
$max_filesize=max($umf, $pms);
// gives out the limit as a littel notice :)
$this->tpl->setVariable("TXT_FILE_INFO", $this->lng->txt("file_notice").$max_filesize);
$this->fillCloneTemplate('DUPLICATE','crs');
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::deleteInfoFilesObject | ( | ) |
Delete info files.
public
Definition at line 820 of file class.ilObjCourseGUI.php.
References $file, editInfoObject(), and ilUtil::sendInfo().
{
if(!count($_POST['file_id']))
{
ilUtil::sendInfo($this->lng->txt('select_one'));
$this->editInfoObject();
return false;
}
include_once('Modules/Course/classes/class.ilCourseFile.php');
foreach($_POST['file_id'] as $file_id)
{
$file = new ilCourseFile($file_id);
if($this->object->getId() == $file->getCourseId())
{
$file->delete();
}
}
ilUtil::sendInfo($this->lng->txt('settings_saved'));
$this->editInfoObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::deleteMembersObject | ( | ) |
Definition at line 2641 of file class.ilObjCourseGUI.php.
References $_SESSION, __showDeleteMembersTable(), ilObjectFactory::getInstanceByObjId(), membersObject(), and ilUtil::sendInfo().
Referenced by memberGatewayObject().
{
global $rbacsystem;
$this->tabs_gui->setTabActive('members');
$_POST['member'] = array_unique(array_merge((array) $_POST['member_ids'],(array) $_POST['tutor_ids'],(array) $_POST['admin_ids']));
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["member"]) or !count($_POST["member"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_member_selected"));
$this->membersObject();
return false;
}
ilUtil::sendInfo($this->lng->txt("crs_delete_members_sure"));
$this->object->initCourseMemberObject();
// CHECK LAST ADMIN
if(!$this->object->members_obj->checkLastAdmin($_POST['member']))
{
ilUtil::sendInfo($this->lng->txt('crs_at_least_one_admin'));
$this->membersObject();
return false;
}
// SHOW DELETE SCREEN
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_editMembers.html",'Modules/Course');
// SAVE IDS IN SESSION
$_SESSION["crs_delete_member_ids"] = $_POST["member"];
$counter = 0;
$f_result = array();
foreach($_POST["member"] as $member_id)
{
#$member_data = $this->object->members_obj->getUserData($member_id);
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
$message = '';
if($this->object->members_obj->isAdmin($member_id))
{
$message = $this->lng->txt("crs_admin");
}
if($this->object->members_obj->isTutor($member_id))
{
$message = $this->lng->txt("crs_tutor");
}
if($this->object->members_obj->isMember($member_id))
{
$message = $this->lng->txt("crs_member");
}
$f_result[$counter][] = $message;
unset($tmp_obj);
++$counter;
}
}
$this->__showDeleteMembersTable($f_result);
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::deleteStarterObject | ( | ) |
Definition at line 608 of file class.ilObjCourseGUI.php.
References $_GET, listStructureObject(), and ilUtil::sendInfo().
{
include_once './Modules/Course/classes/class.ilCourseStart.php';
global $rbacsystem;
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$crs_start =& new ilCourseStart($this->object->getRefId(),$this->object->getId());
$crs_start->delete((int) $_GET['del_starter']);
ilUtil::sendInfo($this->lng->txt('crs_starter_deleted'));
$this->listStructureObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::deleteSubscribers | ( | ) |
Definition at line 2491 of file class.ilObjCourseGUI.php.
References $_SESSION, __showDeleteSubscriberTable(), ilFormat::formatUnixTime(), ilObjectFactory::getInstanceByObjId(), membersObject(), and ilUtil::sendInfo().
Referenced by gatewayObject().
{
global $rbacsystem;
$this->tabs_gui->setTabActive('members');
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["subscriber"]) or !count($_POST["subscriber"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_subscribers_selected"));
$this->membersObject();
return false;
}
ilUtil::sendInfo($this->lng->txt("crs_delete_subscribers_sure"));
// SHOW DELETE SCREEN
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_editMembers.html",'Modules/Course');
$this->object->initCourseMemberObject();
// SAVE IDS IN SESSION
$_SESSION["crs_delete_subscriber_ids"] = $_POST["subscriber"];
$counter = 0;
$f_result = array();
foreach($_POST["subscriber"] as $member_id)
{
$member_data = $this->object->members_obj->getSubscriberData($member_id);
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
#$f_result[$counter][] = strftime("%Y-%m-%d %R",$member_data["time"]);
$f_result[$counter][] = ilFormat::formatUnixTime($member_data["time"],true);
unset($tmp_obj);
++$counter;
}
}
return $this->__showDeleteSubscriberTable($f_result);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::downloadArchivesObject | ( | ) |
Definition at line 1507 of file class.ilObjCourseGUI.php.
References ilUtil::deliverFile(), and ilUtil::sendInfo().
{
global $rbacsystem;
$_POST["archives"] = $_POST["archives"] ? $_POST["archives"] : array();
// MINIMUM ACCESS LEVEL = 'write'
if(!$rbacsystem->checkAccess("read", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
if(!count($_POST['archives']))
{
ilUtil::sendInfo($this->lng->txt('crs_no_archive_selected'));
$this->archiveObject();
return false;
}
if(count($_POST['archives']) > 1)
{
ilUtil::sendInfo($this->lng->txt('crs_select_one_archive'));
$this->archiveObject();
return false;
}
$this->object->initCourseArchiveObject();
$abs_path = $this->object->archives_obj->getArchiveFile((int) $_POST['archives'][0]);
$basename = basename($abs_path);
ilUtil::deliverFile($abs_path,$basename);
}
Here is the call graph for this function:| ilObjCourseGUI::editCourseIconsObject | ( | ) |
edit container icons
Definition at line 1268 of file class.ilObjCourseGUI.php.
References setSubTabs(), and ilContainerGUI::showCustomIconsEditing().
{
global $rbacsystem;
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_edit_icons.html",'Modules/Course');
$this->showCustomIconsEditing();
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt("save"));
$this->tpl->setVariable("CMD_CANCEL", "cancel");
$this->tpl->setVariable("CMD_SUBMIT", "updateCourseIcons");
$this->tpl->parseCurrentBlock();
}
Here is the call graph for this function:| ilObjCourseGUI::editInfoObject | ( | ) |
Edit info page informations.
public
Definition at line 728 of file class.ilObjCourseGUI.php.
References $file, $files, $ilErr, ilCourseFile::_readFilesByCourse(), initInfoEditor(), and setSubTabs().
Referenced by confirmDeleteInfoFilesObject(), deleteInfoFilesObject(), and updateInfoObject().
{
include_once 'Modules/Course/classes/class.ilCourseFile.php';
global $ilErr,$ilAccess;
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
}
$this->setSubTabs('properties');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_info_settings');
$this->initInfoEditor();
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.edit_info.html','Modules/Course');
$this->tpl->setVariable('INFO_TABLE',$this->form->getHTML());
if(!count($files = ilCourseFile::_readFilesByCourse($this->object->getId())))
{
return true;
}
$rows = array();
foreach($files as $file)
{
$table_data['id'] = $file->getFileId();
$table_data['filename'] = $file->getFileName();
$table_data['filetype'] = $file->getFileType();
$table_data['filesize'] = $file->getFileSize();
$rows[] = $table_data;
}
include_once("./Modules/Course/classes/class.ilCourseInfoFileTableGUI.php");
$table_gui = new ilCourseInfoFileTableGUI($this, "edit");
$table_gui->setTitle($this->lng->txt("crs_info_download"));
$table_gui->setData($rows);
$table_gui->addCommandButton("cancel", $this->lng->txt("cancel"));
$table_gui->addMultiCommand("confirmDeleteInfoFiles", $this->lng->txt("delete"));
$table_gui->setSelectAllCheckbox("file_id");
$this->tpl->setVariable('INFO_FILE_TABLE',$table_gui->getHTML());
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::editMapSettingsObject | ( | ) |
Edit Map Settings.
Definition at line 4767 of file class.ilObjCourseGUI.php.
References $ilCtrl, ilGoogleMapUtil::getDefaultSettings(), ilGoogleMapUtil::isActivated(), and setSubTabs().
{
global $ilUser, $ilCtrl, $ilUser, $ilAccess;
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
if (!ilGoogleMapUtil::isActivated() ||
!$ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
return;
}
$latitude = $this->object->getLatitude();
$longitude = $this->object->getLongitude();
$zoom = $this->object->getLocationZoom();
// Get Default settings, when nothing is set
if ($latitude == 0 && $longitude == 0 && $zoom == 0)
{
$def = ilGoogleMapUtil::getDefaultSettings();
$latitude = $def["latitude"];
$longitude = $def["longitude"];
$zoom = $def["zoom"];
}
//$this->tpl->setTitleIcon(ilUtil::getImagePath("icon_pd_b.gif"), $this->lng->txt("personal_desktop"));
//$this->tpl->setVariable("HEADER", $this->lng->txt("personal_desktop"));
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($this->lng->txt("crs_map_settings"));
// enable map
$public = new ilCheckboxInputGUI($this->lng->txt("crs_enable_map"),
"enable_map");
$public->setValue("1");
$public->setChecked($this->object->getEnableCourseMap());
$form->addItem($public);
// map location
$loc_prop = new ilLocationInputGUI($this->lng->txt("crs_map_location"),
"location");
$loc_prop->setLatitude($latitude);
$loc_prop->setLongitude($longitude);
$loc_prop->setZoom($zoom);
$form->addItem($loc_prop);
$form->addCommandButton("saveMapSettings", $this->lng->txt("save"));
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
//$this->tpl->show();
}
Here is the call graph for this function:| ilObjCourseGUI::editMemberObject | ( | ) |
Definition at line 2195 of file class.ilObjCourseGUI.php.
References $_GET, __showEditMemberTable(), ilObjRole::_getTranslation(), ilUtil::formCheckbox(), formSelect(), ilObjectFactory::getInstanceByObjId(), and setSubTabs().
{
global $rbacsystem,$ilObjDataCache;
include_once('classes/class.ilObjRole.php');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_member_administration');
$this->object->initCourseMemberObject();
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
// CHECK MEMBER_ID
if(!isset($_GET["member_id"]) or !$this->object->members_obj->isAssigned((int) $_GET["member_id"]))
{
$this->ilias->raiseError($this->lng->txt("crs_no_valid_member_id_given"),$this->ilias->error_obj->MESSAGE);
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_editMembers.html",'Modules/Course');
$f_result = array();
// GET USER OBJ
$tmp_obj = ilObjectFactory::getInstanceByObjId((int) $_GET['member_id'],false);
$f_result[0][] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname();
$f_result[0][] = $tmp_obj->getLogin();
$f_result[0][] = ilUtil::formCheckbox($this->object->members_obj->hasPassed((int) $_GET['member_id']) ? 1 : 0,
'passed',
1);
$f_result[0][] = ilUtil::formCheckbox($this->object->members_obj->isNotificationEnabled((int) $_GET['member_id']) ? 1 : 0,
'notification',
1);
$f_result[0][] = ilUtil::formCheckbox($this->object->members_obj->isBlocked((int) $_GET['member_id']) ? 1 : 0,
'blocked',
1);
foreach($this->object->members_obj->getRoles() as $role_id)
{
$roles[$role_id] = ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id));
}
$f_result[0][] = ilUtil::formSelect($this->object->members_obj->getAssignedRoles((int) $_GET['member_id']),
"roles[]",
$roles,
true,true,count($roles));
$this->__showEditMemberTable($f_result);
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::editObject | ( | ) |
edit object
public
Reimplemented from ilObjectGUI.
Definition at line 1020 of file class.ilObjCourseGUI.php.
References $ilErr, __prepareDateSelect(), __prepareTimeSelect(), ilUtil::formCheckbox(), ilUtil::formRadioButton(), ilUtil::makeDateSelect(), ilUtil::makeTimeSelect(), and setSubTabs().
Referenced by updateObject().
{
global $ilAccess,$ilErr;
if(!$ilAccess->checkAccess('write','',$this->ref_id))
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
}
$this->setSubTabs('properties');
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_settings');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.crs_settings.html','Modules/Course');
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
// Visibility
$this->tpl->setVariable("TXT_VISIBILITY",$this->lng->txt('crs_visibility'));
$this->tpl->setVariable("TXT_VISIBILITY_UNVISIBLE",$this->lng->txt('crs_visibility_unvisible'));
$this->tpl->setVariable("TXT_VISIBILITY_LIMITLESS",$this->lng->txt('crs_visibility_limitless'));
$this->tpl->setVariable("TXT_VISIBILITY_UNTIL",$this->lng->txt('crs_visibility_until'));
$this->tpl->setVariable("ACTIVATION_UNV_INFO",$this->lng->txt('crs_availability_unvisible_info'));
$this->tpl->setVariable("ACTIVATION_UNL_INFO",$this->lng->txt('crs_availability_limitless_info'));
$this->tpl->setVariable("ACTIVATION_LIM_INFO",$this->lng->txt('crs_availability_until_info'));
$this->tpl->setVariable("ACTIVATION_OFFLINE",
ilUtil::formRadioButton(($this->object->getActivationType() == IL_CRS_ACTIVATION_OFFLINE) ? 1 : 0,
'activation_type',
IL_CRS_ACTIVATION_OFFLINE));
$this->tpl->setVariable("ACTIVATION_UNLIMITED",
ilUtil::formRadioButton(($this->object->getActivationType() == IL_CRS_ACTIVATION_UNLIMITED) ? 1 : 0,
'activation_type',
IL_CRS_ACTIVATION_UNLIMITED));
$this->tpl->setVariable("ACTIVATION_UNTIL",
ilUtil::formRadioButton(($this->object->getActivationType() == IL_CRS_ACTIVATION_LIMITED) ? 1 : 0,
'activation_type',
IL_CRS_ACTIVATION_LIMITED));
$this->tpl->setVariable("TXT_BEGIN",$this->lng->txt('crs_start'));
$this->tpl->setVariable("TXT_END",$this->lng->txt('crs_end'));
$this->tpl->setVariable("TXT_TIME",$this->lng->txt('time'));
$date = $this->__prepareDateSelect($this->object->getActivationStart());
$this->tpl->setVariable("ACTIVATION_START_DATE_SELECT",
ilUtil::makeDateSelect('activation_start',$date['y'],$date['m'],$date['d'],date('Y',time())));
$date = $this->__prepareTimeSelect($this->object->getActivationStart());
$this->tpl->setVariable("ACTIVATION_START_TIME_SELECT",
ilUtil::makeTimeSelect('activation_start_time',true,$date['h'],$date['m'],0,false));
$date = $this->__prepareDateSelect($this->object->getActivationEnd());
$this->tpl->setVariable("ACTIVATION_END_DATE_SELECT",
ilUtil::makeDateSelect('activation_end',$date['y'],$date['m'],$date['d'],date('Y',time())));
$date = $this->__prepareTimeSelect($this->object->getActivationEnd());
$this->tpl->setVariable("ACTIVATION_END_TIME_SELECT",
ilUtil::makeTimeSelect('activation_end_time',true,$date['h'],$date['m'],0,false));
// Registration
$this->tpl->setVariable("TXT_REGISTRATION_DEACTIVATED",$this->lng->txt('crs_reg_deactivated'));
$this->tpl->setVariable("TXT_REGISTRATION_UNLIMITED",$this->lng->txt('crs_registration_unlimited'));
$this->tpl->setVariable("TXT_REGISTRATION_LIMITED",$this->lng->txt('crs_registration_limited'));
$this->tpl->setVariable("TXT_REGISTRATION_TYPE",$this->lng->txt('crs_registration_type'));
$this->tpl->setVariable("REG_DEAC_INFO",$this->lng->txt('crs_registration_deactivated'));
$this->tpl->setVariable("REG_UNLIM_INFO",$this->lng->txt('crs_reg_unlim_info'));
$this->tpl->setVariable("REG_LIM_INFO",$this->lng->txt('crs_reg_lim_info'));
$this->tpl->setVariable("REG_MAX_INFO",$this->lng->txt('crs_reg_max_info'));
$this->tpl->setVariable("REG_NOTY_INFO",$this->lng->txt('crs_reg_notify_info'));
$this->tpl->setVariable("REG_WAIT_INFO",$this->lng->txt('crs_wait_info'));
$this->tpl->setVariable('REG_TYPE_INFO',$this->lng->txt('crs_reg_type_info'));
$this->tpl->setVariable("TXT_SUBSCRIPTION",$this->lng->txt("crs_reg"));
$this->tpl->setVariable("TXT_SUBSCRIPTION_UNLIMITED",$this->lng->txt("crs_unlimited"));
$this->tpl->setVariable("TXT_SUBSCRIPTION_START",$this->lng->txt("crs_start"));
$this->tpl->setVariable("TXT_SUBSCRIPTION_END",$this->lng->txt("crs_end"));
$this->tpl->setVariable("TXT_SUBSCRIPTION_OPTIONS",$this->lng->txt("crs_subscription_type"));
$this->tpl->setVariable("TXT_SUBSCRIPTION_MAX_MEMBERS",$this->lng->txt("crs_subscription_max_members"));
$this->tpl->setVariable("TXT_SUBSCRIPTION_NOTIFY",$this->lng->txt("crs_subscription_notify"));
$this->tpl->setVariable("TXT_DEACTIVATED",$this->lng->txt("crs_subscription_options_deactivated"));
$this->tpl->setVariable("TXT_CONFIRMATION",$this->lng->txt("crs_subscription_options_confirmation"));
$this->tpl->setVariable("TXT_DIRECT",$this->lng->txt("crs_subscription_options_direct"));
$this->tpl->setVariable("TXT_PASSWORD",$this->lng->txt("crs_subscription_options_password"));
$this->tpl->setVariable("TXT_WAIT",$this->lng->txt('crs_waiting_list'));
$this->tpl->setVariable("TXT_NOTIFY",$this->lng->txt('crs_notification'));
$this->tpl->setVariable("REGISTRATION_DEACTIVATED",
ilUtil::formRadioButton(($this->object->getSubscriptionLimitationType() ==
IL_CRS_SUBSCRIPTION_DEACTIVATED) ? 1 : 0,
'subscription_limitation_type',
IL_CRS_SUBSCRIPTION_DEACTIVATED));
$this->tpl->setVariable("REGISTRATION_UNLIMITED",
ilUtil::formRadioButton(($this->object->getSubscriptionLimitationType() ==
IL_CRS_SUBSCRIPTION_UNLIMITED) ? 1 : 0,
'subscription_limitation_type',
IL_CRS_SUBSCRIPTION_UNLIMITED));
$this->tpl->setVariable("REGISTRATION_LIMITED",
ilUtil::formRadioButton(($this->object->getSubscriptionLimitationType() ==
IL_CRS_SUBSCRIPTION_LIMITED) ? 1 : 0,
'subscription_limitation_type',
IL_CRS_SUBSCRIPTION_LIMITED));
$this->tpl->setVariable("RADIO_SUB_CONFIRMATION",
ilUtil::formRadioButton(($this->object->getSubscriptionType() ==
IL_CRS_SUBSCRIPTION_CONFIRMATION) ? 1 : 0,
'subscription_type',
IL_CRS_SUBSCRIPTION_CONFIRMATION));
$this->tpl->setVariable("RADIO_SUB_DIRECT",
ilUtil::formRadioButton(($this->object->getSubscriptionType() ==
IL_CRS_SUBSCRIPTION_DIRECT) ? 1 : 0,
'subscription_type',
IL_CRS_SUBSCRIPTION_DIRECT));
$this->tpl->setVariable("RADIO_SUB_PASSWORD",
ilUtil::formRadioButton(($this->object->getSubscriptionType() ==
IL_CRS_SUBSCRIPTION_PASSWORD) ? 1 : 0,
'subscription_type',
IL_CRS_SUBSCRIPTION_PASSWORD));
$this->tpl->setVariable("SUBSCRIPTION_PASSWORD",$this->object->getSubscriptionPassword());
$date = $this->__prepareDateSelect($this->object->getSubscriptionStart());
$this->tpl->setVariable("SUBSCRIPTION_START_DATE_SELECT",
ilUtil::makeDateSelect('subscription_start',$date['y'],$date['m'],$date['d'],date('Y',time())));
$date = $this->__prepareTimeSelect($this->object->getSubscriptionStart());
$this->tpl->setVariable("SUBSCRIPTION_START_TIME_SELECT",
ilUtil::makeTimeSelect('subscription_start_time',true,$date['h'],$date['m'],0,false));
$date = $this->__prepareDateSelect($this->object->getSubscriptionEnd());
$this->tpl->setVariable("SUBSCRIPTION_END_DATE_SELECT",
ilUtil::makeDateSelect('subscription_end',$date['y'],$date['m'],$date['d'],date('Y',time())));
$date = $this->__prepareTimeSelect($this->object->getSubscriptionEnd());
$this->tpl->setVariable("SUBSCRIPTION_END_TIME_SELECT",
ilUtil::makeTimeSelect('subscription_end_time',true,$date['h'],$date['m'],0,false));
$this->tpl->setVariable("SUBSCRIPTION_MAX_MEMBERS",$this->object->getSubscriptionMaxMembers());
$this->tpl->setVariable("CHECK_WAIT",ilUtil::formCheckbox($this->object->enabledWaitingList(),
'waiting_list',
1));
$this->tpl->setVariable("CHECK_SUBSCRIPTION_NOTIFY",ilUtil::formCheckbox($this->object->getSubscriptionNotify(),
'subscription_notification',
1));
// Viewmode
$this->tpl->setVariable("TXT_VIEWMODE",$this->lng->txt('crs_view_mode'));
$this->tpl->setVariable("TXT_STANDARD_VIEW",$this->lng->txt('crs_view_standard'));
$this->tpl->setVariable("TXT_OBJ_VIEW",$this->lng->txt('crs_view_objective'));
$this->tpl->setVariable("TXT_TIMING_VIEW",$this->lng->txt('crs_view_timing'));
$this->tpl->setVariable("TXT_ARCHIVE_VIEW",$this->lng->txt('crs_view_archive'));
$this->tpl->setVariable("TXT_DOWNLOAD",$this->lng->txt('crs_archive_download'));
$this->tpl->setVariable("VIEW_STANDARD_INFO",$this->lng->txt('crs_view_info_standard'));
$this->tpl->setVariable("VIEW_OBJECTIVE_INFO",$this->lng->txt('crs_view_info_objective'));
$this->tpl->setVariable("VIEW_TIMING_INFO",$this->lng->txt('crs_view_info_timing'));
$this->tpl->setVariable("VIEW_ARCHIVE_INFO",$this->lng->txt('crs_archive_info'));
$this->tpl->setVariable("VIEW_STANDARD",ilUtil::formRadioButton(
($this->object->getViewMode() == IL_CRS_VIEW_STANDARD) ? true : false,
'view_mode',
IL_CRS_VIEW_STANDARD));
$this->tpl->setVariable("VIEW_OBJECTIVE",ilUtil::formRadioButton(
($this->object->getViewMode() == IL_CRS_VIEW_OBJECTIVE) ? true : false,
'view_mode',
IL_CRS_VIEW_OBJECTIVE));
$this->tpl->setVariable("VIEW_TIMING",ilUtil::formRadioButton(
($this->object->getViewMode() == IL_CRS_VIEW_TIMING) ? true : false,
'view_mode',
IL_CRS_VIEW_TIMING));
$this->tpl->setVariable("VIEW_ARCHIVE",ilUtil::formRadioButton(
($this->object->getViewMode() == IL_CRS_VIEW_ARCHIVE) ? true : false,
'view_mode',
IL_CRS_VIEW_ARCHIVE));
$date = $this->__prepareDateSelect($this->object->getArchiveStart());
$this->tpl->setVariable("ARCHIVE_START_DATE_SELECT",
ilUtil::makeDateSelect('archive_start',$date['y'],$date['m'],$date['d'],date('Y',time())));
$date = $this->__prepareTimeSelect($this->object->getArchiveStart());
$this->tpl->setVariable("ARCHIVE_START_TIME_SELECT",
ilUtil::makeTimeSelect('archive_start_time',true,$date['h'],$date['m'],0,false));
$date = $this->__prepareDateSelect($this->object->getArchiveEnd());
$this->tpl->setVariable("ARCHIVE_END_DATE_SELECT",
ilUtil::makeDateSelect('archive_end',$date['y'],$date['m'],$date['d'],date('Y',time())));
$date = $this->__prepareTimeSelect($this->object->getArchiveEnd());
$this->tpl->setVariable("ARCHIVE_END_TIME_SELECT",
ilUtil::makeTimeSelect('archive_end_time',true,$date['h'],$date['m'],0,false));
$this->tpl->setVariable("CHECK_ARCHIVE_DOWNLOAD",ilUtil::formCheckbox(
$this->object->getArchiveType() == IL_CRS_ARCHIVE_DOWNLOAD ? true : false,
'archive_type',
IL_CRS_ARCHIVE_DOWNLOAD));
// Sorting
$this->tpl->setVariable("TXT_SORT",$this->lng->txt('crs_sortorder_abo'));
$this->tpl->setVariable("TXT_MANUAL",$this->lng->txt("crs_sort_manual"));
$this->tpl->setVariable("TXT_TITLE",$this->lng->txt("crs_sort_title"));
$this->tpl->setVariable("TXT_SORT_ACTIVATION",$this->lng->txt("crs_sort_activation"));
$this->tpl->setVariable("SORT_TITLE",ilUtil::formRadioButton(
$this->object->getOrderType() == IL_CRS_SORT_TITLE ? true : false,
'order_type',
IL_CRS_SORT_TITLE));
$this->tpl->setVariable("SORT_MANUAL",ilUtil::formRadioButton(
$this->object->getOrderType() == IL_CRS_SORT_MANUAL ? true : false,
'order_type',
IL_CRS_SORT_MANUAL));
$this->tpl->setVariable("SORT_TIMING",ilUtil::formRadioButton(
$this->object->getOrderType() == IL_CRS_SORT_ACTIVATION ? true : false,
'order_type',
IL_CRS_SORT_ACTIVATION));
$this->tpl->setVariable("SORT_TITLE_INFO",$this->lng->txt('crs_sort_title_info'));
$this->tpl->setVariable("SORT_MANUAL_INFO",$this->lng->txt('crs_sort_manual_info'));
$this->tpl->setVariable("SORT_TIMING_INFO",$this->lng->txt('crs_sort_timing_info'));
// Further settings
$this->tpl->setVariable("TXT_FURTHER_SETTINGS",$this->lng->txt('crs_further_settings'));
$this->tpl->setVariable("TXT_ADD_REMOVE_DESKTOP_ITEMS",$this->lng->txt('crs_add_remove_from_desktop'));
$this->tpl->setVariable("TXT_ADD_DESKTOP_INFO",$this->lng->txt('crs_add_remove_from_desktop_info'));
$this->tpl->setVariable("CHECK_DESKTOP",ilUtil::formCheckbox($this->object->getAboStatus(),
'abo',
1));
$this->tpl->setVariable("TXT_SHOW_MEMBERS",$this->lng->txt('crs_show_members'));
$this->tpl->setVariable("TXT_SHOW_MEMBERS_INFO",$this->lng->txt('crs_show_members_info'));
$this->tpl->setVariable("SHOW_MEMBERS",ilUtil::formCheckbox($this->object->getShowMembers(),
'show_members',
1));
// Footer
$this->tpl->setVariable("TXT_BTN_UPDATE",$this->lng->txt('save'));
$this->tpl->setVariable("TXT_CANCEL",$this->lng->txt('cancel'));
}
Here is the call graph for this function:
Here is the caller graph for this function:| & ilObjCourseGUI::executeCommand | ( | ) |
execute command note: this method is overwritten in all container objects
Reimplemented from ilContainerGUI.
Definition at line 4314 of file class.ilObjCourseGUI.php.
References $_GET, $cmd, $ilErr, $ret, ilPaymentObject::_hasAccess(), forwardToAgreement(), ilObjectGUI::getCreationMode(), infoScreen(), ilObjectGUI::prepareOutput(), and setSubTabs().
{
global $rbacsystem,$ilUser,$ilAccess,$ilErr,$ilTabs,$ilNavigationHistory;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
// check if object is purchased
include_once './payment/classes/class.ilPaymentObject.php';
if (!$this->creation_mode) // don't check, if new object is created
{
if(!ilPaymentObject::_hasAccess($this->object->getRefId()))
{
if ($cmd != "addToShoppingCart")
{
$this->ctrl->setCmd("");
$cmd = "";
}
include_once './payment/classes/class.ilPaymentPurchaseGUI.php';
$this->ctrl->setReturn($this,"");
$pp_gui =& new ilPaymentPurchaseGUI($this->object->getRefId());
$this->ctrl->forwardCommand($pp_gui);
return true;
}
// add entry to navigation history
if (!$this->getCreationMode() &&
$ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$ilNavigationHistory->addItem($_GET["ref_id"],
"repository.php?cmd=frameset&ref_id=".$_GET["ref_id"], "crs");
}
}
switch($next_class)
{
case "ilinfoscreengui":
$this->infoScreen(); // forwards command
break;
case 'ilmdeditorgui':
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
$this->tabs_gui->setTabActive('meta_data');
break;
case "ilcourseregistergui":
$this->ctrl->setReturn($this,"");
$reg_gui =& new ilCourseRegisterGUI($this->object->getRefId());
$ret =& $this->ctrl->forwardCommand($reg_gui);
break;
case 'ilcourseuserfieldsgui':
include_once 'Modules/Course/classes/Export/class.ilCourseUserFieldsGUI.php';
$cdf_gui = new ilCourseUserFieldsGUI($this->object->getId());
$this->setSubTabs('properties');
$this->tabs_gui->setTabActive('settings');
$this->ctrl->forwardCommand($cdf_gui);
break;
case "ilcourseobjectivesgui":
include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
$this->ctrl->setReturn($this,"");
$reg_gui =& new ilCourseObjectivesGUI($this->object->getRefId());
$ret =& $this->ctrl->forwardCommand($reg_gui);
break;
case 'ilobjcoursegroupinggui':
include_once './Modules/Course/classes/class.ilObjCourseGroupingGUI.php';
$this->ctrl->setReturn($this,'edit');
$this->setSubTabs('properties');
$crs_grp_gui =& new ilObjCourseGroupingGUI($this->object,(int) $_GET['obj_id']);
$this->ctrl->forwardCommand($crs_grp_gui);
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('groupings');
break;
case "ilconditionhandlerinterface":
include_once './classes/class.ilConditionHandlerInterface.php';
// preconditions for single course items
if($_GET['item_id'])
{
$this->ctrl->saveParameter($this,'item_id',$_GET['item_id']);
$this->tabs_gui->setTabActive('content');
$this->setSubTabs("item_activation");
$new_gui =& new ilConditionHandlerInterface($this,(int) $_GET['item_id']);
$this->ctrl->forwardCommand($new_gui);
}
else // preconditions for whole course
{
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
$new_gui =& new ilConditionHandlerInterface($this);
$this->ctrl->forwardCommand($new_gui);
}
break;
case "illearningprogressgui":
include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
$new_gui =& new ilLearningProgressGUI(LP_MODE_REPOSITORY,
$this->object->getRefId(),
$_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId());
$this->ctrl->forwardCommand($new_gui);
$this->tabs_gui->setTabActive('learning_progress');
break;
case 'ilpermissiongui':
include_once("./classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
$this->tabs_gui->setTabActive('perm_settings');
break;
case 'ilrepositorysearchgui':
include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
$rep_search =& new ilRepositorySearchGUI();
$rep_search->setCallback($this,'assignMembersObject');
// Set tabs
$this->tabs_gui->setTabActive('members');
$this->ctrl->setReturn($this,'members');
$ret =& $this->ctrl->forwardCommand($rep_search);
$this->setSubTabs('members');
$this->tabs_gui->setSubTabActive('members');
break;
case 'ilcoursecontentinterface':
$this->initCourseContentInterface();
$this->cci_obj->cci_setContainer($this);
$this->ctrl->forwardCommand($this->cci_obj);
$this->setSubTabs('content');
$this->tabs_gui->setTabActive('content');
break;
case 'ilcoursecontentgui':
$this->ctrl->setReturn($this,'members');
include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
$course_content_obj = new ilCourseContentGUI($this);
$this->ctrl->forwardCommand($course_content_obj);
break;
case 'ilobjusergui':
require_once './Services/User/classes/class.ilObjUserGUI.php';
$user_gui = new ilObjUserGUI("",$_GET["user"], false, false);
$html = $this->ctrl->forwardCommand($user_gui);
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_members_gallery');
$this->tpl->setVariable("ADM_CONTENT", $html);
break;
case 'ilmemberexportgui':
include_once('./Modules/Course/classes/Export/class.ilMemberExportGUI.php');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('export_members');
$export = new ilMemberExportGUI($this->object->getRefId());
$this->ctrl->forwardCommand($export);
break;
case 'ilcourseagreementgui':
$this->forwardToAgreement();
break;
case 'ileventadministrationgui':
include_once('Modules/Course/classes/Event/class.ilEventAdministrationGUI.php');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('events');
$events = new ilEventAdministrationGUI($this);
$this->ctrl->forwardCommand($events);
break;
default:
if(!$this->creation_mode and !$ilAccess->checkAccess('visible','',$this->object->getRefId(),'crs'))
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
}
if( !$this->creation_mode
&& $cmd != 'infoScreen'
&& $cmd != 'sendfile'
&& !$rbacsystem->checkAccess("read",$this->object->getRefId())
|| $cmd == 'join'
|| $cmd == 'subscribe')
{
$this->ctrl->setReturn($this,"infoScreen");
$reg_gui =& new ilCourseRegisterGUI($this->object->getRefId());
$ret =& $this->ctrl->forwardCommand($reg_gui);
break;
}
if($cmd == 'listObjectives')
{
include_once './Modules/Course/classes/class.ilCourseObjectivesGUI.php';
$this->ctrl->setReturn($this,"");
$obj_gui =& new ilCourseObjectivesGUI($this->object->getRefId());
$ret =& $this->ctrl->forwardCommand($obj_gui);
break;
}
if((!$this->creation_mode)&&(!$rbacsystem->checkAccess("write",$this->object->getRefId()))){
include_once('Services/Feedback/classes/class.ilFeedbackGUI.php');
$feedbackGUI = new ilFeedbackGUI();
$feedbackGUI->handleRequiredFeedback($this->object->getRefId());
}
if(!$cmd)
{
$cmd = 'view';
}
$cmd .= 'Object';
$this->$cmd();
break;
}
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::fetchPrintMemberData | ( | $ | a_members | ) |
Definition at line 3297 of file class.ilObjCourseGUI.php.
References $_SESSION, ilObjectFactory::getInstanceByObjId(), and ilUtil::sortArray().
Referenced by printMembersObject().
{
global $ilAccess;
$is_admin = (bool) $ilAccess->checkAccess("write",'',$this->object->getRefId());
foreach($a_members as $member_id)
{
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$print_member[$member_id]['login'] = $tmp_obj->getLogin();
$print_member[$member_id]['name'] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname();
if($this->object->members_obj->isAdmin($member_id))
{
$print_member[$member_id]['role'] = $this->lng->txt("il_crs_admin");
}
elseif($this->object->members_obj->isTutor($member_id))
{
$print_member[$member_id]['role'] = $this->lng->txt("il_crs_tutor");
}
elseif($this->object->members_obj->isMember($member_id))
{
$print_member[$member_id]['role'] = $this->lng->txt("il_crs_member");
}
if($this->object->members_obj->isAdmin($member_id) or $this->object->members_obj->isTutor($member_id))
{
if($this->object->members_obj->isNotificationEnabled($member_id))
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_notify");
}
else
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_no_notify");
}
}
else
{
if($this->object->members_obj->isBlocked($member_id))
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_blocked");
}
else
{
$print_member[$member_id]['status'] = $this->lng->txt("crs_unblocked");
}
}
if($is_admin)
{
$print_member[$member_id]['passed'] = $this->object->members_obj->hasPassed($member_id) ?
$this->lng->txt('crs_member_passed') :
$this->lng->txt('crs_member_not_passed');
}
}
}
switch($_SESSION['crs_print_sort'])
{
case 'lastname':
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order']);
case 'login':
return ilUtil::sortArray($print_member,'login',$_SESSION['crs_print_order']);
case 'passed':
return ilUtil::sortArray($print_member,'passed',$_SESSION['crs_print_order']);
case 'blocked':
case 'notification':
return ilUtil::sortArray($print_member,'status',$_SESSION['crs_print_order']);
default:
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order']);
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::fetchPrintSubscriberData | ( | $ | a_members | ) |
Definition at line 3267 of file class.ilObjCourseGUI.php.
References $_SESSION, ilFormat::formatUnixTime(), ilObjectFactory::getInstanceByObjId(), and ilUtil::sortArray().
Referenced by printMembersObject().
{
foreach($a_members as $member_id)
{
$member_data = $this->object->members_obj->getSubscriberData($member_id);
if($tmp_obj = ilObjectFactory::getInstanceByObjId($member_id,false))
{
$print_member[$member_id]['login'] = $tmp_obj->getLogin();
$print_member[$member_id]['name'] = $tmp_obj->getLastname().', '.$tmp_obj->getFirstname();
$print_member[$member_id]['time'] = ilFormat::formatUnixTime($member_data['time'],true);
}
}
switch($_SESSION['crs_print_sort'])
{
case 'lastname':
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order']);
case 'login':
return ilUtil::sortArray($print_member,'login',$_SESSION['crs_print_order']);
case 'sub_time':
return ilUtil::sortArray($print_member,'time',$_SESSION['crs_print_order']);
default:
return ilUtil::sortArray($print_member,'name',$_SESSION['crs_print_order']);
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::forwardToAgreement | ( | ) | [private] |
Forward to CourseAgreementGUI.
private
Definition at line 4605 of file class.ilObjCourseGUI.php.
Referenced by executeCommand().
{
include_once('Modules/Course/classes/class.ilCourseAgreementGUI.php');
$this->ctrl->setReturn($this,'');
$agreement = new ilCourseAgreementGUI($this->object->getRefId());
$this->ctrl->forwardCommand($agreement);
}
Here is the caller graph for this function:| ilObjCourseGUI::gatewayObject | ( | ) |
Definition at line 69 of file class.ilObjCourseGUI.php.
References addFromWaitingList(), addSubscribers(), deleteSubscribers(), removeFromWaitingList(), and viewObject().
{
switch($_POST["action"])
{
case "deleteSubscribers":
$this->deleteSubscribers();
break;
case "addSubscribers":
$this->addSubscribers();
break;
case "addFromWaitingList":
$this->addFromWaitingList();
break;
case "removeFromWaitingList":
$this->removeFromWaitingList();
break;
default:
$this->viewObject();
break;
}
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::getTabs | ( | &$ | tabs_gui | ) |
common tabs for all container objects (should be called at the end of child getTabs() method
Reimplemented from ilContainerGUI.
Definition at line 3135 of file class.ilObjCourseGUI.php.
References $_GET, ilObjUserTracking::_enabledLearningProgress(), and ilLPObjSettings::_lookupMode().
{
global $rbacsystem,$ilAccess,$ilUser;
$this->object->initCourseMemberObject();
$this->ctrl->setParameter($this,"ref_id",$this->ref_id);
if($ilAccess->checkAccess('read','',$this->ref_id))
{
$tabs_gui->addTarget('view_content',
$this->ctrl->getLinkTarget($this,''));
}
if ($ilAccess->checkAccess('visible','',$this->ref_id))
{
//$next_class = $this->ctrl->getNextClass($this);
// this is not nice. tabs should be displayed in ilcoursegui
// not via ilrepositorygui, then next_class == ilinfoscreengui
// could be checked
$force_active = (strtolower($_GET["cmdClass"]) == "ilinfoscreengui"
|| strtolower($_GET["cmdClass"]) == "ilnotegui")
? true
: false;
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTargetByClass(
array("ilobjcoursegui", "ilinfoscreengui"), "showSummary"),
"infoScreen",
"", "", $force_active);
}
if ($ilAccess->checkAccess('write','',$this->ref_id))
{
$force_active = (strtolower($_GET["cmdClass"]) == "ilconditionhandlerinterface"
&& $_GET["item_id"] == "")
? true
: false;
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this, "edit"),
array("edit", "editMapSettings", "editCourseIcons", "listStructure"), "", "", $force_active);
}
// lom meta data
if ($ilAccess->checkAccess('write','',$this->ref_id))
{
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass(array('ilobjcoursegui','ilmdeditorgui'),'listSection'),
"",
"ilmdeditorgui");
}
// member list
if($ilAccess->checkAccess('write','',$this->ref_id))
{
$tabs_gui->addTarget("members",
$this->ctrl->getLinkTarget($this, "members"),
"members",
get_class($this));
}
elseif ($ilAccess->checkAccess('read','',$this->ref_id) &&
$this->object->getShowMembers() == $this->object->SHOW_MEMBERS_ENABLED &&
$ilUser->getId() != ANONYMOUS_USER_ID)
{
$tabs_gui->addTarget("members",
$this->ctrl->getLinkTarget($this, "membersGallery"),
"members",
get_class($this));
}
// learning objectives
if($ilAccess->checkAccess('write','',$this->ref_id))
{
$force_active = (strtolower($_GET["cmdClass"]) == "ilcourseobjectivesgui")
? true
: false;
$tabs_gui->addTarget("crs_objectives",
$this->ctrl->getLinkTarget($this,"listObjectives"),
"listObjectives",
get_class($this), "", $force_active);
}
// learning progress
include_once("Services/Tracking/classes/class.ilObjUserTracking.php");
include_once('Services/Tracking/classes/class.ilLPObjSettings.php');
if(ilObjUserTracking::_enabledLearningProgress() and
$ilUser->getId() != ANONYMOUS_USER_ID and
(($ilAccess->checkAccess('read','',$this->ref_id) and (ilLPObjSettings::_lookupMode($this->object->getId()) != LP_MODE_DEACTIVATED)) or
($ilAccess->checkAccess('write','',$this->ref_id))))
{
$tabs_gui->addTarget('learning_progress',
$this->ctrl->getLinkTargetByClass(array('ilobjcoursegui','illearningprogressgui'),''),
'',
array('illplistofobjectsgui','illplistofsettingsgui','illearningprogressgui','illplistofprogressgui'));
}
if ($ilAccess->checkAccess('edit_permission','',$this->ref_id))
{
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"),
array("perm","info","owner"), 'ilpermissiongui');
}
if ($this->ctrl->getTargetScript() == "adm_object.php")
{
$tabs_gui->addTarget("show_owner",
$this->ctrl->getLinkTarget($this, "owner"), "owner", get_class($this));
if ($this->tree->getSavedNodeData($this->ref_id))
{
$tabs_gui->addTarget("trash",
$this->ctrl->getLinkTarget($this, "trash"), "trash", get_class($this));
}
}
if($ilAccess->checkAccess('join','',$this->ref_id)
and !$this->object->members_obj->isAssigned($ilUser->getId()))
{
$tabs_gui->addTarget("join",
$this->ctrl->getLinkTarget($this, "join"),
'join',
"");
}
if($ilAccess->checkAccess('leave','',$this->object->getRefId())
and $this->object->members_obj->isAssigned($ilUser->getId())
and !$this->object->getShowMembers())
{
$tabs_gui->addTarget("crs_unsubscribe",
$this->ctrl->getLinkTarget($this, "unsubscribe"),
'unsubscribe',
"");
}
}
Here is the call graph for this function:| ilObjCourseGUI::ilObjCourseGUI | ( | ) |
Constructor public.
Definition at line 51 of file class.ilObjCourseGUI.php.
References $_GET, $ilCtrl, and ilContainerGUI::ilContainerGUI().
{
global $ilCtrl;
// CONTROL OPTIONS
$this->ctrl =& $ilCtrl;
$this->ctrl->saveParameter($this,array("ref_id","cmdClass"));
$this->type = "crs";
$this->ilContainerGUI('',(int) $_GET['ref_id'],true,false);
$this->lng->loadLanguageModule('crs');
$this->SEARCH_USER = 1;
$this->SEARCH_GROUP = 2;
$this->SEARCH_COURSE = 3;
}
Here is the call graph for this function:| ilObjCourseGUI::importFileObject | ( | ) |
Definition at line 195 of file class.ilObjCourseGUI.php.
References $_GET, ilObjectGUI::getReturnLocation(), ilUtil::redirect(), and ilUtil::sendInfo().
{
global $_FILES, $rbacsystem, $ilDB;
// check if file was uploaded
if($_FILES['xmldoc']['tmp_name'] == 'none' or !$_FILES['xmldoc']['tmp_name'])
{
$this->ilias->raiseError("No file selected!",$this->ilias->error_obj->MESSAGE);
}
// check correct file type
$info = pathinfo($_FILES["xmldoc"]["name"]);
if (strtolower($info["extension"]) != "zip")
{
$this->ilias->raiseError("File must be a zip file!",$this->ilias->error_obj->MESSAGE);
}
// Create new object
include_once("Modules/Course/classes/class.ilObjCourse.php");
$newObj = new ilObjCourse();
$newObj->setType('crs');
$newObj->setTitle($_FILES["xmldoc"]["name"]);
$newObj->setDescription("");
$newObj->create(true); // true for upload
$newObj->createReference();
$newObj->putInTree($_GET["ref_id"]);
$newObj->setPermissions($_GET["ref_id"]);
$newObj->initDefaultRoles();
// Copy xml file
include_once 'Modules/Course/classes/class.ilFileDataCourse.php';
$course_files = new ilFileDataCourse($newObj->getId());
$course_files->createImportFile($_FILES["xmldoc"]["tmp_name"],$_FILES['xmldoc']['name']);
$course_files->unpackImportFile();
$course_files->validateImportFile();
include_once 'Modules/Course/classes/class.ilCourseXMLParser.php';
$xml_parser = new ilCourseXMLParser($newObj,$course_files->getImportFile());
$xml_parser->startParsing();
// Update title description
$newObj->MDUpdateListener('General');
// delete import file
#$course_files->deleteImportFile();
ilUtil::sendInfo($this->lng->txt('crs_added'),true);
$this->ctrl->setParameter($this, "ref_id", $newObj->getRefId());
ilUtil::redirect($this->getReturnLocation("save",
$this->ctrl->getLinkTarget($this, "edit")));
//ilUtil::redirect($this->getReturnLocation("save","adm_object.php?".$this->link_params));
}
Here is the call graph for this function:| ilObjCourseGUI::infoScreen | ( | ) |
show information screen
Definition at line 323 of file class.ilObjCourseGUI.php.
References $_GET, $file, $files, $ilErr, ilObjectGUI::$tpl, ilCourseDefinedFieldDefinition::_fieldsToInfoString(), ilMDUtils::_fillHTMLMetaTags(), ilCourseDefinedFieldDefinition::_getFields(), ilExportFieldsInfo::_getInstance(), ilPrivacySettings::_getInstance(), ilCourseFile::_readFilesByCourse(), ilFormat::formatUnixTime(), ilUtil::makeClickable(), and ilAdvancedMDRecordGUI::MODE_INFO.
Referenced by executeCommand(), and infoScreenObject().
{
global $ilErr,$ilAccess;
if(!$ilAccess->checkAccess('visible','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
}
// Fill meta header tags
include_once('Services/MetaData/classes/class.ilMDUtils.php');
ilMDUtils::_fillHTMLMetaTags($this->object->getId(),$this->object->getId(),'crs');
$this->tabs_gui->setTabActive('info_short');
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
include_once 'Modules/Course/classes/class.ilCourseFile.php';
$files =& ilCourseFile::_readFilesByCourse($this->object->getId());
$info = new ilInfoScreenGUI($this);
$info->enablePrivateNotes();
$info->enableFeedback();
$info->enableNews();
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"]))
{
$info->enableNewsEditing();
}
if(strlen($this->object->getImportantInformation()) or
strlen($this->object->getSyllabus()) or
count($files))
{
$info->addSection($this->lng->txt('crs_general_informations'));
}
if(strlen($this->object->getImportantInformation()))
{
$info->addProperty($this->lng->txt('crs_important_info'),
"<strong>".nl2br(
ilUtil::makeClickable($this->object->getImportantInformation(), true)."</strong>"));
}
if(strlen($this->object->getSyllabus()))
{
$info->addProperty($this->lng->txt('crs_syllabus'), nl2br(
ilUtil::makeClickable ($this->object->getSyllabus(), true)));
}
// files
if(count($files))
{
$tpl = new ilTemplate('tpl.event_info_file.html',true,true,'Modules/Course');
foreach($files as $file)
{
$tpl->setCurrentBlock("files");
$this->ctrl->setParameter($this,'file_id',$file->getFileId());
$tpl->setVariable("DOWN_LINK",$this->ctrl->getLinkTarget($this,'sendfile'));
$tpl->setVariable("DOWN_NAME",$file->getFileName());
$tpl->setVariable("DOWN_INFO_TXT",$this->lng->txt('crs_file_size_info'));
$tpl->setVariable("DOWN_SIZE",$file->getFileSize());
$tpl->setVariable("TXT_BYTES",$this->lng->txt('bytes'));
$tpl->parseCurrentBlock();
}
$info->addProperty($this->lng->txt('crs_file_download'),
$tpl->get());
}
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
$record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_INFO,'crs',$this->object->getId());
$record_gui->setInfoObject($info);
$record_gui->parse();
// meta data
$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
// contact
if($this->object->hasContactData())
{
$info->addSection($this->lng->txt("crs_contact"));
}
if(strlen($this->object->getContactName()))
{
$info->addProperty($this->lng->txt("crs_contact_name"),
$this->object->getContactName());
}
if(strlen($this->object->getContactResponsibility()))
{
$info->addProperty($this->lng->txt("crs_contact_responsibility"),
$this->object->getContactResponsibility());
}
if(strlen($this->object->getContactPhone()))
{
$info->addProperty($this->lng->txt("crs_contact_phone"),
$this->object->getContactPhone());
}
if($this->object->getContactEmail())
{
$emails = split(",",$this->object->getContactEmail());
foreach ($emails as $email) {
$email = trim($email);
$etpl = new ilTemplate("tpl.crs_contact_email.html", true, true , 'Modules/Course');
$etpl->setVariable("EMAIL_LINK","ilias.php?baseClass=ilmailgui&type=new&rcp_to=".$email);
$etpl->setVariable("CONTACT_EMAIL", $email);
$mailString .= $etpl->get()."<br />";
}
$info->addProperty($this->lng->txt("crs_contact_email"), $mailString);
}
if(strlen($this->object->getContactConsultation()))
{
$info->addProperty($this->lng->txt("crs_contact_consultation"),
nl2br($this->object->getContactConsultation()));
}
//
// access
//
$info->addSection($this->lng->txt("access"));
$info->showLDAPRoleGroupMappingInfo();
// activation
if($this->object->getOfflineStatus())
{
$info->addProperty($this->lng->txt('crs_visibility'),
$this->lng->txt('crs_visibility_unvisible'));
}
elseif($this->object->getActivationUnlimitedStatus())
{
$info->addProperty($this->lng->txt("crs_visibility"),
$this->lng->txt('crs_unlimited'));
}
else
{
$info->addProperty($this->lng->txt("crs_visibility"),
ilFormat::formatUnixTime($this->object->getActivationStart(),true)." - ".
ilFormat::formatUnixTime($this->object->getActivationEnd(),true));
}
switch($this->object->getSubscriptionLimitationType())
{
case IL_CRS_SUBSCRIPTION_DEACTIVATED:
$txt = $this->lng->txt("crs_info_reg_deactivated");
break;
default:
switch($this->object->getSubscriptionType())
{
case IL_CRS_SUBSCRIPTION_CONFIRMATION:
$txt = $this->lng->txt("crs_info_reg_confirmation");
break;
case IL_CRS_SUBSCRIPTION_DIRECT:
$txt = $this->lng->txt("crs_info_reg_direct");
break;
case IL_CRS_SUBSCRIPTION_PASSWORD:
$txt = $this->lng->txt("crs_info_reg_password");
break;
}
}
// subscription
$info->addProperty($this->lng->txt("crs_info_reg"),$txt);
if($this->object->getSubscriptionLimitationType() != IL_CRS_SUBSCRIPTION_DEACTIVATED)
{
if($this->object->getSubscriptionUnlimitedStatus())
{
$info->addProperty($this->lng->txt("crs_reg_until"),
$this->lng->txt('crs_unlimited'));
}
elseif($this->object->getSubscriptionStart() < time())
{
$info->addProperty($this->lng->txt("crs_reg_until"),
$this->lng->txt('crs_to').' '.
ilFormat::formatUnixTime($this->object->getSubscriptionEnd(),true));
}
elseif($this->object->getSubscriptionStart() > time())
{
$info->addProperty($this->lng->txt("crs_reg_until"),
$this->lng->txt('crs_from').' '.
ilFormat::formatUnixTime($this->object->getSubscriptionStart(),true));
}
}
// archive
if($this->object->getViewMode() == IL_CRS_VIEW_ARCHIVE)
{
if($this->object->getArchiveType() != IL_CRS_ARCHIVE_NONE)
{
$info->addProperty($this->lng->txt("crs_archive"),
ilFormat::formatUnixTime($this->object->getArchiveStart(),true)." - ".
ilFormat::formatUnixTime($this->object->getArchiveEnd(),true));
}
}
// Confirmation
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
$privacy = ilPrivacySettings::_getInstance();
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
if($privacy->confirmationRequired() or ilCourseDefinedFieldDefinition::_getFields($this->object->getId()) or $privacy->enabledExport())
{
include_once('Services/PrivacySecurity/classes/class.ilExportFieldsInfo.php');
$field_info = ilExportFieldsInfo::_getInstance();
$this->lng->loadLanguageModule('ps');
$info->addSection($this->lng->txt('crs_user_agreement_info'));
$info->addProperty($this->lng->txt('ps_export_data'),$field_info->exportableFieldsToInfoString());
if(count($fields = ilCourseDefinedFieldDefinition::_fieldsToInfoString($this->object->getId())))
{
$info->addProperty($this->lng->txt('ps_crs_user_fields'),$fields);
}
}
$info->enableLearningProgress(true);
// forward the command
$this->ctrl->forwardCommand($info);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::infoScreenObject | ( | ) |
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed
Definition at line 313 of file class.ilObjCourseGUI.php.
References infoScreen().
{
$this->ctrl->setCmd("showSummary");
$this->ctrl->setCmdClass("ilinfoscreengui");
$this->infoScreen();
}
Here is the call graph for this function:| ilObjCourseGUI::initConditionHandlerGUI | ( | $ | item_id | ) |
Definition at line 4670 of file class.ilObjCourseGUI.php.
References $_GET.
{
include_once './classes/class.ilConditionHandlerInterface.php';
if(!is_object($this->chi_obj))
{
if($_GET['item_id'])
{
$this->chi_obj =& new ilConditionHandlerInterface($this,$item_id);
$this->ctrl->saveParameter($this,'item_id',$_GET['item_id']);
}
else
{
$this->chi_obj =& new ilConditionHandlerInterface($this);
}
}
return true;
}
| ilObjCourseGUI::initInfoEditor | ( | ) |
init info editor
public
Definition at line 850 of file class.ilObjCourseGUI.php.
References $file, and ilAdvancedMDRecordGUI::MODE_EDITOR.
Referenced by editInfoObject().
{
if(is_object($this->form))
{
return true;
}
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$this->form = new ilPropertyFormGUI();
$this->form->setFormAction($this->ctrl->getFormAction($this));
$this->form->setTitle($this->lng->txt('crs_general_info'));
$this->form->addCommandButton('updateInfo',$this->lng->txt('save'));
$this->form->addCommandButton('editInfo',$this->lng->txt('cancel'));
$area = new ilTextAreaInputGUI($this->lng->txt('crs_important_info'),'important');
$area->setValue($this->object->getImportantInformation());
$area->setRows(3);
$area->setCols(80);
$this->form->addItem($area);
$area = new ilTextAreaInputGUI($this->lng->txt('crs_syllabus'),'syllabus');
$area->setValue($this->object->getSyllabus());
$area->setRows(3);
$area->setCols(80);
$this->form->addItem($area);
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('crs_info_download'));
$this->form->addItem($section);
$file = new ilFileInputGUI($this->lng->txt('crs_file'),'file');
$file->enableFileNameSelection('file_name');
$this->form->addItem($file);
$section = new ilFormSectionHeaderGUI();
$section->setTitle($this->lng->txt('crs_contact'));
$this->form->addItem($section);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_name'),'contact_name');
$text->setValue($this->object->getContactName());
$text->setSize(40);
$text->setMaxLength(70);
$this->form->addItem($text);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_responsibility'),'contact_responsibility');
$text->setValue($this->object->getContactResponsibility());
$text->setSize(40);
$text->setMaxLength(70);
$this->form->addItem($text);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_phone'),'contact_phone');
$text->setValue($this->object->getContactPhone());
$text->setSize(40);
$text->setMaxLength(40);
$this->form->addItem($text);
$text = new ilTextInputGUI($this->lng->txt('crs_contact_email'),'contact_email');
$text->setValue($this->object->getContactEmail());
$text->setSize(40);
$text->setMaxLength(255);
$this->form->addItem($text);
$area = new ilTextAreaInputGUI($this->lng->txt('crs_contact_consultation'),'contact_consultation');
$area->setValue($this->object->getContactConsultation());
$area->setRows(3);
$area->setCols(80);
$this->form->addItem($area);
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
$record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,'crs',$this->object->getId());
$record_gui->setPropertyForm($this->form);
$record_gui->parse();
return true;
}
Here is the caller graph for this function:| ilObjCourseGUI::listStructureObject | ( | ) |
Definition at line 544 of file class.ilObjCourseGUI.php.
References ilObjectGUI::$data, ilUtil::getImagePath(), ilObjectFactory::getInstanceByRefId(), ilUtil::sendInfo(), setSubTabs(), and ilUtil::switchColor().
Referenced by addStarterObject(), and deleteStarterObject().
{
include_once './Modules/Course/classes/class.ilCourseStart.php';
global $rbacsystem;
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_start_objects');
$crs_start =& new ilCourseStart($this->object->getRefId(),$this->object->getId());
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_list_starter.html",'Modules/Course');
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
if(!count($starter = $crs_start->getStartObjects()))
{
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK",$this->ctrl->getLinkTarget($this,'selectStarter'));
$this->tpl->setVariable("BTN_TXT",$this->lng->txt('crs_add_starter'));
$this->tpl->parseCurrentBlock();
ilUtil::sendInfo($this->lng->txt('crs_no_starter_created'));
return true;
}
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_crs.gif'));
$this->tpl->setVariable("ALT_IMG",$this->lng->txt('obj_crs'));
$this->tpl->setVariable("TBL_TITLE",$this->lng->txt('crs_edit_start_objects'));
$this->tpl->setVariable("HEADER_DESC",$this->lng->txt('description'));
$this->tpl->setVariable("HEADER_OPT",$this->lng->txt('options'));
$this->tpl->setVariable("BTN_ADD",$this->lng->txt('crs_add_starter'));
$counter = 0;
foreach($starter as $start_id => $data)
{
$tmp_obj =& ilObjectFactory::getInstanceByRefId($data['item_ref_id']);
if(strlen($tmp_obj->getDescription()))
{
$this->tpl->setCurrentBlock("description");
$this->tpl->setVariable("DESCRIPTION_STARTER",$tmp_obj->getDescription());
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("starter_row");
$this->tpl->setVariable("ROW_CLASS",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$this->tpl->setVariable("STARTER_TITLE",$tmp_obj->getTitle());
$this->ctrl->setParameter($this,'del_starter',$start_id);
$this->tpl->setVariable("DELETE_LINK",$this->ctrl->getLinkTarget($this,'deleteStarter'));
$this->tpl->setVariable("DELETE_ALT",$this->lng->txt('delete'));
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::listUsersGroupObject | ( | ) |
Definition at line 3006 of file class.ilObjCourseGUI.php.
References $_SESSION, ilObjectGUI::$tree, $user, __appendToStoredResults(), __showSearchUserTable(), ilUtil::formCheckbox(), ilObjectFactory::getInstanceByObjId(), ilObjectFactory::getInstanceByRefId(), searchObject(), and ilUtil::sendInfo().
{
global $rbacsystem,$tree;
$this->tabs_gui->setTabActive('members');
$_SESSION["crs_group"] = $_POST["group"] = $_POST["group"] ? $_POST["group"] : $_SESSION["crs_group"];
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["group"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_groups_selected"));
$this->searchObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_usr_selection.html",'Modules/Course');
#$this->__showButton("searchUser",$this->lng->txt("crs_new_search"));
$this->object->initCourseMemberObject();
// GET ALL MEMBERS
$members = array();
foreach($_POST["group"] as $group_id)
{
if(!$tree->isInTree($group_id))
{
continue;
}
if(!$tmp_obj = ilObjectFactory::getInstanceByRefId($group_id))
{
continue;
}
$members = array_merge($tmp_obj->getGroupMemberIds(),$members);
unset($tmp_obj);
}
$members = array_unique($members);
$members = $this->__appendToStoredResults($members);
// FORMAT USER DATA
$counter = 0;
$f_result = array();
foreach($members as $user)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user,false))
{
continue;
}
$user_ids[$counter] = $user;
$f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getLastname();
$f_result[$counter][] = $tmp_obj->getFirstname();
unset($tmp_obj);
++$counter;
}
$this->__showSearchUserTable($f_result,$user_ids,"listUsersGroup");
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::listUsersRoleObject | ( | ) |
Definition at line 3075 of file class.ilObjCourseGUI.php.
References $_SESSION, ilObjectGUI::$tree, $user, __appendToStoredResults(), __showSearchUserTable(), ilUtil::formCheckbox(), ilObjectFactory::getInstanceByObjId(), searchObject(), and ilUtil::sendInfo().
{
global $rbacsystem,$rbacreview,$tree;
$this->tabs_gui->setTabActive('members');
$_SESSION["crs_role"] = $_POST["role"] = $_POST["role"] ? $_POST["role"] : $_SESSION["crs_role"];
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["role"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_roles_selected"));
$this->searchObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_usr_selection.html",'Modules/Course');
#$this->__showButton("searchUser",$this->lng->txt("crs_new_search"));
$this->object->initCourseMemberObject();
// GET ALL MEMBERS
$members = array();
foreach($_POST["role"] as $role_id)
{
$members = array_merge($rbacreview->assignedUsers($role_id),$members);
}
$members = array_unique($members);
$members = $this->__appendToStoredResults($members);
// FORMAT USER DATA
$counter = 0;
$f_result = array();
foreach($members as $user)
{
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($user,false))
{
continue;
}
$user_ids[$counter] = $user;
$f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getLastname();
$f_result[$counter][] = $tmp_obj->getFirstname();
unset($tmp_obj);
++$counter;
}
$this->__showSearchUserTable($f_result,$user_ids,"listUsersRole");
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::mailMembersObject | ( | ) |
Definition at line 4268 of file class.ilObjCourseGUI.php.
References $ilErr, ilObjRole::_getTranslation(), ilUtil::formCheckbox(), ilUtil::getImagePath(), and setSubTabs().
{
global $rbacreview, $ilErr, $ilAccess, $ilObjDataCache;
include_once('classes/class.ilObjRole.php');
$is_admin = (bool) $ilAccess->checkAccess("write", "", $this->object->getRefId());
if (!$is_admin &&
$this->object->getShowMembers() == $this->object->SHOW_MEMBERS_DISABLED)
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
}
$this->tabs_gui->setTabActive('members');
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.mail_members.html','Modules/Course');
$this->setSubTabs('members');
$this->tpl->setVariable("MAILACTION",'ilias.php?baseClass=ilmailgui&type=role');
$this->tpl->setVariable("SELECT_ACTION",'ilias.php?baseClass=ilmailgui&view=my_courses&search_crs='.$this->object->getId());
$this->tpl->setVariable("MAIL_SELECTED",$this->lng->txt('send_mail_selected'));
$this->tpl->setVariable("MAIL_MEMBERS",$this->lng->txt('send_mail_members'));
$this->tpl->setVariable("MAIL_TUTOR",$this->lng->txt('send_mail_tutors'));
$this->tpl->setVariable("MAIL_ADMIN",$this->lng->txt('send_mail_admins'));
$this->tpl->setVariable("IMG_ARROW",ilUtil::getImagePath('arrow_downright.gif'));
$this->tpl->setVariable("OK",$this->lng->txt('ok'));
// Display roles with user friendly mailbox addresses
$role_folder = $rbacreview->getRoleFolderOfObject($this->object->getRefId());
$role_ids = $rbacreview->getRolesOfRoleFolder($role_folder['ref_id'], false);
foreach ($role_ids as $role_id)
{
$this->tpl->setCurrentBlock("mailbox_row");
$role_addr = $rbacreview->getRoleMailboxAddress($role_id);
$this->tpl->setVariable("CHECK_MAILBOX",ilUtil::formCheckbox(1,'roles[]',
htmlspecialchars($role_addr)
));
$this->tpl->setVariable("MAILBOX",ilObjRole::_getTranslation($ilObjDataCache->lookupTitle($role_id)). " (" . $role_addr . ")");
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:| ilObjCourseGUI::memberGatewayObject | ( | ) |
Gateway for member administration commands.
public
Definition at line 103 of file class.ilObjCourseGUI.php.
References deleteMembersObject(), sendMailToSelectedUsersObject(), and updateMembersObject().
{
if(isset($_POST['btn_pressed']['deleteMembers']))
{
return $this->deleteMembersObject();
}
elseif($_POST['btn_pressed']['sendMailToSelectedUsers'])
{
return $this->sendMailToSelectedUsersObject();
}
else
{
return $this->updateMembersObject();
}
}
Here is the call graph for this function:| ilObjCourseGUI::membersGalleryObject | ( | ) |
Definition at line 3466 of file class.ilObjCourseGUI.php.
References $file, $ilErr, ilObjectGUI::__showButton(), exit, ilObjectFactory::getInstanceByObjId(), ilUtil::getStyleSheetLocation(), setSubTabs(), and ilUtil::sortArray().
{
global $rbacsystem, $ilErr, $ilAccess, $ilUser;
$is_admin = (bool) $ilAccess->checkAccess("write", "", $this->object->getRefId());
if (!$is_admin &&
$this->object->getShowMembers() == $this->object->SHOW_MEMBERS_DISABLED)
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_read"),$ilErr->MESSAGE);
}
$this->tpl->addBlockFile('ADM_CONTENT','adm_content','tpl.crs_members_gallery.html','Modules/Course');
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_members_gallery');
// Unsubscribe
if($ilAccess->checkAccess('leave','',$this->object->getRefId()) and
$this->object->members_obj->isAssigned($ilUser->getId()))
{
$this->__showButton($this->ctrl->getLinkTarget($this,'unsubscribe'),$this->lng->txt("crs_unsubscribe"));
}
$this->object->initCourseMemberObject();
// MEMBERS
if(count($members = $this->object->members_obj->getParticipants()))
{
$ordered_members = array();
foreach($members as $member_id)
{
if(!($usr_obj = ilObjectFactory::getInstanceByObjId($member_id,false)))
{
continue;
}
// please do not use strtoupper on first/last name for output
// this messes up with some unicode characters, i guess
// depending on php verion, alex
array_push($ordered_members,array("id" => $member_id,
"login" => $usr_obj->getLogin(),
"lastname" => $usr_obj->getLastName(),
"firstname" => $usr_obj->getFirstName(),
"sortlastname" => strtoupper($usr_obj->getLastName()),
"usr_obj" => $usr_obj));
}
$ordered_members=ilUtil::sortArray($ordered_members,"sortlastname","asc");
foreach($ordered_members as $member)
{
$usr_obj = $member["usr_obj"];
$public_profile = $usr_obj->getPref("public_profile");
// SET LINK TARGET FOR USER PROFILE
$this->ctrl->setParameterByClass("ilobjusergui", "user", $member["id"]);
$profile_target = $this->ctrl->getLinkTargetByClass("ilobjusergui","getPublicProfile");
// GET USER IMAGE
$file = $usr_obj->getPersonalPicturePath("xsmall");
if($this->object->members_obj->isAdmin($member["id"]) or $this->object->members_obj->isTutor($member["id"]))
{
if ($public_profile == "y")
{
$this->tpl->setCurrentBlock("tutor_linked");
$this->tpl->setVariable("LINK_PROFILE", $profile_target);
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("tutor_not_linked");
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("tutor");
}
else
{
if ($public_profile == "y")
{
$this->tpl->setCurrentBlock("member_linked");
$this->tpl->setVariable("LINK_PROFILE", $profile_target);
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
else
{
$this->tpl->setCurrentBlock("member_not_linked");
$this->tpl->setVariable("SRC_USR_IMAGE", $file);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("member");
}
// do not show name, if public profile is not activated
if ($public_profile == "y")
{
$this->tpl->setVariable("FIRSTNAME", $member["firstname"]);
$this->tpl->setVariable("LASTNAME", $member["lastname"]);
}
$this->tpl->setVariable("LOGIN", $member["login"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("members");
$this->tpl->setVariable("MEMBERS_TABLE_HEADER",$this->lng->txt('crs_members_title'));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setVariable("TITLE",$this->lng->txt('crs_members_print_title'));
$this->tpl->setVariable("CSS_PATH",ilUtil::getStyleSheetLocation());
$headline = $this->object->getTitle()."<br/>".$this->object->getDescription();
$this->tpl->setVariable("HEADLINE",$headline);
$this->tpl->show();
exit;
}
Here is the call graph for this function:| ilObjCourseGUI::membersMapObject | ( | ) |
Members map.
Definition at line 4839 of file class.ilObjCourseGUI.php.
References ilObjectGUI::$tpl, ilGoogleMapUtil::isActivated(), and setSubTabs().
{
global $tpl;
$this->tabs_gui->setTabActive("members");
$this->setSubTabs('members');
$this->tabs_gui->setSubTabActive("crs_members_map");
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
if (!ilGoogleMapUtil::isActivated() || !$this->object->getEnableCourseMap())
{
return;
}
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapGUI.php");
$map = new ilGoogleMapGUI();
$map->setMapId("course_map");
$map->setWidth("700px");
$map->setHeight("500px");
$map->setLatitude($this->object->getLatitude());
$map->setLongitude($this->object->getLongitude());
$map->setZoom($this->object->getLocationZoom());
$map->setEnableTypeControl(true);
$map->setEnableNavigationControl(true);
$this->object->initCourseMemberObject();
if(count($members = $this->object->members_obj->getParticipants()))
{
foreach($members as $user_id)
{
$map->addUserMarker($user_id);
}
}
$tpl->setContent($map->getHTML());
$tpl->setLeftContent($map->getUserListHTML());
}
Here is the call graph for this function:| ilObjCourseGUI::membersObject | ( | ) |
Definition at line 1595 of file class.ilObjCourseGUI.php.
References $_GET, $_SESSION, $ilErr, __renderAdminsTable(), __renderMembersTable(), __renderTutorsTable(), ilObjectGUI::__showButton(), __showSubscribers(), __showWaitingList(), ilObjUserTracking::_enabledLearningProgress(), ilObjUserTracking::_enabledUserRelatedData(), ilCourseItems::_hasTimings(), ilUtil::getImagePath(), and setSubTabs().
Referenced by addFromWaitingList(), addSubscribers(), autoFillObject(), deleteMembersObject(), deleteSubscribers(), performRemoveFromWaitingListObject(), removeFromWaitingList(), removeMembersObject(), removeSubscribersObject(), searchUserObject(), sendMailToSelectedUsersObject(), updateMemberObject(), and updateMembersObject().
{
include_once "./Services/Table/classes/class.ilTableGUI.php";
include_once './Services/Tracking/classes/class.ilObjUserTracking.php';
include_once './Modules/Course/classes/class.ilCourseItems.php';
$_SESSION['crs_print_sort'] = $_GET['member_sort_by'] ? $_GET['member_sort_by'] : 'lastname';
$_SESSION['crs_print_order'] = $_GET['member_sort_order'] ? $_GET['member_sort_order'] : 'asc';
$this->lng->loadLanguageModule('trac');
$this->show_tracking = (ilObjUserTracking::_enabledLearningProgress() and ilObjUserTracking::_enabledUserRelatedData());
$_SESSION['crs_admin_hide'] = isset($_GET['admin_show_details']) ? !$_GET['admin_show_details'] :
$_SESSION['crs_admin_hide'];
$_SESSION['crs_tutor_hide'] = isset($_GET['tutor_show_details']) ? !$_GET['tutor_show_details'] :
$_SESSION['crs_tutor_hide'];
$_SESSION['crs_member_hide'] = isset($_GET['member_show_details']) ? !$_GET['member_show_details'] :
$_SESSION['crs_member_hide'];
global $ilAccess,$ilErr,$ilUser;
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_write"),$ilErr->MESSAGE);
}
$this->timings_enabled = (ilCourseItems::_hasTimings($this->object->getRefId()) and
($this->object->getViewMode() == IL_CRS_VIEW_TIMING));
$this->setSubTabs('members');
$this->tabs_gui->setTabActive('members');
$this->tabs_gui->setSubTabActive('crs_member_administration');
// add members
$this->tpl->addBlockfile("BUTTONS", "buttons", "tpl.buttons.html");
$this->tpl->setCurrentBlock("btn_cell");
$this->tpl->setVariable("BTN_LINK",$this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','start'));
$this->tpl->setVariable("BTN_TXT",$this->lng->txt("crs_add_member"));
$this->tpl->parseCurrentBlock();
// print
$this->__showButton("printMembers",$this->lng->txt("crs_print_list"),"target=\"_blank\"");
$this->tpl->addBlockfile('ADM_CONTENT','adm_content','tpl.edit_members.html','Modules/Course');
// Waitinglist
$this->__showSubscribers();
$this->__showWaitingList();
// this is neccessary...
$this->ctrl->setParameter($this,'cmd','memberGateway');
$this->tpl->setVariable('FORMACTION',$this->ctrl->getLinkTarget($this));
$this->ctrl->clearParameters($this);
$this->tpl->setVariable("HEADER_IMG",ilUtil::getImagePath('icon_usr.gif'));
$this->tpl->setVariable("HEADER_ALT",$this->lng->txt('crs_members_table'));
$this->tpl->setVariable("MEMBER_TABLE_TITLE",$this->lng->txt('crs_members_table'));
// Admins
$this->__renderAdminsTable();
// Tutors
$this->__renderTutorsTable();
// Members
$this->__renderMembersTable();
$this->tpl->setVariable('TXT_SELECTED_USER',$this->lng->txt('crs_selected_users'));
$this->tpl->setVariable('BTN_FOOTER_VAL',$this->lng->txt('crs_delete_member'));
$this->tpl->setVariable('BTN_FOOTER_MAIL',$this->lng->txt('crs_mem_send_mail'));
$this->tpl->setVariable('ARROW_DOWN',ilUtil::getImagePath('arrow_downright.gif'));
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::performRemoveFromWaitingListObject | ( | ) |
Definition at line 2387 of file class.ilObjCourseGUI.php.
References $_SESSION, membersObject(), and ilUtil::sendInfo().
{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_SESSION["crs_delete_waiting_list_ids"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_users_selected"));
$this->membersObject();
return false;
}
$this->object->initWaitingList();
foreach($_SESSION['crs_delete_waiting_list_ids'] as $usr_id)
{
$this->object->waiting_list_obj->removeFromList($usr_id);
}
ilUtil::sendInfo($this->lng->txt('crs_users_removed_from_list'));
$this->membersObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::performUnsubscribeObject | ( | ) |
Definition at line 2623 of file class.ilObjCourseGUI.php.
References ilUtil::redirect(), and ilUtil::sendInfo().
{
global $rbacsystem;
// CHECK ACCESS
if(!$rbacsystem->checkAccess("leave", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->object->initCourseMemberObject();
$this->object->members_obj->delete($this->ilias->account->getId());
$this->object->members_obj->sendUnsubscribeNotificationToAdmins($this->ilias->account->getId());
ilUtil::sendInfo($this->lng->txt('crs_unsubscribed_from_crs'),true);
ilUtil::redirect("repository.php?ref_id=".$this->tree->getParentId($this->ref_id));
}
Here is the call graph for this function:| ilObjCourseGUI::printMembersObject | ( | ) |
Definition at line 3377 of file class.ilObjCourseGUI.php.
References ilObjectGUI::$tpl, exit, fetchPrintMemberData(), fetchPrintSubscriberData(), ilFormat::formatUnixTime(), ilUtil::getImagePath(), and ilUtil::getStyleSheetLocation().
{
global $rbacsystem;
$is_admin = (bool) $rbacsystem->checkAccess("write", $this->object->getRefId());
$tpl =& new ilTemplate('tpl.crs_members_print.html',true,true,'Modules/Course');
$this->object->initCourseMemberObject();
// MEMBERS
if(count($members = $this->object->members_obj->getParticipants()))
{
$members = $this->fetchPrintMemberData($members);
foreach($members as $member_data)
{
$tpl->setCurrentBlock("members_row");
$tpl->setVariable("LOGIN",$member_data['login']);
$tpl->setVariable("NAME",$member_data['name']);
$tpl->setVariable("ROLE",$member_data['role']);
$tpl->setVariable("STATUS",$member_data['status']);
$tpl->setVariable("PASSED",$member_data['passed']);
if($is_admin)
{
$tpl->setVariable("STATUS",$member_data['status']);
$tpl->setVariable("PASSED",$member_data['passed']);
}
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("members");
$tpl->setVariable("MEMBERS_IMG_SOURCE",ilUtil::getImagePath('icon_usr.gif'));
$tpl->setVariable("MEMBERS_IMG_ALT",$this->lng->txt('crs_header_members'));
$tpl->setVariable("MEMBERS_TABLE_HEADER",$this->lng->txt('crs_members_table'));
$tpl->setVariable("TXT_LOGIN",$this->lng->txt('username'));
$tpl->setVariable("TXT_NAME",$this->lng->txt('name'));
$tpl->setVariable("TXT_ROLE",$this->lng->txt('crs_role'));
if($is_admin)
{
$tpl->setVariable("TXT_STATUS",$this->lng->txt('crs_status'));
$tpl->setVariable("TXT_PASSED",$this->lng->txt('crs_passed'));
}
$tpl->parseCurrentBlock();
}
// SUBSCRIBERS
if(count($members = $this->object->members_obj->getSubscribers()))
{
$members = $this->fetchPrintSubscriberData($members);
foreach($members as $member_data)
{
$tpl->setCurrentBlock("members_row");
$tpl->setVariable("SLOGIN",$member_data['login']);
$tpl->setVariable("SNAME",$member_data['name']);
$tpl->setVariable("STIME",$member_data["time"]);
$this->tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("subscribers");
$tpl->setVariable("SUBSCRIBERS_IMG_SOURCE",ilUtil::getImagePath('icon_usr.gif'));
$tpl->setVariable("SUBSCRIBERS_IMG_ALT",$this->lng->txt('crs_subscribers'));
$tpl->setVariable("SUBSCRIBERS_TABLE_HEADER",$this->lng->txt('crs_subscribers'));
$tpl->setVariable("TXT_SLOGIN",$this->lng->txt('username'));
$tpl->setVariable("TXT_SNAME",$this->lng->txt('name'));
$tpl->setVariable("TXT_STIME",$this->lng->txt('crs_time'));
$tpl->parseCurrentBlock();
}
$tpl->setVariable("TITLE",$this->lng->txt('crs_members_print_title'));
$tpl->setVariable("CSS_PATH",ilUtil::getStyleSheetLocation());
$headline = $this->lng->txt('obj_crs').': '.$this->object->getTitle().
' -> '.$this->lng->txt('crs_header_members').' ('.ilFormat::formatUnixTime(time(),true).')';
$tpl->setVariable("HEADLINE",$headline);
$tpl->show();
exit;
}
Here is the call graph for this function:| ilObjCourseGUI::removeBigIconObject | ( | ) |
remove big icon
public
Definition at line 1464 of file class.ilObjCourseGUI.php.
References ilUtil::redirect().
{
$this->object->removeBigIcon();
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editCourseIcons"));
}
Here is the call graph for this function:| ilObjCourseGUI::removeFromWaitingList | ( | ) |
Definition at line 2541 of file class.ilObjCourseGUI.php.
References $_SESSION, __showRemoveFromWaitingListTable(), ilFormat::formatUnixTime(), ilObjectFactory::getInstanceByObjId(), membersObject(), and ilUtil::sendInfo().
Referenced by gatewayObject().
{
global $rbacsystem;
$this->tabs_gui->setTabActive('members');
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_POST["waiting_list"]) or !count($_POST["waiting_list"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_users_selected"));
$this->membersObject();
return false;
}
ilUtil::sendInfo($this->lng->txt("crs_delete_from_list_sure"));
// SHOW DELETE SCREEN
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_editMembers.html",'Modules/Course');
$this->object->initCourseMemberObject();
$this->object->initWaitingList();
// SAVE IDS IN SESSION
$_SESSION["crs_delete_waiting_list_ids"] = $_POST["waiting_list"];
$counter = 0;
$f_result = array();
foreach($_POST["waiting_list"] as $wait_id)
{
$user_data =& $this->object->waiting_list_obj->getUser($wait_id);
// GET USER OBJ
if($tmp_obj = ilObjectFactory::getInstanceByObjId($wait_id,false))
{
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
#$f_result[$counter][] = strftime("%Y-%m-%d %R",$user_data["time"]);
$f_result[$counter][] = ilFormat::formatUnixTime($user_data["time"],true);
unset($tmp_obj);
++$counter;
}
}
return $this->__showRemoveFromWaitingListTable($f_result);
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::removeMembersObject | ( | ) |
Definition at line 2720 of file class.ilObjCourseGUI.php.
References $_SESSION, membersObject(), and ilUtil::sendInfo().
{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_SESSION["crs_delete_member_ids"]) or !count($_SESSION["crs_delete_member_ids"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_member_selected"));
$this->membersObject();
return false;
}
$this->object->initCourseMemberObject();
if(!$this->object->members_obj->deleteParticipants($_SESSION["crs_delete_member_ids"]))
{
ilUtil::sendInfo($this->object->getMessage());
unset($_SESSION["crs_delete_member_ids"]);
$this->membersObject();
return false;
}
else
{
// SEND NOTIFICATION
foreach($_SESSION["crs_delete_member_ids"] as $usr_id)
{
$this->object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_MEMBER,$usr_id);
}
}
unset($_SESSION["crs_delete_member_ids"]);
ilUtil::sendInfo($this->lng->txt("crs_members_deleted"));
$this->membersObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::removeSmallIconObject | ( | ) |
remove small icon
public
Definition at line 1453 of file class.ilObjCourseGUI.php.
References ilUtil::redirect().
{
$this->object->removeSmallIcon();
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editCourseIcons"));
}
Here is the call graph for this function:| ilObjCourseGUI::removeSubscribersObject | ( | ) |
Definition at line 2761 of file class.ilObjCourseGUI.php.
References $_SESSION, membersObject(), and ilUtil::sendInfo().
{
global $rbacsystem;
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if(!is_array($_SESSION["crs_delete_subscriber_ids"]) or !count($_SESSION["crs_delete_subscriber_ids"]))
{
ilUtil::sendInfo($this->lng->txt("crs_no_subscribers_selected"));
$this->membersObject();
return false;
}
$this->object->initCourseMemberObject();
if(!$this->object->members_obj->deleteSubscribers($_SESSION["crs_delete_subscriber_ids"]))
{
ilUtil::sendInfo($this->object->getMessage());
unset($_SESSION["crs_delete_subscriber_ids"]);
$this->membersObject();
return false;
}
else
{
// SEND NOTIFICATION
foreach($_SESSION["crs_delete_subscriber_ids"] as $usr_id)
{
$this->object->members_obj->sendNotification($this->object->members_obj->NOTIFY_DISMISS_SUBSCRIBER,$usr_id);
}
}
unset($_SESSION["crs_delete_subscriber_ids"]);
ilUtil::sendInfo($this->lng->txt("crs_subscribers_deleted"));
$this->membersObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::removeTinyIconObject | ( | ) |
remove small icon
public
Definition at line 1476 of file class.ilObjCourseGUI.php.
References ilUtil::redirect().
{
$this->object->removeTinyIcon();
ilUtil::redirect($this->ctrl->getLinkTarget($this, "editCourseIcons"));
}
Here is the call graph for this function:| ilObjCourseGUI::renderObject | ( | ) |
render the object
Reimplemented from ilContainerGUI.
Definition at line 256 of file class.ilObjCourseGUI.php.
References viewObject().
{
$this->ctrl->setCmd("view");
$this->viewObject();
}
Here is the call graph for this function:| ilObjCourseGUI::saveMapSettingsObject | ( | ) |
Definition at line 4823 of file class.ilObjCourseGUI.php.
References $ilCtrl, and ilUtil::stripSlashes().
{
global $ilCtrl, $ilUser;
$this->object->setLatitude(ilUtil::stripSlashes($_POST["location"]["latitude"]));
$this->object->setLongitude(ilUtil::stripSlashes($_POST["location"]["longitude"]));
$this->object->setLocationZoom(ilUtil::stripSlashes($_POST["location"]["zoom"]));
$this->object->setEnableCourseMap(ilUtil::stripSlashes($_POST["enable_map"]));
$this->object->update();
$ilCtrl->redirect($this, "editMapSettings");
}
Here is the call graph for this function:| ilObjCourseGUI::saveObject | ( | ) |
save object public
Reimplemented from ilObjectGUI.
Definition at line 1486 of file class.ilObjCourseGUI.php.
References ilObjectGUI::getReturnLocation(), ilUtil::redirect(), and ilUtil::sendInfo().
{
global $rbacadmin,$ilUser;
$newObj =& parent::saveObject();
$newObj->initDefaultRoles();
$newObj->initCourseMemberObject();
$newObj->members_obj->add($ilUser->getId(),IL_CRS_ADMIN);
// always send a message
ilUtil::sendInfo($this->lng->txt("crs_added"),true);
$this->ctrl->setParameter($this, "ref_id", $newObj->getRefId());
ilUtil::redirect($this->getReturnLocation("save",
$this->ctrl->getLinkTarget($this, "edit")));
//ilUtil::redirect($this->getReturnLocation("save",$this->ctrl->getLinkTarget($this,"")));
}
Here is the call graph for this function:| ilObjCourseGUI::searchObject | ( | ) |
Definition at line 2878 of file class.ilObjCourseGUI.php.
References $_SESSION, ilObjectGUI::$tree, $user, __search(), __showSearchGroupTable(), __showSearchRoleTable(), __showSearchUserTable(), ilUtil::formCheckbox(), ilObjectFactory::getInstanceByObjId(), ilObjectFactory::getInstanceByRefId(), searchUserObject(), and ilUtil::sendInfo().
Referenced by addFromWaitingList(), listUsersGroupObject(), and listUsersRoleObject().
{
global $rbacsystem,$tree;
$this->tabs_gui->setTabActive('members');
#$this->__unsetSessionVariables();
$_SESSION["crs_search_str"] = $_POST["search_str"] = $_POST["search_str"]
? $_POST["search_str"]
: $_SESSION["crs_search_str"];
$_SESSION["crs_search_for"] = $_POST["search_for"] = $_POST["search_for"]
? $_POST["search_for"]
: $_SESSION["crs_search_for"];
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->object->initCourseMemberObject();
if(!isset($_POST["search_for"]) or !isset($_POST["search_str"]))
{
ilUtil::sendInfo($this->lng->txt("crs_search_enter_search_string"));
$this->searchUserObject();
return false;
}
if(!count($result = $this->__search($_POST["search_str"],$_POST["search_for"])))
{
ilUtil::sendInfo($this->lng->txt("crs_no_results_found"));
$this->searchUserObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_usr_selection.html",'Modules/Course');
#$this->__showButton("searchUser",$this->lng->txt("crs_new_search"));
$counter = 0;
$f_result = array();
switch($_POST["search_for"])
{
case "usr":
foreach($result as $user)
{
if(!is_object($tmp_obj = ilObjectFactory::getInstanceByObjId($user,false)))
{
continue;
}
$user_ids[$counter] = $user;
$f_result[$counter][] = ilUtil::formCheckbox(0,"user[]",$user);
$f_result[$counter][] = $tmp_obj->getLogin();
$f_result[$counter][] = $tmp_obj->getFirstname();
$f_result[$counter][] = $tmp_obj->getLastname();
unset($tmp_obj);
++$counter;
}
$this->__showSearchUserTable($f_result,$user_ids);
return true;
case "grp":
foreach($result as $group)
{
if(!$tree->isInTree($group["id"]))
{
continue;
}
if(!$tmp_obj = ilObjectFactory::getInstanceByRefId($group["id"],false))
{
continue;
}
$grp_ids[$counter] = $group["id"];
$f_result[$counter][] = ilUtil::formCheckbox(0,"group[]",$group["id"]);
$f_result[$counter][] = array($tmp_obj->getTitle(),$tmp_obj->getDescription());
$f_result[$counter][] = $tmp_obj->getCountMembers();
unset($tmp_obj);
++$counter;
}
$this->__showSearchGroupTable($f_result,$grp_ids);
return true;
case "role":
foreach($result as $role)
{
// exclude anonymous role
if ($role["id"] == ANONYMOUS_ROLE_ID)
{
continue;
}
if(!$tmp_obj = ilObjectFactory::getInstanceByObjId($role["id"],false))
{
continue;
}
// exclude roles with no users assigned to
if ($tmp_obj->getCountMembers() == 0)
{
continue;
}
$role_ids[$counter] = $role["id"];
$f_result[$counter][] = ilUtil::formCheckbox(0,"role[]",$role["id"]);
$f_result[$counter][] = array($tmp_obj->getTitle(),$tmp_obj->getDescription());
$f_result[$counter][] = $tmp_obj->getCountMembers();
unset($tmp_obj);
++$counter;
}
$this->__showSearchRoleTable($f_result,$role_ids);
return true;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::searchUserObject | ( | ) |
Definition at line 2804 of file class.ilObjCourseGUI.php.
References $_SESSION, __unsetSessionVariables(), ilUtil::formRadioButton(), membersObject(), ilUtil::prepareFormOutput(), and ilUtil::sendInfo().
Referenced by cancelSearchObject(), and searchObject().
{
global $rbacsystem;
$this->tabs_gui->setTabActive('members');
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$this->object->initCourseMemberObject();
if($this->object->getSubscriptionMaxMembers() and
$this->object->getSubscriptionMaxMembers() <= $this->object->members_obj->getCountMembers())
{
ilUtil::sendInfo($this->lng->txt("crs_max_members_reached"));
$this->membersObject();
return false;
}
$this->tpl->addBlockFile("ADM_CONTENT","adm_content","tpl.crs_members_search.html",'Modules/Course');
$this->tpl->setVariable("F_ACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("SEARCH_ASSIGN_USR",$this->lng->txt("crs_search_members"));
$this->tpl->setVariable("SEARCH_SEARCH_TERM",$this->lng->txt("search_search_term"));
$this->tpl->setVariable("SEARCH_VALUE",$_SESSION["crs_search_str"] ?
ilUtil::prepareFormOutput($_SESSION["crs_search_str"],true) : "");
$this->tpl->setVariable("SEARCH_FOR",$this->lng->txt("exc_search_for"));
$this->tpl->setVariable("SEARCH_ROW_TXT_USER",$this->lng->txt("exc_users"));
$this->tpl->setVariable("SEARCH_ROW_TXT_GROUP",$this->lng->txt("exc_groups"));
$this->tpl->setVariable("SEARCH_ROW_TXT_ROLE",$this->lng->txt("exc_roles"));
#$this->tpl->setVariable("SEARCH_ROW_TXT_COURSE",$this->lng->txt("courses"));
$this->tpl->setVariable("BTN2_VALUE",$this->lng->txt("cancel"));
$this->tpl->setVariable("BTN1_VALUE",$this->lng->txt("search"));
$usr = ($_POST["search_for"] == "usr" || $_POST["search_for"] == "") ? 1 : 0;
$grp = ($_POST["search_for"] == "grp") ? 1 : 0;
$role = ($_POST["search_for"] == "role") ? 1 : 0;
$this->tpl->setVariable("SEARCH_ROW_CHECK_USER",ilUtil::formRadioButton($usr,"search_for","usr"));
$this->tpl->setVariable("SEARCH_ROW_CHECK_ROLE",ilUtil::formRadioButton($role,"search_for","role"));
$this->tpl->setVariable("SEARCH_ROW_CHECK_GROUP",ilUtil::formRadioButton($grp,"search_for","grp"));
#$this->tpl->setVariable("SEARCH_ROW_CHECK_COURSE",ilUtil::formRadioButton(0,"search_for",$this->SEARCH_COURSE));
$this->__unsetSessionVariables();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::selectStarterObject | ( | ) |
Definition at line 629 of file class.ilObjCourseGUI.php.
References ilUtil::formCheckbox(), ilUtil::getImagePath(), ilObjectFactory::getInstanceByRefId(), setSubTabs(), and ilUtil::switchColor().
Referenced by addStarterObject().
{
include_once './Modules/Course/classes/class.ilCourseStart.php';
$this->setSubTabs("properties");
$this->tabs_gui->setTabActive('settings');
$this->tabs_gui->setSubTabActive('crs_start_objects');
global $rbacsystem;
if(!$rbacsystem->checkAccess("write", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
$crs_start =& new ilCourseStart($this->object->getRefId(),$this->object->getId());
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_add_starter.html",'Modules/Course');
$this->tpl->setVariable("FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TYPE_IMG",ilUtil::getImagePath('icon_crs.gif'));
$this->tpl->setVariable("ALT_IMG",$this->lng->txt('obj_crs'));
$this->tpl->setVariable("TBL_TITLE",$this->lng->txt('crs_select_starter'));
$this->tpl->setVariable("HEADER_DESC",$this->lng->txt('description'));
$this->tpl->setVariable("BTN_ADD",$this->lng->txt('crs_add_starter'));
$this->tpl->setVariable("BTN_CANCEL",$this->lng->txt('cancel'));
$this->object->initCourseItemObject();
$counter = 0;
foreach($crs_start->getPossibleStarters($this->object->items_obj) as $item_ref_id)
{
$tmp_obj =& ilObjectFactory::getInstanceByRefId($item_ref_id);
if(strlen($tmp_obj->getDescription()))
{
$this->tpl->setCurrentBlock("description");
$this->tpl->setVariable("DESCRIPTION_STARTER",$tmp_obj->getDescription());
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("starter_row");
$this->tpl->setVariable("ROW_CLASS",ilUtil::switchColor(++$counter,'tblrow1','tblrow2'));
$this->tpl->setVariable("CHECK_STARTER",ilUtil::formCheckbox(0,'starter[]',$item_ref_id));
$this->tpl->setVariable("STARTER_TITLE",$tmp_obj->getTitle());
$this->tpl->parseCurrentBlock();
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::sendFileObject | ( | ) |
Definition at line 1290 of file class.ilObjCourseGUI.php.
References $_GET, $file, and ilUtil::deliverFile().
{
include_once 'Modules/Course/classes/class.ilCourseFile.php';
$file = new ilCourseFile((int) $_GET['file_id']);
ilUtil::deliverFile($file->getAbsolutePath(),$file->getFileName(),$file->getFileType());
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::sendMailToSelectedUsersObject | ( | ) |
Definition at line 119 of file class.ilObjCourseGUI.php.
References ilObjUser::_lookupLogin(), membersObject(), ilUtil::redirect(), and ilUtil::sendInfo().
Referenced by memberGatewayObject().
{
$_POST['member'] = array_unique(array_merge((array) $_POST['member_ids'],(array) $_POST['tutor_ids'],(array) $_POST['admin_ids']));
if (!count($_POST["member"]))
{
ilUtil::sendInfo($this->lng->txt("no_checkbox"));
$this->membersObject();
return false;
}
foreach($_POST["member"] as $usr_id)
{
$rcps[] = ilObjUser::_lookupLogin($usr_id);
}
ilUtil::redirect("ilias.php?baseClass=ilmailgui&type=new&rcp_to=".implode(',',$rcps));
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::setSubTabs | ( | $ | a_tab | ) |
set sub tabs
Definition at line 1327 of file class.ilObjCourseGUI.php.
References $_GET, ilPrivacySettings::_getInstance(), ilCourseDefinedFieldDefinition::_hasFields(), and ilGoogleMapUtil::isActivated().
Referenced by confirmDeleteInfoFilesObject(), editCourseIconsObject(), editInfoObject(), editMapSettingsObject(), editMemberObject(), editObject(), executeCommand(), listStructureObject(), mailMembersObject(), membersGalleryObject(), membersMapObject(), membersObject(), and selectStarterObject().
{
global $rbacsystem,$ilUser,$ilAccess;
switch ($a_tab)
{
case "properties":
$this->tabs_gui->addSubTabTarget("crs_settings",
$this->ctrl->getLinkTarget($this,'edit'),
"edit", get_class($this));
$this->tabs_gui->addSubTabTarget("crs_info_settings",
$this->ctrl->getLinkTarget($this,'editInfo'),
"editInfo", get_class($this));
$this->tabs_gui->addSubTabTarget("preconditions",
$this->ctrl->getLinkTargetByClass('ilConditionHandlerInterface','listConditions'),
"", "ilConditionHandlerInterface");
$this->tabs_gui->addSubTabTarget("crs_start_objects",
$this->ctrl->getLinkTarget($this,'listStructure'),
"listStructure", get_class($this));
$this->tabs_gui->addSubTabTarget('groupings',
$this->ctrl->getLinkTargetByClass('ilobjcoursegroupinggui','listGroupings'),
'listGroupings',
get_class($this));
// custom icon
if ($this->ilias->getSetting("custom_icons"))
{
$this->tabs_gui->addSubTabTarget("icon_settings",
$this->ctrl->getLinkTarget($this,'editCourseIcons'),
"editCourseIcons", get_class($this));
}
// map settings
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
if (ilGoogleMapUtil::isActivated())
{
$this->tabs_gui->addSubTabTarget("crs_map_settings",
$this->ctrl->getLinkTarget($this,'editMapSettings'),
"editMapSettings", get_class($this));
}
include_once('Services/PrivacySecurity/classes/class.ilPrivacySettings.php');
include_once('Modules/Course/classes/Export/class.ilCourseDefinedFieldDefinition.php');
$privacy = ilPrivacySettings::_getInstance();
if($rbacsystem->checkAccess('export_member_data',$privacy->getPrivacySettingsRefId()) and
($privacy->enabledExport() or
ilCourseDefinedFieldDefinition::_hasFields($this->object->getId())))
{
$this->tabs_gui->addSubTabTarget('user_fields',
$this->ctrl->getLinkTargetByClass('ilcourseuserfieldsgui'),
'',
'ilcourseuserfieldsgui');
}
break;
case "item_activation":
$this->tabs_gui->addSubTabTarget("activation",
$this->ctrl->getLinkTargetByClass('ilCourseItemAdministrationGUI','edit'),
"edit", get_class($this));
$this->ctrl->setParameterByClass('ilconditionhandlerinterface','item_id',(int) $_GET['item_id']);
$this->tabs_gui->addSubTabTarget("preconditions",
$this->ctrl->getLinkTargetByClass('ilConditionHandlerInterface','listConditions'),
"", "ilConditionHandlerInterface");
break;
case 'members':
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget("crs_member_administration",
$this->ctrl->getLinkTarget($this,'members'),
"members", get_class($this));
}
$this->tabs_gui->addSubTabTarget("crs_members_gallery",
$this->ctrl->getLinkTarget($this,'membersGallery'),
"membersGallery", get_class($this));
// members map
include_once("./Services/GoogleMaps/classes/class.ilGoogleMapUtil.php");
if (ilGoogleMapUtil::isActivated() && $this->object->getEnableCourseMap())
{
$this->tabs_gui->addSubTabTarget("crs_members_map",
$this->ctrl->getLinkTarget($this,'membersMap'),
"membersMap", get_class($this));
}
include_once 'Services/Mail/classes/class.ilMail.php';
$mail =& new ilMail($ilUser->getId());
if($rbacsystem->checkAccess('mail_visible',$mail->getMailObjectReferenceId()))
{
$this->tabs_gui->addSubTabTarget("mail_members",
$this->ctrl->getLinkTarget($this,'mailMembers'),
"mailMembers", get_class($this));
}
if($ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$this->tabs_gui->addSubTabTarget("events",
$this->ctrl->getLinkTargetByClass('ileventadministrationgui','eventsList'),
"", 'ileventadministrationgui');
}
include_once 'Services/PrivacySecurity/classes/class.ilPrivacySettings.php';
$privacy = ilPrivacySettings::_getInstance();
if($ilAccess->checkAccess('write','',$this->object->getRefId())
and $privacy->enabledExport()
and $rbacsystem->checkAccess('export_member_data',$privacy->getPrivacySettingsRefId()))
{
$this->tabs_gui->addSubTabTarget('export_members',
$this->ctrl->getLinkTargetByClass('ilmemberexportgui','show'));
}
break;
}
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::toUnix | ( | $ | date, | |
| $ | time = array() | |||
| ) |
Definition at line 4743 of file class.ilObjCourseGUI.php.
Referenced by updateObject().
{
return mktime($time['h'],$time['m'],0,$date['m'],$date['d'],$date['y']);
}
Here is the caller graph for this function:| ilObjCourseGUI::unsubscribeObject | ( | ) |
Definition at line 2591 of file class.ilObjCourseGUI.php.
References ilUtil::sendInfo().
{
global $rbacsystem;
// CHECK ACCESS
if(!$rbacsystem->checkAccess("leave", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
if($this->object->getShowMembers())
{
$this->tabs_gui->setTabActive('members');
}
else
{
$this->tabs_gui->setTabActive('crs_unsubscribe');
}
#$this->setSubTabs('members');
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.crs_unsubscribe_sure.html",'Modules/Course');
ilUtil::sendInfo($this->lng->txt('crs_unsubscribe_sure'));
$this->tpl->setVariable("UNSUB_FORMACTION",$this->ctrl->getFormAction($this));
$this->tpl->setVariable("TXT_CANCEL",$this->lng->txt("cancel"));
$this->tpl->setVariable("CMD_SUBMIT",'performUnsubscribe');
$this->tpl->setVariable("TXT_SUBMIT",$this->lng->txt("crs_unsubscribe"));
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::updateCourseIconsObject | ( | ) |
update container icons
Definition at line 1302 of file class.ilObjCourseGUI.php.
References $_GET, and ilUtil::sendInfo().
{
global $rbacsystem;
if (!$rbacsystem->checkAccess("write",$_GET["ref_id"]) )
{
$this->ilErr->raiseError($this->lng->txt("permission_denied"),$this->ilErr->MESSAGE);
}
//save custom icons
if ($this->ilias->getSetting("custom_icons"))
{
$this->object->saveIcons($_FILES["cont_big_icon"],
$_FILES["cont_small_icon"], $_FILES["cont_tiny_icon"]);
}
ilUtil::sendInfo($this->lng->txt("msg_obj_modified"),true);
$this->ctrl->redirect($this,"editCourseIcons");
}
Here is the call graph for this function:| ilObjCourseGUI::updateInfoObject | ( | ) |
Definition at line 926 of file class.ilObjCourseGUI.php.
References $ilErr, editInfoObject(), ilAdvancedMDRecordGUI::MODE_EDITOR, ilUtil::sendInfo(), and ilUtil::stripSlashes().
{
global $ilErr,$ilAccess;
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt('msg_no_perm_read'),$ilErr->MESSAGE);
}
include_once 'Modules/Course/classes/class.ilCourseFile.php';
$file_obj = new ilCourseFile();
$file_obj->setCourseId($this->object->getId());
$file_obj->setFileName(strlen($_POST['file_name']) ?
ilUtil::stripSlashes($_POST['file_name']) :
$_FILES['file']['name']);
$file_obj->setFileSize($_FILES['file']['size']);
$file_obj->setFileType($_FILES['file']['type']);
$file_obj->setTemporaryName($_FILES['file']['tmp_name']);
$file_obj->setErrorCode($_FILES['file']['error']);
$this->object->setImportantInformation(ilUtil::stripSlashes($_POST['important']));
$this->object->setSyllabus(ilUtil::stripSlashes($_POST['syllabus']));
$this->object->setContactName(ilUtil::stripSlashes($_POST['contact_name']));
$this->object->setContactResponsibility(ilUtil::stripSlashes($_POST['contact_responsibility']));
$this->object->setContactPhone(ilUtil::stripSlashes($_POST['contact_phone']));
$this->object->setContactEmail(ilUtil::stripSlashes($_POST['contact_email']));
$this->object->setContactConsultation(ilUtil::stripSlashes($_POST['contact_consultation']));
include_once('Services/AdvancedMetaData/classes/class.ilAdvancedMDRecordGUI.php');
$record_gui = new ilAdvancedMDRecordGUI(ilAdvancedMDRecordGUI::MODE_EDITOR,
'crs',$this->object->getId());
$record_gui->loadFromPost();
// Validate
$ilErr->setMessage('');
$file_obj->validate();
$this->object->validateInfoSettings();
if(strlen($ilErr->getMessage()))
{
ilUtil::sendInfo($ilErr->getMessage());
$this->editInfoObject();
return false;
}
$this->object->update();
$file_obj->create();
$record_gui->saveValues();
ilUtil::sendInfo($this->lng->txt("crs_settings_saved"));
$this->editInfoObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::updateMemberObject | ( | ) |
Definition at line 2249 of file class.ilObjCourseGUI.php.
References $_GET, membersObject(), and ilUtil::sendInfo().
{
global $rbacsystem;
$this->object->initCourseMemberObject();
// MINIMUM ACCESS LEVEL = 'administrate'
if(!$rbacsystem->checkAccess("write", $this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_write"),$this->ilias->error_obj->MESSAGE);
}
// CHECK MEMBER_ID
if(!isset($_GET["member_id"]) or !$this->object->members_obj->isAssigned((int) $_GET["member_id"]))
{
$this->ilias->raiseError($this->lng->txt("crs_no_valid_member_id_given"),$this->ilias->error_obj->MESSAGE);
}
// Remember settings for notification
$passed = $this->object->members_obj->hasPassed((int) $_GET['member_id']);
$notify = $this->object->members_obj->isNotificationEnabled((int) $_GET['member_id']);
$blocked = $this->object->members_obj->isBlocked((int) $_GET['member_id']);
$this->object->members_obj->updateRoleAssignments((int) $_GET['member_id'],$_POST['roles']);
$this->object->members_obj->updatePassed((int) $_GET['member_id'],(int) $_POST['passed']);
$this->object->members_obj->updateNotification((int) $_GET['member_id'],(int) $_POST['notification']);
$this->object->members_obj->updateBlocked((int) $_GET['member_id'],(int) $_POST['blocked']);
if($passed != $this->object->members_obj->hasPassed((int) $_GET['member_id']) or
$notify != $this->object->members_obj->isNotificationEnabled((int) $_GET['member_id']) or
$blocked != $this->object->members_obj->isBlocked((int) $_GET['member_id']))
{
$this->object->members_obj->sendNotification($this->object->members_obj->NOTIFY_STATUS_CHANGED,(int) $_GET['member_id']);
}
ilUtil::sendInfo($this->lng->txt("crs_member_updated"));
$this->membersObject();
return true;
}
Here is the call graph for this function:| ilObjCourseGUI::updateMembersObject | ( | ) |
Definition at line 1677 of file class.ilObjCourseGUI.php.
References $ilErr, membersObject(), and ilUtil::sendInfo().
Referenced by memberGatewayObject().
{
global $ilAccess,$ilErr,$ilUser,$rbacadmin;
if(!$ilAccess->checkAccess('write','',$this->object->getRefId()))
{
$ilErr->raiseError($this->lng->txt("msg_no_perm_write"),$ilErr->MESSAGE);
}
if(!is_array($_POST['visible_member_ids']))
{
ilUtil::sendInfo($this->lng->txt('no_checkbox'));
$this->membersObject();
return false;
}
$visible_members = array();
if(isset($_POST['btn_pressed']['updateAdmins']))
{
$type = 'admins';
$visible_members = array_intersect($_POST['visible_member_ids'],$this->object->members_obj->getAdmins());
$passed = is_array($_POST['admin_passed']) ? $_POST['admin_passed'] : array();
$notification = is_array($_POST['admin_notification']) ? $_POST['admin_notification'] : array();
}
elseif(isset($_POST['btn_pressed']['updateTutors']))
{
$type = 'admins';
$visible_members = array_intersect($_POST['visible_member_ids'],$this->object->members_obj->getTutors());
$passed = is_array($_POST['tutor_passed']) ? $_POST['tutor_passed'] : array();
$notification = is_array($_POST['tutor_notification']) ? $_POST['tutor_notification'] : array();
}
elseif(isset($_POST['btn_pressed']['updateMembers']))
{
$type = 'members';
$visible_members = array_intersect($_POST['visible_member_ids'],$this->object->members_obj->getMembers());
$passed = is_array($_POST['member_passed']) ? $_POST['member_passed'] : array();
$blocked = is_array($_POST['member_blocked']) ? $_POST['member_blocked'] : array();
}
foreach($visible_members as $member_id)
{
$this->object->members_obj->updatePassed($member_id,in_array($member_id,$passed));
switch($type)
{
case 'admins';
$this->object->members_obj->updateNotification($member_id,in_array($member_id,$notification));
$this->object->members_obj->updateBlocked($member_id,false);
break;
case 'members':
$this->object->members_obj->updateNotification($member_id,false);
$this->object->members_obj->updateBlocked($member_id,in_array($member_id,$blocked));
break;
}
}
ilUtil::sendInfo($this->lng->txt('settings_saved'));
$this->membersObject();
}
Here is the call graph for this function:
Here is the caller graph for this function:| ilObjCourseGUI::updateObject | ( | ) |
updates object entry in object_data
public
Reimplemented from ilObjectGUI.
Definition at line 979 of file class.ilObjCourseGUI.php.
References editObject(), ilUtil::sendInfo(), ilUtil::stripSlashes(), and toUnix().
{
$this->object->setActivationType((int) $_POST['activation_type']);
$this->object->setActivationStart($this->toUnix($_POST['activation_start'],$_POST['activation_start_time']));
$this->object->setActivationEnd($this->toUnix($_POST['activation_end'],$_POST['activation_end_time']));
$this->object->setSubscriptionLimitationType((int) $_POST['subscription_limitation_type']);
$this->object->setSubscriptionType((int) $_POST['subscription_type']);
$this->object->setSubscriptionPassword(ilUtil::stripSlashes($_POST['subscription_password']));
$this->object->setSubscriptionStart($this->toUnix($_POST['subscription_start'],$_POST['subscription_start_time']));
$this->object->setSubscriptionEnd($this->toUnix($_POST['subscription_end'],$_POST['subscription_end_time']));
$this->object->setSubscriptionMaxMembers((int) $_POST['subscription_max']);
$this->object->enableWaitingList((int) $_POST['waiting_list']);
$this->object->setSubscriptionNotify((int) $_POST['subscription_notification']);
$this->object->setViewMode((int) $_POST['view_mode']);
if($this->object->getViewMode() == IL_CRS_VIEW_TIMING)
{
$this->object->setOrderType(IL_CRS_SORT_ACTIVATION);
}
else
{
$this->object->setOrderType((int) $_POST['order_type']);
}
$this->object->setArchiveStart($this->toUnix($_POST['archive_start'],$_POST['archive_start_time']));
$this->object->setArchiveEnd($this->toUnix($_POST['archive_end'],$_POST['archive_end_time']));
$this->object->setArchiveType($_POST['archive_type']);
$this->object->setAboStatus((int) $_POST['abo']);
$this->object->setShowMembers((int) $_POST['show_members']);
if($this->object->validate())
{
$this->object->update();
ilUtil::sendInfo($this->lng->txt('settings_saved'));
}
else
{
ilUtil::sendInfo($this->object->getMessage());
}
$this->editObject();
}
Here is the call graph for this function:| ilObjCourseGUI::viewObject | ( | ) |
list childs of current object
public
Reimplemented from ilObjectGUI.
Definition at line 263 of file class.ilObjCourseGUI.php.
References $_GET, $ilCtrl, ilMDUtils::_fillHTMLMetaTags(), ilLearningProgress::_tracProgress(), and checkAgreement().
Referenced by gatewayObject(), and renderObject().
{
global $rbacsystem, $ilUser, $ilCtrl;
// CHECK ACCESS
if(!$rbacsystem->checkAccess("read",$this->object->getRefId()))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
if (strtolower($_GET["baseClass"]) == "iladministrationgui")
{
parent::viewObject();
return true;
}
// Fill meta header tags
include_once('Services/MetaData/classes/class.ilMDUtils.php');
ilMDUtils::_fillHTMLMetaTags($this->object->getId(),$this->object->getId(),'crs');
// Trac access
include_once 'Services/Tracking/classes/class.ilLearningProgress.php';
ilLearningProgress::_tracProgress($ilUser->getId(),$this->object->getId(),'crs');
if(!$this->checkAgreement())
{
include_once('Modules/Course/classes/class.ilCourseAgreementGUI.php');
$this->ctrl->setReturn($this,'view_content');
$agreement = new ilCourseAgreementGUI($this->object->getRefId());
$this->ctrl->setCmdClass(get_class($agreement));
$this->ctrl->forwardCommand($agreement);
return true;
}
include_once './Modules/Course/classes/class.ilCourseContentGUI.php';
$course_content_obj = new ilCourseContentGUI($this);
$this->ctrl->setCmdClass(get_class($course_content_obj));
$this->ctrl->forwardCommand($course_content_obj);
return true;
}
Here is the call graph for this function:
Here is the caller graph for this function:
1.7.1