ILIAS  Release_5_0_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjTestListGUI Class Reference

Class ilObjTestListGUI. More...

+ Inheritance diagram for ilObjTestListGUI:
+ Collaboration diagram for ilObjTestListGUI:

Public Member Functions

 ilObjTestListGUI ()
 constructor
 init ()
 initialisation
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="")
 inititialize new item
 getCommandFrame ($a_cmd)
 Get command target frame.
 getProperties ()
 Get item properties.
 getCommandLink ($a_cmd)
 Get command link url.
 createDefaultCommand ($a_command)
 overwritten from base class for course objectives
 addCommandLinkParameter ($a_param)
 add command link parameters
- Public Member Functions inherited from ilObjectListGUI
 ilObjectListGUI ()
 constructor
 setContainerObject ($container_obj)
 set the container object (e.g categorygui) Used for link, delete ...
 getContainerObject ()
 get container object
 enableProperties ($a_status)
 En/disable properties.
 getPropertiesStatus ()
 enablePreconditions ($a_status)
 En/disable preconditions.
 getNoticePropertiesStatus ()
 enableNoticeProperties ($a_status)
 En/disable notices.
 getPreconditionsStatus ()
 enableDescription ($a_status)
 En/disable description.
 getDescriptionStatus ()
 getSearchFragmentStatus ()
 Show hide search result fragments.
 enableSearchFragments ($a_status)
 En/disable description.
 enableLinkedPath ($a_status)
 Enable linked path.
 enabledRelevance ()
 enabled relevance
 enableRelevance ($a_status)
 enable relevance
 setRelevance ($a_rel)
 set relevance
 getRelevance ()
 get relevance
 enableIcon ($a_status)
 En/Dis-able icons.
 getIconStatus ()
 Are icons enabled?
 enableCheckbox ($a_status)
 En/Dis-able checkboxes.
 getCheckboxStatus ()
 Are checkboxes enabled?
 enableExpand ($a_status)
 En/Dis-able expand/collapse link.
 getExpandStatus ()
 Is expand/collapse enabled.
 setExpanded ($a_status)
 isExpanded ()
 setPositionInputField ($a_field_index, $a_position_value)
 Set position input field.
 enableDelete ($a_status)
 En/disable delete.
 getDeleteStatus ()
 enableCut ($a_status)
 En/disable cut.
 getCutStatus ()
 enableCopy ($a_status)
 En/disable copy.
 getCopyStatus ()
 enableSubscribe ($a_status)
 En/disable subscribe.
 getSubscribeStatus ()
 enablePayment ($a_status)
 En/disable payment.
 getPaymentStatus ()
 enableLink ($a_status)
 En/disable link.
 getLinkStatus ()
 enablePath ($a_path, $a_start_node=null)
 En/disable path.
 getPathStatus ()
 enableCommands ($a_status, $a_std_only=false)
 En/disable commands.
 getCommandsStatus ()
 enableInfoScreen ($a_info_screen)
 En/disable path.
 addSubItemHTML ($a_html)
 Add HTML for subitem (used for sessions)
 getInfoScreenStatus ()
 enableProgressInfo ($a_status)
 enable progress info
 getProgressInfoStatus ()
 get progress info status
 enableSubstitutions ($a_status)
 Enable substitutions.
 getSubstitutionStatus ()
 Get substitution status.
 enableItemDetailLinks ($a_status)
 enable item detail links E.g Direct links to chapters or pages
 getItemDetailLinkStatus ()
 get item detail link status
 setItemDetailLinks ($a_detail_links, $a_intro_txt= '')
 set items detail links
 insertItemDetailLinks ()
 insert item detail links
 setTitle ($a_title)
 getTitle ()
 getTitle overwritten in class.ilObjLinkResourceList.php
 setDescription ($a_description)
 getDescription ()
 getDescription overwritten in class.ilObjLinkResourceList.php
 setSearchFragment ($a_text)
 set search fragment
 getSearchFragment ()
 get search fragment
 setSeparateCommands ($a_val)
 Set separate commands.
 getSeparateCommands ()
 Get separate commands.
 getCommandId ()
 get command id Normally the ref id.
 setAdditionalInformation ($a_val)
 Set additional information.
 getAdditionalInformation ()
 Get additional information.
 setDetailsLevel ($a_level)
 Details level Currently used in Search which shows only limited properties of forums Currently used for Sessions (switch between minimal and extended view for each session)
 getDetailsLevel ()
 Get current details level.
 enableRepositoryTransfer ($a_value)
 Enable copy/move to repository (from personal workspace)
 restrictToGoto ($a_value)
 Restrict all actions/links to goto.
 checkCommandAccess ($a_permission, $a_cmd, $a_ref_id, $a_type, $a_obj_id="")
 initItem ($a_ref_id, $a_obj_id, $a_title="", $a_description="", $a_context=self::CONTEXT_REPOSITORY)
 inititialize new item (is called by getItemHTML())
 setConditionTarget ($a_ref_id, $a_obj_id, $a_target_type)
 resetConditionTarget ()
 disableTitleLink ($a_status)
 setDefaultCommandParameters (array $a_params)
 getCommandImage ($a_cmd)
 Get command icon image.
 getProperties ($a_item= '')
 Get item properties.
 addCustomProperty ($a_property="", $a_value="", $a_alert=false, $a_newline=false)
 add custom property
 getCustomProperties ($a_prop)
 get custom properties
 getAlertProperties ()
 get all alert properties
 getNoticeProperties ()
 get notice properties
 addCustomCommand ($a_link, $a_lang_var, $a_frame="", $onclick="")
 add a custom command
 forceVisibleOnly ($a_stat)
 Force visible access only.
 isVisibleOnlyForced ()
 Force unreadable.
 getCommands ()
 get all current commands for a specific ref id (in the permission context of the current user)
 getIconImageType ()
 Returns the icon image type.
 insertTitle ()
 insert item title
 insertSubstitutions ()
 Insert substitutions.
 insertDescription ()
 insert item description
 insertSearchFragment ()
 Insert highlighted search fragment.
 insertRelevance ()
 insert relevance
 setMode ($a_mode)
 set output mode
 getMode ()
 get output mode
 setConditionDepth ($a_depth)
 set depth for precondition output (stops at level 5)
 isMode ($a_mode)
 check current output mode
 insertProperties ($a_item= '')
 insert properties
 insertNoticeProperties ()
 insertPayment ()
 insert payment information
 insertPreconditions ()
 insert all missing preconditions
 insertCommand ($a_href, $a_text, $a_frame="", $a_img="", $a_cmd="", $a_onclick="")
 insert command button
 insertDeleteCommand ()
 insert cut command
 insertLinkCommand ()
 insert link command
 insertCutCommand ($a_to_repository=false)
 insert cut command
 insertCopyCommand ($a_to_repository=false)
 Insert copy command.
 insertPasteCommand ()
 Insert paste command.
 insertSubscribeCommand ()
 insert subscribe command
 insertInfoScreenCommand ()
 insert info screen command
 insertCommonSocialCommands ($a_header_actions=false)
 Insert common social commands (comments, notes, tagging)
 insertTimingsCommand ()
 insert edit timings command
 insertCommands ($a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_header_actions=false)
 insert all commands into html code
 enableComments ($a_value, $a_enable_comments_settings=true)
 Toogle comments action status.
 enableNotes ($a_value)
 Toogle notes action status.
 enableTags ($a_value)
 Toogle tags action status.
 enableRating ($a_value, $a_text=null, $a_categories=false, array $a_ctrl_path=null)
 Toogle rating action status.
 enableMultiDownload ($a_value)
 Toggles whether multiple objects can be downloaded at once or not.
 insertMultiDownloadCommand ()
 enableDownloadCheckbox ($a_ref_id, $a_value)
 getDownloadCheckboxState ()
 setHeaderSubObject ($a_type, $a_id)
 Set sub object identifier.
 addHeaderIcon ($a_id, $a_img, $a_tooltip=null, $a_onclick=null, $a_status_text=null, $a_href=null)
 addHeaderIconHTML ($a_id, $a_html)
 setAjaxHash ($a_hash)
 getHeaderAction ()
 Get header action.
 appendRepositoryFrameParameter ($a_link)
 workaround: all links into the repository (from outside) must tell repository to setup the frameset
 modifySAHSlaunch ($a_link, $wtarget)
 workaround: SAHS in new javavasript-created window or iframe
 insertPath ()
 insert path
 insertProgressInfo ()
 insert progress info
 insertIconsAndCheckboxes ()
 Insert icons and checkboxes.
 insertSubItems ()
 Insert subitems.
 insertPositionField ()
 Insert field for positioning.
 adminCommandsIncluded ()
 returns whether any admin commands (link, delete, cut) are included in the output
 storeAccessCache ()
 Store access cache.
 getListItemHTML ($a_ref_id, $a_obj_id, $a_title, $a_description, $a_use_asynch=false, $a_get_asynch_commands=false, $a_asynch_url="", $a_context=self::CONTEXT_REPOSITORY)
 Get all item information (title, commands, description) in HTML.
 setParentRefId ($a_ref_id)
 Set current parent ref id to enable unique js-ids (sessions, etc.)
 getCommandsHTML ()
 Get commands HTML (must be called after get list item html)
 isSideBlock ()
 Returns whether current item is a block in a side column or not.
 setBoldTitle ($a_bold_title)
 public boolean $a_bold_title set the item title bold
 isTitleBold ()
 public
 enableTimings ($a_status)
 enable timings link
 isFileUploadAllowed ()
 Gets a value indicating whether file uploads to this object are allowed or not.
 insertFileUpload ()
 Inserts a file upload component.

