ILIAS  release_5-4 Revision v5.4.26-12-gabc799a52e6
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 ()
 list childs of current object 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...
 
 infoScreen ()
 show information screen 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 ()
 list childs of current object 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...
 

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...
 
 setSettingsSubTabs ()
 
- 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...
 
 showMountWebfolderIcon ()
 
 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
 
- Protected Attributes inherited from ilObjectGUI
 $ilErr
 
 $locator
 
 $user
 
 $access
 
 $settings
 
 $rbacreview
 
 $toolbar
 
 $tmp_import_dir
 
 $tabs_gui = null
 
 $ctrl
 
 $object_service
 

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

50 {
51 global $DIC;
52
53 $this->lng = $DIC->language();
54 $this->user = $DIC->user();
55 $this->ctrl = $DIC->ctrl();
56 $this->tabs = $DIC->tabs();
57 $this->help = $DIC["ilHelp"];
58 $this->locator = $DIC["ilLocator"];
59 $this->tpl = $DIC["tpl"];
60 $this->toolbar = $DIC->toolbar();
61 $lng = $DIC->language();
62
63 $this->lng->loadLanguageModule('cert');
64
65 $this->type = "exc";
66 parent::__construct($a_data, $a_id, $a_call_by_reference, false);
67
68 $lng->loadLanguageModule("exercise");
69 $lng->loadLanguageModule("exc");
70 $this->ctrl->saveParameter($this, "ass_id");
71
72 include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
73 if ($_REQUEST["ass_id"] > 0 && is_object($this->object) && ilExAssignment::lookupExerciseId($_REQUEST["ass_id"]) == $this->object->getId()) {
74 $this->ass = new ilExAssignment((int) $_REQUEST["ass_id"]);
75 } elseif ($_REQUEST["ass_id"] > 0) {
76 throw new ilExerciseException("Assignment ID does not match Exercise.");
77 }
78
79
80 $this->certificateDownloadValidator = new ilCertificateDownloadValidator();
81 }
user()
Definition: user.php:4
Validates if an active certificate is stored in the database and can be downloaded by the user.
Exercise assignment.
static lookupExerciseId($a_ass_id)
Lookup excercise id for assignment id.
Exercise exceptions class.
global $DIC
Definition: saml.php:7

References $DIC, ilObjectGUI\$lng, 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 718 of file class.ilObjExerciseGUI.php.

719 {
720 global $DIC;
721
722 $ilErr = $DIC["ilErr"];
723 $lng = $DIC->language();
724 $ilAccess = $DIC->access();
725 $ilCtrl = $DIC->ctrl();
726
727 //we don't have baseClass here...
728 $ilCtrl->setTargetScript("ilias.php");
729 $ilCtrl->initBaseClass("ilRepositoryGUI");
730
731 //ilExerciseMailNotification has links to:
732 // "Assignments", "Submission and Grades" and Downnoad the NEW files if the assignment type is "File Upload".
733 $ass_id = $_GET['ass_id'];
734 $parts = explode("_", $a_raw);
735 if (!$ass_id) {
736 $ass_id = null;
737 $action = null;
738
739 switch (end($parts)) {
740 case "download":
741 $action = $parts[3];
742 $member = $parts[2];
743 $ass_id = $parts[1];
744 break;
745
746 case "setdownload":
747 $action = $parts[3];
748 $member = $parts[2];
749 $ass_id = $parts[1];
750 break;
751
752 case "grades":
753 $action = $parts[2];
754 $ass_id = $parts[1];
755 break;
756 }
757 }
758
759 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ref_id", $a_target);
760
761 if ($ilAccess->checkAccess("read", "", $a_target)) {
762 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "target", $a_raw);
763
764 if ($ass_id) {
765 $ilCtrl->setParameterByClass("ilExerciseManagementGUI", "ass_id", $ass_id);
766 }
767
768 switch ($action) {
769 case "grades":
770 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "members");
771 break;
772
773 /*case "download":
774 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
775 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"),"downloadNewReturned");
776 break;*/
777
778 case "setdownload":
779 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
780 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"), "waitingDownload");
781 break;
782
783 default:
784 if ($parts[1] != "") {
785 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id", $parts[1]);
786 $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id_goto", $parts[1]);
787 }
788 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI"), "showOverview");
789 break;
790
791 }
792 } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
793 $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI"), "infoScreen");
794 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
795 ilUtil::sendFailure(sprintf(
796 $lng->txt("msg_no_perm_read_item"),
798 ), true);
800 }
801 }
$_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.
$action
global $ilCtrl
Definition: ilias.php:18

