ILIAS  release_6 Revision v6.24-5-g0c8bfefb3b8
ilObjExerciseGUI Class Reference

Class ilObjExerciseGUI. More...

+ Inheritance diagram for ilObjExerciseGUI:
+ Collaboration diagram for ilObjExerciseGUI:

Public Member Functions

 __construct ($a_data, $a_id, $a_call_by_reference, $a_prepare_output=true)
 Constructor @access public. More...
 
 executeCommand ()
 execute command More...
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 addContentSubTabs ($a_activate)
 Add subtabs of content view. More...
 
 getTabs ()
 adds tabs to tab gui object More...
 
 infoScreenObject ()
 this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed More...
 
 editObject ()
 edit object More...
 
 addLocatorItems ()
 Add locator item. More...
 
 showOverviewObject ()
 Show overview of assignments. More...
 
 certificateObject ()
 
 outCertificateObject ()
 
 startAssignmentObject ()
 Start assignment with relative deadline. More...
 
- Public Member Functions inherited from ilObjectGUI
 executeCommand ()
 execute command More...
 
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui More...
 
 getCreationMode ()
 get creation mode More...
 
 prepareOutput ($a_show_subobjects=true)
 prepare output More...
 
 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 @access public More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 save object More...
 
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 edit object More...
 
 addExternalEditFormCustom (ilPropertyFormGUI $a_form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g. More...
 
 isVisible ($a_ref_id, $a_type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject ($a_error=false)
 Display deletion confirmation screen. More...
 
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI. More...
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html. More...
 
 addToDeskObject ()
 @inheritDoc More...
 
 removeFromDeskObject ()
 @inheritDoc More...
 

Static Public Member Functions

static _goto ($a_target, $a_raw)
 redirect script More...
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root. More...
 

Protected Member Functions

 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 listAssignmentsObject ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Init properties form. More...
 
 getEditFormCustomValues (array &$a_values)
 Get values for properties form. More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 getService ()
 Get service. More...
 
 setSettingsSubTabs ()
 
 handleRandomAssignmentEntryPage ()
 Display random assignment start page, if necessary. More...
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 Get object service. More...
 
 assignObject ()
 
 setTitleAndDescription ()
 called by prepare output More...
 
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction ($a_list_gui)
 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 @access public More...
 
 setAdminTabs ()
 set admin tabs @access public More...
 
 setLocator ()
 set Locator More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator ($a_omit=true)
 
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 initCreationForms ($a_new_type)
 Init creation froms. More...
 
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion) More...
 
 initCreateForm ($a_new_type)
 Init object creation form. More...
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types. More...
 
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates. More...
 
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 Init object edit form. More...
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 Get values for edit form. More...
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $a_form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 initImportForm ($a_new_type)
 Init object import form. More...
 
 importFileObject ($parent_id=null, $a_catch_errors=true)
 Import. More...
 
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook. More...
 
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command More...
 
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command More...
 
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command More...
 
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu) More...
 
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl. More...
 
 getTabs ()
 get tabs abstract method. More...
 
 __showButton ($a_cmd, $a_text, $a_target='')
 
 hitsperpageObject ()
 