Protected Member Functions

 modifyTitleLink ($a_default_link)
- Protected Member Functions inherited from ilObjectListGUI
 buildGotoLink ()
 insertPaymentCommand ($has_extension_prices=false)
 parseConditions ($toggle_id, $conditions, $obligatory=true)
 resetCustomData ()
 reset properties and commands
 getUniqueItemId ($a_as_div=false)
 Get unique item identifier (for js-actions)
 isCommentsActivated ($a_type, $a_ref_id, $a_obj_id, $a_header_actions, $a_check_write_access=true)
 Check comments status against comments settings and context.

Protected Attributes

 $command_link_params = array()
- Protected Attributes inherited from ilObjectListGUI
 $obj_id
 $ref_id
 $type
 $sub_obj_id
 $sub_obj_type
 $substitutions = null
 $substitutions_enabled = false
 $icons_enabled = false
 $checkboxes_enabled = false
 $position_enabled = false
 $progress_enabled = false
 $item_detail_links_enabled = false
 $item_detail_links = array()
 $item_detail_links_intro = ''
 $search_fragments_enabled = false
 $search_fragment = ''
 $path_linked = false
 $enabled_relevance = false
 $relevance = 0
 $expand_enabled = false
 $is_expanded = true
 $bold_title = false
 $copy_enabled = true
 $details_level = self::DETAILS_ALL
 $reference_ref_id = false
 $separate_commands = false
 $search_fragment_enabled = false
 $additional_information = false
 $static_link_enabled = false
 $repository_transfer_enabled = false
 $shared = false
 $restrict_to_goto = false
 $comments_enabled = false
 $comments_settings_enabled = false
 $notes_enabled = false
 $tags_enabled = false
 $rating_enabled = false
 $rating_categories_enabled = false
 $rating_text = false
 $rating_ctrl_path = false
 $timings_enabled = true
 $force_visible_only = false
 $prevent_duplicate_commands = array()
 $parent_ref_id
 $title_link = ''
 $title_link_disabled = false

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectListGUI
static prepareJsLinks ($a_redraw_url, $a_notes_url, $a_tags_url, $a_tpl=null)
 Insert js/ajax links into template.
