ILIAS  trunk Revision v11.0_alpha-1761-g6dbbfa7b760
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilSCORMTrackingItemsPerUserFilterGUI Class Reference

Class ilSCORMTrackingItemsPerUserFilterGUI. More...

+ Inheritance diagram for ilSCORMTrackingItemsPerUserFilterGUI:
+ Collaboration diagram for ilSCORMTrackingItemsPerUserFilterGUI:

Public Member Functions

 __construct (object $a_parent_obj, string $a_parent_cmd)
 
 parse (string $userSelected, string $report, array $reports)
 
- Public Member Functions inherited from ilPropertyFormGUI
 __construct ()
 
 executeCommand ()
 
 setTableWidth (string $a_width)
 
 getTableWidth ()
 
 setMode (string $a_mode)
 
 getMode ()
 
 setTitle (string $a_title)
 
 getTitle ()
 
 setTitleIcon (string $a_titleicon)
 
 getTitleIcon ()
 
 setDescription (string $a_val)
 
 getDescription ()
 
 setTopAnchor (string $a_val)
 
 getTopAnchor ()
 
 setShowTopButtons (bool $a_val)
 
 getShowTopButtons ()
 
 setForceTopButtons (bool $a_val)
 
 getForceTopButtons ()
 
 addItem ($a_item)
 
 removeItemByPostVar (string $a_post_var, bool $a_remove_unused_headers=false)
 
 getItemByPostVar (string $a_post_var)
 
 setItems (array $a_items)
 
 getItems ()
 
 getInputItemsRecursive ()
 returns a flat array of all input items including the possibly existing subitems recursively More...
 
 setDisableStandardMessage (bool $a_val)
 
 getDisableStandardMessage ()
 
 getHideLabels ()
 
 setHideLabels (bool $a_value=true)
 
 setValuesByArray (array $a_values, bool $a_restrict_to_value_keys=false)
 
 setValuesByPost ()
 
 checkInput ()
 
 getInput (string $a_post_var, bool $ensureValidation=true)
 Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-POST variable, identified by the passed postvar. More...
 
 addCommandButton (string $a_cmd, string $a_text, string $a_id="")
 
 getCommandButtons ()
 
 clearCommandButtons ()
 
 getContent ()
 
 insertItem ( $item, bool $a_sub_item=false)
 
 addAsyncOnloadCode (string $code)
 
 getHTML ()
 
 getHTMLAsync ()
 
 getFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 Get file upload data. More...
 
 hasFileUpload (string $a_field, ?string $a_index=null, ?string $a_sub_index=null)
 
 moveFileUpload (string $a_target_directory, string $a_field, ?string $a_target_name=null, ?string $a_index=null, ?string $a_sub_index=null)
 Move upload to target directory. More...
 
- Public Member Functions inherited from ilFormGUI
 setFormAction (string $a_formaction)
 
 getFormAction ()
 
 setTarget (string $a_target)
 
 getTarget ()
 
 setMultipart (bool $a_multipart)
 
 getMultipart ()
 
 setId (string $a_id)
 
 getId ()
 
 setName (string $a_name)
 
 getName ()
 
 setKeepOpen (bool $a_keepopen)
 
 getKeepOpen ()
 
 setOpenTag (bool $a_open)
 
 getOpenTag ()
 
 setCloseTag (bool $a_val)
 
 getCloseTag ()
 
 setPreventDoubleSubmission (bool $a_val)
 
 getPreventDoubleSubmission ()
 
 getHTML ()
 
 getContent ()
 

Data Fields

ilPropertyFormGUI $form
 

Private Attributes

object $parent_obj
 
string $parent_cmd
 

Additional Inherited Members

- Protected Member Functions inherited from ilPropertyFormGUI
 getRequestedPostVar ()
 
 getFileHash ()
 
 hideRequired (string $a_type)
 
 appendOnloadCode (string $html)
 
 rebuildUploadedFiles ()
 
 checkForRequiredField ()
 
- Protected Attributes inherited from ilPropertyFormGUI
bool $required_text = false
 
ilLanguage $lng
 
ilCtrl $ctrl
 
ilTemplate $tpl
 
ilObjUser $user = null
 
ilSetting $settings = null
 
string $mode = "std"
 
bool $check_input_called = false
 
bool $disable_standard_message = false
 
string $top_anchor = "il_form_top"
 
