ILIAS  release_7 Revision v7.30-3-g800a261c036
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...
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

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
 
 $exercise_request
 
 $exercise_ui
 
 $requested_ass_id
 
- Protected Attributes inherited from ilObjectGUI
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $rbacsystem
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 
 $favourites
 
 $request
 

Private Attributes

 $certificateDownloadValidator
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
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->exercise_request = $DIC->exercise()->internal()->request();
92 $this->exercise_ui = $DIC->exercise()->internal()->ui();
93 $this->requested_ass_id = $this->exercise_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->exercise_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.
global $DIC
Definition: goto.php:24
help()
Definition: help.php:2
__construct(Container $dic, ilPlugin $plugin)
@inheritDoc

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 840 of file class.ilObjExerciseGUI.php.

841 {
842 global $DIC;
843
844 $ilErr = $DIC["ilErr"];
845 $lng = $DIC->language();
846 $ilAccess = $DIC->access();
847 $ilCtrl = $DIC->ctrl();
848
849 //we don't have baseClass here...
850 $ilCtrl->setTargetScript("ilias.php");
851 $ilCtrl->initBaseClass("ilRepositoryGUI");
852
853 //ilExerciseMailNotification has links to:
854 // "Assignments", "Submission and Grades" and Downnoad the NEW files if the assignment type is "File Upload".
855 $ass_id = $_GET['ass_id'];
856 $parts = explode("_", $a_raw);
857 if (!$ass_id) {
858 $ass_id = null;
859 $action = null;
860
861 switch (end($parts)) {
862 case "download":
863 $action = $parts[3];
864 $member = $parts[2];
865 $ass_id = $parts[1];
866 break;
867
868 case "setdownload":
869 $action = $parts[3];
870 $member = $parts[2];
871 $ass_id = $parts[1];
872 break;
873
874 case "grades":
875 $action = $parts[2];
876 $ass_id = $parts[1];
877 break;
878 }
879 }
880
881 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ref_id", $a_target);
882
883 if ($ilAccess->checkAccess("read", "", $a_target)) {
884 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "target", $a_raw);
885
886 if ($ass_id) {
887 $ilCtrl->setParameterByClass("ilExerciseManagementGUI", "ass_id", $ass_id);
888 }
889
890 switch ($action) {
891 case "grades":
892 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "members");
893 break;
894
895 /*case "download":
896 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
897 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"),"downloadNewReturned");
898 break;*/
899
900 case "setdownload":
901 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
902 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "waitingDownload");
903 break;
904
905 default:
906 if ($parts[1] != "") {
907 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id", $parts[1]);
908 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id_goto", $parts[1]);
909 }
910 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI"), "showOverview");
911 break;
912
913 }
914 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
915 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI"), "infoScreen");
916 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
917 ilUtil::sendFailure(sprintf(
918 $lng->txt("msg_no_perm_read_item"),
920 ), true);
922 }
923 }
$_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.
const ROOT_FOLDER_ID
Definition: constants.php:30

References $_GET, $DIC, ilObjectGUI\$ilErr, ilObjectGUI\$lng, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ROOT_FOLDER_ID, 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 527 of file class.ilObjExerciseGUI.php.

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

References ilObjectGUI\$ctrl, 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 928 of file class.ilObjExerciseGUI.php.

929 {
930 $ilLocator = $this->locator;
931
932 if (is_object($this->object)) {
933 // #17955
934 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "showOverview"), "", $_GET["ref_id"]);
935 }
936 }

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 262 of file class.ilObjExerciseGUI.php.

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

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

+ Here is the call graph for this function:

◆ certificateObject()

ilObjExerciseGUI::certificateObject ( )

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

1018 {
1019 $this->setSettingsSubTabs();
1020 $this->tabs_gui->activateTab("settings");
1021 $this->tabs_gui->activateSubTab("certificate");
1022
1023 $guiFactory = new ilCertificateGUIFactory();
1024 $output_gui = $guiFactory->create($this->object);
1025
1026 $output_gui->certificateEditor();
1027 }