static preloadCommonProperties ($a_obj_ids, $a_context)
 Preload common properties.
- Data Fields inherited from ilObjectListGUI
const DETAILS_MINIMAL = 10
const DETAILS_SEARCH = 20
const DETAILS_ALL = 30
const CONTEXT_REPOSITORY = 1
const CONTEXT_WORKSPACE = 2
const CONTEXT_SHOP = 3
const CONTEXT_WORKSPACE_SHARING = 4
const CONTEXT_PERSONAL_DESKTOP = 5
const CONTEXT_SEARCH = 6
const DOWNLOAD_CHECKBOX_NONE = 0
const DOWNLOAD_CHECKBOX_ENABLED = 1
const DOWNLOAD_CHECKBOX_DISABLED = 2
 $ctrl
 $description_enabled = true
 $preconditions_enabled = true
 $properties_enabled = true
 $notice_properties_enabled = true
 $commands_enabled = true
 $cust_prop = array()
 $cust_commands = array()
 $info_screen_enabled = false
 $condition_depth = 0
 $std_cmd_only = false
 $sub_item_html = array()
 $multi_download_enabled = false
 $download_checkbox_state = self::DOWNLOAD_CHECKBOX_NONE
- Static Protected Attributes inherited from ilObjectListGUI
static $cnt_notes = array()
static $cnt_tags = array()
static $tags = array()
static $comments_activation = array()
static $preload_done = false
static $js_unique_id = 0