__initTableGUI ()
 
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table More...
 
 redirectToRefId ($a_ref_id, $a_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 $_GET["ref_id"] value More...
 
 fillCloneTemplate ($a_tpl_varname, $a_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...
 
 setColumnSettings (ilColumnGUI $column_gui)
 May be overwritten in subclasses. More...
 
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error. More...
 
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission. More...
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting. More...
 

Protected Attributes

 $tabs
 
 $help
 
 $ass = null
 
 $service
 
 $request
 
 $exercise_ui
 
 $requested_ass_id
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 

Private Attributes

 $certificateDownloadValidator
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 
 $objDefinition
 
 $tpl
 
 $tree
 
 $lng
 
 $data
 
 $object
 
 $ref_id
 
 $obj_id
 
 $maxcount
 
 $formaction
 
 $return_location
 
 $target_frame
 
 $tab_target_script
 
 $actions
 
 $sub_objects
 
 $omit_locator = false
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjExerciseGUI::__construct (   $a_data,
  $a_id,
  $a_call_by_reference,
  $a_prepare_output = true 
)

Constructor @access public.

Definition at line 67 of file class.ilObjExerciseGUI.php.

68 {
69 global $DIC;
70
71 $this->lng = $DIC->language();
72 $this->user = $DIC->user();
73 $this->ctrl = $DIC->ctrl();
74 $this->tabs = $DIC->tabs();
75 $this->help = $DIC["ilHelp"];
76 $this->locator = $DIC["ilLocator"];
77 $this->tpl = $DIC["tpl"];
78 $this->toolbar = $DIC->toolbar();
79 $lng = $DIC->language();
80
81 $this->lng->loadLanguageModule('cert');
82
83 $this->type = "exc";
84 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
85
86 $lng->loadLanguageModule("exercise");
87 $lng->loadLanguageModule("exc");
88 $this->ctrl->saveParameter($this, "ass_id");
89
90 $this->service = $DIC->exercise()->internal()->service();
91 $this->request = $DIC->exercise()->internal()->request();
92 $this->exercise_ui = $DIC->exercise()->internal()->ui();
93 $this->requested_ass_id = $this->request->getRequestedAssId();
94
95 if ($this->requested_ass_id > 0 && is_object($this->object) && ilExAssignment::lookupExerciseId($this->requested_ass_id) == $this->object->getId()) {
96 $this->ass = $this->request->getRequestedAssignment();
97 } elseif ($this->requested_ass_id > 0) {
98 throw new ilExerciseException("Assignment ID does not match Exercise.");
99 }
100
101 $this->certificateDownloadValidator = new ilCertificateDownloadValidator();
102 }
user()
Definition: user.php:4
Validates if an active certificate is stored in the database and can be downloaded by the user.
static lookupExerciseId($a_ass_id)
Lookup excercise id for assignment id.
Exercise exceptions class.
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc
$DIC
Definition: xapitoken.php:46

References $DIC, ilObjectGUI\$lng, ILIAS\GlobalScreen\Provider\__construct(), help(), ilExAssignment\lookupExerciseId(), and user().

+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

static ilObjExerciseGUI::_goto (   $a_target,
  $a_raw 
)
static

redirect script

Parameters
string$a_target

Definition at line 825 of file class.ilObjExerciseGUI.php.

826 {
827 global $DIC;
828
829 $ilErr = $DIC["ilErr"];
830 $lng = $DIC->language();
831 $ilAccess = $DIC->access();
832 $ilCtrl = $DIC->ctrl();
833
834 //we don't have baseClass here...
835 $ilCtrl->setTargetScript("ilias.php");
836 $ilCtrl->initBaseClass("ilRepositoryGUI");
837
838 //ilExerciseMailNotification has links to:
839 // "Assignments", "Submission and Grades" and Downnoad the NEW files if the assignment type is "File Upload".
840 $ass_id = $_GET['ass_id'];
841 $parts = explode("_", $a_raw);
842 if (!$ass_id) {
843 $ass_id = null;
844 $action = null;
845
846 switch (end($parts)) {
847 case "download":
848 $action = $parts[3];
849 $member = $parts[2];
850 $ass_id = $parts[1];
851 break;
852
853 case "setdownload":
854 $action = $parts[3];
855 $member = $parts[2];
856 $ass_id = $parts[1];
857 break;
858
859 case "grades":
860 $action = $parts[2];
861 $ass_id = $parts[1];
862 break;
863 }
864 }
865
866 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ref_id", $a_target);
867
868 if ($ilAccess->checkAccess("read", "", $a_target)) {
869 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "target", $a_raw);
870
871 if ($ass_id) {
872 $ilCtrl->setParameterByClass("ilExerciseManagementGUI", "ass_id", $ass_id);
873 }
874
875 switch ($action) {
876 case "grades":
877 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "members");
878 break;
879
880 /*case "download":
881 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
882 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"),"downloadNewReturned");
883 break;*/
884
885 case "setdownload":
886 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
887 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "waitingDownload");
888 break;
889
890 default:
891 if ($parts[1] != "") {
892 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id", $parts[1]);
893 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id_goto", $parts[1]);
894 }
895 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI"), "showOverview");
896 break;
897
898 }
899 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
900 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI"), "infoScreen");
901 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
902 ilUtil::sendFailure(sprintf(
903 $lng->txt("msg_no_perm_read_item"),
905 ), true);
907 }
908 }
$_GET["client_id"]
static _gotoRepositoryRoot($a_raise_error=false)
Goto repository root.
static _lookupObjId($a_id)
static _lookupTitle($a_id)
lookup object title
static sendFailure($a_info="", $a_keep=false)
Send Failure Message to Screen.
global $ilCtrl
Definition: ilias.php:18

References $_GET, $DIC, $ilCtrl, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ addContentSubTabs()

ilObjExerciseGUI::addContentSubTabs (   $a_activate)

Add subtabs of content view.

Parameters
object$tabs_guiilTabsGUI object

Definition at line 523 of file class.ilObjExerciseGUI.php.

524 {
525 $ilTabs = $this->tabs;
528
529 $ilTabs->addSubTab(
530 "content",
531 $lng->txt("view"),
532 $ilCtrl->getLinkTarget($this, "showOverview")
533 );
534 if ($this->checkPermissionBool("write")) {
535 $ilTabs->addSubTab(
536 "list_assignments",
537 $lng->txt("edit"),
538 $ilCtrl->getLinkTargetByClass("ilExAssignmentEditorGUI", "listAssignments")
539 );
540 }
541 $ilTabs->activateSubTab($a_activate);
542 }
checkPermissionBool($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission.

References ilObjectGUI\$ctrl, $ilCtrl, ilObjectGUI\$lng, $tabs, and ilObjectGUI\checkPermissionBool().

Referenced by executeCommand(), and showOverviewObject().

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

◆ addLocatorItems()

ilObjExerciseGUI::addLocatorItems ( )

Add locator item.

Reimplemented from ilObjectGUI.

Definition at line 913 of file class.ilObjExerciseGUI.php.

914 {
915 $ilLocator = $this->locator;
916
917 if (is_object($this->object)) {
918 // #17955
919 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "showOverview"), "", $_GET["ref_id"]);
920 }
921 }

References $_GET, and ilObjectGUI\$locator.

◆ afterSave()

ilObjExerciseGUI::afterSave ( ilObject  $a_new_object)
protected

Post (successful) object creation hook.

Parameters
ilObject$a_new_object

Reimplemented from ilObjectGUI.

Definition at line 258 of file class.ilObjExerciseGUI.php.