References setSettingsSubTabs().

+ Here is the call graph for this function:

◆ editObject()

ilObjExerciseGUI::editObject ( )

edit object

@access public

Reimplemented from ilObjectGUI.

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

805 {
806 $this->setSettingsSubTabs();
807 $this->tabs_gui->activateSubTab("edit");
808 return parent::editObject();
809 }

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

References $_GET, ilObjectGUI\$ctrl, $GLOBALS, $ilUser, ilObjectGUI\$lng, $ret, $tabs, ilObjectGUI\$user, addContentSubTabs(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilObjectGUI\getCreationMode(), 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 437 of file class.ilObjExerciseGUI.php.

438 {
440
441 $a_values["desc"] = $this->object->getLongDescription();
442 $a_values["show_submissions"] = $this->object->getShowSubmissions();
443 $a_values["pass_mode"] = $this->object->getPassMode();
444 if ($a_values["pass_mode"] == "nr") {
445 $a_values["pass_nr"] = $this->object->getPassNr();
446 }
447
448 $a_values["nr_random_mand"] = $this->object->getNrMandatoryRandom();
449
450 $a_values["notification"] = ilNotification::hasNotification(
452 $ilUser->getId(),
453 $this->object->getId()
454 );
455
456 $a_values['completion_by_submission'] = (int) $this->object->isCompletionBySubmissionEnabled();
457
458 $tfeedback = array();
459 if ($this->object->hasTutorFeedbackMail()) {
461 }
462 if ($this->object->hasTutorFeedbackText()) {
464 }
465 if ($this->object->hasTutorFeedbackFile()) {
467 }
468 $a_values['tfeedback'] = $tfeedback;
469
470 // orgunit position setting enabled
471 $a_values['obj_orgunit_positions'] = (bool) ilOrgUnitGlobalSettings::getInstance()
472 ->isPositionAccessActiveForObject($this->object->getId());
473
474 $a_values['cont_custom_md'] = ilContainer::_lookupContainerSetting(
475 $this->object->getId(),
477 false
478 );
479 }
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 670 of file class.ilObjExerciseGUI.php.

671 {
672 return $this->service;
673 }

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 553 of file class.ilObjExerciseGUI.php.

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

1086 {
1087 $service = $this->getService();
1088 $random_manager = $service->getRandomAssignmentManager($this->object);
1089 if ($random_manager->needsStart()) {
1090 $gui = $this->exercise_ui->getRandomAssignmentGUI();
1091 $gui->renderStartPage();
1092 return true;
1093 }
1094
1095 return false;
1096 }

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 658 of file class.ilObjExerciseGUI.php.

659 {
660 $this->ctrl->setCmd("showSummary");
661 $this->ctrl->setCmdClass("ilinfoscreengui");
662 $this->infoScreen();
663 }

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 287 of file class.ilObjExerciseGUI.php.

288 {
289 $obj_service = $this->getObjectService();
290
291 $service = $this->getService();
292 $random_manager = $service->getRandomAssignmentManager($this->object);
293
294 $a_form->setTitle($this->lng->txt("exc_edit_exercise"));
295
296 $pres = new ilFormSectionHeaderGUI();
297 $pres->setTitle($this->lng->txt('obj_presentation'));
298 $a_form->addItem($pres);
299
300 // tile image
301 $a_form = $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
302
304 $section->setTitle($this->lng->txt('exc_passing_exc'));
305 $a_form->addItem($section);
306
307 // pass mode
308 $radg = new ilRadioGroupInputGUI($this->lng->txt("exc_pass_mode"), "pass_mode");
309
310 $op1 = new ilRadioOption(
311 $this->lng->txt("exc_pass_all"),
313 $this->lng->txt("exc_pass_all_info")
314 );
315 $radg->addOption($op1);
316 $op2 = new ilRadioOption(
317 $this->lng->txt("exc_pass_minimum_nr"),
319 $this->lng->txt("exc_pass_minimum_nr_info")
320 );
321 $radg->addOption($op2);
322 $op3 = new ilRadioOption(
323 $this->lng->txt("exc_random_selection"),
325 $this->lng->txt("exc_random_selection_info")
326 );
327 if (!$random_manager->canBeActivated() && $this->object->getPassMode() != ilObjExercise::PASS_MODE_RANDOM) {
328 $op3->setDisabled(true);
329 $op3->setInfo($this->lng->txt("exc_random_selection_not_changeable_info") . " " .
330 implode(" ", $random_manager->getDeniedActivationReasons()));
331 }
332 if ($this->object->getPassMode() == ilObjExercise::PASS_MODE_RANDOM && !$random_manager->canBeDeactivated()) {
333 $radg->setDisabled(true);
334 $radg->setInfo($this->lng->txt("exc_pass_mode_not_changeable_info") . " " .
335 implode(" ", $random_manager->getDeniedDeactivationReasons()));
336 }
337 // minimum number of assignments to pass
338 $rn = new ilNumberInputGUI($this->lng->txt("exc_nr_random_mand"), "nr_random_mand");
339 $rn->setSize(4);
340 $rn->setMaxLength(4);
341 $rn->setRequired(true);
342 $rn->setMinValue(1, false);
343 $cnt = ilExAssignment::count($this->object->getId());
344 $rn->setMaxValue($cnt, true);
345 $op3->addSubItem($rn);
346
347 $radg->addOption($op3);
348
349 // minimum number of assignments to pass
350 $ni = new ilNumberInputGUI($this->lng->txt("exc_min_nr"), "pass_nr");
351 $ni->setSize(4);
352 $ni->setMaxLength(4);
353 $ni->setRequired(true);
354 $mand = ilExAssignment::countMandatory($this->object->getId());
355 $min = max($mand, 1);
356 $ni->setMinValue($min, true);
357 $ni->setInfo($this->lng->txt("exc_min_nr_info"));
358 $op2->addSubItem($ni);
359
360 $a_form->addItem($radg);
361
362 // completion by submission
363 $subcompl = new ilRadioGroupInputGUI($this->lng->txt("exc_passed_status_determination"), "completion_by_submission");
364 $op1 = new ilRadioOption($this->lng->txt("exc_completion_by_tutor"), 0, "");
365 $subcompl->addOption($op1);
366 $op2 = new ilRadioOption($this->lng->txt("exc_completion_by_submission"), 1, $this->lng->txt("exc_completion_by_submission_info"));
367 $subcompl->addOption($op2);
368 $a_form->addItem($subcompl);
369
370 /*$subcompl = new ilCheckboxInputGUI($this->lng->txt('exc_completion_by_submission'), 'completion_by_submission');
371 $subcompl->setInfo($this->lng->txt('exc_completion_by_submission_info'));
372 $subcompl->setValue(1);
373 $a_form->addItem($subcompl);*/
374
376 $section->setTitle($this->lng->txt('exc_publishing'));
377 $a_form->addItem($section);
378
379 // show submissions
380 $cb = new ilCheckboxInputGUI($this->lng->txt("exc_show_submissions"), "show_submissions");
381 $cb->setInfo($this->lng->txt("exc_show_submissions_info"));
382 $a_form->addItem($cb);
383
385 $section->setTitle($this->lng->txt('exc_notification'));
386 $a_form->addItem($section);
387
388 // submission notifications
389 $cbox = new ilCheckboxInputGUI($this->lng->txt("exc_submission_notification"), "notification");
390 $cbox->setInfo($this->lng->txt("exc_submission_notification_info"));
391 $a_form->addItem($cbox);
392
393
394 // feedback settings
395
397 $section->setTitle($this->lng->txt('exc_feedback'));
398 $a_form->addItem($section);
399
400 $fdb = new ilCheckboxGroupInputGUI($this->lng->txt("exc_settings_feedback"), "tfeedback");
401 $a_form->addItem($fdb);
402
403 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_mail"), ilObjExercise::TUTOR_FEEDBACK_MAIL);
404 $option->setInfo($this->lng->txt("exc_settings_feedback_mail_info"));
405 $fdb->addOption($option);
406 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_file"), ilObjExercise::TUTOR_FEEDBACK_FILE);
407 $option->setInfo($this->lng->txt("exc_settings_feedback_file_info"));
408 $fdb->addOption($option);
409 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_text"), ilObjExercise::TUTOR_FEEDBACK_TEXT);
410 $option->setInfo($this->lng->txt("exc_settings_feedback_text_info"));
411 $fdb->addOption($option);
412
413 // additional features
415 $section->setTitle($this->lng->txt('obj_features'));
416 $a_form->addItem($section);
417
419
420 $position_settings = ilOrgUnitGlobalSettings::getInstance()
421 ->getObjectPositionSettingsByType($this->object->getType());
422
423 if ($position_settings->isActive()) {
425 }
426
428 $this->object->getId(),
429 $a_form,
430 $features
431 );
432 }
$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 274 of file class.ilObjExerciseGUI.php.

275 {
276 $ilCtrl = $this->ctrl;
277
278 $this->checkPermissionBool("write");
279
280 // #16587
281 $ilCtrl->redirectByClass("ilExAssignmentEditorGUI", "listAssignments");
282 }

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

+ Here is the call graph for this function:

◆ outCertificateObject()

ilObjExerciseGUI::outCertificateObject ( )

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

1030 {
1031 global $DIC;
1032
1033 $database = $DIC->database();
1034 $logger = $DIC->logger()->root();
1035
1037
1038 $objectId = (int) $this->object->getId();
1039
1040 if (false === $this->certificateDownloadValidator->isCertificateDownloadable($ilUser->getId(), $objectId)) {
1041 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
1042 $this->ctrl->redirect($this);
1043 }
1044
1045 $ilUserCertificateRepository = new ilUserCertificateRepository($database, $logger);
1046 $pdfGenerator = new ilPdfGenerator($ilUserCertificateRepository, $logger);
1047
1048 $pdfAction = new ilCertificatePdfAction(
1049 $logger,
1050 $pdfGenerator,
1052 $this->lng->txt('error_creating_certificate_pdf')
1053 );
1054
1055 $pdfAction->downloadPdf((int) $ilUser->getId(), (int) $objectId);
1056 }
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 811 of file class.ilObjExerciseGUI.php.

812 {
813 $this->tabs_gui->addSubTab(
814 "edit",
815 $this->lng->txt("general_settings"),
816 $this->ctrl->getLinkTarget($this, "edit")
817 );
818
819 $this->tabs_gui->addSubTab(
820 "crit",
821 $this->lng->txt("exc_criteria_catalogues"),
822 $this->ctrl->getLinkTargetByClass("ilexccriteriacataloguegui", "")
823 );
824
825 $validator = new ilCertificateActiveValidator();
826 if (true === $validator->validate()) {
827 $this->tabs_gui->addSubTab(
828 "certificate",
829 $this->lng->txt("certificate"),
830 $this->ctrl->getLinkTarget($this, "certificate")
831 );
832 }
833 }

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

+ Here is the caller graph for this function:

◆ showOverviewObject()

ilObjExerciseGUI::showOverviewObject ( )

Show overview of assignments.

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

947 {
949 $ilTabs = $this->tabs;
951 $ilToolbar = $this->toolbar;
952
953 $this->checkPermission("read");
954
955 $ilTabs->activateTab("content");
956 $this->addContentSubTabs("content");
957
958 if ($this->handleRandomAssignmentEntryPage()) {
959 return;
960 }
961
962 $tpl->addJavaScript("./Modules/Exercise/js/ilExcPresentation.js");
963
965 $ilUser->getId(),
966 $this->object->getId(),
967 $this->object->getRefId(),
968 'exc'
969 );
970
971
972 if ($this->certificateDownloadValidator->isCertificateDownloadable((int) $ilUser->getId(), (int) $this->object->getId())) {
973 $ilToolbar->addButton(
974 $this->lng->txt("certificate"),
975 $this->ctrl->getLinkTarget($this, "outCertificate")
976 );
977 }
978
979 $ass_gui = new ilExAssignmentGUI($this->object, $this->getService());
980
981 $acc = new ilAccordionGUI();
982 $acc->setId("exc_ow_" . $this->object->getId());
983
984 $ass_data = ilExAssignment::getInstancesByExercise($this->object->getId());
985 $random_manager = $this->service->getRandomAssignmentManager($this->object);
986 foreach ($ass_data as $ass) {
987 if (!$random_manager->isAssignmentVisible($ass->getId(), $this->user->getId())) {
988 continue;
989 }
990
991 // incoming assignment deeplink
992 $force_open = false;
993 if (isset($_GET["ass_id_goto"]) &&
994 (int) $_GET["ass_id_goto"] == $ass->getId()) {
995 $force_open = true;
996 }
997
998 $acc->addItem(
999 $ass_gui->getOverviewHeader($ass),
1000 $ass_gui->getOverviewBody($ass),
1001 $force_open
1002 );
1003 }
1004
1005 if (count($ass_data) < 2) {
1006 $acc->setBehaviour("FirstOpen");
1007 } else {
1008 $acc->setUseSessionStorage(true);
1009 }
1010
1011 $mtpl = new ilTemplate("tpl.exc_ass_overview.html", true, true, "Modules/Exercise");
1012 $mtpl->setVariable("CONTENT", $acc->getHTML());
1013
1014 $tpl->setContent($mtpl->get());
1015 }
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 1061 of file class.ilObjExerciseGUI.php.