Detailed Description

Member Function Documentation

ilObjTestListGUI::addCommandLinkParameter (   $a_param)

add command link parameters

public

Parameters
array(param => value)
Returns

Definition at line 181 of file class.ilObjTestListGUI.php.

{
$this->command_link_params = $a_param;
}
ilObjTestListGUI::createDefaultCommand (   $a_command)

overwritten from base class for course objectives

public

Parameters
@return

Reimplemented from ilObjectListGUI.

Definition at line 168 of file class.ilObjTestListGUI.php.

{
return $a_command;
}
ilObjTestListGUI::getCommandFrame (   $a_cmd)

Get command target frame.

Parameters
string$a_cmdcommand
Returns
string command target frame

Reimplemented from ilObjectListGUI.

Definition at line 75 of file class.ilObjTestListGUI.php.

References ilFrameTargetInfo\_getFrame().

{
switch($a_cmd)
{
case "":
case "infoScreen":
case "eval_a":
case "eval_stat":
include_once "./Services/UICore/classes/class.ilFrameTargetInfo.php";
$frame = ilFrameTargetInfo::_getFrame("MainContent");
break;
default:
}
return $frame;
}

+ Here is the call graph for this function:

ilObjTestListGUI::getCommandLink (   $a_cmd)

Get command link url.

Parameters
int$a_ref_idreference id
string$a_cmdcommand

Reimplemented from ilObjectListGUI.

Definition at line 136 of file class.ilObjTestListGUI.php.

References $ilCtrl, and ilUtil\appendUrlParameterString().

{
global $ilCtrl;
$a_cmd = explode('::', $a_cmd);
if( count($a_cmd) == 2 )
{
$cmd_link = $ilCtrl->getLinkTargetByClass(array('ilRepositoryGUI', 'ilObjTestGUI', $a_cmd[0]), $a_cmd[1]);
}
else
{
$cmd_link = $ilCtrl->getLinkTargetByClass('ilObjTestGUI', $a_cmd[0]);
}
$params = array_merge(array('ref_id' => $this->ref_id), $this->command_link_params);
foreach($params as $param => $value)
{
$cmd_link = ilUtil::appendUrlParameterString($cmd_link, "$param=$value", true);
}
return $cmd_link;
}

