3declare(strict_types=1);
 
   90    public static function _goto(
string $target)
 
   98        $targetParameters = explode(
'_', $target);
 
   99        $id = (int) $targetParameters[0];
 
  101        if (!self::isAccessible($id)) {
 
  102            $err->raiseError(
$lng->txt(
'msg_no_perm_read'), $err->FATAL);
 
  105        if (self::hasAccess(self::ACCESS_READ, $id)) {
 
  106            $params = [
'ref_id' => $id];
 
  108            if (isset(
$request->getQueryParams()[
'gotolp'])) {
 
  109                $params[
'gotolp'] = 1;
 
  113                ilRepositoryGUI::class,
 
  114                [ilRepositoryGUI::class, ilObjLearningSequenceGUI::class],
 
  120        if (self::hasAccess(self::ACCESS_VISIBLE, $id)) {
 
  126                $lng->txt(
'msg_no_perm_read_item'),
 
  143    protected static function hasAccess(
string $mode, 
int $id) : bool
 
  146        return $DIC->access()->checkAccess($mode, 
'', $id);
 
  149    protected static function forwardByClass(
string $base_class, array $classes, array $params, 
string $cmd = 
'')
 
  153        $target_class = end($classes);
 
  155        $ctrl->setTargetScript(
'ilias.php');
 
  156        $ctrl->initBaseClass($base_class);
 
  158        foreach ($params as $key => $value) {
 
  159            $ctrl->setParameterByClass($target_class, $key, $value);
 
  162        $ctrl->redirectByClass($classes, $cmd);
 
  167        $this->ref_id = (int) 
$_GET[
'ref_id'];
 
  173        $this->ctrl = 
$DIC[
'ilCtrl'];
 
  174        $this->lng = 
$DIC[
'lng'];
 
  175        $this->
user = $DIC[
'ilUser'];
 
  176        $this->tabs = 
$DIC[
'ilTabs'];
 
  177        $this->toolbar = 
$DIC[
'ilToolbar'];
 
  178        $this->
help = $DIC[
'ilHelp'];
 
  179        $this->
settings = $DIC[
'ilSetting'];
 
  180        $this->access = 
$DIC[
'ilAccess'];
 
  181        $this->rbac_review = 
$DIC[
'rbacreview'];
 
  182        $this->ui_factory = 
$DIC[
'ui.factory'];
 
  183        $this->ui_renderer = 
$DIC[
'ui.renderer'];
 
  185        $this->log = 
$DIC[
"ilLoggerFactory"]->getRootLogger();
 
  186        $this->app_event_handler = 
$DIC[
'ilAppEventHandler'];
 
  187        $this->navigation_history = 
$DIC[
'ilNavigationHistory'];
 
  188        $this->obj_definition = 
$DIC[
'objDefinition'];
 
  189        $this->tpl = 
$DIC[
"tpl"];
 
  190        $this->obj_service = 
$DIC->object();
 
  191        $this->toolbar = 
$DIC[
'ilToolbar'];
 
  193        $this->
help->setScreenIdComponent($this->obj_type);
 
  194        $this->lng->loadLanguageModule($this->obj_type);
 
  197        $this->data_factory = new \ILIAS\Data\Factory();
 
  203            $this->object->getType(),
 
  204            $this->object->getRefId(),
 
  205            $this->object->getId(),
 
  212        $next_class = $this->ctrl->getNextClass($this);
 
  213        $cmd = $this->ctrl->getCmd();
 
  216        parent::prepareOutput();
 
  223            $next_class === 
'ilobjlearningsequencelearnergui' 
  227        $tpl->setPermanentLink(
"lso", $this->ref_id);
 
  229        switch ($next_class) {
 
  230            case "ilcommonactiondispatchergui":
 
  232                $this->ctrl->forwardCommand($gui);
 
  234            case "ilinfoscreengui":
 
  237            case "ilpermissiongui":
 
  240            case "ilobjlearningsequencesettingsgui":
 
  243            case "ilobjlearningsequencecontentgui":
 
  246            case "ilobjlearningsequencelearnergui":
 
  249            case "illearningsequencemembershipgui":
 
  252            case 'ilmailmembersearchgui':
 
  255            case 'illearningprogressgui':
 
  261            case 'ilobjectcopygui':
 
  264                $this->ctrl->forwardCommand($cp);
 
  266            case 'ilobjindividualassessmentgui':
 
  267                $struct = [
'ilrepositorygui',
'ilobjindividualassessmentgui'];
 
  268                if ($cmd === 
'edit') {
 
  269                    $struct[] = 
'ilindividualassessmentsettingsgui';
 
  271                $this->ctrl->redirectByClass($struct, $cmd);
 
  274                $struct = [
'ilrepositorygui',
'ilobjtestgui'];
 
  275                $this->ctrl->redirectByClass($struct, $cmd);
 
  355                        throw new ilException(
"ilObjLearningSequenceGUI: Invalid command '$cmd'");
 
  359                throw new ilException(
"ilObjLearningSequenceGUI: Can't forward to next class $next_class");
 
  371            $this->access->checkAccess(
'read', 
'', $this->ref_id)
 
  374            $this->navigation_history->addItem($this->ref_id, $link, $this->obj_type);
 
  378    protected function info(
string $cmd = self::CMD_INFO)
 
  380        $this->tabs->setTabActive(self::TAB_INFO);
 
  381        $this->ctrl->setCmdClass(
'ilinfoscreengui');
 
  382        $this->ctrl->setCmd($cmd);
 
  384        $this->ctrl->forwardCommand($info);
 
  387    protected function permissions(
string $cmd = self::CMD_PERMISSIONS)
 
  389        $this->tabs->setTabActive(self::TAB_PERMISSIONS);
 
  391        $this->ctrl->setCmd($cmd);
 
  392        $this->ctrl->forwardCommand($perm_gui);
 
  395    protected function settings(
string $cmd = self::CMD_SETTINGS)
 
  397        $this->tabs->activateTab(self::TAB_SETTINGS);
 
  405        $this->ctrl->setCmd($cmd);
 
  406        $this->ctrl->forwardCommand($gui);
 
  411        $this->tabs->clearSubTabs();
 
  421        $this->
info(self::CMD_INFO);
 
  427        $this->tabs->activateTab(self::TAB_CONTENT_MAIN);
 
  429        $this->tabs->activateSubTab(self::TAB_MANAGE);
 
  440        $this->ctrl->setCmd($cmd);
 
  441        $this->ctrl->forwardCommand($gui);
 
  444    protected function learnerView(
string $cmd = self::CMD_LEARNER_VIEW)
 
  446        $this->tabs->activateTab(self::TAB_CONTENT_MAIN);
 
  448        $this->tabs->activateSubTab(self::TAB_VIEW_CONTENT);
 
  450        $gui = $this->
object->getLocalDI()[
"gui.learner"];
 
  452        $this->ctrl->setCmd($cmd);
 
  453        $this->ctrl->forwardCommand($gui);
 
  458        $may_manage_members = $this->
checkAccess(
"edit_members");
 
  459        $this->ctrl->setCmdClass(
'ilLearningSequenceMembershipGUI');
 
  460        if ($may_manage_members) {
 
  469        $this->tabs->setTabActive(self::TAB_MEMBERS);
 
  484        $this->ctrl->setCmd($cmd);
 
  485        $this->ctrl->forwardCommand($ms_gui);
 
  490        $this->tabs->setTabActive(self::TAB_LP);
 
  492        $for_user = $this->
user->getId();
 
  494        if (
$_GET[
'user_id']) {
 
  495            $for_user = 
$_GET[
'user_id'];
 
  504        if ($cmd === self::CMD_LP) {
 
  508        $this->ctrl->setCmd($cmd);
 
  509        $this->ctrl->forwardCommand($lp_gui);
 
  514        $this->tabs->setTabActive(self::TAB_EXPORT);
 
  516        $gui->addFormat(
"xml");
 
  518        $this->ctrl->forwardCommand($gui);
 
  528        parent::createObject();
 
  533        parent::saveObject();
 
  539            (
int) $new_object->
getId(),
 
  541            $this->app_event_handler,
 
  546        $participant->updateNotification($this->
user->getId(), $this->settings->get(
'mail_lso_admin_notification', 
true));
 
  549        $settings = new \ilContainerSortingSettings($new_object->
getId());
 
  556        ilUtil::sendSuccess($this->lng->txt(
'object_added'), 
true);
 
  557        $this->ctrl->setParameter($this, 
"ref_id", $new_object->
getRefId());
 
  561                $this->ctrl->getLinkTarget($this, self::CMD_SETTINGS, 
"", 
false, 
false)
 
  569            $usr_id = (int) $this->
user->getId();
 
  570            $this->
getObject()->getLSRoles()->leave($usr_id);
 
  577        $this->ls_object->leave($usr_id);
 
  584                self::TAB_CONTENT_MAIN,
 
  585                $this->lng->txt(self::TAB_CONTENT_MAIN),
 
  586                $this->ctrl->getLinkTarget($this, self::CMD_VIEW, 
"", 
false, 
false)
 
  593                $this->lng->txt(self::TAB_INFO),
 
  594                $this->getLinkTarget(self::CMD_INFO)
 
  601                $this->lng->txt(self::TAB_SETTINGS),
 
  602                $this->getLinkTarget(self::CMD_SETTINGS)
 
  609                    $this->
getObject()->getLSSettings()->getMembersGallery()
 
  611                    $this->
getObject()->getLSRoles()->isMember((
int) $this->
user->getId())
 
  616                    $this->lng->txt(self::TAB_MEMBERS),
 
  617                    $this->ctrl->getLinkTarget($this, self::CMD_MEMBERS, 
"", 
false, 
false)
 
  625                $this->lng->txt(self::TAB_LP),
 
  626                $this->getLinkTarget(self::CMD_LP)
 
  633                $this->lng->txt(self::TAB_EXPORT),
 
  634                $this->ctrl->getLinkTargetByClass(
"ilexportgui", 
"")
 
  640                self::TAB_PERMISSIONS,
 
  641                $this->lng->txt(self::TAB_PERMISSIONS),
 
  642                $this->getLinkTarget(self::CMD_PERMISSIONS)
 
  654        $this->tabs->addSubTab(
 
  655            self::TAB_VIEW_CONTENT,
 
  656            $this->lng->txt(self::TAB_VIEW_CONTENT),
 
  657            $this->getLinkTarget(self::CMD_LEARNER_VIEW)
 
  661            $this->tabs->addSubTab(
 
  663                $this->lng->txt(self::TAB_MANAGE),
 
  664                $this->getLinkTarget(self::CMD_CONTENT)
 
  671        return $this->access->checkAccess($which, 
"", $this->ref_id);
 
  680        $may_edit_lp_settings = $this->
checkAccess(
'edit_learning_progress');
 
  682        return ($lp_access || $may_edit_lp_settings);
 
  689            strtolower(
'ilObjLearningSequenceGUI'),
 
  692        return $this->ctrl->getLinkTargetByClass($class_path, $cmd);
 
  699                return 'ilObjLearningSequenceContentGUI';
 
  701                return 'ilObjLearningSequenceLearnerGUI';
 
  703                return 'ilObjLearningSequenceSettingsGUI';
 
  705                return 'ilInfoScreenGUI';
 
  707                return 'ilPermissionGUI';
 
  709                return 'ilLearningProgressGUI';
 
  712        throw new InvalidArgumentException(
'cannot resolve class for command: ' . $cmd);
 
  717        $link = chr(13) . chr(10) . chr(13) . chr(10);
 
  718        $link .= $this->lng->txt(
'lso_mail_permanent_link');
 
  719        $link .= chr(13) . chr(10) . chr(13) . chr(10);
 
  722        return rawurlencode(base64_encode($link));
 
  727        if ($this->
object === 
null) {
 
  744        $local_roles = $this->
object->getLocalLearningSequenceRoles(
false);
 
  745        $lso_member = $this->
object->getDefaultMemberRole();
 
  746        $lso_roles = array();
 
  748        if (in_array($lso_member, $local_roles)) {
 
  750            unset($local_roles[$lso_roles[$lso_member]]);
 
  753        foreach ($local_roles as $title => $role_id) {
 
  765        $types = array_filter(
 
  766            array_keys($this->obj_definition->getSubObjects(
'lso', 
false)),
 
  768                return $type !== 
'rolf';
 
  778        foreach ($a_data as $usr_id => $user_data) {
 
  779            $res_data[$usr_id] = $user_data;
 
  782            foreach ($udf_data->getAll() as $field => $value) {
 
  783                list(
$f, $field_id) = explode(
'_', $field);
 
  784                $res_data[$usr_id][
'udf_' . $field_id] = (string) $value;
 
An exception for terminatinating execution or to throw for unit testing.
static _recordReadEvent( $a_type, $a_ref_id, $obj_id, $usr_id, $isCatchupWriteEvents=true, $a_ext_rc=false, $a_ext_time=false)
Records a read event and catches up with write events.
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Confirmation screen class.
trashObject()
Show trash content of object.
cutObject()
cut object(s) out from a container and write the information to clipboard
showPasteTreeObject()
Show paste tree.
performPasteIntoMultipleObjectsObject()
undeleteObject()
Get objects back from trash.
linkObject()
create an new reference of an object in tree it's like a hard link of unix
keepObjectsInClipboardObject()
Keep objects in the clipboard.
const SORT_NEW_ITEMS_ORDER_CREATION
const SORT_NEW_ITEMS_POSITION_BOTTOM
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Export User Interface Class.
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress
const LP_CONTEXT_REPOSITORY
Class ilObjUserTrackingGUI.
GUI class for learning sequence membership features.
static _isParticipant($ref_id, $usr_id)
Static function to check if a user is a participant of the container object.
static _getLink($a_ref_id, $a_type='', $a_params=array(), $append="")
Class ilObjLearningSequenceContentGUI.
Class ilObjLearningSequenceGUI.
settings(string $cmd=self::CMD_SETTINGS)
learningProgress(string $cmd=self::CMD_LP)
recordLearningSequenceRead()
getTabs()
common tabs for all container objects (should be called at the end of child getTabs() method
removeMember(int $usr_id)
renderObject()
render the object
static _goto(string $target)
const CMD_MEMBERS_GALLERY
afterSave(ilObject $new_object)
Post (successful) object creation hook.
manageContent(string $cmd=self::CMD_CONTENT)
const CMD_DELETE_CONFIRMED
static hasAccess(string $mode, int $id)
info(string $cmd=self::CMD_INFO)
const MAIL_ALLOWED_TUTORS
manage_members(string $cmd=self::CMD_MANAGE_MEMBERS)
permissions(string $cmd=self::CMD_PERMISSIONS)
executeCommand()
execute command note: this method is overwritten in all container objects
initDidacticTemplate(ilPropertyFormGUI $form)
Show didactic template types.
getLinkTarget(string $cmd)
static isAccessible(int $id)
static forwardByClass(string $base_class, array $classes, array $params, string $cmd='')
const CMD_REMOVE_FROM_DESK
getAdditionalWhitelistTypes()
append additional types to ilRepositoryExplorerGUI's whitelist
learnerView(string $cmd=self::CMD_LEARNER_VIEW)
getClassForTabs(string $cmd)
Class ilObjLearningSequenceSettingsGUI.
static getInstanceByRefId(int $ref_id)
static _getTranslation($a_role_title)
static _enabledLearningProgress()
check wether learing progress is enabled or not
GUI class for the workflow of copying objects.
confirmedDeleteObject()
confirmed deletion of object -> objects are moved to trash or deleted immediately,...
cancelCreation()
cancel create action and go back to repository parent
importFileObject($parent_id=null, $a_catch_errors=true)
Import.
static _gotoRepositoryNode($a_ref_id, $a_cmd="frameset")
Goto repository root.
getReturnLocation($a_cmd, $a_location="")
get return location for command (command is method name without "Object", e.g.
getCreationMode()
get creation mode
addHeaderAction()
Add header action menu.
redrawHeaderActionObject()
Ajax call: redraw action header only.
deleteObject($a_error=false)
Display deletion confirmation screen.
Class ilObject Basic functions for all objects.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
getRefId()
get reference id @access public
getId()
get object id @access public
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
static _getInstance()
Get instance of ilPrivacySettings.
static redirect($a_script)
static sendInfo($a_info="", $a_keep=false)
Send Info Message to Screen.
removeFromDeskObject()
Remove from desktop @access public.
addToDeskObject()
Add desktop item @access public.
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc