31        $this->toolbar = $ilToolbar;
 
   33        $this->parent_ref_id = $a_parent_ref_id;
 
   34        $this->lng->loadLanguageModule(
"administration");
 
   41        if ($cmd == 
"roleStartingPointform" || !$cmd) {
 
   42            $cmd = 
"initRoleStartingPointForm";
 
   55        include_once 
"Services/User/classes/class.ilUserRoleStartingPointTableGUI.php";
 
   57        require_once 
"./Services/AccessControl/classes/class.ilStartingPoint.php";
 
   60        if (!empty($roles_without_point)) {
 
   61            $this->toolbar->addButton(
 
   62                $this->lng->txt(
'create_starting_point'),
 
   63                $this->ctrl->getLinkTarget($this, 
"roleStartingPointform")
 
   72        $this->tpl->setContent(
$tbl->getHTML());
 
   80        $this->tpl->setContent(
$form->getHTML());
 
   88        $this->tpl->setContent(
$form->getHTML());
 
   95        require_once(
"Services/Form/classes/class.ilPropertyFormGUI.php");
 
   96        require_once 
"Services/User/classes/class.ilUserUtil.php";
 
  101        $startp = 
new ilCheckboxInputGUI($this->lng->txt(
"user_chooses_starting_page"), 
"usr_start_pers");
 
  102        $startp->setInfo($this->lng->txt(
"adm_user_starting_point_personal_info"));
 
  105        $form->addItem($startp);
 
  107        $form->addCommandButton(
"saveUserStartingPoint", $this->lng->txt(
"save"));
 
  120        if (!$rbacsystem->checkAccess(
"write", $this->parent_ref_id)) {
 
  124        require_once 
"Services/Form/classes/class.ilPropertyFormGUI.php";
 
  125        require_once 
"./Services/AccessControl/classes/class.ilObjRole.php";
 
  126        require_once 
"./Services/AccessControl/classes/class.ilStartingPoint.php";
 
  127        include_once 
"Services/User/classes/class.ilUserUtil.php";
 
  130        $ilCtrl->saveParameter($this, array(
"spid"));
 
  132        $spoint_id = $_REQUEST[
'spid'];
 
  135        if ($spoint_id > 0 && $spoint_id != 
'default') {
 
  140                $rolid = (int) $_REQUEST[
'rolid'];
 
  142                    $options[$rolid] = $role->getTitle();
 
  143                    $starting_point = $st_point->getStartingPoint();
 
  144                    $si_roles = 
new ilSelectInputGUI($this->lng->txt(
"editing_this_role"), 
'role_disabled');
 
  146                    $si_roles->setDisabled(
true);
 
  147                    $form->addItem($si_roles);
 
  150                    $hi->setValue($rolid);
 
  154                    $hidde_sp_id->setValue($spoint_id);
 
  155                    $form->addItem($hidde_sp_id);
 
  160        elseif (!$spoint_id || $spoint_id !=
'default') {
 
  165                foreach ($roles as $role) {
 
  166                    $options[$role[
'id']] = $role[
'title'];
 
  168                $si_roles = 
new ilSelectInputGUI($this->lng->txt(
"roles_without_starting_point"), 
'role');
 
  170                $form->addItem($si_roles);
 
  179        $si->setRequired(
true);
 
  180        $si->setInfo($this->lng->txt(
"adm_user_starting_point_info"));
 
  184            $si->addOption($opt);
 
  186            if (!in_array($value, 
$valid)) {
 
  187                $opt->setInfo($this->lng->txt(
"adm_user_starting_point_invalid_info"));
 
  190        $si->setValue($starting_point);
 
  195        $repobj_id = 
new ilTextInputGUI($this->lng->txt(
"adm_user_starting_point_ref_id"), 
"start_object");
 
  196        $repobj_id->setRequired(
true);
 
  197        $repobj_id->setSize(5);
 
  201                $start_ref_id  = $st_point->getStartingObject();
 
  206            $repobj_id->setValue($start_ref_id);
 
  215        $repobj->addSubItem($repobj_id);
 
  216        $si->addOption($repobj);
 
  219        $form->addCommandButton(
"saveStartingPoint", $this->lng->txt(
"save"));
 
  220        $form->addCommandButton(
"startingPoints", $this->lng->txt(
"cancel"));
 
  222        $form->setTitle($this->lng->txt(
"starting_point_settings"));
 
  232        if (!$rbacsystem->checkAccess(
"write", $this->parent_ref_id)) {
 
  233            $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"), 
$ilErr->FATAL);
 
  236        include_once 
"Services/User/classes/class.ilUserUtil.php";
 
  240        if (
$form->checkInput()) {
 
  243            $ilCtrl->redirect($this, 
"startingPoints");
 
  246        $ilCtrl->redirect($this, 
"startingPoints");
 
  256        if (!$rbacsystem->checkAccess(
"write", $this->parent_ref_id)) {
 
  257            $ilErr->raiseError($this->lng->txt(
"msg_no_perm_read"), 
$ilErr->FATAL);
 
  260        if ((
int) 
$_POST[
'start_point_id'] > 0) {
 
  261            $start_point_id = (int) 
$_POST[
'start_point_id'];
 
  266        if (
$form->checkInput()) {
 
  268            if (
$form->getInput(
'role')) {
 
  271                if ($start_point_id) {
 
  277                $starting_point->setStartingPoint(
$form->getInput(
"start_point"));
 
  278                $rules = array(
"role_id" => 
$form->getInput(
'role'));
 
  279                $starting_point->setRuleOptions(serialize($rules));
 
  281                $obj_id = 
$form->getInput(
'start_object');
 
  284                        $starting_point->setStartingObject($obj_id);
 
  290                    $starting_point->setStartingObject(0);
 
  293                if ($start_point_id) {
 
  294                    $starting_point->update();
 
  296                    $starting_point->save();
 
  303            $ilCtrl->redirect($this, 
"startingPoints");
 
  314        if (!$rbacsystem->checkAccess(
"write", $this->parent_ref_id)) {
 
  319            require_once 
"./Services/AccessControl/classes/class.ilStartingPoint.php";
 
  322            $sp->saveOrder(
$_POST[
'position']);
 
  326        $ilCtrl->redirect($this, 
"startingPoints");
 
  336        $ilTabs->clearTargets();
 
  337        $ilTabs->setBackTarget(
$lng->txt(
'back_to_starting_points_list'), 
$ilCtrl->getLinkTarget($this, 
'startingPoints'));
 
  339        include_once 
'Services/Utilities/classes/class.ilConfirmationGUI.php';
 
  341        $conf->setFormAction(
$ilCtrl->getFormAction($this));
 
  342        $conf->setHeaderText(
$lng->txt(
'confirm_delete_starting_point'));
 
  345        if ($_REQUEST[
'rolid'] && $_REQUEST[
'spid']) {
 
  346            include_once 
"./Services/AccessControl/classes/class.ilObjRole.php";
 
  348            $rolid = (int) $_REQUEST[
'rolid'];
 
  349            $spid = (int) $_REQUEST[
'spid'];
 
  353            $conf->addItem(
'rolid', $rolid, $role->getTitle());
 
  354            $conf->addItem(
'spid', $spid, 
"");
 
  357        $conf->setConfirm(
$lng->txt(
'delete'), 
'deleteStartingPoint');
 
  358        $conf->setCancel(
$lng->txt(
'cancel'), 
'startingPoints');
 
  360        $tpl->setContent($conf->getHTML());
 
  370        if (!$rbacsystem->checkAccess(
"write", $this->parent_ref_id)) {
 
  374        require_once 
"./Services/AccessControl/classes/class.ilObjRole.php";
 
  376        if ($rolid = $_REQUEST[
'rolid'] && $spid = $_REQUEST[
'spid']) {
 
  377            include_once(
"./Services/AccessControl/classes/class.ilStartingPoint.php");
 
  384        $ilCtrl->redirect($this, 
"startingPoints");
 
if(!isset( $_REQUEST[ 'ReturnTo'])) if(!isset($_REQUEST['AuthId'])) $options
An exception for terminatinating execution or to throw for unit testing.
Confirmation screen class.
static getLogger($a_component_id)
Get component logger.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static _lookupType($a_id, $a_reference=false)
lookup object type
This class represents an option in a radio group.
static getGlobalRolesWithoutStartingPoint()
Get id and title of the roles without starting points.
This class represents a text property in a property form.
TableGUI class for LTI consumer listing.
Class ilUserStartingPointGUI.
initRoleStartingPointForm(ilPropertyFormGUI $form=null)
initUserStartingPointForm(ilPropertyFormGUI $form=null)
deleteStartingPoint()
Set to 0 the starting point values.
__construct($a_parent_ref_id)
Constructor @access public.
startingPoints()
table form to set up starting points depends of user roles
getRoleStartingPointForm()
confirmDeleteStartingPoint()
Confirm delete starting point.
saveStartingPoint()
store starting point from the form
getUserStartingPointForm()
static getPossibleStartingPoints($a_force_all=false)
Get all valid starting points.
static hasPersonalStartingPoint()
Can starting point be personalized?
static togglePersonalStartingPoint($a_value)
Toggle personal starting point setting.
static getStartingPoint()
Get current starting point setting.
static getStartingObject()
Get ref id of starting object.
const START_REPOSITORY_OBJ
static setStartingPoint($a_value, $a_ref_id=null)
Set starting point setting.
static sendSuccess($a_info="", $a_keep=false)
Send Success Message to Screen.
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
if(isset($_POST['submit'])) $form