References $_GET, $action, $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 450 of file class.ilObjExerciseGUI.php.

451 {
452 $ilTabs = $this->tabs;
455
456 $ilTabs->addSubTab(
457 "content",
458 $lng->txt("view"),
459 $ilCtrl->getLinkTarget($this, "showOverview")
460 );
461 if ($this->checkPermissionBool("write")) {
462 $ilTabs->addSubTab(
463 "list_assignments",
464 $lng->txt("edit"),
465 $ilCtrl->getLinkTargetByClass("ilExAssignmentEditorGUI", "listAssignments")
466 );
467 }
468 $ilTabs->activateSubTab($a_activate);
469 }
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 806 of file class.ilObjExerciseGUI.php.

807 {
808 $ilLocator = $this->locator;
809
810 if (is_object($this->object)) {
811 // #17955
812 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "showOverview"), "", $_GET["ref_id"]);
813 }
814 }

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

225 {
227
228 $a_new_object->saveData();
229
230 ilUtil::sendSuccess($this->lng->txt("exc_added"), true);
231
232 $ilCtrl->setParameterByClass("ilExAssignmentEditorGUI", "ref_id", $a_new_object->getRefId());
233 $ilCtrl->redirectByClass("ilExAssignmentEditorGUI", "addAssignment");
234 }
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 889 of file class.ilObjExerciseGUI.php.

890 {
891 $this->setSettingsSubTabs();
892 $this->tabs_gui->activateTab("settings");
893 $this->tabs_gui->activateSubTab("certificate");
894
895 $guiFactory = new ilCertificateGUIFactory();
896 $output_gui = $guiFactory->create($this->object);
897
898 $output_gui->certificateEditor();
899 }

References setSettingsSubTabs().

+ Here is the call graph for this function:

◆ editObject()

ilObjExerciseGUI::editObject ( )

edit object

@access public

Reimplemented from ilObjectGUI.

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

683 {
684 $this->setSettingsSubTabs();
685 $this->tabs_gui->activateSubTab("edit");
686 return parent::editObject();
687 }

References setSettingsSubTabs().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjExerciseGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