string $title = ''
 
string $titleicon = ""
 
string $description = ""
 
string $tbl_width = ""
 
bool $show_top_buttons = true
 
bool $hide_labels = false
 
bool $force_top_buttons = false
 
HTTP Services $http
 
Refinery Factory $refinery = null
 
ilGlobalTemplateInterface $global_tpl = null
 
 $onload_code = []
 
- Protected Attributes inherited from ilFormGUI
string $formaction = ""
 
bool $multipart = false
 
bool $keepopen = false
 
bool $opentag = true
 
string $id = ''
 
string $name = ''
 
string $target = ''
 
bool $prevent_double_submission = false
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilSCORMTrackingItemsPerUserFilterGUI::__construct ( object  $a_parent_obj,
string  $a_parent_cmd 
)

Definition at line 32 of file class.ilSCORMTrackingItemsPerUserFilterGUI.php.

References ILIAS\GlobalScreen\Provider\__construct().

33  {
34  $this->parent_obj = $a_parent_obj;
35  $this->parent_cmd = $a_parent_cmd;
37  }
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ parse()

ilSCORMTrackingItemsPerUserFilterGUI::parse ( string  $userSelected,
string  $report,
array  $reports 
)
Exceptions
ilCtrlException

Definition at line 42 of file class.ilSCORMTrackingItemsPerUserFilterGUI.php.

References $DIC, ilPropertyFormGUI\$lng, ilPropertyFormGUI\$user, ilObject\_exists(), ILIAS\Repository\form(), ilPrivacySettings\getInstance(), ilTrQuery\getParticipantsForObject(), ILIAS\Repository\int(), ilLanguage\loadLanguageModule(), ilSelectInputGUI\setOptions(), and ilLanguage\txt().

42  : void
43  {
44  global $DIC;
45  $ilCtrl = $DIC->ctrl();
46  $lng = $DIC->language();
47  $lng->loadLanguageModule("scormtrac");
48  $this->form = new ilPropertyFormGUI();
49  $this->form->setFormAction($ilCtrl->getFormAction($this->parent_obj));
50 
51  $options = array("all" => $lng->txt("all"));
52  $users = ilTrQuery::getParticipantsForObject($this->parent_obj->getRefId());
53  $privacy = ilPrivacySettings::getInstance();
54  $allowExportPrivacy = $privacy->enabledExportSCORM();
55 
56  if ($users && count($users) > 0) {
57  foreach ($users as $usr) {
58  $user = (int) $usr;
59  if (ilObject::_exists($user) && ilObject::_lookUpType($user) === 'usr') {
60  if ($allowExportPrivacy == true) {
61  $e_user = new ilObjUser((int) $user);
62  $options[$user] = $e_user->getLastname() . ", " . $e_user->getFirstname();
63  } else {
64  $options[$user] = 'User Id: ' . $user;
65  }
66  }
67  }
68  } else {
69  $options = array("-1" => $lng->txt("no_items"));
70  }
71 
72  $si = new ilSelectInputGUI($lng->txt("user"), "userSelected");
73  $si->setOptions($options);
74  $si->setValue($userSelected);
75  $this->form->addItem($si);
76 
77  $options = array("choose" => $lng->txt("please_choose"));
78  foreach ($reports as $value) {
79  $options[$value] = $lng->txt(strtolower($value));
80  }
81  $si = new ilSelectInputGUI($lng->txt("report"), "report");
82  $si->setOptions($options);
83  $si->setValue($report);
84  $this->form->addItem($si);
85  $this->form->addCommandButton($this->parent_cmd, $lng->txt("apply_filter"));
86  }
This class represents a selection list property in a property form.
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
loadLanguageModule(string $a_module)
Load language module.
setOptions(array $a_options)
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
global $DIC
Definition: shib_login.php:22
form( $class_path, string $cmd, string $submit_caption="")
static getParticipantsForObject(int $a_ref_id)
Get participant ids for given object.
+ Here is the call graph for this function:

Field Documentation

◆ $form

ilPropertyFormGUI ilSCORMTrackingItemsPerUserFilterGUI::$form

◆ $parent_cmd

string ilSCORMTrackingItemsPerUserFilterGUI::$parent_cmd
private

◆ $parent_obj

object ilSCORMTrackingItemsPerUserFilterGUI::$parent_obj
private

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