259 {
261
262 $a_new_object->saveData();
263
264 ilUtil::sendSuccess($this->lng->txt("exc_added"), true);
265
266 $ilCtrl->setParameterByClass("ilExAssignmentEditorGUI", "ref_id", $a_new_object->getRefId());
267 $ilCtrl->redirectByClass("ilExAssignmentEditorGUI", "addAssignment");
268 }
getRefId()
get reference id @access public

References ilObjectGUI\$ctrl, $ilCtrl, and ilObject\getRefId().

+ Here is the call graph for this function:

◆ certificateObject()

ilObjExerciseGUI::certificateObject ( )

Definition at line 1002 of file class.ilObjExerciseGUI.php.

1003 {
1004 $this->setSettingsSubTabs();
1005 $this->tabs_gui->activateTab("settings");
1006 $this->tabs_gui->activateSubTab("certificate");
1007
1008 $guiFactory = new ilCertificateGUIFactory();
1009 $output_gui = $guiFactory->create($this->object);
1010
1011 $output_gui->certificateEditor();
1012 }

References setSettingsSubTabs().

+ Here is the call graph for this function:

◆ editObject()

ilObjExerciseGUI::editObject ( )

edit object

@access public

Reimplemented from ilObjectGUI.

Definition at line 789 of file class.ilObjExerciseGUI.php.

790 {
791 $this->setSettingsSubTabs();
792 $this->tabs_gui->activateSubTab("edit");
793 return parent::editObject();
794 }

References setSettingsSubTabs().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjExerciseGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 104 of file class.ilObjExerciseGUI.php.