1062 {
1063 global $DIC;
1064
1065 $ilCtrl = $DIC->ctrl();
1066 $ilUser = $DIC->user();
1067
1068 if ($this->ass) {
1069 $state = ilExcAssMemberState::getInstanceByIds($this->ass->getId(), $ilUser->getId());
1070 if (!$state->getCommonDeadline() && $state->getRelativeDeadline()) {
1071 $idl = $state->getIndividualDeadlineObject();
1072 $idl->setStartingTimestamp(time());
1073 $idl->save();
1074 }
1075 }
1076
1077 $ilCtrl->redirect($this, "showOverview");
1078 }
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)

References $DIC, $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 481 of file class.ilObjExerciseGUI.php.

482 {
483 $obj_service = $this->getObjectService();
484
486 $this->object->setShowSubmissions($a_form->getInput("show_submissions"));
487 $this->object->setPassMode($a_form->getInput("pass_mode"));
488 if ($this->object->getPassMode() == "nr") {
489 $this->object->setPassNr($a_form->getInput("pass_nr"));
490 }
491 if ($this->object->getPassMode() == ilObjExercise::PASS_MODE_RANDOM) {
492 $this->object->setNrMandatoryRandom($a_form->getInput("nr_random_mand"));
493 }
494
495 $this->object->setCompletionBySubmission($a_form->getInput('completion_by_submission') == 1 ? true : false);
496
497 $feedback = $a_form->getInput("tfeedback");
498 $this->object->setTutorFeedback(is_array($feedback)
499 ? array_sum($feedback)
500 : null);
501
504 $ilUser->getId(),
505 $this->object->getId(),
506 (bool) $a_form->getInput("notification")
507 );
508
509 // tile image
510 $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
511
513 $this->object->getId(),
514 $a_form,
515 array(
518 )
519 );
520 }
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 257 of file class.ilObjExerciseGUI.php.

258 {
259 $this->infoScreenObject();
260 }
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_request

ilObjExerciseGUI::$exercise_request
protected

Definition at line 51 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().

◆ $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: