ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
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 ()
 
 uploadObject ()
 display status information or report errors messages in case of error More...
 
 upload ()
 
 getTemplate ()
 output main header (title and locator) More...
 
 certificate ()
 Shows the certificate editor. More...
 
 addLocatorItems ()
 
 setSettingsSubTabs ()
 
 export ()
 
 exportModule ()
 
 getType ()
 
- Public Member Functions inherited from ilObjectGUI
 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] does belong to the parent 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...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 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)
 
 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...
 
 importTracking ()
 gui functions for GUI export More...
 
 trackingImportForm ()
 Show import form. More...
 
 initTrackingImportForm ()
 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 ()
 
 initCreateForm (string $new_type)
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 setTabs ()
 
 getTabs ()
 adds tabs to tab gui object More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 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...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 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...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 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...
 
 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...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

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
 
GlobalHttpState $http
 
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
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
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 = ""
 

Private Attributes

ilPropertyFormGUI $form
 

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 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
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

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 46 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

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 77 of file class.ilObjSCORM2004LearningModuleGUI.php.

77 : void
78 {
79 if ($this->id != 0) {
80 if ($this->call_by_reference) {
81 $this->object = new ilObjSCORM2004LearningModule($this->id, true);
82 } else {
83 $this->object = new ilObjSCORM2004LearningModule($this->id, false);
84 }
85 }
86 }
Class ilObjSCORM2004LearningModule.

◆ executeCommand()

ilObjSCORM2004LearningModuleGUI::executeCommand ( )

execute command

Exceptions
ilCtrlException
ilException

Reimplemented from ilObjSAHSLearningModuleGUI.

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

88 : void
89 {
90 $ilCtrl = $this->ctrl;
91
92 $next_class = $ilCtrl->getNextClass($this);
93 $cmd = $ilCtrl->getCmd();
94 parent::executeCommand();
95 $this->addHeaderAction();
96 }
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 412 of file class.ilObjSCORM2004LearningModuleGUI.php.

412 : void
413 {
414 $values = array();
415 $values["Fobject_title"] = $this->object->getTitle();
416 $values["Fobject_description"] = $this->object->getLongDescription();
417 if (!$this->object->getOfflineStatus()) {
418 $values["cobj_online"] = true;
419 }
420 $values["open_mode"] = $this->object->getOpenMode();
421 $values["width_0"] = $this->object->getWidth();
422 $values["width_1"] = $this->object->getWidth();
423 $values["height_0"] = $this->object->getHeight();
424 $values["height_1"] = $this->object->getHeight();
425 $values["cobj_ie_force_render"] = $this->object->getIe_force_render();
426 $values["cobj_nomenu"] = $this->object->getNoMenu();
427 $values["cobj_hidenavig"] = $this->object->getHideNavig();
428 $values["cobj_auto_last_visited"] = $this->object->getAuto_last_visited();
429 $values["lesson_mode"] = $this->object->getDefaultLessonMode();
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, string $submit_caption="")

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 126 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

101 : void
102 {
107 $ilToolbar = $this->toolbar;
108 $ilCtrl = $this->ctrl;
110 $ilTabs = $this->tabs;
111
112 $this->setSettingsSubTabs();
113 $ilTabs->setSubTabActive('cont_settings');
114 // view
115 $ilToolbar->addButtonInstance($this->object->getViewButton());
116
117 // output forms
118 $this->initPropertiesForm();
120 $tpl->setContent($this->form->getHTML());
121 }
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:31

References ilObjSCORMLearningModuleGUI\$ctrl, $ilSetting, ilObjectGUI\$lng, $rbacsystem, ilObjectGUI\$settings, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\$tree, ILIAS\Repository\form(), getPropertiesFormValues(), initPropertiesForm(), ILIAS\Repository\object(), ILIAS\UICore\GlobalTemplate\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->setMaxAttempt($this->dic->http()->wrapper()->post()->retrieve('max_attempt',$this->dic->refinery()->kindlyTo()->int()));
495 $this->object->setAutoReviewChar($t_auto_review);
496 $this->object->setDefaultLessonMode($this->dic->http()->wrapper()->post()->retrieve('lesson_mode', $this->dic->refinery()->kindlyTo()->string()));
497 $this->object->setSession($t_session);
498 $this->object->setNoMenu($this->dic->http()->wrapper()->post()->has('cobj_nomenu'));
499 $this->object->setHideNavig($this->dic->http()->wrapper()->post()->has('cobj_hidenavig'));
500 $this->object->setAuto_last_visited($this->dic->http()->wrapper()->post()->has('cobj_auto_last_visited'));
501 $this->object->setIe_force_render($this->dic->http()->wrapper()->post()->has('cobj_ie_force_render'));
502 $this->object->setFourth_edition($this->dic->http()->wrapper()->post()->has('cobj_fourth_edition'));
503 $this->object->setSequencing($this->dic->http()->wrapper()->post()->has('cobj_sequencing'));
504 $this->object->setInteractions($this->dic->http()->wrapper()->post()->has('cobj_interactions'));
505 $this->object->setObjectives($this->dic->http()->wrapper()->post()->has('cobj_objectives'));
506 $this->object->setComments($this->dic->http()->wrapper()->post()->has('cobj_comments'));
507 $this->object->setTime_from_lms($this->dic->http()->wrapper()->post()->has('cobj_time_from_lms'));
508 $this->object->setCheck_values($this->dic->http()->wrapper()->post()->has('cobj_check_values'));
509 $this->object->setAutoSuspend($t_auto_suspend);
510 // $this->object->setOfflineMode($tmpOfflineMode);
511 $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())));
512 $this->object->setIdSetting($this->dic->http()->wrapper()->post()->retrieve('id_setting', $this->dic->refinery()->kindlyTo()->int()));
513 $this->object->setNameSetting($this->dic->http()->wrapper()->post()->retrieve('name_setting', $this->dic->refinery()->kindlyTo()->int()));
514 $this->object->setTitle($this->dic->http()->wrapper()->post()->retrieve('Fobject_title', $this->dic->refinery()->kindlyTo()->string()));
515 $this->object->setDescription($this->dic->http()->wrapper()->post()->retrieve('Fobject_description', $this->dic->refinery()->kindlyTo()->string()));
516
517 // tile image
518 $obj_service->commonSettings()->legacyForm($this->form, $this->object)->saveTileImage();
519
520 $this->object->update();
521 $this->tpl->setOnScreenMessage('success', $this->lng->txt("msg_obj_modified"), true);
522 $this->ctrl->redirect($this, "properties");
523 }

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 577 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

References ilObjectGUI\$access, $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 528 of file class.ilObjSCORM2004LearningModuleGUI.php.

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

References $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 39 of file class.ilObjSCORM2004LearningModuleGUI.php.

◆ $error

ilErrorHandling ilObjSCORM2004LearningModuleGUI::$error
protected

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

◆ $form

ilPropertyFormGUI ilObjSCORM2004LearningModuleGUI::$form
private

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

◆ $help

ilHelpGUI ilObjSCORM2004LearningModuleGUI::$help
protected

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

◆ $rbacsystem

ilRbacSystem ilObjSCORM2004LearningModuleGUI::$rbacsystem
protected

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

Referenced by properties().

◆ $tabs

ilTabsGUI ilObjSCORM2004LearningModuleGUI::$tabs
protected

◆ $tool_context

ContextServices ilObjSCORM2004LearningModuleGUI::$tool_context
protected

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


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