+ Here is the call graph for this function:

ilObjTestListGUI::getProperties ( )

Get item properties.

Returns
array array of property arrays: "alert" (boolean) => display as an alert property (usually in red) "property" (string) => property name "value" (string) => property value

Definition at line 103 of file class.ilObjTestListGUI.php.

References $ilUser, $lng, ilObjTestAccess\_isOnline(), and ilObjTestAccess\_lookupOnlineTestAccess().

{
global $lng, $ilUser;
$props = array();
include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
if (!ilObjTestAccess::_isOnline($this->obj_id))
{
$props[] = array("alert" => true, "property" => $lng->txt("status"),
"value" => $lng->txt("offline"));
}
// we cannot use ilObjTestAccess::_isOffline() because of text messages
$onlineaccess = ilObjTestAccess::_lookupOnlineTestAccess($this->obj_id, $ilUser->id);
if ($onlineaccess !== true)
{
$props[] = array("alert" => true, "property" => $lng->txt("status"),
"value" => $onlineaccess);
}
return $props;
}

+ Here is the call graph for this function:

ilObjTestListGUI::ilObjTestListGUI ( )

constructor

Definition at line 27 of file class.ilObjTestListGUI.php.

References ilObjectListGUI\ilObjectListGUI().

{
$this->ilObjectListGUI();
$this->info_screen_enabled = true;
}

+ Here is the call graph for this function:

ilObjTestListGUI::init ( )

initialisation

Reimplemented from ilObjectListGUI.

Definition at line 36 of file class.ilObjTestListGUI.php.

References ilObjTestAccess\_getCommands().

{
$this->static_link_enabled = true;
$this->delete_enabled = true;
$this->cut_enabled = true;
$this->copy_enabled = true;
$this->subscribe_enabled = true;
$this->link_enabled = true;
$this->payment_enabled = true;
$this->type = "tst";
$this->gui_class_name = "ilobjtestgui";
// general commands array
include_once "./Modules/Test/classes/class.ilObjTestAccess.php";
$this->commands = ilObjTestAccess::_getCommands();
}

+ Here is the call graph for this function:

ilObjTestListGUI::initItem (   $a_ref_id,
  $a_obj_id,
  $a_title = "",
  $a_description = "" 
)

inititialize new item

Parameters
int$a_ref_idreference id
int$a_obj_idobject id
string$a_titletitle
string$a_descriptiondescription

Definition at line 62 of file class.ilObjTestListGUI.php.

{
parent::initItem($a_ref_id, $a_obj_id, $a_title, $a_description);
}
ilObjTestListGUI::modifyTitleLink (   $a_default_link)
protected

Reimplemented from ilObjectListGUI.

Definition at line 187 of file class.ilObjTestListGUI.php.

References ilObjectListGUI\$ref_id, ilObject\_getAllReferences(), and ilLOSettings\isObjectiveTest().

{
include_once './Modules/Course/classes/Objectives/class.ilLOSettings.php';
$id = ilLOSettings::isObjectiveTest($this->ref_id);
$cmd_link = $a_default_link;
if($id)
{
$ref_ids = ilObject::_getAllReferences($id);
$ref_id = end($ref_ids);
$this->ctrl->setParameterByClass("ilrepositorygui", 'ref_id', $ref_id);
$this->ctrl->setParameterByClass("ilrepositorygui", 'tid', $this->ref_id);
$cmd_link = $this->ctrl->getLinkTargetByClass("ilrepositorygui", 'redirectLocToTest');
$this->ctrl->setParameterByClass("ilrepositorygui", "ref_id", $this->ref_id);
$this->ctrl->clearParametersByClass('ilrepositorygui');
}
return parent::modifyTitleLink($cmd_link);
}

+ Here is the call graph for this function:

Field Documentation

ilObjTestListGUI::$command_link_params = array()
protected

Definition at line 21 of file class.ilObjTestListGUI.php.


The documentation for this class was generated from the following file: