ILIAS  release_8 Revision v8.23
ilObjExerciseGUI Class Reference
+ Inheritance diagram for ilObjExerciseGUI:
+ Collaboration diagram for ilObjExerciseGUI:

Public Member Functions

 __construct ($a_data, int $a_id, bool $a_call_by_reference)
 
 viewObject ()
 
 addContentSubTabs (string $a_activate)
 
 infoScreenObject ()
 
 editObject ()
 
 certificateObject ()
 
 outCertificateObject ()
 
 startAssignmentObject ()
 Start assignment with relative deadline. More...
 
- Public Member Functions inherited from ilObjectGUI
 __construct ($data, int $id=0, bool $call_by_reference=true, bool $prepare_output=true)
 
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 if true, a creation screen is displayed the current [ref_id] don't belong to the current class! The mode is determined in ilRepositoryGUI More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelDeleteObject ()
 cancel deletion of object More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 redirectAfterCreation ()
 Redirect after creation, see https://docu.ilias.de/goto_docu_wiki_wpage_5035_1357.html Should be overwritten and redirect to settings screen. More...
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

static _goto (string $a_target, string $a_raw)
 
- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot (bool $raise_error=false)
 Goto repository root. More...
 
static _gotoRepositoryNode (int $ref_id, string $cmd="")
 
static _gotoSharedWorkspaceNode (int $wsp_id)
 

Protected Member Functions

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

Protected Attributes

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

Private Attributes

ilCertificateDownloadValidator $certificateDownloadValidator
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ALLOWED_TAGS_IN_TITLE_AND_DESCRIPTION
 
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 

Detailed Description

Constructor & Destructor Documentation

◆ __construct()

ilObjExerciseGUI::__construct (   $a_data,
int  $a_id,
bool  $a_call_by_reference 
)
Exceptions
ilExerciseException

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