84 {
87 $ilTabs = $this->tabs;
89
90 $next_class = $this->ctrl->getNextClass($this);
91 $cmd = $this->ctrl->getCmd();
92 $this->prepareOutput();
93
94 //echo "-".$next_class."-".$cmd."-"; exit;
95 switch ($next_class) {
96 case "ilinfoscreengui":
97 $ilTabs->activateTab("info");
98 $this->infoScreen(); // forwards command
99 break;
100
101 case 'ilpermissiongui':
102 $ilTabs->activateTab("permissions");
103 include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
104 $perm_gui = new ilPermissionGUI($this);
105 $ret = &$this->ctrl->forwardCommand($perm_gui);
106 break;
107
108 case "illearningprogressgui":
109 $ilTabs->activateTab("learning_progress");
110 include_once './Services/Tracking/classes/class.ilLearningProgressGUI.php';
111
112 $new_gui = new ilLearningProgressGUI(
114 $this->object->getRefId(),
115 $_GET['user_id'] ? $_GET['user_id'] : $ilUser->getId()
116 );
117 $this->ctrl->forwardCommand($new_gui);
118 $this->tabs_gui->setTabActive('learning_progress');
119 break;
120
121 case 'ilobjectcopygui':
122 $ilCtrl->saveParameter($this, 'new_type');
123 $ilCtrl->setReturnByClass(get_class($this), 'create');
124
125 include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
126 $cp = new ilObjectCopyGUI($this);
127 $cp->setType('exc');
128 $this->ctrl->forwardCommand($cp);
129 break;
130
131 case "ilexportgui":
132 $ilTabs->activateTab("export");
133 include_once("./Services/Export/classes/class.ilExportGUI.php");
134 $exp_gui = new ilExportGUI($this);
135 $exp_gui->addFormat("xml");
136 $ret = $this->ctrl->forwardCommand($exp_gui);
137// $this->tpl->show();
138 break;
139
140 case "ilcommonactiondispatchergui":
141 include_once("Services/Object/classes/class.ilCommonActionDispatcherGUI.php");
143 $this->ctrl->forwardCommand($gui);
144 break;
145
146 case "ilcertificategui":
147 $this->setSettingsSubTabs();
148 $this->tabs_gui->activateTab("settings");
149 $this->tabs_gui->activateSubTab("certificate");
150
151 $guiFactory = new ilCertificateGUIFactory();
152 $output_gui = $guiFactory->create($this->object);
153
154 $this->ctrl->forwardCommand($output_gui);
155 break;
156
157 case "ilexassignmenteditorgui":
158 $this->checkPermission("write");
159 $ilTabs->activateTab("content");
160 $this->addContentSubTabs("list_assignments");
161 include_once("./Modules/Exercise/classes/class.ilExAssignmentEditorGUI.php");
162 $ass_gui = new ilExAssignmentEditorGUI($this->object->getId(), $this->object->isCompletionBySubmissionEnabled(), $this->ass);
163 $this->ctrl->forwardCommand($ass_gui);
164 break;
165
166 case "ilexsubmissiongui":
167 $this->checkPermission("read");
168 $ilTabs->activateTab("content");
169 $this->addContentSubTabs("content");
170 $this->ctrl->setReturn($this, "showOverview");
171 include_once("./Modules/Exercise/classes/class.ilExSubmissionGUI.php");
172 $sub_gui = new ilExSubmissionGUI($this->object, $this->ass, (int) $_REQUEST["member_id"]);
173 $this->ctrl->forwardCommand($sub_gui);
174 break;
175
176 case "ilexercisemanagementgui":
177 // rbac or position access
178 if ($GLOBALS['DIC']->access()->checkRbacOrPositionPermissionAccess(
179 'edit_submissions_grades',
180 'edit_submissions_grades',
181 $this->object->getRefId()
182 )) {
183 $ilTabs->activateTab("grades");
184 include_once("./Modules/Exercise/classes/class.ilExerciseManagementGUI.php");
185 $mgmt_gui = new ilExerciseManagementGUI($this->object, $this->ass);
186 $this->ctrl->forwardCommand($mgmt_gui);
187 } else {
188 $this->checkPermission("edit_submissions_grades"); // throw error by standard procedure
189 }
190 break;
191
192 case "ilexccriteriacataloguegui":
193 $this->checkPermission("write");
194 $ilTabs->activateTab("settings");
195 $this->setSettingsSubTabs();
196 $ilTabs->activateSubTab("crit");
197 include_once("./Modules/Exercise/classes/class.ilExcCriteriaCatalogueGUI.php");
198 $crit_gui = new ilExcCriteriaCatalogueGUI($this->object);
199 $this->ctrl->forwardCommand($crit_gui);
200 break;
201
202 default:
203 if (!$cmd) {
204 $cmd = "infoScreen";
205 }
206
207 $cmd .= "Object";
208
209 $this->$cmd();
210
211 break;
212 }
213
214 $this->addHeaderAction();
215
216 return true;
217 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Class ilExAssignmentEditorGUI.
Class ilExSubmissionGUI.
Class ilExcCriteriaCatalogueGUI.
Class ilExerciseManagementGUI.
Export User Interface Class.
Class ilObjUserTrackingGUI.
infoScreen()
show information screen
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.
New PermissionGUI (extends from old ilPermission2GUI) RBAC related output.
$GLOBALS['JPEG_Segment_Names']
Global Variable: XMP_tag_captions.
$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(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), 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 370 of file class.ilObjExerciseGUI.php.

371 {
373
374 $a_values["desc"] = $this->object->getLongDescription();
375 $a_values["show_submissions"] = $this->object->getShowSubmissions();
376 $a_values["pass_mode"] = $this->object->getPassMode();
377 if ($a_values["pass_mode"] == "nr") {
378 $a_values["pass_nr"] = $this->object->getPassNr();
379 }
380
381 include_once "./Services/Notification/classes/class.ilNotification.php";
382 $a_values["notification"] = ilNotification::hasNotification(
384 $ilUser->getId(),
385 $this->object->getId()
386 );
387
388 $a_values['completion_by_submission'] = (int) $this->object->isCompletionBySubmissionEnabled();
389
390 $tfeedback = array();
391 if ($this->object->hasTutorFeedbackMail()) {
393 }
394 if ($this->object->hasTutorFeedbackText()) {
396 }
397 if ($this->object->hasTutorFeedbackFile()) {
399 }
400 $a_values['tfeedback'] = $tfeedback;
401
402 // orgunit position setting enabled
403 $a_values['obj_orgunit_positions'] = (bool) ilOrgUnitGlobalSettings::getInstance()
404 ->isPositionAccessActiveForObject($this->object->getId());
405 }
static hasNotification($type, $user_id, $id)
Check notification status for object and user.

References $ilUser, ilObjectGUI\$user, 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:

◆ getTabs()

ilObjExerciseGUI::getTabs ( )

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjectGUI.

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

477 {
479 $ilHelp = $this->help;
480
481 $ilHelp->setScreenIdComponent("exc");
482
483 if ($this->checkPermissionBool("read")) {
484 $this->tabs_gui->addTab(
485 "content",
486 $lng->txt("exc_assignments"),
487 $this->ctrl->getLinkTarget($this, "showOverview")
488 );
489 }
490
491 $next_class = strtolower($this->ctrl->getNextClass());
492 if ($this->checkPermissionBool("visible") || $this->checkPermissionBool("read")) {
493 $this->tabs_gui->addTab(
494 "info",
495 $lng->txt("info_short"),
496 $this->ctrl->getLinkTargetByClass("ilinfoscreengui", "showSummary")
497 );
498 }
499
500 // edit properties
501 if ($this->checkPermissionBool("write")) {
502 /*$tabs_gui->addTab("assignments",
503 $lng->txt("exc_edit_assignments"),
504 $this->ctrl->getLinkTarget($this, 'listAssignments'));*/
505
506 $this->tabs_gui->addTab(
507 "settings",
508 $lng->txt("settings"),
509 $this->ctrl->getLinkTarget($this, 'edit')
510 );
511 }
512 if ($this->access->checkRbacOrPositionPermissionAccess(
513 'edit_submissions_grades',
514 'edit_submissions_grades',
515 $this->object->getRefId()
516 )) {
517 $this->tabs_gui->addTab(
518 "grades",
519 $lng->txt("exc_submissions_and_grades"),
520 $this->ctrl->getLinkTargetByClass("ilexercisemanagementgui", "members")
521 );
522 }
523
524 // learning progress
525 $save_sort_order = $_GET["sort_order"]; // hack, because exercise sort parameters
526 $save_sort_by = $_GET["sort_by"]; // must not be forwarded to learning progress
527 $save_offset = $_GET["offset"];
528 $_GET["offset"] = $_GET["sort_by"] = $_GET["sort_order"] = "";
529
530 include_once './Services/Tracking/classes/class.ilLearningProgressAccess.php';
531 if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
532 $this->tabs_gui->addTab(
533 'learning_progress',
534 $lng->txt('learning_progress'),
535 $this->ctrl->getLinkTargetByClass(array('ilobjexercisegui','illearningprogressgui'), '')
536 );
537 }
538
539 $_GET["sort_order"] = $save_sort_order; // hack, part ii
540 $_GET["sort_by"] = $save_sort_by;
541 $_GET["offset"] = $save_offset;
542
543 // export
544 if ($this->checkPermissionBool("write")) {
545 $this->tabs_gui->addTab(
546 "export",
547 $lng->txt("export"),
548 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
549 );
550 }
551
552
553 // permissions
554 if ($this->checkPermissionBool("edit_permission")) {
555 $this->tabs_gui->addTab(
556 'permissions',
557 $lng->txt("perm_settings"),
558 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
559 );
560 }
561 }
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:

◆ infoScreen()

ilObjExerciseGUI::infoScreen ( )

show information screen

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

579 {
581 $ilTabs = $this->tabs;
583
584 $ilTabs->activateTab("info");
585
586 if (!$this->checkPermissionBool("read")) {
587 $this->checkPermission("visible");
588 }
589
590 include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
591 $info = new ilInfoScreenGUI($this);
592
593 $info->enablePrivateNotes();
594
595 $info->enableNews();
596 if ($this->checkPermissionBool("write")) {
597 $info->enableNewsEditing();
598 $info->setBlockProperty("news", "settings", true);
599 }
600
601 // standard meta data
602 //$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
603
604 // instructions
605 $info->addSection($this->lng->txt("exc_overview"));
606 include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
607 $ass = ilExAssignment::getAssignmentDataOfExercise($this->object->getId());
608 $cnt = 0;
609 $mcnt = 0;
610 foreach ($ass as $a) {
611 $cnt++;
612 if ($a["mandatory"]) {
613 $mcnt++;
614 }
615 }
616 $info->addProperty($lng->txt("exc_assignments"), $cnt);
617 $info->addProperty($lng->txt("exc_mandatory"), $mcnt);
618 if ($this->object->getPassMode() != "nr") {
619 $info->addProperty(
620 $lng->txt("exc_pass_mode"),
621 $lng->txt("exc_msg_all_mandatory_ass")
622 );
623 } else {
624 $info->addProperty(
625 $lng->txt("exc_pass_mode"),
626 sprintf($lng->txt("exc_msg_min_number_ass"), $this->object->getPassNr())
627 );
628 }
629
630 // feedback from tutor
631 include_once("Services/Tracking/classes/class.ilLPMarks.php");
632 if ($this->checkPermissionBool("read")) {
633 $lpcomment = ilLPMarks::_lookupComment($ilUser->getId(), $this->object->getId());
634 $mark = ilLPMarks::_lookupMark($ilUser->getId(), $this->object->getId());
635 //$status = ilExerciseMembers::_lookupStatus($this->object->getId(), $ilUser->getId());
636 $st = $this->object->determinStatusOfUser($ilUser->getId());
637 $status = $st["overall_status"];
638 if ($lpcomment != "" || $mark != "" || $status != "notgraded") {
639 $info->addSection($this->lng->txt("exc_feedback_from_tutor"));
640 if ($lpcomment != "") {
641 $info->addProperty(
642 $this->lng->txt("exc_comment"),
643 $lpcomment
644 );
645 }
646 if ($mark != "") {
647 $info->addProperty(
648 $this->lng->txt("exc_mark"),
649 $mark
650 );
651 }
652
653 //if ($status == "")
654 //{
655 // $info->addProperty($this->lng->txt("status"),
656 // $this->lng->txt("message_no_delivered_files"));
657 //}
658 //else
659 if ($status != "notgraded") {
660 $img = '<img src="' . ilUtil::getImagePath("scorm/" . $status . ".svg") . '" ' .
661 ' alt="' . $lng->txt("exc_" . $status) . '" title="' . $lng->txt("exc_" . $status) .
662 '" />';
663
664 $add = "";
665 if ($st["failed_a_mandatory"]) {
666 $add = " (" . $lng->txt("exc_msg_failed_mandatory") . ")";
667 } elseif ($status == "failed") {
668 $add = " (" . $lng->txt("exc_msg_missed_minimum_number") . ")";
669 }
670 $info->addProperty(
671 $this->lng->txt("status"),
672 $img . " " . $this->lng->txt("exc_" . $status) . $add
673 );
674 }
675 }
676 }
677
678 // forward the command
679 $this->ctrl->forwardCommand($info);
680 }
static getAssignmentDataOfExercise($a_exc_id)
Get assignments data of an exercise in an array.
Class ilInfoScreenGUI.
static _lookupMark($a_usr_id, $a_obj_id)
static _lookupComment($a_usr_id, $a_obj_id)
static getImagePath($img, $module_path="", $mode="output", $offline=false)
get image path (for images located in a template directory)
$info
Definition: index.php:5

References $ass, $ilUser, $img, $info, ilObjectGUI\$lng, $tabs, ilObjectGUI\$user, ilLPMarks\_lookupComment(), ilLPMarks\_lookupMark(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ilExAssignment\getAssignmentDataOfExercise(), and ilUtil\getImagePath().

Referenced by executeCommand(), and infoScreenObject().

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

569 {
570 $this->ctrl->setCmd("showSummary");
571 $this->ctrl->setCmdClass("ilinfoscreengui");
572 $this->infoScreen();
573 }

References infoScreen().

Referenced by viewObject().

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

◆ initEditCustomForm()

ilObjExerciseGUI::initEditCustomForm ( ilPropertyFormGUI  $a_form)
protected

Init properties form.

Reimplemented from ilObjectGUI.

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

250 {
251 $obj_service = $this->getObjectService();
252
253 $a_form->setTitle($this->lng->txt("exc_edit_exercise"));
254
255 $pres = new ilFormSectionHeaderGUI();
256 $pres->setTitle($this->lng->txt('obj_presentation'));
257 $a_form->addItem($pres);
258
259 // tile image
260 $a_form = $obj_service->commonSettings()->legacyForm($a_form, $this->object)->addTileImage();
261
263 $section->setTitle($this->lng->txt('exc_passing_exc'));
264 $a_form->addItem($section);
265
266 // pass mode
267 $radg = new ilRadioGroupInputGUI($this->lng->txt("exc_pass_mode"), "pass_mode");
268
269 $op1 = new ilRadioOption(
270 $this->lng->txt("exc_pass_all"),
271 "all",
272 $this->lng->txt("exc_pass_all_info")
273 );
274 $radg->addOption($op1);
275 $op2 = new ilRadioOption(
276 $this->lng->txt("exc_pass_minimum_nr"),
277 "nr",
278 $this->lng->txt("exc_pass_minimum_nr_info")
279 );
280 $radg->addOption($op2);
281
282 // minimum number of assignments to pass
283 $ni = new ilNumberInputGUI($this->lng->txt("exc_min_nr"), "pass_nr");
284 $ni->setSize(4);
285 $ni->setMaxLength(4);
286 $ni->setRequired(true);
287 include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
288 $mand = ilExAssignment::countMandatory($this->object->getId());
289 $min = max($mand, 1);
290 $ni->setMinValue($min, true);
291 $ni->setInfo($this->lng->txt("exc_min_nr_info"));
292 $op2->addSubItem($ni);
293
294 $a_form->addItem($radg);
295
296 // completion by submission
297 $subcompl = new ilRadioGroupInputGUI($this->lng->txt("exc_passed_status_determination"), "completion_by_submission");
298 $op1 = new ilRadioOption($this->lng->txt("exc_completion_by_tutor"), 0, "");
299 $subcompl->addOption($op1);
300 $op2 = new ilRadioOption($this->lng->txt("exc_completion_by_submission"), 1, $this->lng->txt("exc_completion_by_submission_info"));
301 $subcompl->addOption($op2);
302 $a_form->addItem($subcompl);
303
304 /*$subcompl = new ilCheckboxInputGUI($this->lng->txt('exc_completion_by_submission'), 'completion_by_submission');
305 $subcompl->setInfo($this->lng->txt('exc_completion_by_submission_info'));
306 $subcompl->setValue(1);
307 $a_form->addItem($subcompl);*/
308
310 $section->setTitle($this->lng->txt('exc_publishing'));
311 $a_form->addItem($section);
312
313 // show submissions
314 $cb = new ilCheckboxInputGUI($this->lng->txt("exc_show_submissions"), "show_submissions");
315 $cb->setInfo($this->lng->txt("exc_show_submissions_info"));
316 $a_form->addItem($cb);
317
319 $section->setTitle($this->lng->txt('exc_notification'));
320 $a_form->addItem($section);
321
322 // submission notifications
323 $cbox = new ilCheckboxInputGUI($this->lng->txt("exc_submission_notification"), "notification");
324 $cbox->setInfo($this->lng->txt("exc_submission_notification_info"));
325 $a_form->addItem($cbox);
326
327
328 // feedback settings
329
331 $section->setTitle($this->lng->txt('exc_feedback'));
332 $a_form->addItem($section);
333
334 $fdb = new ilCheckboxGroupInputGUI($this->lng->txt("exc_settings_feedback"), "tfeedback");
335 $a_form->addItem($fdb);
336
337 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_mail"), ilObjExercise::TUTOR_FEEDBACK_MAIL);
338 $option->setInfo($this->lng->txt("exc_settings_feedback_mail_info"));
339 $fdb->addOption($option);
340 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_file"), ilObjExercise::TUTOR_FEEDBACK_FILE);
341 $option->setInfo($this->lng->txt("exc_settings_feedback_file_info"));
342 $fdb->addOption($option);
343 $option = new ilCheckboxOption($this->lng->txt("exc_settings_feedback_text"), ilObjExercise::TUTOR_FEEDBACK_TEXT);
344 $option->setInfo($this->lng->txt("exc_settings_feedback_text_info"));
345 $fdb->addOption($option);
346
347 $position_settings = ilOrgUnitGlobalSettings::getInstance()
348 ->getObjectPositionSettingsByType($this->object->getType());
349
350 if ($position_settings->isActive()) {
351 // add additional feature section
352 $feat = new ilFormSectionHeaderGUI();
353 $feat->setTitle($this->lng->txt('obj_features'));
354 $a_form->addItem($feat);
355
356 // add orgunit settings
358 $this->object->getId(),
359 $a_form,
360 array(
362 )
363 );
364 }
365 }
$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 countMandatory($a_ex_id)
Order assignments by deadline date.
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, ilPropertyFormGUI\addItem(), ilExAssignment\countMandatory(), ilOrgUnitGlobalSettings\getInstance(), ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\initServiceSettingsForm(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, 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 236 of file class.ilObjExerciseGUI.php.

237 {
239
240 $this->checkPermissionBool("write");
241
242 // #16587
243 $ilCtrl->redirectByClass("ilExAssignmentEditorGUI", "listAssignments");
244 }

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

+ Here is the call graph for this function:

◆ outCertificateObject()

ilObjExerciseGUI::outCertificateObject ( )

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

902 {
903 global $DIC;
904
905 $database = $DIC->database();
906 $logger = $DIC->logger()->root();
907
909
910 $objectId = (int) $this->object->getId();
911
912 if (false === $this->certificateDownloadValidator->isCertificateDownloadable($ilUser->getId(), $objectId)) {
913 ilUtil::sendFailure($this->lng->txt("permission_denied"), true);
914 $this->ctrl->redirect($this);
915 }
916
917 $ilUserCertificateRepository = new ilUserCertificateRepository($database, $logger);
918 $pdfGenerator = new ilPdfGenerator($ilUserCertificateRepository, $logger);
919
920 $pdfAction = new ilCertificatePdfAction(
921 $logger,
922 $pdfGenerator,
924 $this->lng->txt('error_creating_certificate_pdf')
925 );
926
927 $pdfAction->downloadPdf((int) $ilUser->getId(), (int) $objectId);
928 }
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 689 of file class.ilObjExerciseGUI.php.

690 {
691 $this->tabs_gui->addSubTab(
692 "edit",
693 $this->lng->txt("general_settings"),
694 $this->ctrl->getLinkTarget($this, "edit")
695 );
696
697 $this->tabs_gui->addSubTab(
698 "crit",
699 $this->lng->txt("exc_criteria_catalogues"),
700 $this->ctrl->getLinkTargetByClass("ilexccriteriacataloguegui", "")
701 );
702
703 include_once "Services/Certificate/classes/class.ilCertificate.php";
705 $this->tabs_gui->addSubTab(
706 "certificate",
707 $this->lng->txt("certificate"),
708 $this->ctrl->getLinkTarget($this, "certificate")
709 );
710 }
711 }

References ilCertificate\isActive().

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

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

◆ showOverviewObject()

ilObjExerciseGUI::showOverviewObject ( )

Show overview of assignments.

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

825 {
827 $ilTabs = $this->tabs;
829 $ilToolbar = $this->toolbar;
830
831 $this->checkPermission("read");
832
833 $tpl->addJavaScript("./Modules/Exercise/js/ilExcPresentation.js");
834
835 include_once("./Services/Tracking/classes/class.ilLearningProgress.php");
837 $ilUser->getId(),
838 $this->object->getId(),
839 $this->object->getRefId(),
840 'exc'
841 );
842
843 $ilTabs->activateTab("content");
844 $this->addContentSubTabs("content");
845
846 if ($this->certificateDownloadValidator->isCertificateDownloadable((int) $ilUser->getId(), (int) $this->object->getId())) {
847 $ilToolbar->addButton(
848 $this->lng->txt("certificate"),
849 $this->ctrl->getLinkTarget($this, "outCertificate")
850 );
851 }
852
853 include_once("./Modules/Exercise/classes/class.ilExAssignmentGUI.php");
854 $ass_gui = new ilExAssignmentGUI($this->object);
855
856 include_once("./Modules/Exercise/classes/class.ilExAssignment.php");
857 include_once("./Services/Accordion/classes/class.ilAccordionGUI.php");
858 $acc = new ilAccordionGUI();
859 $acc->setId("exc_ow_" . $this->object->getId());
860
861 $ass_data = ilExAssignment::getInstancesByExercise($this->object->getId());
862 foreach ($ass_data as $ass) {
863 // incoming assignment deeplink
864 $force_open = false;
865 if (isset($_GET["ass_id_goto"]) &&
866 (int) $_GET["ass_id_goto"] == $ass->getId()) {
867 $force_open = true;
868 }
869
870 $acc->addItem(
871 $ass_gui->getOverviewHeader($ass),
872 $ass_gui->getOverviewBody($ass),
873 $force_open
874 );
875 }
876
877 if (count($ass_data) < 2) {
878 $acc->setBehaviour("FirstOpen");
879 } else {
880 $acc->setUseSessionStorage(true);
881 }
882
883 $mtpl = new ilTemplate("tpl.exc_ass_overview.html", true, true, "Modules/Exercise");
884 $mtpl->setVariable("CONTENT", $acc->getHTML());
885
886 $tpl->setContent($mtpl->get());
887 }
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='')
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(), and ilExAssignment\getInstancesByExercise().

