ILIAS  release_8 Revision v8.24
ilObjSCORM2004LearningModuleGUI Class Reference

Class ilObjSCORMLearningModuleGUI. More...

+ Inheritance diagram for ilObjSCORM2004LearningModuleGUI:
+ Collaboration diagram for ilObjSCORM2004LearningModuleGUI:

Public Member Functions

 __construct (array $a_data, int $a_id, bool $a_call_by_reference, ?bool $a_prepare_output=true)
 
 executeCommand ()
 execute command More...
 
 properties ()
 Scorm 2004 module properties. More...
 
 initPropertiesForm ()
 Initialize properties form. More...
 
 getPropertiesFormValues ()
 Get values for properties form. More...
 
 saveProperties ()
 save scorm 2004 module properties More...
 
 showTrackingItems ()
 Show tracking table. More...
 
- Public Member Functions inherited from ilObjSCORMLearningModuleGUI
 __construct ($data, int $id, bool $call_by_reference, bool $prepare_output=true)
 Constructor. More...
 
 properties ()
 scorm module properties More...
 
 initPropertiesForm ()
 Init properties form. More...
 
 getPropertiesFormValues ()
 Get values for properties form. More...
 
 newModuleVersion ()
 upload new version of module More...
 
 getMaxFileSize ()
 
 newModuleVersionUpload ()
 
 saveProperties ()
 
 showTrackingItems ()
 Show tracking table. More...
 
 deleteTrackingForUser ()
 display deletion confirmation screen More...
 
 cancelDeleteTracking ()
 cancel deletion of export files More...
 
 confirmedDeleteTracking ()
 
 cancel ()
 overwrite..jump back to trackingdata not parent More...
 
 setSubTabs ()
 
- Public Member Functions inherited from ilObjSAHSLearningModuleGUI
 __construct ($data, int $id, bool $call_by_reference, bool $prepare_output=true)
 Constructor. More...
 
 executeCommand ()
 execute command More...
 
 properties ()
 module properties More...
 
 saveProperties ()
 
 initUploadForm ()
 
 uploadObject ()
 display status information or report errors messages in case of error More...
 
 upload ()
 
 getTemplate ()
 save new learning module to db More...
 
 certificate ()
 Shows the certificate editor. More...
 
 addLocatorItems ()
 
 setSettingsSubTabs ()
 
 export ()
 
 exportModule ()
 
 getType ()
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Protected Member Functions

 assignObject ()
 assign scorm object to scorm gui object More...
 
 showTrackingItemsBySco ()
 show tracking data More...
 
- Protected Member Functions inherited from ilObjSCORMLearningModuleGUI
 assignObject ()
 assign scorm object to scorm gui object More...
 
 showTrackingItemsBySco ()
 
 modifyTrackingItems ()
 
 applyUserTableFilter ()
 
 resetUserTableFilter ()
 Reset table filter. More...
 
 import ()
 gui functions for GUI export More...
 
 importForm ()
 Show import form. More...
 
 initImportForm (string $new_type)
 Init import form. More...
 
 exportAll ()
 Show export section for all users. More...
 
 exportSelectionUsers ()
 Export selection for selected users. More...
 
- Protected Member Functions inherited from ilObjSAHSLearningModuleGUI
 infoScreen ()
 
 infoScreenForward ()
 
 initCreationForms (string $a_new_type)
 no manual SCORM creation, only import at the time More...
 
 setTabs ()
 
 getTabs ()
 adds tabs to tab gui object More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms (string $new_type)
 Init creation forms. More...
 
 getCreationFormsHTML (array $forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm (string $new_type)
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm (string $new_type)
 
 importFileObject (int $parent_id=null)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 fillCloneTemplate (?string $tpl_name, string $type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning. More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 showCustomIconsEditing ( $input_colspan=1, ilPropertyFormGUI $form=null, $as_section=true)
 show edit section of custom icons for container More...
 

Protected Attributes

ILIAS DI Container $dic
 
ilTabsGUI $tabs
 
ilRbacSystem $rbacsystem
 
ilHelpGUI $help
 
ilErrorHandling $error
 
ContextServices $tool_context
 
- Protected Attributes inherited from ilObjSCORMLearningModuleGUI
ILIAS DI Container $dic
 
int $refId
 
ilCtrl $ctrl
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Factory $refinery
 
ilFavouritesManager $favourites
 
ilObjectCustomIconFactory $custom_icon_factory
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Static Public Member Functions inherited from ilObjSAHSLearningModuleGUI
static _goto (string $a_target)
 goto target course More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 
- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjSCORM2004LearningModuleGUI::__construct ( array  $a_data,
int  $a_id,
bool  $a_call_by_reference,
?bool  $a_prepare_output = true 
)

Definition at line 45 of file class.ilObjSCORM2004LearningModuleGUI.php.

46 {
47 global $DIC;
48 $this->dic = $DIC;
49 $this->lng = $DIC->language();
50 $this->access = $DIC->access();
51 $this->ctrl = $DIC->ctrl();
52 $this->tpl = $DIC["tpl"];
53 $this->tabs = $DIC->tabs();
54 $this->rbacsystem = $DIC->rbac()->system();
55 $this->tree = $DIC->repositoryTree();
56 $this->toolbar = $DIC->toolbar();
57 $this->settings = $DIC->settings();
58 $this->help = $DIC["ilHelp"];
59 $this->error = $DIC["ilErr"];
60 $this->user = $DIC->user();
61 $this->tool_context = $DIC->globalScreen()->tool()->context();
62 $lng = $DIC->language();
63
64 $lng->loadLanguageModule("content");
65 $lng->loadLanguageModule("sahs");
66 $lng->loadLanguageModule("search");
68 $this->type = "sahs";
69 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
70 #$this->tabs_gui = new ilTabsGUI();
71 }
error(string $a_errmsg)
loadLanguageModule(string $a_module)
Load language module.
ilLanguage $lng
global $DIC
Definition: feed.php:28
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), ILIAS\Repository\ctrl(), error(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\settings(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ assignObject()

ilObjSCORM2004LearningModuleGUI::assignObject ( )
protected

assign scorm object to scorm gui object

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 76 of file class.ilObjSCORM2004LearningModuleGUI.php.

76 : void
77 {
78 if ($this->id != 0) {
79 if ($this->call_by_reference) {
80 $this->object = new ilObjSCORM2004LearningModule($this->id, true);
81 } else {
82 $this->object = new ilObjSCORM2004LearningModule($this->id, false);
83 }
84 }
85 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

◆ executeCommand()

ilObjSCORM2004LearningModuleGUI::executeCommand ( )

execute command

Exceptions
ilCtrlException
ilException

Reimplemented from ilObjSAHSLearningModuleGUI.

Definition at line 87 of file class.ilObjSCORM2004LearningModuleGUI.php.

87 : void
88 {
89 $ilCtrl = $this->ctrl;
90
91 $next_class = $ilCtrl->getNextClass($this);
92 $cmd = $ilCtrl->getCmd();
93 parent::executeCommand();
94 $this->addHeaderAction();
95 }
getNextClass($a_gui_class=null)
@inheritDoc
addHeaderAction()
Add header action menu.

References ilObjSCORMLearningModuleGUI\$ctrl, ilObjectGUI\addHeaderAction(), and ilCtrl\getNextClass().

+ Here is the call graph for this function:

◆ getPropertiesFormValues()

ilObjSCORM2004LearningModuleGUI::getPropertiesFormValues ( )

Get values for properties form.

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 411 of file class.ilObjSCORM2004LearningModuleGUI.php.

411 : void
412 {
413 $values = array();
414 $values["Fobject_title"] = $this->object->getTitle();
415 $values["Fobject_description"] = $this->object->getLongDescription();
416 if (!$this->object->getOfflineStatus()) {
417 $values["cobj_online"] = true;
418 }
419 $values["open_mode"] = $this->object->getOpenMode();
420 $values["width_0"] = $this->object->getWidth();
421 $values["width_1"] = $this->object->getWidth();
422 $values["height_0"] = $this->object->getHeight();
423 $values["height_1"] = $this->object->getHeight();
424 $values["cobj_ie_force_render"] = $this->object->getIe_force_render();
425 $values["cobj_nomenu"] = $this->object->getNoMenu();
426 $values["cobj_hidenavig"] = $this->object->getHideNavig();
427 $values["cobj_auto_last_visited"] = $this->object->getAuto_last_visited();
428 $values["lesson_mode"] = $this->object->getDefaultLessonMode();
429 $values["credit_mode"] = $this->object->getCreditMode();
430 $values["auto_review"] = $this->object->getAutoReviewChar();
431 $values["mastery_score"] = $this->object->getMasteryScore();
432 $values["cobj_session"] = $this->object->getSession();
433 $values["cobj_fourth_edition"] = $this->object->getFourth_edition();
434 $values["cobj_sequencing"] = $this->object->getSequencing();
435 $values["cobj_interactions"] = $this->object->getInteractions();
436 $values["cobj_objectives"] = $this->object->getObjectives();
437 $values["cobj_comments"] = $this->object->getComments();
438 $values["cobj_time_from_lms"] = $this->object->getTime_from_lms();
439 $values["cobj_check_values"] = $this->object->getCheck_values();
440 $values["cobj_auto_suspend"] = $this->object->getAutoSuspend();
441 $values["id_setting"] = $this->object->getIdSetting();
442 $values["name_setting"] = $this->object->getNameSetting();
443 $values["cobj_debug"] = $this->object->getDebug();
444 $this->form->setValuesByArray($values);
445 }
form( $class_path, string $cmd)

References ILIAS\Repository\form(), and ILIAS\Repository\object().

Referenced by properties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPropertiesForm()

ilObjSCORM2004LearningModuleGUI::initPropertiesForm ( )

Initialize properties form.

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 125 of file class.ilObjSCORM2004LearningModuleGUI.php.

125 : void
126 {
128 $ilCtrl = $this->ctrl;
129 $obj_service = $this->getObjectService();
130
131 //check/select only once
132 $this->object->checkMasteryScoreValues();
133
134 $this->form = new ilPropertyFormGUI();
135 $this->form->setFormAction($ilCtrl->getFormAction($this));
136 $this->form->setTitle($this->lng->txt("cont_lm_properties"));
137
138 //title
139 $ti = new ilTextInputGUI($this->lng->txt("title"), "Fobject_title");
140 $ti->setMaxLength(200);
141 $this->form->addItem($ti);
142
143 //description
144 $ti = new ilTextAreaInputGUI($this->lng->txt("description"), "Fobject_description");
145 $this->form->addItem($ti);
146
147 // SCORM-type
148 $ne = new ilNonEditableValueGUI($this->lng->txt("type"), "");
149 $ne->setValue($this->lng->txt("lm_type_" . ilObjSAHSLearningModule::_lookupSubType($this->object->getID())));
150 $this->form->addItem($ne);
151
152 // version
153 $ne = new ilNonEditableValueGUI($this->lng->txt("cont_sc_version"), "");
154 $ne->setValue($this->object->getModuleVersion());
155 $ne->setInfo($this->lng->txt("cont_sc_version_info"));
156 $this->form->addItem($ne);
157
158 //
159 // activation
160 //
161 $sh = new ilFormSectionHeaderGUI();
162 $sh->setTitle($this->lng->txt("activation"));
163 $this->form->addItem($sh);
164
165 // online
166 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_online"), "cobj_online");
167 $cb->setInfo($this->lng->txt("cont_online_info"));
168 $this->form->addItem($cb);
169
170
171 //
172 // presentation
173 //
174 $sh = new ilFormSectionHeaderGUI();
175 $sh->setTitle($this->lng->txt("cont_presentation"));
176 $this->form->addItem($sh);
177
178 // display mode (open)
179 // $options = array(
180 // "0" => $this->lng->txt("cont_open_normal"),
181 // "1" => $this->lng->txt("cont_open_iframe_max"),
182 // "2" => $this->lng->txt("cont_open_iframe_defined"),
183 // "5" => $this->lng->txt("cont_open_window_undefined"),
184 // "6" => $this->lng->txt("cont_open_window_defined")
185 // );
186 // $si = new ilSelectInputGUI($this->lng->txt("cont_open"), "open_mode");
187 // $si->setOptions($options);
188 // $si->setValue($this->object->getOpenMode());
189 // $this->form->addItem($si);
190
191 $radg = new ilRadioGroupInputGUI($lng->txt("cont_open"), "open_mode");
192 $op0 = new ilRadioOption($this->lng->txt("cont_open_normal"), "0");
193 $radg->addOption($op0);
194 $op1 = new ilRadioOption($this->lng->txt("cont_open_iframe"), "1");
195 $radg->addOption($op1);
196 $op2 = new ilRadioOption($this->lng->txt("cont_open_window"), "5");
197 $radg->addOption($op2);
198 // width
199 $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_0");
200 $ni->setMaxLength(4);
201 $ni->setSize(4);
202 $op1->addSubItem($ni);
203 $ni = new ilNumberInputGUI($this->lng->txt("cont_width"), "width_1");
204 $ni->setMaxLength(4);
205 $ni->setSize(4);
206 $op2->addSubItem($ni);
207 // height
208 $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_0");
209 $ni->setMaxLength(4);
210 $ni->setSize(4);
211 $ni->setInfo($this->lng->txt("cont_width_height_info"));
212 $op1->addSubItem($ni);
213 $ni = new ilNumberInputGUI($this->lng->txt("cont_height"), "height_1");
214 $ni->setMaxLength(4);
215 $ni->setSize(4);
216 $ni->setInfo($this->lng->txt("cont_width_height_info"));
217 $op2->addSubItem($ni);
218
219 // force IE to render again
220 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_ie_force_render"), "cobj_ie_force_render");
221 $cb->setValue("y");
222 $cb->setInfo($this->lng->txt("cont_ie_force_render_info"));
223 $op2->addSubItem($cb);
224
225 $this->form->addItem($radg);
226
227
228 // disable top menu
229 //Hide Top Navigation Bar
230 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_nomenu"), "cobj_nomenu");
231 $cb->setValue("y");
232 $cb->setInfo($this->lng->txt("cont_nomenu_info"));
233 $this->form->addItem($cb);
234
235 // disable left-side navigation
236 // Hide Left Navigation Tree
237 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_hidenavig"), "cobj_hidenavig");
238 $cb->setValue("y");
239 $cb->setInfo($this->lng->txt("cont_hidenavig_info"));
240 $this->form->addItem($cb);
241
242 // auto navigation to last visited item
243 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_last_visited"), "cobj_auto_last_visited");
244 $cb->setValue("y");
245 $cb->setInfo($this->lng->txt("cont_auto_last_visited_info"));
246 $this->form->addItem($cb);
247
248 // tile image
249 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->addTileImage();
250
251 //
252 // scorm options
253 //
254 $sh = new ilFormSectionHeaderGUI();
255 $sh->setTitle($this->lng->txt("cont_scorm_options"));
256 $this->form->addItem($sh);
257
258 // lesson mode
259 $radg = new ilRadioGroupInputGUI($lng->txt("cont_def_lesson_mode"), "lesson_mode");
260 $op0 = new ilRadioOption($this->lng->txt("cont_sc_less_mode_normal"), "normal");
261 $radg->addOption($op0);
262 $op1 = new ilRadioOption($this->lng->txt("cont_sc_less_mode_browse"), "browse");
263 $radg->addOption($op1);
264 // credit mode
265 $cmradg = new ilRadioGroupInputGUI($lng->txt("cont_credit_mode"), "credit_mode");
266 $cmop0 = new ilRadioOption($this->lng->txt("cont_credit_on"), "credit");
267 $cmradg->addOption($cmop0);
268 $cmop1 = new ilRadioOption($this->lng->txt("cont_credit_off"), "no_credit");
269 $cmradg->addOption($cmop1);
270 $op0->addSubItem($cmradg);
271 // set lesson mode review when completed
272 $options = array(
273 "n" => $this->lng->txt("cont_sc_auto_review_no"),
274 "r" => $this->lng->txt("cont_sc_auto_review_completed_not_failed_or_passed"),
275 "p" => $this->lng->txt("cont_sc_auto_review_passed"),
276 "q" => $this->lng->txt("cont_sc_auto_review_passed_or_failed"),
277 "c" => $this->lng->txt("cont_sc_auto_review_completed"),
278 "d" => $this->lng->txt("cont_sc_auto_review_completed_and_passed"),
279 "y" => $this->lng->txt("cont_sc_auto_review_completed_or_passed"),
280 "s" => $this->lng->txt("cont_sc_store_if_previous_score_was_lower")
281 );
282 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_auto_review_2004"), "auto_review");
283 $si->setOptions($options);
284 $si->setInfo($this->lng->txt("cont_sc_auto_review_info_2004"));
285 $op0->addSubItem($si);
286 // end lesson mode
287 $this->form->addItem($radg);
288
289 // mastery_score
290 if ($this->object->getMasteryScoreValues() != "") {
291 $ni = new ilNumberInputGUI($this->lng->txt("cont_mastery_score_2004"), "mastery_score");
292 $ni->setMaxLength(3);
293 $ni->setSize(3);
294 $ni->setInfo($this->lng->txt("cont_mastery_score_2004_info") . ' ' . $this->object->getMasteryScoreValues());
295 $this->form->addItem($ni);
296 }
297
298 //
299 // rte settings
300 //
301 $sh = new ilFormSectionHeaderGUI();
302 $sh->setTitle($this->lng->txt("cont_rte_settings"));
303 $this->form->addItem($sh);
304
305 // unlimited session timeout
306 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sc_usession"), "cobj_session");
307 $cb->setValue("y");
308 $cb->setInfo($this->lng->txt("cont_sc_usession_info"));
309 $this->form->addItem($cb);
310
311 // SCORM 2004 fourth edition features
312 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_fourth_edition"), "cobj_fourth_edition");
313 $cb->setValue("y");
314 $cb->setInfo($this->lng->txt("cont_fourth_edition_info"));
315 $this->form->addItem($cb);
316
317 // sequencing
318 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_sequencing"), "cobj_sequencing");
319 $cb->setValue("y");
320 $cb->setInfo($this->lng->txt("cont_sequencing_info"));
321 $this->form->addItem($cb);
322
323 // storage of interactions
324 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_interactions"), "cobj_interactions");
325 $cb->setValue("y");
326 $cb->setInfo($this->lng->txt("cont_interactions_info"));
327 $this->form->addItem($cb);
328
329 // objectives
330 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_objectives"), "cobj_objectives");
331 $cb->setValue("y");
332 $cb->setInfo($this->lng->txt("cont_objectives_info"));
333 $this->form->addItem($cb);
334
335 // comments
336 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_comments"), "cobj_comments");
337 $cb->setValue("y");
338 $cb->setInfo($this->lng->txt("cont_comments_info"));
339 $this->form->addItem($cb);
340
341 // time from lms
342 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_time_from_lms"), "cobj_time_from_lms");
343 $cb->setValue("y");
344 $cb->setInfo($this->lng->txt("cont_time_from_lms_info"));
345 $this->form->addItem($cb);
346
347 // check values
348 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_check_values"), "cobj_check_values");
349 $cb->setValue("y");
350 $cb->setInfo($this->lng->txt("cont_check_values_info"));
351 $this->form->addItem($cb);
352
353 // auto cmi.exit to suspend
354 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_auto_suspend"), "cobj_auto_suspend");
355 $cb->setValue("y");
356 $cb->setInfo($this->lng->txt("cont_auto_suspend_info"));
357 $this->form->addItem($cb);
358
359 // settings for student_id
360 $options = array(
361 0 => $this->lng->txt("cont_sc_id_setting_user_id"),
362 1 => $this->lng->txt("cont_sc_id_setting_user_login"),
363 2 => $this->lng->txt("cont_sc_id_setting_user_id_plus_ref_id"),
364 3 => $this->lng->txt("cont_sc_id_setting_user_login_plus_ref_id"),
365 4 => $this->lng->txt("cont_sc_id_setting_user_id_plus_obj_id"),
366 5 => $this->lng->txt("cont_sc_id_setting_user_login_plus_obj_id")
367 );
368 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_id_setting_2004"), "id_setting");
369 $si->setOptions($options);
370 $si->setInfo($this->lng->txt("cont_sc_id_setting_info"));
371 $this->form->addItem($si);
372
373 // settings for student_name
374 $options = array(
375 0 => $this->lng->txt("cont_sc_name_setting_last_firstname"),
376 1 => $this->lng->txt("cont_sc_name_setting_first_lastname"),
377 2 => $this->lng->txt("cont_sc_name_setting_fullname"),
378 3 => $this->lng->txt("cont_sc_name_setting_salutation_lastname"),
379 4 => $this->lng->txt("cont_sc_name_setting_first_name"),
380 9 => $this->lng->txt("cont_sc_name_setting_no_name")
381 );
382 $si = new ilSelectInputGUI($this->lng->txt("cont_sc_name_setting_2004"), "name_setting");
383 $si->setOptions($options);
384 $si->setInfo($this->lng->txt("cont_sc_name_setting_info"));
385 $this->form->addItem($si);
386
387 //
388 // debugging
389 //
390 $sh = new ilFormSectionHeaderGUI();
391 $sh->setTitle($this->lng->txt("cont_debugging"));
392 $this->form->addItem($sh);
393
394 // test tool
395 $cb = new ilCheckboxInputGUI($this->lng->txt("cont_debug"), "cobj_debug");
396 $cb->setValue("y");
397 if ($this->object->getDebugActivated() == false) {
398 $cb->setDisabled(true);
399 $cb->setInfo($this->lng->txt("cont_debug_deactivated"));
400 } else {
401 $cb->setInfo($this->lng->txt("cont_debug_deactivate"));
402 }
403 $this->form->addItem($cb);
404 $this->form->addCommandButton("saveProperties", $lng->txt("save"));
405 }
This class represents a checkbox property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
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...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a number property in a property form.
static _lookupSubType(int $a_obj_id)
lookup subtype id (scorm, )
This class represents a property form user interface.
This class represents a property in a property form.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This class represents a selection list property in a property form.
This class represents a text area property in a property form.
This class represents a text property in a property form.

References ilObjSCORMLearningModuleGUI\$ctrl, ilObjectGUI\$lng, ilObjSAHSLearningModule\_lookupSubType(), ILIAS\Repository\form(), ilObjectGUI\getObjectService(), ILIAS\Repository\lng(), ILIAS\Repository\object(), and ilLanguage\txt().

Referenced by properties(), and saveProperties().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ properties()

ilObjSCORM2004LearningModuleGUI::properties ( )

Scorm 2004 module properties.

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 100 of file class.ilObjSCORM2004LearningModuleGUI.php.

100 : void
101 {
106 $ilToolbar = $this->toolbar;
107 $ilCtrl = $this->ctrl;
109 $ilTabs = $this->tabs;
110
111 $this->setSettingsSubTabs();
112 $ilTabs->setSubTabActive('cont_settings');
113 // view
114 $ilToolbar->addButtonInstance($this->object->getViewButton());
115
116 // output forms
117 $this->initPropertiesForm();
119 $tpl->setContent($this->form->getHTML());
120 }
getPropertiesFormValues()
Get values for properties form.
ilGlobalTemplateInterface $tpl
ilSetting $settings
ilToolbarGUI $toolbar
setContent(string $a_html)
Sets content for standard template.
global $ilSetting
Definition: privfeed.php:17

References ilObjSCORMLearningModuleGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, $rbacsystem, ilObjectGUI\$settings, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\$tree, ILIAS\Repository\form(), getPropertiesFormValues(), initPropertiesForm(), ILIAS\Repository\object(), ilGlobalTemplateInterface\setContent(), and ilObjSAHSLearningModuleGUI\setSettingsSubTabs().

+ Here is the call graph for this function:

◆ saveProperties()

ilObjSCORM2004LearningModuleGUI::saveProperties ( )

save scorm 2004 module properties

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 450 of file class.ilObjSCORM2004LearningModuleGUI.php.

450 : void
451 {
453 $obj_service = $this->getObjectService();
454 $this->initPropertiesForm();
455 $this->form->checkInput();
456 if ($this->dic->http()->wrapper()->post()->has('mastery_score')) {
457 $sMasteryScore = $this->dic->http()->wrapper()->post()->retrieve('mastery_score', $this->dic->refinery()->kindlyTo()->string());
458 if ($sMasteryScore !== "") {
459 $this->object->setMasteryScore((int) $sMasteryScore);
460 } else {
461 $this->object->setMasteryScore(null);
462 }
463 }
464
465 $t_auto_review = $this->dic->http()->wrapper()->post()->retrieve('auto_review', $this->dic->refinery()->kindlyTo()->string());
466 $t_auto_suspend = $this->dic->http()->wrapper()->post()->has('cobj_auto_suspend');
467 $t_session = $this->dic->http()->wrapper()->post()->has('cobj_session');
468 if ($t_auto_review === "s") {
469 $t_auto_suspend = true;
470 //if not storing without session
471 $t_session = true;
472 }
473
474 $t_height = $this->object->getHeight();
475 if ($this->dic->http()->wrapper()->post()->retrieve('height_0', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getHeight()) {
476 $t_height = $this->dic->http()->wrapper()->post()->retrieve('height_0', $this->dic->refinery()->kindlyTo()->int());
477 }
478 if ($this->dic->http()->wrapper()->post()->retrieve('height_1', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getHeight()) {
479 $t_height = $this->dic->http()->wrapper()->post()->retrieve('height_1', $this->dic->refinery()->kindlyTo()->int());
480 }
481
482 $t_width = $this->object->getWidth();
483 if ($this->dic->http()->wrapper()->post()->retrieve('width_0', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getWidth()) {
484 $t_width = $this->dic->http()->wrapper()->post()->retrieve('width_0', $this->dic->refinery()->kindlyTo()->int());
485 }
486 if ($this->dic->http()->wrapper()->post()->retrieve('width_1', $this->dic->refinery()->kindlyTo()->int()) != $this->object->getWidth()) {
487 $t_width = $this->dic->http()->wrapper()->post()->retrieve('width_1', $this->dic->refinery()->kindlyTo()->int());
488 }
489
490 $this->object->setOfflineStatus(!($this->dic->http()->wrapper()->post()->has('cobj_online')));
491 $this->object->setOpenMode($this->dic->http()->wrapper()->post()->retrieve('open_mode', $this->dic->refinery()->kindlyTo()->int()));
492 $this->object->setWidth($t_width);
493 $this->object->setHeight($t_height);
494 $this->object->setCreditMode($this->dic->http()->wrapper()->post()->retrieve('credit_mode', $this->dic->refinery()->kindlyTo()->string()));
495 // $this->object->setMaxAttempt($this->dic->http()->wrapper()->post()->retrieve('max_attempt',$this->dic->refinery()->kindlyTo()->int()));
496 $this->object->setAutoReviewChar($t_auto_review);
497 $this->object->setDefaultLessonMode($this->dic->http()->wrapper()->post()->retrieve('lesson_mode', $this->dic->refinery()->kindlyTo()->string()));
498 $this->object->setSession($t_session);
499 $this->object->setNoMenu($this->dic->http()->wrapper()->post()->has('cobj_nomenu'));
500 $this->object->setHideNavig($this->dic->http()->wrapper()->post()->has('cobj_hidenavig'));
501 $this->object->setAuto_last_visited($this->dic->http()->wrapper()->post()->has('cobj_auto_last_visited'));
502 $this->object->setIe_force_render($this->dic->http()->wrapper()->post()->has('cobj_ie_force_render'));
503 $this->object->setFourth_edition($this->dic->http()->wrapper()->post()->has('cobj_fourth_edition'));
504 $this->object->setSequencing($this->dic->http()->wrapper()->post()->has('cobj_sequencing'));
505 $this->object->setInteractions($this->dic->http()->wrapper()->post()->has('cobj_interactions'));
506 $this->object->setObjectives($this->dic->http()->wrapper()->post()->has('cobj_objectives'));
507 $this->object->setComments($this->dic->http()->wrapper()->post()->has('cobj_comments'));
508 $this->object->setTime_from_lms($this->dic->http()->wrapper()->post()->has('cobj_time_from_lms'));
509 $this->object->setCheck_values($this->dic->http()->wrapper()->post()->has('cobj_check_values'));
510 $this->object->setAutoSuspend($t_auto_suspend);
511 // $this->object->setOfflineMode($tmpOfflineMode);
512 $this->object->setDebug($this->dic->http()->wrapper()->post()->has('cobj_debug'));//ilUtil::yn2tf($this->dic->http()->wrapper()->post()->retrieve('cobj_debug',$this->dic->refinery()->kindlyTo()->string())));
513 $this->object->setIdSetting($this->dic->http()->wrapper()->post()->retrieve('id_setting', $this->dic->refinery()->kindlyTo()->int()));
514 $this->object->setNameSetting($this->dic->http()->wrapper()->post()->retrieve('name_setting', $this->dic->refinery()->kindlyTo()->int()));
515 $this->object->setTitle($this->dic->http()->wrapper()->post()->retrieve('Fobject_title', $this->dic->refinery()->kindlyTo()->string()));
516 $this->object->setDescription($this->dic->http()->wrapper()->post()->retrieve('Fobject_description', $this->dic->refinery()->kindlyTo()->string()));
517
518 // tile image
519 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
520
521 $this->object->update();
522 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
523 $this->ctrl->redirect($this, "properties");
524 }

References $ilSetting, ilObjectGUI\$settings, ILIAS\Repository\ctrl(), ILIAS\Repository\form(), ilObjectGUI\getObjectService(), initPropertiesForm(), and ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ showTrackingItems()

ilObjSCORM2004LearningModuleGUI::showTrackingItems ( )

Show tracking table.

Exceptions
ilCtrlException

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 578 of file class.ilObjSCORM2004LearningModuleGUI.php.

578 : bool
579 {
580 $ilTabs = $this->tabs;
581 $ilAccess = $this->access;
582
583 $ilTabs->setTabActive('cont_tracking_data');
584
585 if ($ilAccess->checkAccess("read_learning_progress", "", $this->object->getRefId())) {
586 $this->setSubTabs();
587 $ilTabs->setSubTabActive('cont_tracking_byuser');
588
589 $reports = array('exportSelectedSuccess','exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','exportObjGlobalToSystem');
590
591 $userSelected = "all";
592 if ($this->dic->http()->wrapper()->query()->has('userSelected')) {
593 $userSelected = ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve('userSelected', $this->dic->refinery()->kindlyTo()->string()));
594 }
595 if ($this->dic->http()->wrapper()->post()->has('userSelected')) {
596 $userSelected = ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve('userSelected', $this->dic->refinery()->kindlyTo()->string()));
597 }
598 $this->ctrl->setParameter($this, 'userSelected', $userSelected);
599
600 $report = "choose";
601 if ($this->dic->http()->wrapper()->query()->has('report')) {
602 $report = ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve('report', $this->dic->refinery()->kindlyTo()->string()));
603 }
604 if ($this->dic->http()->wrapper()->post()->has('report')) {
605 $report = ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve('report', $this->dic->refinery()->kindlyTo()->string()));
606 }
607 $this->ctrl->setParameter($this, 'report', $report);
608 $filter = new ilSCORM2004TrackingItemsPerUserFilterGUI($this, 'showTrackingItems');
609 $filter->parse($userSelected, $report, $reports);
610 if ($report === "choose") {
611 $this->tpl->setContent($filter->form->getHTML());
612 } else {
613 $usersSelected = array();
614 if ($userSelected !== "all") {
615 $usersSelected[] = $userSelected;
616 } else {
617 $users = ilTrQuery::getParticipantsForObject($this->ref_id);
618 foreach ($users as $usr) {
619 $user = (int) $usr;
620 if (ilObject::_exists($user) && ilObject::_lookUpType($user) === 'usr') {
621 $usersSelected[] = $user;
622 }
623 }
624 }
625 $scosSelected = array();
626 $tmpscos = $this->object->getTrackedItems();
627 foreach ($tmpscos as $i => $value) {
628 $scosSelected[] = $value["id"];
629 }
630 $tbl = new ilSCORM2004TrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItems', $usersSelected, $scosSelected, $report);
631 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
632 }
633 } elseif ($ilAccess->checkAccess("edit_learning_progress", "", $this->object->getRefId())) {
634 $this->modifyTrackingItems();
635 }
636 return true;
637 }
ilAccessHandler $access
static _exists(int $id, bool $reference=false, ?string $type=null)
checks if an object exists in object_data
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static getParticipantsForObject(int $a_ref_id)
Get participant ids for given object.
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
$i
Definition: metadata.php:41

References ilObjectGUI\$access, $i, $tabs, ilObjectGUI\$user, ilObject\_exists(), ILIAS\Repository\ctrl(), ilTrQuery\getParticipantsForObject(), ILIAS\Repository\int(), ilObjSCORMLearningModuleGUI\modifyTrackingItems(), ILIAS\Repository\object(), ilObjSCORMLearningModuleGUI\setSubTabs(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ showTrackingItemsBySco()

ilObjSCORM2004LearningModuleGUI::showTrackingItemsBySco ( )
protected

show tracking data

Reimplemented from ilObjSCORMLearningModuleGUI.

Definition at line 529 of file class.ilObjSCORM2004LearningModuleGUI.php.

529 : bool
530 {
531 $ilTabs = $this->tabs;
532
533 $this->setSubTabs();
534 $ilTabs->setTabActive("cont_tracking_data");
535 $ilTabs->setSubTabActive("cont_tracking_bysco");
536
537 $reports = array('exportSelectedCore','exportSelectedInteractions','exportSelectedObjectives','tracInteractionItem','tracInteractionUser','tracInteractionUserAnswers');
538
539 $scoSelected = "all";
540 if ($this->dic->http()->wrapper()->query()->has('scoSelected')) {
541 $scoSelected = ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve('scoSelected', $this->dic->refinery()->kindlyTo()->string()));
542 }
543 if ($this->dic->http()->wrapper()->post()->has('scoSelected')) {
544 $scoSelected = ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve('scoSelected', $this->dic->refinery()->kindlyTo()->string()));
545 }
546
547 $this->ctrl->setParameter($this, 'scoSelected', $scoSelected);
548
549 $report = "choose";
550 if ($this->dic->http()->wrapper()->query()->has('report')) {
551 $report = ilUtil::stripSlashes($this->dic->http()->wrapper()->query()->retrieve('report', $this->dic->refinery()->kindlyTo()->string()));
552 }
553 if ($this->dic->http()->wrapper()->post()->has('report')) {
554 $report = ilUtil::stripSlashes($this->dic->http()->wrapper()->post()->retrieve('report', $this->dic->refinery()->kindlyTo()->string()));
555 }
556 $this->ctrl->setParameter($this, 'report', $report);
557 $filter = new ilSCORM2004TrackingItemsPerScoFilterGUI($this, 'showTrackingItemsBySco');
558 $filter->parse($scoSelected, $report, $reports);
559 if ($report === "choose") {
560 $this->tpl->setContent($filter->form->getHTML());
561 } else {
562 $scosSelected = array();
563 if ($scoSelected !== "all") {
564 $scosSelected[] = $scoSelected;
565 } else {
566 $tmpscos = $this->object->getTrackedItems();
567 foreach ($tmpscos as $i => $value) {
568 $scosSelected[] = $value["id"];
569 }
570 }
571 $a_users = ilTrQuery::getParticipantsForObject($this->ref_id);
572 $tbl = new ilSCORM2004TrackingItemsTableGUI($this->object->getId(), $this, 'showTrackingItemsBySco', $a_users, $scosSelected, $report);
573 $this->tpl->setContent($filter->form->getHTML() . $tbl->getHTML());
574 }
575 return true;
576 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...

References $i, $tabs, ILIAS\Repository\ctrl(), ilTrQuery\getParticipantsForObject(), ILIAS\Repository\object(), ilObjSCORMLearningModuleGUI\setSubTabs(), and ilUtil\stripSlashes().

+ Here is the call graph for this function:

Field Documentation

◆ $dic

ILIAS DI Container ilObjSCORM2004LearningModuleGUI::$dic
protected

Definition at line 38 of file class.ilObjSCORM2004LearningModuleGUI.php.

◆ $error

ilErrorHandling ilObjSCORM2004LearningModuleGUI::$error
protected

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

◆ $help

ilHelpGUI ilObjSCORM2004LearningModuleGUI::$help
protected

Definition at line 41 of file class.ilObjSCORM2004LearningModuleGUI.php.

◆ $rbacsystem

ilRbacSystem ilObjSCORM2004LearningModuleGUI::$rbacsystem
protected

Definition at line 40 of file class.ilObjSCORM2004LearningModuleGUI.php.

Referenced by properties().

◆ $tabs

ilTabsGUI ilObjSCORM2004LearningModuleGUI::$tabs
protected

◆ $tool_context

ContextServices ilObjSCORM2004LearningModuleGUI::$tool_context
protected

Definition at line 43 of file class.ilObjSCORM2004LearningModuleGUI.php.


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