References $ass, ilObjectGUI\$ctrl, $DIC, $GLOBALS, ilObjectGUI\$lng, $lp_user_id, ilObjectGUI\$object, $tabs, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\access(), addContentSubTabs(), ilObjectGUI\addHeaderAction(), ilObjectGUI\checkPermission(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ilObjectGUI\executeCommand(), ilObjectGUI\getCreationMode(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), getService(), ILIAS\Repository\help(), ILIAS\Repository\lng(), ilLanguage\loadLanguageModule(), ILIAS\Repository\locator(), ilExAssignment\lookupExerciseId(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), setSettingsSubTabs(), ILIAS\Repository\tabs(), ILIAS\Repository\toolbar(), and ILIAS\Repository\user().

53  {
54  global $DIC;
55 
56  $this->lng = $DIC->language();
57  $this->user = $DIC->user();
58  $this->ctrl = $DIC->ctrl();
59  $this->tabs = $DIC->tabs();
60  $this->help = $DIC["ilHelp"];
61  $this->locator = $DIC["ilLocator"];
62  $this->tpl = $DIC["tpl"];
63  $this->toolbar = $DIC->toolbar();
64  $lng = $DIC->language();
65 
66  $this->lng->loadLanguageModule('cert');
67 
68  $this->type = "exc";
69  parent::__construct($a_data, $a_id, $a_call_by_reference, false);
70 
71  $lng->loadLanguageModule("exercise");
72  $lng->loadLanguageModule("exc");
73  $this->ctrl->saveParameter($this, "ass_id");
74 
75  $this->service = $DIC->exercise()->internal();
76  $this->exercise_request = $DIC->exercise()->internal()->gui()->request();
77  $this->exercise_ui = $DIC->exercise()->internal()->gui();
78  $this->requested_ass_id = $this->exercise_request->getAssId();
79 
80  if ($this->requested_ass_id > 0 && is_object($this->object) && ilExAssignment::lookupExerciseId(
81  $this->requested_ass_id
82  ) === $this->object->getId()) {
83  $this->ass = $this->exercise_request->getAssignment();
84  } elseif ($this->requested_ass_id > 0) {
85  throw new ilExerciseException("Assignment ID does not match Exercise.");
86  }
87 
88  $this->lp_user_id = ($this->exercise_request->getUserId() > 0)
89  ?: $this->user->getId();
90  $this->requested_sort_order = $this->exercise_request->getSortOrder();
91  $this->requested_sort_by = $this->exercise_request->getSortBy();
92  $this->requested_offset = $this->exercise_request->getOffset();
93  $this->requested_ref_id = $this->exercise_request->getRefId();
94  $this->requested_ass_id_goto = $this->exercise_request->getAssIdGoto();
95 
96  $this->certificateDownloadValidator = new ilCertificateDownloadValidator();
97  }
loadLanguageModule(string $a_module)
Load language module.
global $DIC
Definition: feed.php:28
ilLanguage $lng
Validates if an active certificate is stored in the database and can be downloaded by the user...
__construct(Container $dic, ilPlugin $plugin)
static lookupExerciseId(int $a_ass_id)
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
+ Here is the call graph for this function:

Member Function Documentation

◆ _goto()

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

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

References $DIC, ilObjectGUI\$lng, $parts, ilObjectGUI\$request, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ROOT_FOLDER_ID, and ilLanguage\txt().

833  : void {
834  global $DIC;
835 
836  $main_tpl = $DIC->ui()->mainTemplate();
837 
838  $request = $DIC->exercise()->internal()->gui()->request();
839  $ass_id = $request->getAssId();
840 
841  $lng = $DIC->language();
842  $ilAccess = $DIC->access();
843  $ilCtrl = $DIC->ctrl();
844 
845  //we don't have baseClass here...
846  $ilCtrl->setTargetScript("ilias.php");
847 
848  //ilExerciseMailNotification has links to:
849  // "Assignments", "Submission and Grades" and Downnoad the NEW files if the assignment type is "File Upload".
850  $parts = explode("_", $a_raw);
851  $action = null;
852  $member = null;
853  if (!$ass_id) {
854  $ass_id = null;
855 
856  switch (end($parts)) {
857  case "download":
858  case "setdownload":
859  $action = $parts[3];
860  $member = $parts[2];
861  $ass_id = $parts[1];
862  break;
863 
864  case "grades":
865  $action = $parts[2];
866  $ass_id = $parts[1];
867  break;
868  }
869  }
870 
871  $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ref_id", $a_target);
872 
873  if ($ilAccess->checkAccess("read", "", $a_target)) {
874  $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "target", $a_raw);
875 
876  if ($ass_id) {
877  $ilCtrl->setParameterByClass("ilExerciseManagementGUI", "ass_id", $ass_id);
878  }
879 
880  switch ($action) {
881  case "grades":
882  $ilCtrl->redirectByClass(
883  array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"),
884  "members"
885  );
886  break;
887 
888  /*case "download":
889  $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
890  $ilCtrl->redirectByClass(array("ilRepositoryGUI", "ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI", "ilExSubmissionFileGUI"),"downloadNewReturned");
891  break;*/
892 
893  case "setdownload":
894  $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "member_id", $member);
895  $ilCtrl->redirectByClass(
896  array("ilExerciseHandlerGUI", "ilObjExerciseGUI", "ilExerciseManagementGUI"),
897  "waitingDownload"
898  );
899  break;
900 
901  default:
902  if (($parts[1] ?? "") != "") {
903  $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id", $parts[1]);
904  $ilCtrl->setParameterByClass("ilExerciseHandlerGUI", "ass_id_goto", $parts[1]);
905  }
906  $ilCtrl->redirectByClass(
907  array("ilExerciseHandlerGUI", "ilObjExerciseGUI"),
908  "showOverview"
909  );
910  break;
911 
912  }
913  } elseif ($ilAccess->checkAccess("visible", "", $a_target)) {
914  $ilCtrl->redirectByClass(
915  array("ilExerciseHandlerGUI", "ilObjExerciseGUI"),
916  "infoScreen"
917  );
918  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
919  $main_tpl->setOnScreenMessage('failure', sprintf(
920  $lng->txt("msg_no_perm_read_item"),
922  ), true);
924  }
925  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
const ROOT_FOLDER_ID
Definition: constants.php:32
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
static _lookupObjId(int $ref_id)
global $DIC
Definition: feed.php:28
ilLanguage $lng
static _lookupTitle(int $obj_id)
ServerRequestInterface $request
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
+ Here is the call graph for this function:

◆ addContentSubTabs()

ilObjExerciseGUI::addContentSubTabs ( string  $a_activate)

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

References ilObjectGUI\$ctrl, $help, ilObjectGUI\$lng, $tabs, ILIAS\Repository\access(), ilLearningProgressAccess\checkAccess(), ilObjectGUI\checkPermissionBool(), ilCtrl\clearParametersByClass(), ILIAS\Repository\ctrl(), ilCtrl\getLinkTarget(), ilObjectGUI\getTabs(), ILIAS\Repository\object(), and ilLanguage\txt().