105 {
108 $ilTabs = $this->tabs;
110
111 $next_class = $this->ctrl->getNextClass($this);
112 $cmd = $this->ctrl->getCmd();
113 $this->prepareOutput();
114
115 //echo "-".$next_class."-".$cmd."-"; exit;
116 switch ($next_class) {
117 case "ilinfoscreengui":
118 $ilTabs->activateTab("info");
119 $this->infoScreen(); // forwards command
120 break;
121
122 case 'ilpermissiongui':
123 $ilTabs->activateTab("permissions");
124 $perm_gui = new ilPermissionGUI($this);
125 $ret = &$this->ctrl->forwardCommand($perm_gui);
126 break;
127
128 case "illearningprogressgui":
129 $ilTabs->activateTab("learning_progress");
130 $new_gui = new ilLearningProgressGUI(
132 $this->object->getRefId(),
133 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId()
134 );
135 $this->ctrl->forwardCommand($new_gui);
136 $this->tabs_gui->setTabActive('learning_progress');
137 break;
138
139 case 'ilobjectcopygui':
140 $ilCtrl->saveParameter($this, 'new_type');
141 $ilCtrl->setReturnByClass(get_class($this), 'create');
142
143 $cp = new ilObjectCopyGUI($this);
144 $cp->setType('exc');
145 $this->ctrl->forwardCommand($cp);
146 break;
147
148 case "ilexportgui":
149 $ilTabs->activateTab("export");
150 $exp_gui = new ilExportGUI($this);
151 $exp_gui->addFormat("xml");
152 $ret = $this->ctrl->forwardCommand($exp_gui);
153// $this->tpl->show();
154 break;
155
156 case "ilcommonactiondispatchergui":
158 $this->ctrl->forwardCommand($gui);
159 break;
160
161 case "ilcertificategui":
162 $this->setSettingsSubTabs();
163 $this->tabs_gui->activateTab("settings");
164 $this->tabs_gui->activateSubTab("certificate");
165
166 $guiFactory = new ilCertificateGUIFactory();
167 $output_gui = $guiFactory->create($this->object);
168
169 $this->ctrl->forwardCommand($output_gui);
170 break;
171
172 case "ilexassignmenteditorgui":
173 $this->checkPermission("write");
174 $ilTabs->activateTab("content");
175 $this->addContentSubTabs("list_assignments");
176 $ass_gui = new ilExAssignmentEditorGUI($this->object->getId(), $this->object->isCompletionBySubmissionEnabled(), $this->ass);
177 $this->ctrl->forwardCommand($ass_gui);
178 break;
179
180 case "ilexsubmissiongui":
181 $this->checkPermission("read");
182 $random_manager = $this->service->getRandomAssignmentManager($this->object);
183 if (!$random_manager->isAssignmentVisible($this->requested_ass_id, $this->user->getId())) {
184 return;
185 }
186 $ilTabs->activateTab("content");
187 $this->addContentSubTabs("content");
188 $this->ctrl->setReturn($this, "showOverview");
189 $sub_gui = $this->exercise_ui->getSubmissionGUI();
190 $this->ctrl->forwardCommand($sub_gui);
191 break;
192
193 case "ilexercisemanagementgui":
194 // rbac or position access
195 if ($GLOBALS['DIC']->access()->checkRbacOrPositionPermissionAccess(
196 'edit_submissions_grades',
197 'edit_submissions_grades',
198 $this->object->getRefId()
199 )) {
200 $ilTabs->activateTab("grades");
201 $mgmt_gui = new ilExerciseManagementGUI($this->getService(), $this->ass);
202 $this->ctrl->forwardCommand($mgmt_gui);
203 } else {
204 $this->checkPermission("edit_submissions_grades"); // throw error by standard procedure
205 }
206 break;
207
208 case "ilexccriteriacataloguegui":
209 $this->checkPermission("write");
210 $ilTabs->activateTab("settings");
211 $this->setSettingsSubTabs();
212 $ilTabs->activateSubTab("crit");
213 $crit_gui = new ilExcCriteriaCatalogueGUI($this->object);
214 $this->ctrl->forwardCommand($crit_gui);
215 break;
216
217
218 case "ilportfolioexercisegui":
219 $this->ctrl->saveParameter($this, array("part_id"));
220 $gui = new ilPortfolioExerciseGUI($this->object, $this->initSubmission());
221 $ilCtrl->forwardCommand($gui);
222 break;
223
224 case "ilexcrandomassignmentgui":
225 $gui = $this->exercise_ui->getRandomAssignmentGUI();
226 $this->ctrl->forwardCommand($gui);
227 break;
228
229 case 'ilobjectmetadatagui':
230 $this->checkPermissionBool("write", '', '', $this->object->getRefId());
231 $this->tabs_gui->setTabActive('meta_data');
232 $md_gui = new ilObjectMetaDataGUI($this->object);
233 $this->ctrl->forwardCommand($md_gui);
234 break;
235
236 default:
237 if (!$cmd) {
238 $cmd = "infoScreen";
239 }
240
241 $cmd .= "Object";
242
243 $this->$cmd();
244
245 break;
246 }
247
248 $this->addHeaderAction();
249
250 return true;
251 }
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilExAssignmentEditorGUI.
Class ilExcCriteriaCatalogueGUI.
Class ilExerciseManagementGUI.
Export User Interface Class.
Class ilObjUserTrackingGUI.
addContentSubTabs($a_activate)
Add subtabs of content view.
GUI class for the workflow of copying objects.
checkPermission($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
Check permission and redirect on error.
prepareOutput($a_show_subobjects=true)
prepare output
addHeaderAction()
Add header action menu.
Class ilObjectMetaDataGUI.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
Class ilPortfolioExerciseGUI.
$ret
Definition: parser.php:6
$ilUser
Definition: imgupload.php:18

References $_GET, ilObjectGUI\$ctrl, $GLOBALS, $ilCtrl, $ilUser, ilObjectGUI\$lng, $ret, $tabs, ilObjectGUI\$user, addContentSubTabs(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getService(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ilObjectGUI\prepareOutput(), and setSettingsSubTabs().

+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjExerciseGUI::getEditFormCustomValues ( array &  $a_values)
protected

Get values for properties form.

Reimplemented from ilObjectGUI.

Definition at line 433 of file class.ilObjExerciseGUI.php.

434 {
436
437 $a_values["desc"] = $this->object->getLongDescription();
438 $a_values["show_submissions"] = $this->object->getShowSubmissions();
439 $a_values["pass_mode"] = $this->object->getPassMode();
440 if ($a_values["pass_mode"] == "nr") {
441 $a_values["pass_nr"] = $this->object->getPassNr();
442 }
443
444 $a_values["nr_random_mand"] = $this->object->getNrMandatoryRandom();
445
446 $a_values["notification"] = ilNotification::hasNotification(
448 $ilUser->getId(),
449 $this->object->getId()
450 );
451
452 $a_values['completion_by_submission'] = (int) $this->object->isCompletionBySubmissionEnabled();
453
454 $tfeedback = array();
455 if ($this->object->hasTutorFeedbackMail()) {
457 }
458 if ($this->object->hasTutorFeedbackText()) {
460 }
461 if ($this->object->hasTutorFeedbackFile()) {
463 }
464 $a_values['tfeedback'] = $tfeedback;
465
466 // orgunit position setting enabled
467 $a_values['obj_orgunit_positions'] = (bool) ilOrgUnitGlobalSettings::getInstance()
468 ->isPositionAccessActiveForObject($this->object->getId());
469
470 $a_values['cont_custom_md'] = ilContainer::_lookupContainerSetting(
471 $this->object->getId(),
473 false
474 );
475 }
static _lookupContainerSetting($a_id, $a_keyword, $a_default_value=null)
Lookup a container setting.
static hasNotification($type, $user_id, $id)
Check notification status for object and user.

References $ilUser, ilObjectGUI\$user, ilContainer\_lookupContainerSetting(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilOrgUnitGlobalSettings\getInstance(), ilNotification\hasNotification(), ilObjExercise\TUTOR_FEEDBACK_FILE, ilObjExercise\TUTOR_FEEDBACK_MAIL, ilObjExercise\TUTOR_FEEDBACK_TEXT, and ilNotification\TYPE_EXERCISE_SUBMISSION.

+ Here is the call graph for this function:

◆ getService()

ilObjExerciseGUI::getService ( )
protected

Get service.

Returns
ilExerciseInternalService

Definition at line 666 of file class.ilObjExerciseGUI.php.

667 {
668 return $this->service;
669 }

References $service.

Referenced by executeCommand(), handleRandomAssignmentEntryPage(), initEditCustomForm(), and showOverviewObject().

+ Here is the caller graph for this function:

◆ getTabs()

ilObjExerciseGUI::getTabs ( )

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjectGUI.

Definition at line 549 of file class.ilObjExerciseGUI.php.

550 {
552 $ilHelp = $this->help;
553
554 $ilHelp->setScreenIdComponent("exc");
555
556 if ($this->checkPermissionBool("read")) {
557 $this->tabs_gui->addTab(
558 "content",
559 $lng->txt("exc_assignments"),
560 $this->ctrl->getLinkTarget($this, "showOverview")
561 );
562 }
563
564 $next_class = strtolower($this->ctrl->getNextClass());
565 if ($this->checkPermissionBool("visible") || $this->checkPermissionBool("read")) {
566 $this->tabs_gui->addTab(
567 "info",
568 $lng->txt("info_short"),
569 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
570 );
571 }
572
573 // edit properties
574 if ($this->checkPermissionBool("write")) {
575 /*$tabs_gui->addTab("assignments",
576 $lng->txt("exc_edit_assignments"),
577 $this->ctrl->getLinkTarget($this, 'listAssignments'));*/
578
579 $this->tabs_gui->addTab(
580 "settings",
581 $lng->txt("settings"),
582 $this->ctrl->getLinkTarget($this, 'edit')
583 );
584 }
585 if ($this->access->checkRbacOrPositionPermissionAccess(
586 'edit_submissions_grades',
587 'edit_submissions_grades',
588 $this->object->getRefId()
589 )) {
590 $this->tabs_gui->addTab(
591 "grades",
592 $lng->txt("exc_submissions_and_grades"),
593 $this->ctrl->getLinkTargetByClass("ilexercisemanagementgui", "members")
594 );
595 }
596
597 // learning progress
598 $save_sort_order = $_GET["sort_order"]; // hack, because exercise sort parameters
599 $save_sort_by = $_GET["sort_by"]; // must not be forwarded to learning progress
600 $save_offset = $_GET["offset"];
601 $_GET["offset"] = $_GET["sort_by"] = $_GET["sort_order"] = "";
602
603 if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
604 $this->tabs_gui->addTab(
605 'learning_progress',
606 $lng->txt('learning_progress'),
607 $this->ctrl->getLinkTargetByClass(array('ilobjexercisegui','illearningprogressgui'), '')
608 );
609 }
610
611 // meta data
612 if ($this->access->checkAccess('write', '', $this->object->getRefId())) {
613 $mdgui = new ilObjectMetaDataGUI($this->object);
614 $mdtab = $mdgui->getTab();
615 if ($mdtab) {
616 $this->tabs_gui->addTarget(
617 "meta_data",
618 $mdtab,
619 "",
620 "ilobjectmetadatagui"
621 );
622 }
623 }
624
625 $_GET["sort_order"] = $save_sort_order; // hack, part ii
626 $_GET["sort_by"] = $save_sort_by;
627 $_GET["offset"] = $save_offset;
628
629 // export
630 if ($this->checkPermissionBool("write")) {
631 $this->tabs_gui->addTab(
632 "export",
633 $lng->txt("export"),
634 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
635 );
636 }
637
638
639 // permissions
640 if ($this->checkPermissionBool("edit_permission")) {
641 $this->tabs_gui->addTab(
642 'permissions',
643 $lng->txt("perm_settings"),
644 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
645 );
646 }
647 }
static checkAccess($a_ref_id, $a_allow_only_read=true)
check access to learning progress

References $_GET, $help, ilObjectGUI\$lng, ilLearningProgressAccess\checkAccess(), and ilObjectGUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ handleRandomAssignmentEntryPage()

ilObjExerciseGUI::handleRandomAssignmentEntryPage ( )
protected

Display random assignment start page, if necessary.

Returns
bool

Definition at line 1070 of file class.ilObjExerciseGUI.php.

1071 {
1072 $service = $this->getService();
1073 $random_manager = $service->getRandomAssignmentManager($this->object);
1074 if ($random_manager->needsStart()) {
1075 $gui = $this->exercise_ui->getRandomAssignmentGUI();
1076 $gui->renderStartPage();
1077 return true;
1078 }
1079
1080 return false;
1081 }

References $service, and getService().

Referenced by showOverviewObject().

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

◆ infoScreenObject()

ilObjExerciseGUI::infoScreenObject ( )

this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually, if everything works through ilCtrl in the future this may be changed

Definition at line 654 of file class.ilObjExerciseGUI.php.

655 {
656 $this->ctrl->setCmd("showSummary");
657 $this->ctrl->setCmdClass("ilinfoscreengui");
658 $this->infoScreen();
659 }

Referenced by viewObject().

+ Here is the caller graph for this function:

◆ initEditCustomForm()

ilObjExerciseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Init properties form.

Reimplemented from ilObjectGUI.

Definition at line 283 of file class.ilObjExerciseGUI.php.

284 {
285 $obj_service = $this->getObjectService();
286
287 $service = $this->getService();
288 $random_manager = $service->getRandomAssignmentManager($this->object);
289
290 $a_form->setTitle($this->lng->txt("exc_edit_exercise"));
291
292 $pres = new ilFormSectionHeaderGUI();
293 $pres->setTitle($this->lng->txt('obj_presentation'));
294 $a_form->addItem($pres);
295
296 // tile image
297 $a_form = $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
298
300 $section->setTitle($this->lng->txt('exc_passing_exc'));
301 $a_form->addItem($section);
302
303 // pass mode
304 $radg = new ilRadioGroupInputGUI($this->lng->txt("exc_pass_mode"), "pass_mode");
305
306 $op1 = new ilRadioOption(
307 $this->lng->txt("exc_pass_all"),
309 $this->lng->txt("exc_pass_all_info")
310 );
311 $radg->addOption($op1);
312 $op2 = new ilRadioOption(
313 $this->lng->txt("exc_pass_minimum_nr"),
315 $this->lng->txt("exc_pass_minimum_nr_info")
316 );
317 $radg->addOption($op2);
318 $op3 = new ilRadioOption(
319 $this->lng->txt("exc_random_selection"),
321 $this->lng->txt("exc_random_selection_info")
322 );
323 if (!$random_manager->canBeActivated() && $this->object->getPassMode() != ilObjExercise::PASS_MODE_RANDOM) {
324 $op3->setDisabled(true);
325 $op3->setInfo($this->lng->txt("exc_random_selection_not_changeable_info") . " " .
326 implode(" ", $random_manager->getDeniedActivationReasons()));
327 }
328 if ($this->object->getPassMode() == ilObjExercise::PASS_MODE_RANDOM && !$random_manager->canBeDeactivated()) {
329 $radg->setDisabled(true);
330 $radg->setInfo($this->lng->txt("exc_pass_mode_not_changeable_info") . " " .
331 implode(" ", $random_manager->getDeniedDeactivationReasons()));
332 }
333 // minimum number of assignments to pass
334 $rn = new ilNumberInputGUI($this->lng->txt("exc_nr_random_mand"), "nr_random_mand");
335 $rn->setSize(4);
336 $rn->setMaxLength(4);
337 $rn->setRequired(true);
338 $rn->setMinValue(1, false);
339 $cnt = ilExAssignment::count($this->object->getId());
340 $rn->setMaxValue($cnt, true);
341 $op3->addSubItem($rn);
342
343 $radg->addOption($op3);
344
345 // minimum number of assignments to pass
346 $ni = new ilNumberInputGUI($this->lng->txt("exc_min_nr"), "pass_nr");
347 $ni->setSize(4);
348 $ni->setMaxLength(4);
349 $ni->setRequired(true);
350 $mand = ilExAssignment::countMandatory($this->object->getId());
351 $min = max($mand, 1);
352 $ni->setMinValue($min, true);
353 $ni->setInfo($this->lng->txt("exc_min_nr_info"));
354 $op2->addSubItem($ni);
355
356 $a_form->addItem($radg);
357
358 // completion by submission
359 $subcompl = new ilRadioGroupInputGUI($this->lng->txt("exc_passed_status_determination"), "completion_by_submission");
360 $op1 = new ilRadioOption($this->lng->txt("exc_completion_by_tutor"), 0, "");
361 $subcompl->addOption($op1);
362 $op2 = new ilRadioOption($this->lng->txt("exc_completion_by_submission"), 1, $this->lng->txt("exc_completion_by_submission_info"));
363 $subcompl->addOption($op2);
364 $a_form->addItem($subcompl);
365
366 /*$subcompl = new ilCheckboxInputGUI($this->lng->txt('exc_completion_by_submission'), 'completion_by_submission');
367 $subcompl->setInfo($this->lng->txt('exc_completion_by_submission_info'));
368 $subcompl->setValue(1);
369 $a_form->addItem($subcompl);*/
370
372 $section->setTitle($this->lng->txt('exc_publishing'));
373 $a_form->addItem($section);
374
375 // show submissions
376 $cb = new ilCheckboxInputGUI($this->lng->txt("exc_show_submissions"), "show_submissions");
377 $cb->setInfo($this->lng->txt("exc_show_submissions_info"));
378 $a_form->addItem($cb);
379
381 $section->setTitle($this->lng->txt('exc_notification'));
382 $a_form->addItem($section);
383
384 // submission notifications
385 $cbox = new ilCheckboxInputGUI($this->lng->txt("exc_submission_notification"), "notification");
386 $cbox->setInfo($this->lng->txt("exc_submission_notification_info"));
387 $a_form->addItem($cbox);
388
389
390 // feedback settings
391
393 $section->setTitle($this->lng->txt('exc_feedback'));
394 $a_form->addItem($section);
395
396 $fdb = new ilCheckboxGroupInputGUI($this->lng->txt("exc_settings_feedback"), "tfeedback");
397 $a_form->addItem($fdb);
398
399 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_mail"), ilObjExercise::TUTOR_FEEDBACK_MAIL);
400 $option->setInfo($this->lng->txt("exc_settings_feedback_mail_info"));
401 $fdb->addOption($option);
402 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_file"), ilObjExercise::TUTOR_FEEDBACK_FILE);
403 $option->setInfo($this->lng->txt("exc_settings_feedback_file_info"));
404 $fdb->addOption($option);
405 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_text"), ilObjExercise::TUTOR_FEEDBACK_TEXT);
406 $option->setInfo($this->lng->txt("exc_settings_feedback_text_info"));
407 $fdb->addOption($option);
408
409 // additional features
411 $section->setTitle($this->lng->txt('obj_features'));
412 $a_form->addItem($section);
413
415
416 $position_settings = ilOrgUnitGlobalSettings::getInstance()
417 ->getObjectPositionSettingsByType($this->object->getType());
418
419 if ($position_settings->isActive()) {
421 }
422
424 $this->object->getId(),
425 $a_form,
426 $features
427 );
428 }
$section
Definition: Utf8Test.php:83
This class represents a property in a property form.
This class represents a checkbox property in a property form.
This class represents an option in a checkbox group.
static count($a_ex_id)
Order assignments by deadline date.
static countMandatory($a_ex_id)
Count the number of mandatory assignments.
This class represents a section header in a property form.
This class represents a number property in a property form.
getObjectService()
Get object service.
static initServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Init service settings form.
addItem($a_item)
Add Item (Property, SectionHeader).
setTitle($a_title)
Set Title.
This class represents a property in a property form.
This class represents an option in a radio group.

References $section, $service, ilPropertyFormGUI\addItem(), ilExAssignment\count(), ilExAssignment\countMandatory(), ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilOrgUnitGlobalSettings\getInstance(), ilObjectGUI\getObjectService(), getService(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilObjExercise\PASS_MODE_ALL, ilObjExercise\PASS_MODE_NR, ilObjExercise\PASS_MODE_RANDOM, ilPropertyFormGUI\setTitle(), ilObjExercise\TUTOR_FEEDBACK_FILE, ilObjExercise\TUTOR_FEEDBACK_MAIL, and ilObjExercise\TUTOR_FEEDBACK_TEXT.

+ Here is the call graph for this function:

◆ listAssignmentsObject()

ilObjExerciseGUI::listAssignmentsObject ( )
protected

Definition at line 270 of file class.ilObjExerciseGUI.php.

271 {
273
274 $this->checkPermissionBool("write");
275
276 // #16587
277 $ilCtrl->redirectByClass("ilExAssignmentEditorGUI", "listAssignments");
278 }

References ilObjectGUI\$ctrl, $ilCtrl, and ilObjectGUI\checkPermissionBool().

+ Here is the call graph for this function:

◆ outCertificateObject()

ilObjExerciseGUI::outCertificateObject ( )

Definition at line 1014 of file class.ilObjExerciseGUI.php.

1015 {
1016 global $DIC;
1017
1018 $database = $DIC->database();
1019 $logger = $DIC->logger()->root();
1020
1022
1023 $objectId = (int) $this->object->getId();
1024
1025 if (false === $this->certificateDownloadValidator->isCertificateDownloadable($ilUser->getId(), $objectId)) {
1026 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
1027 $this->ctrl->redirect($this);
1028 }
1029
1030 $ilUserCertificateRepository = new ilUserCertificateRepository($database, $logger);
1031 $pdfGenerator = new ilPdfGenerator($ilUserCertificateRepository, $logger);
1032
1033 $pdfAction = new ilCertificatePdfAction(
1034 $logger,
1035 $pdfGenerator,
1037 $this->lng->txt('error_creating_certificate_pdf')
1038 );
1039
1040 $pdfAction->downloadPdf((int) $ilUser->getId(), (int) $objectId);
1041 }
Just a wrapper class to create Unit Test for other classes.
Class ilPdfGeneratorConstantsTest.

References $DIC, $ilUser, ilObjectGUI\$user, and ilUtil\sendFailure().

+ Here is the call graph for this function:

◆ setSettingsSubTabs()

ilObjExerciseGUI::setSettingsSubTabs ( )
protected

Definition at line 796 of file class.ilObjExerciseGUI.php.

797 {
798 $this->tabs_gui->addSubTab(
799 "edit",
800 $this->lng->txt("general_settings"),
801 $this->ctrl->getLinkTarget($this, "edit")
802 );
803
804 $this->tabs_gui->addSubTab(
805 "crit",
806 $this->lng->txt("exc_criteria_catalogues"),
807 $this->ctrl->getLinkTargetByClass("ilexccriteriacataloguegui", "")
808 );
809
810 $validator = new ilCertificateActiveValidator();
811 if (true === $validator->validate()) {
812 $this->tabs_gui->addSubTab(
813 "certificate",
814 $this->lng->txt("certificate"),
815 $this->ctrl->getLinkTarget($this, "certificate")
816 );
817 }
818 }

Referenced by certificateObject(), editObject(), and executeCommand().

+ Here is the caller graph for this function:

◆ showOverviewObject()

ilObjExerciseGUI::showOverviewObject ( )

Show overview of assignments.

Definition at line 931 of file class.ilObjExerciseGUI.php.

932 {
934 $ilTabs = $this->tabs;
936 $ilToolbar = $this->toolbar;
937
938 $this->checkPermission("read");
939
940 $ilTabs->activateTab("content");
941 $this->addContentSubTabs("content");
942
943 if ($this->handleRandomAssignmentEntryPage()) {
944 return;
945 }
946
947 $tpl->addJavaScript("./Modules/Exercise/js/ilExcPresentation.js");
948
950 $ilUser->getId(),
951 $this->object->getId(),
952 $this->object->getRefId(),
953 'exc'
954 );
955
956
957 if ($this->certificateDownloadValidator->isCertificateDownloadable((int) $ilUser->getId(), (int) $this->object->getId())) {
958 $ilToolbar->addButton(
959 $this->lng->txt("certificate"),
960 $this->ctrl->getLinkTarget($this, "outCertificate")
961 );
962 }
963
964 $ass_gui = new ilExAssignmentGUI($this->object, $this->getService());
965
966 $acc = new ilAccordionGUI();
967 $acc->setId("exc_ow_" . $this->object->getId());
968
969 $ass_data = ilExAssignment::getInstancesByExercise($this->object->getId());
970 $random_manager = $this->service->getRandomAssignmentManager($this->object);
971 foreach ($ass_data as $ass) {
972 if (!$random_manager->isAssignmentVisible($ass->getId(), $this->user->getId())) {
973 continue;
974 }
975
976 // incoming assignment deeplink
977 $force_open = false;
978 if (isset($_GET["ass_id_goto"]) &&
979 (int) $_GET["ass_id_goto"] == $ass->getId()) {
980 $force_open = true;
981 }
982
983 $acc->addItem(
984 $ass_gui->getOverviewHeader($ass),
985 $ass_gui->getOverviewBody($ass),
986 $force_open
987 );
988 }
989
990 if (count($ass_data) < 2) {
991 $acc->setBehaviour("FirstOpen");
992 } else {
993 $acc->setUseSessionStorage(true);
994 }
995
996 $mtpl = new ilTemplate("tpl.exc_ass_overview.html", true, true, "Modules/Exercise");
997 $mtpl->setVariable("CONTENT", $acc->getHTML());
998
999 $tpl->setContent($mtpl->get());
1000 }
Accordion user interface class.
GUI class for exercise assignments.
static getInstancesByExercise($a_exc_id)
static _tracProgress($a_user_id, $a_obj_id, $a_ref_id, $a_obj_type='')
handleRandomAssignmentEntryPage()
Display random assignment start page, if necessary.
special template class to simplify handling of ITX/PEAR

References $_GET, $ass, $ilUser, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\$user, ilLearningProgress\_tracProgress(), addContentSubTabs(), ilObjectGUI\checkPermission(), ilExAssignment\getInstancesByExercise(), getService(), and handleRandomAssignmentEntryPage().

+ Here is the call graph for this function:

◆ startAssignmentObject()

ilObjExerciseGUI::startAssignmentObject ( )

Start assignment with relative deadline.

Definition at line 1046 of file class.ilObjExerciseGUI.php.

1047 {
1048 global $DIC;
1049
1050 $ilCtrl = $DIC->ctrl();
1051 $ilUser = $DIC->user();
1052
1053 if ($this->ass) {
1054 $state = ilExcAssMemberState::getInstanceByIds($this->ass->getId(), $ilUser->getId());
1055 if (!$state->getCommonDeadline() && $state->getRelativeDeadline()) {
1056 $idl = $state->getIndividualDeadlineObject();
1057 $idl->setStartingTimestamp(time());
1058 $idl->save();
1059 }
1060 }
1061
1062 $ilCtrl->redirect($this, "showOverview");
1063 }
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)

References $DIC, $ilCtrl, $ilUser, and ilExcAssMemberState\getInstanceByIds().

+ Here is the call graph for this function:

◆ updateCustom()

ilObjExerciseGUI::updateCustom ( ilPropertyFormGUI  $a_form)
protected

Insert custom update form values into object.

Parameters
ilPropertyFormGUI$a_form

Reimplemented from ilObjectGUI.

Definition at line 477 of file class.ilObjExerciseGUI.php.

478 {
479 $obj_service = $this->getObjectService();
480
482 $this->object->setShowSubmissions($a_form->getInput("show_submissions"));
483 $this->object->setPassMode($a_form->getInput("pass_mode"));
484 if ($this->object->getPassMode() == "nr") {
485 $this->object->setPassNr($a_form->getInput("pass_nr"));
486 }
487 if ($this->object->getPassMode() == ilObjExercise::PASS_MODE_RANDOM) {
488 $this->object->setNrMandatoryRandom($a_form->getInput("nr_random_mand"));
489 }
490
491 $this->object->setCompletionBySubmission($a_form->getInput('completion_by_submission') == 1 ? true : false);
492
493 $feedback = $a_form->getInput("tfeedback");
494 $this->object->setTutorFeedback(is_array($feedback)
495 ? array_sum($feedback)
496 : null);
497
500 $ilUser->getId(),
501 $this->object->getId(),
502 (bool) $a_form->getInput("notification")
503 );
504
505 // tile image
506 $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
507
509 $this->object->getId(),
510 $a_form,
511 array(
514 )
515 );
516 }
static setNotification($type, $user_id, $id, $status=true)
Set notification status for object and user.
static updateServiceSettingsForm($a_obj_id, ilPropertyFormGUI $form, $services)
Update service settings.
getInput($a_post_var, $ensureValidation=true)
Returns the value of a HTTP-POST variable, identified by the passed id.