+ Here is the call graph for this function:

◆ startAssignmentObject()

ilObjExerciseGUI::startAssignmentObject ( )

Start assignment with relative deadline.

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

934 {
935 global $DIC;
936
937 $ilCtrl = $DIC->ctrl();
938 $ilUser = $DIC->user();
939
940 if ($this->ass) {
941 include_once("./Modules/Exercise/classes/class.ilExcAssMemberState.php");
942 $state = ilExcAssMemberState::getInstanceByIds($this->ass->getId(), $ilUser->getId());
943 if (!$state->getCommonDeadline() && $state->getRelativeDeadline()) {
944 $idl = $state->getIndividualDeadlineObject();
945 $idl->setStartingTimestamp(time());
946 $idl->save();
947 }
948 }
949
950 $ilCtrl->redirect($this, "showOverview");
951 }
if(!array_key_exists('stateid', $_REQUEST)) $state
Handle linkback() response from LinkedIn.
Definition: linkback.php:10
static getInstanceByIds($a_ass_id, $a_user_id=0)
Get instance by IDs (recommended for consumer code)

References $DIC, $ilCtrl, $ilUser, $state, 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 407 of file class.ilObjExerciseGUI.php.

408 {
409 $obj_service = $this->getObjectService();
410
412 $this->object->setShowSubmissions($a_form->getInput("show_submissions"));
413 $this->object->setPassMode($a_form->getInput("pass_mode"));
414 if ($this->object->getPassMode() == "nr") {
415 $this->object->setPassNr($a_form->getInput("pass_nr"));
416 }
417
418 $this->object->setCompletionBySubmission($a_form->getInput('completion_by_submission') == 1 ? true : false);
419
420 $feedback = $a_form->getInput("tfeedback");
421 $this->object->setTutorFeedback(is_array($feedback)
422 ? array_sum($feedback)
423 : null);
424
425 include_once "./Services/Notification/classes/class.ilNotification.php";
428 $ilUser->getId(),
429 $this->object->getId(),
430 (bool) $a_form->getInput("notification")
431 );
432
433 // tile image
434 $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
435
437 $this->object->getId(),
438 $a_form,
439 array(
441 )
442 );
443 }
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, ilPropertyFormGUI\getInput(), ilObjectGUI\getObjectService(), ilObjectServiceSettingsGUI\ORGU_POSITION_ACCESS, ilNotification\setNotification(), ilNotification\TYPE_EXERCISE_SUBMISSION, and ilObjectServiceSettingsGUI\updateServiceSettingsForm().

+ Here is the call graph for this function:

◆ viewObject()

ilObjExerciseGUI::viewObject ( )

list childs of current object

@access public

Reimplemented from ilObjectGUI.

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

220 {
221 $this->infoScreenObject();
222 }
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 43 of file class.ilObjExerciseGUI.php.

Referenced by infoScreen(), and showOverviewObject().

◆ $certificateDownloadValidator

ilObjExerciseGUI::$certificateDownloadValidator
private

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

◆ $help

ilObjExerciseGUI::$help
protected

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

Referenced by getTabs().

◆ $tabs

ilObjExerciseGUI::$tabs
protected

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