Referenced by __construct(), and addLocatorItems().

542  : void
543  {
544  $ilTabs = $this->tabs;
545  $lng = $this->lng;
546  $ilCtrl = $this->ctrl;
547 
548  $ilTabs->addSubTab(
549  "content",
550  $lng->txt("view"),
551  $ilCtrl->getLinkTarget($this, "showOverview")
552  );
553  if ($this->checkPermissionBool("write")) {
554  $ilTabs->addSubTab(
555  "list_assignments",
556  $lng->txt("edit"),
557  $ilCtrl->getLinkTargetByClass("ilExAssignmentEditorGUI", "listAssignments")
558  );
559  }
560  $ilTabs->activateSubTab($a_activate);
561  }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...
ilLanguage $lng
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ addLocatorItems()

ilObjExerciseGUI::addLocatorItems ( )
protected

Add locator item.

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

References $ilUser, ilObjectGUI\$locator, ilObjectGUI\$object, $requested_ref_id, $tabs, ilObjectGUI\$toolbar, ilObjectGUI\$tpl, ilObjectGUI\$user, ilLearningProgress\_tracProgress(), addContentSubTabs(), ilLocatorGUI\addItem(), ilGlobalTemplateInterface\addJavaScript(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilExAssignment\getInstancesByExercise(), getService(), ILIAS\Repository\lng(), ILIAS\Repository\object(), ilGlobalTemplateInterface\setContent(), and ILIAS\Repository\user().

930  : void
931  {
932  $ilLocator = $this->locator;
933 
934  if (is_object($this->object)) {
935  // #17955
936  $ilLocator->addItem(
937  $this->object->getTitle(),
938  $this->ctrl->getLinkTarget($this, "showOverview"),
939  "",
941  );
942  }
943  }
addItem(string $a_title, string $a_link, string $a_frame="", int $a_ref_id=0, ?string $type=null)
ilLocatorGUI $locator
+ Here is the call graph for this function:

◆ afterSave()

ilObjExerciseGUI::afterSave ( ilObject  $a_new_object)
protected

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

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

263  : void
264  {
265  $ilCtrl = $this->ctrl;
266 
267  $a_new_object->saveData();
268 
269  $this->tpl->setOnScreenMessage('success', $this->lng->txt("exc_added"), true);
270 
271  $ilCtrl->setParameterByClass("ilExAssignmentEditorGUI", "ref_id", $a_new_object->getRefId());
272  $ilCtrl->redirectByClass("ilExAssignmentEditorGUI", "addAssignment");
273  }
+ Here is the call graph for this function:

◆ certificateObject()

ilObjExerciseGUI::certificateObject ( )
Exceptions
ilException

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

References ilObjectGUI\checkPermission(), and setSettingsSubTabs().

1035  : void
1036  {
1037  $this->checkPermission("write");
1038  $this->setSettingsSubTabs();
1039  $this->tabs_gui->activateTab("settings");
1040  $this->tabs_gui->activateSubTab("certificate");
1041 
1042  $guiFactory = new ilCertificateGUIFactory();
1043  $output_gui = $guiFactory->create($this->object);
1044 
1045  $output_gui->certificateEditor();
1046  }
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ editObject()

ilObjExerciseGUI::editObject ( )

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

References setSettingsSubTabs().

799  : void
800  {
801  $this->setSettingsSubTabs();
802  $this->tabs_gui->activateSubTab("edit");
803  parent::editObject();
804  }
+ Here is the call graph for this function:

◆ getEditFormCustomValues()

ilObjExerciseGUI::getEditFormCustomValues ( array &  $a_values)
protected

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

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

453  : void
454  {
456 
457  $a_values["desc"] = $this->object->getLongDescription();
458  $a_values["show_submissions"] = $this->object->getShowSubmissions();
459  $a_values["pass_mode"] = $this->object->getPassMode();
460  if ($a_values["pass_mode"] == "nr") {
461  $a_values["pass_nr"] = $this->object->getPassNr();
462  }
463 
464  $a_values["nr_random_mand"] = $this->object->getNrMandatoryRandom();
465 
466  $a_values["notification"] = ilNotification::hasNotification(
468  $ilUser->getId(),
469  $this->object->getId()
470  );
471 
472  $a_values['completion_by_submission'] = (int) $this->object->isCompletionBySubmissionEnabled();
473 
474  $tfeedback = array();
475  if ($this->object->hasTutorFeedbackMail()) {
476  $tfeedback[] = ilObjExercise::TUTOR_FEEDBACK_MAIL;
477  }
478  if ($this->object->hasTutorFeedbackText()) {
479  $tfeedback[] = ilObjExercise::TUTOR_FEEDBACK_TEXT;
480  }
481  if ($this->object->hasTutorFeedbackFile()) {
482  $tfeedback[] = ilObjExercise::TUTOR_FEEDBACK_FILE;
483  }
484  $a_values['tfeedback'] = $tfeedback;
485 
486  // orgunit position setting enabled
487  $a_values['obj_orgunit_positions'] = ilOrgUnitGlobalSettings::getInstance()
488  ->isPositionAccessActiveForObject(
489  $this->object->getId()
490  );
491 
492  $a_values['cont_custom_md'] = ilContainer::_lookupContainerSetting(
493  $this->object->getId(),
495  false
496  );
497  }
static _lookupContainerSetting(int $a_id, string $a_keyword, string $a_default_value=null)
$ilUser
Definition: imgupload.php:34
static hasNotification(int $type, int $user_id, int $id)
Check notification status for object and user.
getLongDescription()
get object long description (stored in object_description)
+ Here is the call graph for this function:

◆ getService()

◆ infoScreenObject()

ilObjExerciseGUI::infoScreenObject ( )
Exceptions
ilObjectException

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

References ILIAS\Repository\ctrl().

Referenced by viewObject().

658  : void
659  {
660  $this->ctrl->setCmd("showSummary");
661  $this->ctrl->setCmdClass("ilinfoscreengui");
662  $this->infoScreen();
663  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ listAssignmentsObject()

◆ outCertificateObject()

ilObjExerciseGUI::outCertificateObject ( )

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

References $DIC, $ilUser, ilObjectGUI\$user, ILIAS\Repository\ctrl(), ilCertificatePdfAction\downloadPdf(), ilObject\getId(), and ILIAS\Repository\lng().

1048  : void
1049  {
1050  global $DIC;
1051 
1052  $database = $DIC->database();
1053  $logger = $DIC->logger()->root();
1054 
1055  $ilUser = $this->user;
1056 
1057  $objectId = $this->object->getId();
1058 
1059  if (!$this->certificateDownloadValidator->isCertificateDownloadable($ilUser->getId(), $objectId)) {
1060  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("permission_denied"), true);
1061  $this->ctrl->redirect($this);
1062  }
1063 
1064  $ilUserCertificateRepository = new ilUserCertificateRepository($database, $logger);
1065  $pdfGenerator = new ilPdfGenerator($ilUserCertificateRepository, $logger);
1066 
1067  $pdfAction = new ilCertificatePdfAction(
1068  $logger,
1069  $pdfGenerator,
1071  $this->lng->txt('error_creating_certificate_pdf')
1072  );
1073 
1074  $pdfAction->downloadPdf($ilUser->getId(), $objectId);
1075  }
Class ilPdfGeneratorConstantsTest.
global $DIC
Definition: feed.php:28
Just a wrapper class to create Unit Test for other classes.
$ilUser
Definition: imgupload.php:34
downloadPdf(int $userId, int $objectId)
+ Here is the call graph for this function:

◆ setSettingsSubTabs()

ilObjExerciseGUI::setSettingsSubTabs ( )
protected

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

References ILIAS\Repository\ctrl(), and ILIAS\Repository\lng().

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

806  : void
807  {
808  $this->tabs_gui->addSubTab(
809  "edit",
810  $this->lng->txt("general_settings"),
811  $this->ctrl->getLinkTarget($this, "edit")
812  );
813 
814  $this->tabs_gui->addSubTab(
815  "crit",
816  $this->lng->txt("exc_criteria_catalogues"),
817  $this->ctrl->getLinkTargetByClass("ilexccriteriacataloguegui", "")
818  );
819 
820  $validator = new ilCertificateActiveValidator();
821  if ($validator->validate()) {
822  $this->tabs_gui->addSubTab(
823  "certificate",
824  $this->lng->txt("certificate"),
825  $this->ctrl->getLinkTarget($this, "certificate")
826  );
827  }
828  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ startAssignmentObject()

ilObjExerciseGUI::startAssignmentObject ( )

Start assignment with relative deadline.

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

References ilObjectGUI\$ctrl, ilObjectGUI\$object, ilObjectGUI\$user, ILIAS\Exercise\InternalService\domain(), ilObject\getId(), ilExcAssMemberState\getInstanceByIds(), getService(), and ilCtrl\redirect().

1080  : void
1081  {
1082  $ctrl = $this->ctrl;
1083  $user = $this->user;
1084 
1085  if ($this->ass !== null) {
1086  $state = ilExcAssMemberState::getInstanceByIds($this->ass->getId(), $user->getId());
1087  if (!$state->getCommonDeadline() && $state->getRelativeDeadline()) {
1088  $idl = $state->getIndividualDeadlineObject();
1089  $idl->setStartingTimestamp(time());
1090  $idl->save();
1091  }
1092  }
1093 
1094  $ctrl->redirect($this, "showOverview");
1095  }
redirect(object $a_gui_obj, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
static getInstanceByIds(int $a_ass_id, int $a_user_id=0)
+ Here is the call graph for this function:

◆ updateCustom()

ilObjExerciseGUI::updateCustom ( ilPropertyFormGUI  $a_form)
protected

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

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

499  : void
500  {
501  $obj_service = $this->getObjectService();
502 
504  $this->object->setShowSubmissions($a_form->getInput("show_submissions"));
505  $this->object->setPassMode($a_form->getInput("pass_mode"));
506  if ($this->object->getPassMode() == "nr") {
507  $this->object->setPassNr($a_form->getInput("pass_nr"));
508  }
509  if ($this->object->getPassMode() == ilObjExercise::PASS_MODE_RANDOM) {
510  $this->object->setNrMandatoryRandom($a_form->getInput("nr_random_mand"));
511  }
512 
513  $this->object->setCompletionBySubmission($a_form->getInput('completion_by_submission') == 1);
514 
515  $feedback = $a_form->getInput("tfeedback");
516  $this->object->setTutorFeedback(
517  is_array($feedback)
518  ? array_sum($feedback)
519  : null
520  );
521 
524  $ilUser->getId(),
525  $this->object->getId(),
526  (bool) $a_form->getInput("notification")
527  );
528 
529  // tile image
530  $obj_service->commonSettings()->legacyForm($a_form, $this->object)->saveTileImage();
531 
533  $this->object->getId(),
534  $a_form,
535  array(
538  )
539  );
540  }
static updateServiceSettingsForm(int $obj_id, ilPropertyFormGUI $form, array $services)
getInput(string $a_post_var, bool $ensureValidation=true)
Returns the input of an item, if item provides getInput method and as fallback the value of the HTTP-...
static setNotification(int $type, int $user_id, int $id, bool $status=true)
Set notification status for object and user.
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ viewObject()

ilObjExerciseGUI::viewObject ( )

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

References infoScreenObject().

258  : void
259  {
260  $this->infoScreenObject();
261  }
+ Here is the call graph for this function:

Field Documentation

◆ $ass

ilExAssignment ilObjExerciseGUI::$ass = null
protected

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

Referenced by __construct().

◆ $certificateDownloadValidator

ilCertificateDownloadValidator ilObjExerciseGUI::$certificateDownloadValidator
private

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

◆ $exercise_request

Exercise GUIRequest ilObjExerciseGUI::$exercise_request
protected

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

◆ $exercise_ui

Exercise InternalGUIService ilObjExerciseGUI::$exercise_ui
protected

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

◆ $help

ilHelpGUI ilObjExerciseGUI::$help
protected

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

Referenced by addContentSubTabs().

◆ $lp_user_id

int ilObjExerciseGUI::$lp_user_id
protected

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

Referenced by __construct().

◆ $requested_ass_id

int ilObjExerciseGUI::$requested_ass_id
protected

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

◆ $requested_ass_id_goto

int ilObjExerciseGUI::$requested_ass_id_goto
protected

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

◆ $requested_offset

int ilObjExerciseGUI::$requested_offset
protected

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

◆ $requested_ref_id

int ilObjExerciseGUI::$requested_ref_id
protected

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

Referenced by addLocatorItems().

◆ $requested_sort_by

string ilObjExerciseGUI::$requested_sort_by
protected

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

◆ $requested_sort_order

string ilObjExerciseGUI::$requested_sort_order
protected

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

◆ $service

InternalService ilObjExerciseGUI::$service
protected

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

Referenced by getService().

◆ $tabs

ilTabsGUI ilObjExerciseGUI::$tabs
protected

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