References $ilUser, ilObjectGUI\$user, ilObjectServiceSettingsGUI\CUSTOM_METADATA, ilPropertyFormGUI\getInput(), ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilObjExercise\PASS_MODE_RANDOM, ilNotification\setNotification(), ilNotification\TYPE_EXERCISE_SUBMISSION, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ viewObject()

ilObjExerciseGUI::viewObject ( )

viewObject container presentation for "administration -> repository, trash, permissions"

Exceptions

ilObjectException

Reimplemented from ilObjectGUI.

Definition at line 253 of file class.ilObjExerciseGUI.php.

254 {
255 $this->infoScreenObject();
256 }
infoScreenObject()
this one is called from the info button in the repository not very nice to set cmdClass/Cmd manually,...

References infoScreenObject().

+ Here is the call graph for this function:

Field Documentation

◆ $ass

ilObjExerciseGUI::$ass = null
protected

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

Referenced by showOverviewObject().

◆ $certificateDownloadValidator

ilObjExerciseGUI::$certificateDownloadValidator
private

Definition at line 26 of file class.ilObjExerciseGUI.php.

◆ $exercise_ui

ilObjExerciseGUI::$exercise_ui
protected

Definition at line 56 of file class.ilObjExerciseGUI.php.

◆ $help

ilObjExerciseGUI::$help
protected

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

Referenced by getTabs().

◆ $request

ilObjExerciseGUI::$request
protected

Definition at line 51 of file class.ilObjExerciseGUI.php.

◆ $requested_ass_id

ilObjExerciseGUI::$requested_ass_id
protected

Definition at line 61 of file class.ilObjExerciseGUI.php.

◆ $service

ilObjExerciseGUI::$service
protected

◆ $tabs

ilObjExerciseGUI::$tabs
protected

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