ILIAS  trunk Revision v11.0_alpha-3011-gc6b235a2e85
ilObjSurveyGUI Class Reference

@ilCtrl_Calls ilObjSurveyGUI: ilSurveyEvaluationGUI, ilSurveyExecutionGUI @ilCtrl_Calls ilObjSurveyGUI: ilObjectMetaDataGUI, ilPermissionGUI @ilCtrl_Calls ilObjSurveyGUI: ilInfoScreenGUI, ilObjectCopyGUI @ilCtrl_Calls ilObjSurveyGUI: ilSurveySkillDeterminationGUI @ilCtrl_Calls ilObjSurveyGUI: ilCommonActionDispatcherGUI, ilSurveySkillGUI @ilCtrl_Calls ilObjSurveyGUI: ilSurveyEditorGUI, ilSurveyConstraintsGUI @ilCtrl_Calls ilObjSurveyGUI: ilSurveyParticipantsGUI, ilLearningProgressGUI @ilCtrl_Calls ilObjSurveyGUI: ilExportGUI, ilLTIProviderObjectSettingGUI @ilCtrl_Calls ilObjSurveyGUI: ILIAS\Survey\Execution\LaunchGUI More...

+ Inheritance diagram for ilObjSurveyGUI:
+ Collaboration diagram for ilObjSurveyGUI:

Public Member Functions

 executeCommand ()
 
 evaluationObject ()
 Redirects the evaluation object call to the ilSurveyEvaluationGUI class Coming from ListGUI... More...
 
 savePropertiesObject ()
 
 initPropertiesForm ()
 
 addSubTabs (string $a_section)
 
 propertiesObject (?ilPropertyFormGUI $a_form=null)
 Display the properties form. More...
 
 doAutoCompleteObject ()
 
 importSurveyObject ()
 
 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...
 
 getUserResultsTable (int $a_active_id)
 
 sendUserResultsMail (int $a_active_id, string $a_recipient)
 
 mailUserResultsObject ()
 
- Public Member Functions inherited from ilObjectGUI
 getRefId ()
 
 setAdminMode (string $mode)
 
 getAdminMode ()
 
 getObject ()
 
 executeCommand ()
 
 withReferences ()
 determines whether objects are referenced or not (got ref ids or not) More...
 
 setCreationMode (bool $mode=true)
 If true, a creation screen is displayed the current [ref_id] does belong to the parent class The mode is determined in ilRepositoryGUI. More...
 
 getCreationMode ()
 
 prepareOutput (bool $show_sub_objects=true)
 
 getAdminTabs ()
 administration tabs show only permissions and trash folder More...
 
 getHTML ()
 
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled More...
 
 cancelObject ()
 cancel action and go back to previous page More...
 
 createObject ()
 create new object form More...
 
 editAvailabilityPeriodObject ()
 
 saveAvailabilityPeriodObject ()
 
 cancelCreation ()
 cancel create action and go back to repository parent More...
 
 saveObject ()
 
 getDidacticTemplateVar (string $type)
 Get didactic template setting from creation screen. More...
 
 putObjectInTree (ilObject $obj, ?int $parent_node_id=null)
 Add object to tree at given position. More...
 
 editObject ()
 
 addExternalEditFormCustom (ilPropertyFormGUI $form)
 
 updateObject ()
 updates object entry in object_data More...
 
 getFormAction (string $cmd, string $default_form_action="")
 Get form action for command (command is method name without "Object", e.g. More...
 
 isVisible (int $ref_id, string $type)
 
 viewObject ()
 viewObject container presentation for "administration -> repository, trash, permissions" More...
 
 deleteObject (bool $error=false)
 Display deletion confirmation screen. More...
 
 setColumnSettings (ilColumnGUI $column_gui)
 
 addToDeskObject ()
 
 removeFromDeskObject ()
 
- Public Member Functions inherited from ILIAS\Object\ImplementsCreationCallback
 callCreationCallback (\ilObject $object, \ilObjectDefinition $obj_definition, int $requested_crtcb)
 

Static Public Member Functions

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

Protected Member Functions

 noPermission ()
 
 addToNavigationHistory ()
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 viewUserResultsObject ()
 
 getUserResultsPlain (int $a_active_id)
 
 checkRbacOrPositionPermission (string $a_rbac_permission, string $a_position_permission)
 
 runObject ()
 
- Protected Member Functions inherited from ilObjectGUI
 getObjectService ()
 
 assignObject ()
 
 setTitleAndDescription ()
 
 createActionDispatcherGUI ()
 
 initHeaderAction (?string $sub_type=null, ?int $sub_id=null)
 Add header action menu. More...
 
 insertHeaderAction (?ilObjectListGUI $list_gui=null)
 Insert header action into main template. More...
 
 addHeaderAction ()
 Add header action menu. More...
 
 redrawHeaderActionObject ()
 Ajax call: redraw action header only. More...
 
 setTabs ()
 set admin tabs More...
 
 setAdminTabs ()
 set admin tabs More...
 
 setLocator ()
 
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 omitLocator (bool $omit=true)
 
 addAdminLocatorItems (bool $do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded) More...
 
 getCreationFormsHTML (StandardForm|ilPropertyFormGUI|array $form)
 
 getTitleForCreationFormPage ()
 
 getCreationFormTitle ()
 
 initCreateForm (string $new_type)
 
 didacticTemplatesToForm ()
 
 initDidacticTemplate (ilPropertyFormGUI $form)
 
 retrieveAdditionalDidacticTemplateOptions ()
 
 addAdoptContentLinkToToolbar ()
 
 addImportButtonToToolbar ()
 
 addAvailabilityPeriodButtonToToolbar (ilToolbarGUI $toolbar)
 
 parseDidacticTemplateVar (string $var, string $type)
 
 afterSave (ilObject $new_object)
 Post (successful) object creation hook. More...
 
 initEditForm ()
 
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form. More...
 
 getEditFormValues ()
 
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields. More...
 
 validateCustom (ilPropertyFormGUI $form)
 Validate custom values (if not possible with checkInput()) More...
 
 updateCustom (ilPropertyFormGUI $form)
 Insert custom update form values into object. More...
 
 afterUpdate ()
 Post (successful) object update hook. More...
 
 routeImportCmdObject ()
 
 importFile (string $file_to_import, string $path_to_uploaded_file_in_temp_dir)
 
 deleteUploadedImportFile (string $path_to_uploaded_file_in_temp_dir)
 
 afterImport (ilObject $new_object)
 Post (successful) object import hook. More...
 
 setFormAction (string $cmd, string $form_action)
 
 getReturnLocation (string $cmd, string $default_location="")
 Get return location for command (command is method name without "Object", e.g. More...
 
 setReturnLocation (string $cmd, string $location)
 set specific return location for command More...
 
 getTargetFrame (string $cmd, string $default_target_frame="")
 get target frame for command (command is method name without "Object", e.g. More...
 
 setTargetFrame (string $cmd, string $target_frame)
 Set specific target frame for command. More...
 
 showPossibleSubObjects ()
 show possible sub objects (pull down menu) More...
 
 getTabs ()
 @abstract overwrite in derived GUI class of your object type More...
 
 redirectToRefId (int $ref_id, string $cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current ["ref_id"] value of the request More...
 
 getCenterColumnHTML ()
 Get center column. More...
 
 getRightColumnHTML ()
 Display right column. More...
 
 checkPermission (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 checkPermissionBool (string $perm, string $cmd="", string $type="", ?int $ref_id=null)
 
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files. More...
 
 getCreatableObjectTypes ()
 
 buildAddNewItemElements (array $subtypes, string $create_target_class=ilRepositoryGUI::class, ?int $redirect_target_ref_id=null,)
 
 buildGroup (string $create_target_class, array $obj_types_in_group, string $title, array $subtypes)
 

Protected Attributes

InternalGUIService $gui
 
ILIAS Survey Execution ExecutionGUIRequest $execution_request
 
ILIAS Survey Editing EditingGUIRequest $edit_request
 
ilNavigationHistory $nav_history
 
ilTabsGUI $tabs
 
ilHelpGUI $help
 
ilLogger $log
 
Participants InvitationsManager $invitation_manager
 
ILIAS Survey InternalService $survey_service
 
ILIAS Survey Mode FeatureConfig $feature_config = null
 
ILIAS Survey Access AccessManager $access_manager = null
 
ILIAS Survey Execution RunManager $run_manager
 
ILIAS Survey Participants StatusManager $status_manager
 
ilObjSurvey $survey = null
 
ilRbacSystem $rbacsystem
 
ilMailMimeSenderFactory $senderFactory
 
- Protected Attributes inherited from ilObjectGUI
ILIAS Notes Service $notes_service
 
GlobalHttpState $http
 
ServerRequestInterface $request
 
ilLocatorGUI $locator
 
ilObjUser $user
 
ilAccessHandler $access
 
ilSetting $settings
 
ilToolbarGUI $toolbar
 
ilRbacAdmin $rbac_admin
 
ilRbacSystem $rbac_system
 
ilRbacReview $rbac_review
 
ilObjectService $object_service
 
ilObjectDefinition $obj_definition
 
ilGlobalTemplateInterface $tpl
 
ilTree $tree
 
ilCtrl $ctrl
 
ilErrorHandling $error
 
ilLanguage $lng
 
ilTabsGUI $tabs_gui
 
ILIAS $ilias
 
ArrayBasedRequestWrapper $post_wrapper
 
RequestWrapper $request_wrapper
 
Refinery $refinery
 
ilFavouritesManager $favourites
 
CustomIconFactory $custom_icon_factory
 
UIFactory $ui_factory
 
UIRenderer $ui_renderer
 
Filesystem $temp_file_system
 
ilObject $object = null
 
bool $creation_mode = false
 
 $data
 
int $id
 
bool $call_by_reference = false
 
bool $prepare_output
 
int $ref_id
 
int $obj_id
 
int $maxcount
 
array $form_action = []
 
array $return_location = []
 
array $target_frame = []
 
string $tmp_import_dir
 
string $sub_objects = ""
 
bool $omit_locator = false
 
string $type = ""
 
string $admin_mode = self::ADMIN_MODE_NONE
 
int $requested_ref_id = 0
 
int $requested_crtptrefid = 0
 
int $requested_crtcb = 0
 
string $requested_new_type = ""
 
string $link_params
 
string $html = ""
 

Additional Inherited Members

- Data Fields inherited from ilObjectGUI
const ADMIN_MODE_NONE = ""
 
const ADMIN_MODE_SETTINGS = "settings"
 
const ADMIN_MODE_REPOSITORY = "repository"
 
const UPLOAD_TYPE_LOCAL = 1
 
const UPLOAD_TYPE_UPLOAD_DIRECTORY = 2
 
const CFORM_NEW = 1
 
const CFORM_IMPORT = 2
 
const CFORM_CLONE = 3
 
const SUPPORTED_IMPORT_MIME_TYPES = [MimeType::APPLICATION__ZIP, MimeType::APPLICATION__X_ZIP_COMPRESSED]
 

Detailed Description

Member Function Documentation

◆ _goto()

static ilObjSurveyGUI::_goto ( string  $a_target)
static

redirect script

Exceptions
ilCtrlException

Definition at line 755 of file class.ilObjSurveyGUI.php.

757 : void {
758 global $DIC;
759 $main_tpl = $DIC->ui()->mainTemplate();
760 $request = $DIC->survey()->internal()->gui()->execution()->request();
761 $a_access_code = $request->getAccessCode();
762
763 $ilAccess = $DIC->access();
764 $lng = $DIC->language();
765 $ctrl = $DIC->ctrl();
766
767 $t_arr = explode("_", $a_target);
768 $ref_id = (int) $t_arr[0];
769 if ($a_access_code === "" && isset($t_arr[1])) {
770 $a_access_code = $t_arr[1];
771 }
772 // see ilObjSurveyAccess::_checkGoto()
773 if ($a_access_code !== '') {
774 $sess = $DIC->survey()->internal()->repo()
775 ->execution()->runSession();
776 $sess->setCode(ilObject::_lookupObjId($ref_id), $a_access_code);
777 $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
778 $ctrl->redirectByClass("ilObjSurveyGUI", "run");
779 }
780
781 // write permission -> info screen
782 if ($ilAccess->checkAccess("write", "", $ref_id)) {
783 $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
784 $ctrl->redirectByClass("ilObjSurveyGUI", "run");
785 }
786
787 // read permission, evaluation access and finished run -> evaluation
788 if ($ilAccess->checkAccess("visible", "", $ref_id) ||
789 $ilAccess->checkAccess("read", "", $ref_id)) {
790 if ($ilAccess->checkAccess("read", "", $ref_id)) {
791 $domain_service = $DIC->survey()->internal()->domain();
792 $am = $domain_service->access($ref_id, $DIC->user()->getId());
794 $run_manager = $domain_service->execution()->run($survey, $DIC->user()->getId());
795 if ($am->canAccessEvaluation()) {
796 $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
797 $ctrl->redirectByClass(["ilObjSurveyGUI", "ilSurveyEvaluationGUI"], "openEvaluation");
798 }
799 $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
800 $ctrl->redirectByClass("ilObjSurveyGUI", "run");
801 } else {
802 $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
803 $ctrl->redirectByClass(["ilObjSurveyGUI", "ilInfoScreenGUI"]);
804 }
805 } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
806 $main_tpl->setOnScreenMessage('failure', sprintf(
807 $lng->txt("msg_no_perm_read_item"),
809 ), true);
811 }
812 }
redirectByClass( $a_class, ?string $a_cmd=null, ?string $a_anchor=null, bool $is_async=false)
@inheritDoc
setParameterByClass(string $a_class, string $a_parameter, $a_value)
@inheritDoc
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...
ILIAS Survey Execution RunManager $run_manager
static _gotoRepositoryRoot(bool $raise_error=false)
Goto repository root.
ServerRequestInterface $request
ilLanguage $lng
static _lookupObjId(int $ref_id)
static _lookupTitle(int $obj_id)
const ROOT_FOLDER_ID
Definition: constants.php:32
global $DIC
Definition: shib_login.php:26

◆ addLocatorItems()

ilObjSurveyGUI::addLocatorItems ( )
protected

should be overwritten to add object specific items (repository items are preloaded)

Reimplemented from ilObjectGUI.

Definition at line 707 of file class.ilObjSurveyGUI.php.

707 : void
708 {
709 $ilLocator = $this->gui->locator();
710 switch ($this->ctrl->getCmd()) {
711 case "next":
712 case "previous":
713 case "start":
714 case "resume":
715 case "infoScreen":
716 case "redirectQuestion":
717 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $this->requested_ref_id);
718 break;
719 case "evaluation":
720 case "checkEvaluationAccess":
721 case "evaluationdetails":
722 case "evaluationuser":
723 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluation"), "", $this->requested_ref_id);
724 break;
725 case "create":
726 case "save":
727 case "cancel":
728 case "importSurvey":
729 case "cloneAll":
730 break;
731 default:
732 $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $this->requested_ref_id);
733
734 // this has to be done here because ilSurveyEditorGUI is called after finalizing the locator
735 if ($this->edit_request->getQuestionId() > 0 &&
736 !$this->edit_request->getNewForSurvey()) {
737 // not on create
738 // see ilObjSurveyQuestionPool::addLocatorItems
739 $q_id = $this->edit_request->getQuestionId();
740 $q_type = SurveyQuestion::_getQuestionType($q_id) . "GUI";
741 $this->ctrl->setParameterByClass($q_type, "q_id", $q_id);
742 $ilLocator->addItem(
744 $this->ctrl->getLinkTargetByClass(array("ilSurveyEditorGUI", $q_type), "editQuestion")
745 );
746 }
747 break;
748 }
749 }
static _getTitle(int $question_id)
Returns the question title of a question with a given id.
static _getQuestionType(int $question_id)
Returns the question type of a question with a given id.

References SurveyQuestion\_getQuestionType(), SurveyQuestion\_getTitle(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ addSubTabs()

ilObjSurveyGUI::addSubTabs ( string  $a_section)

Definition at line 571 of file class.ilObjSurveyGUI.php.

573 : void {
574 if ($a_section === 'settings') {
575 $this->tabs_gui->addSubTabTarget(
576 "settings",
577 $this->ctrl->getLinkTarget($this, 'properties')
578 );
579
580 $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
581 if ($lti_settings->hasSettingsAccess()) {
582 $this->tabs_gui->addSubTabTarget(
583 'lti_provider',
584 $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
585 );
586 }
587 }
588 }
GUI class for LTI provider object settings.

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

Referenced by executeCommand().

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

◆ addToNavigationHistory()

ilObjSurveyGUI::addToNavigationHistory ( )
protected

Definition at line 312 of file class.ilObjSurveyGUI.php.

312 : void
313 {
314 $external_rater = $this->status_manager->isExternalRater();
315 // add entry to navigation history
316 if (!$external_rater && !$this->getCreationMode() &&
317 $this->checkPermissionBool("read")) {
318 $this->ctrl->setParameterByClass("ilobjsurveygui", "ref_id", $this->ref_id);
319 $link = $this->ctrl->getLinkTargetByClass("ilobjsurveygui", "infoScreen");
320 $this->nav_history->addItem($this->ref_id, $link, "svy");
321 }
322 }
checkPermissionBool(string $perm, string $cmd="", string $type="", ?int $ref_id=null)

References ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), and ilObjectGUI\getCreationMode().

Referenced by executeCommand().

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

◆ afterSave()

ilObjSurveyGUI::afterSave ( ilObject  $new_object)
protected

Post (successful) object creation hook.

Reimplemented from ilObjectGUI.

Definition at line 352 of file class.ilObjSurveyGUI.php.

352 : void
353 {
354 $form = $this
355 ->initCreateForm($this->requested_new_type)
356 ->withRequest($this->request);
357 $data = $form->getData();
358 $dtemplate = $data["didactic_templates"];
359
360 // #16446
361 $new_object->loadFromDb();
362
363 // set the mode depending on didactic template
364 if (str_starts_with($dtemplate, "svy360_")) {
365 $new_object->setMode(ilObjSurvey::MODE_360);
366 } elseif (str_starts_with($dtemplate, "svyselfeval_")) {
367 $new_object->setMode(ilObjSurvey::MODE_SELF_EVAL);
368 } elseif (str_starts_with($dtemplate, "individfeedb_")) {
369 $new_object->setMode(ilObjSurvey::MODE_IND_FEEDB);
370 }
371
372 $svy_mode = $new_object->getMode();
373 if ($svy_mode === ilObjSurvey::MODE_360) {
374 // this should rather be ilObjSurvey::ANONYMIZE_ON - see ilObjSurvey::getUserDataFromActiveId()
375 $new_object->setAnonymize(ilObjSurvey::ANONYMIZE_CODE_ALL);
376 $new_object->setEvaluationAccess(ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS);
377 } elseif ($svy_mode === ilObjSurvey::MODE_SELF_EVAL) {
378 $new_object->setEvaluationAccess(ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS);
379 }
380 $new_object->saveToDB();
381
382 // always send a message
383 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
384 ilUtil::redirect("ilias.php?baseClass=ilObjSurveyGUI&ref_id=" .
385 $new_object->getRefId() . "&cmd=properties");
386 }
const EVALUATION_ACCESS_PARTICIPANTS
const ANONYMIZE_CODE_ALL
static redirect(string $a_script)

References ilObjectGUI\$data, ilObjSurvey\ANONYMIZE_CODE_ALL, ilObjSurvey\EVALUATION_ACCESS_PARTICIPANTS, ilObject\getRefId(), ILIAS\Repository\lng(), ilObjSurvey\MODE_360, ilObjSurvey\MODE_IND_FEEDB, ilObjSurvey\MODE_SELF_EVAL, and ilUtil\redirect().

+ Here is the call graph for this function:

◆ checkRbacOrPositionPermission()

ilObjSurveyGUI::checkRbacOrPositionPermission ( string  $a_rbac_permission,
string  $a_position_permission 
)
protected
Todo:
move to access manager

Definition at line 1052 of file class.ilObjSurveyGUI.php.

1055 : bool {
1056 $access = $GLOBALS['DIC']->access();
1058 $a_rbac_permission,
1059 $a_position_permission,
1060 $this->object->getRefId()
1061 );
1062 }
ilAccessHandler $access
checkRbacOrPositionPermissionAccess(string $rbac_perm, string $pos_perm, int $ref_id)
$GLOBALS["DIC"]
Definition: wac.php:54

Referenced by executeCommand().

+ Here is the caller graph for this function:

◆ doAutoCompleteObject()

ilObjSurveyGUI::doAutoCompleteObject ( )

Definition at line 617 of file class.ilObjSurveyGUI.php.

617 : void
618 {
619 $fields = array('login','firstname','lastname','email');
620
621 $auto = new ilUserAutoComplete();
622 $auto->setSearchFields($fields);
623 $auto->setResultField('login');
624 $auto->enableFieldSearchableCheck(true);
625 $auto->setMoreLinkAvailable(true);
626
627 if ($this->edit_request->getFetchAll()) {
628 $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
629 }
630
631 echo $auto->getList(ilUtil::stripSlashes($this->edit_request->getTerm()));
632 exit();
633 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
exit

References exit, ilUserAutoComplete\MAX_ENTRIES, and ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ evaluationObject()

ilObjSurveyGUI::evaluationObject ( )

Redirects the evaluation object call to the ilSurveyEvaluationGUI class Coming from ListGUI...

Definition at line 328 of file class.ilObjSurveyGUI.php.

328 : void
329 {
330 $eval_gui = new ilSurveyEvaluationGUI($this->survey);
331 $this->ctrl->redirect($eval_gui, "openEvaluation");
332 }
Survey evaluation graphical output.

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ executeCommand()

ilObjSurveyGUI::executeCommand ( )

Reimplemented from ilObjectGUI.

Definition at line 125 of file class.ilObjSurveyGUI.php.

125 : void
126 {
127 $ilTabs = $this->tabs;
130 if ($survey) {
131 if (!$access_manager->canAccessInfoScreen()) {
132 $this->noPermission();
133 }
134 $this->addToNavigationHistory();
135 }
136
137 $cmd = $this->ctrl->getCmd("properties");
138
139
140 // deep link from repository - "redirect" to page view
141 if (!$this->ctrl->getCmdClass() && $cmd === "questionsrepo") {
142 $this->ctrl->setParameterByClass("ilsurveyeditorgui", "pgov", "1");
143 $this->ctrl->redirectByClass("ilsurveyeditorgui", "questions");
144 }
145
146 $next_class = $this->ctrl->getNextClass($this);
147 if ($next_class !== "") {
148 $this->ctrl->setReturn($this, "properties");
149 }
150 // deprecated, moved for less file
151 //$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "survey.css", "components/ILIAS/Survey"), "screen");
152 $this->prepareOutput();
153
154 $this->log->debug("next_class= $next_class");
155 switch ($next_class) {
156 case 'illtiproviderobjectsettinggui':
157 $this->addSubTabs('settings');
158 $ilTabs->activateTab("settings");
159 $ilTabs->activateSubTab('lti_provider');
160 $lti_gui = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
161 $lti_gui->setCustomRolesForSelection($GLOBALS['DIC']->rbac()->review()->getLocalRoles($this->object->getRefId()));
162 $lti_gui->offerLTIRolesForSelection(false);
163 $this->ctrl->forwardCommand($lti_gui);
164 break;
165
166
167 case "ilinfoscreengui":
168 if (!in_array(
169 $this->ctrl->getCmdClass(),
170 array(strtolower(PublicProfileGUI::class), 'ilobjportfoliogui')
171 )) {
172 $this->addHeaderAction();
173 $this->infoScreen(); // forwards command
174 } else {
175 // #16891
176 $ilTabs->clearTargets();
177 $info = new ilInfoScreenGUI($this);
178 $this->ctrl->forwardCommand($info);
179 }
180 break;
181
182 case 'ilobjectmetadatagui':
183 $this->checkPermission("write");
184 $ilTabs->activateTab("meta_data");
185 $this->addHeaderAction();
186 $md_gui = new ilObjectMetaDataGUI($this->object);
187 $this->ctrl->forwardCommand($md_gui);
188 break;
189
190 case "ilsurveyevaluationgui":
191
192 if ($this->checkRbacOrPositionPermission('read_results', 'access_results') ||
193 ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $this->user->getId())) {
194 $ilTabs->activateTab("svy_results");
195 $this->addHeaderAction();
196 $eval_gui = new ilSurveyEvaluationGUI($survey);
197 $this->ctrl->forwardCommand($eval_gui);
198 }
199 break;
200
201 case "ilsurveyexecutiongui":
202 $ilTabs->clearTargets();
203 $exec_gui = new ilSurveyExecutionGUI($survey);
204 $this->ctrl->forwardCommand($exec_gui);
205 break;
206
207 case 'ilpermissiongui':
208 $ilTabs->activateTab("perm_settings");
209 $this->addHeaderAction();
210 $perm_gui = new ilPermissionGUI($this);
211 $this->ctrl->forwardCommand($perm_gui);
212 break;
213
214 case 'ilobjectcopygui':
215 $cp = new ilObjectCopyGUI($this);
216 $cp->setType('svy');
217 $this->ctrl->forwardCommand($cp);
218 break;
219
220 case "ilcommonactiondispatchergui":
222 $this->ctrl->forwardCommand($gui);
223 break;
224
225 // 360, skill service
226 case 'ilsurveyskillgui':
227 $ilTabs->activateTab("survey_competences");
229 $this->ctrl->forwardCommand($gui);
230 break;
231
232 case 'ilsurveyskilldeterminationgui':
233 $ilTabs->activateTab("maintenance");
235 $this->ctrl->forwardCommand($gui);
236 break;
237
238 case 'ilsurveyeditorgui':
239 $this->checkPermission("write");
240 $ilTabs->activateTab("survey_questions");
241 $gui = new ilSurveyEditorGUI($this);
242 $this->ctrl->forwardCommand($gui);
243 break;
244
245 case 'ilsurveyconstraintsgui':
246 $this->checkPermission("write");
247 $ilTabs->activateTab("constraints");
248 $gui = new ilSurveyConstraintsGUI($this);
249 $this->ctrl->forwardCommand($gui);
250 break;
251
252 case 'ilsurveyparticipantsgui':
253 if (!$this->feature_config->usesAppraisees()) {
254 $ilTabs->activateTab("maintenance");
255 } else {
256 $ilTabs->activateTab("survey_360_appraisees");
257 }
258 $gui = new ilSurveyParticipantsGUI($this, $this->checkRbacOrPositionPermission('read_results', 'access_results'));
259 $this->ctrl->forwardCommand($gui);
260 break;
261
262 case "illearningprogressgui":
263 $ilTabs->activateTab("learning_progress");
264 $new_gui = new ilLearningProgressGUI(
266 $this->object->getRefId()
267 );
268 $this->ctrl->forwardCommand($new_gui);
269 break;
270
271 case 'ilexportgui':
272 $ilTabs->activateTab("export");
273 $exp_gui = new ilExportGUI($this);
274 $exp_gui->addFormat("xml");
275 $this->ctrl->forwardCommand($exp_gui);
276 break;
277
278 case strtolower(\ILIAS\Survey\Execution\LaunchGUI::class):
279 $ilTabs->activateTab("run");
280 $this->ctrl->forwardCommand(
281 $this->gui->execution()->launchGUI(
282 $this->survey
283 )
284 );
285 break;
286
287 default:
288 $this->addHeaderAction();
289 $cmd .= "Object";
290
291 $this->log->debug("Default cmd= $cmd");
292
293 $this->$cmd();
294 break;
295 }
296
297 if (strtolower($this->edit_request->getBaseClass()) !== "iladministrationgui" &&
298 $this->getCreationMode() !== true) {
299 $this->tpl->printToStdout();
300
301 //cherry pick conflict with d97cf1c77b
302 //$this->tpl->show();
303 //$this->log->debug("after tpl show");
304 }
305 }
static getInstanceFromAjaxCall()
(Re-)Build instance from ajax call
Export User Interface Class.
Class ilInfoScreenGUI.
Class ilObjUserTrackingGUI.
static _hasEvaluationAccess(int $a_obj_id, int $user_id)
ILIAS Survey Access AccessManager $access_manager
infoScreen()
show information screen
InternalGUIService $gui
addSubTabs(string $a_section)
checkRbacOrPositionPermission(string $a_rbac_permission, string $a_position_permission)
GUI class for the workflow of copying objects.
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
addHeaderAction()
Add header action menu.
prepareOutput(bool $show_sub_objects=true)
Class ilObjectMetaDataGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
Class ilSurveyEditorGUI.
Survey execution graphical output.
Class ilSurveyParticipantsGUI.
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
$info
Definition: entry_point.php:21
Interface Observer \BackgroundTasks Contains several chained tasks and infos about them.

References $access_manager, $GLOBALS, $gui, $info, $survey, $tabs, ilObjSurveyAccess\_hasEvaluationAccess(), ilObjectGUI\addHeaderAction(), addSubTabs(), addToNavigationHistory(), ilObjectGUI\checkPermission(), checkRbacOrPositionPermission(), ILIAS\Repository\ctrl(), ilCommonActionDispatcherGUI\getInstanceFromAjaxCall(), infoScreen(), ilLearningProgressBaseGUI\LP_CONTEXT_REPOSITORY, noPermission(), ILIAS\Repository\object(), ilObjectGUI\prepareOutput(), and ILIAS\Repository\rbac().

+ Here is the call graph for this function:

◆ getTabs()

ilObjSurveyGUI::getTabs ( )
protected

@abstract overwrite in derived GUI class of your object type

Reimplemented from ilObjectGUI.

Definition at line 388 of file class.ilObjSurveyGUI.php.

388 : void
389 {
390 $ilUser = $this->user;
391 $ilHelp = $this->help;
393
394 if (is_null($this->object)) {
395 return;
396 }
397
398 // @todo investigate, if this can still be the case
399 if ($this->object instanceof ilObjSurveyQuestionPool) {
400 return;
401 }
402
403 $ilHelp->setScreenIdComponent("svy");
404
405 if ($this->checkPermissionBool("read")) {
406 $this->tabs_gui->addTab(
407 "run",
408 $this->lng->txt("obj_svy"),
409 $this->ctrl->getLinkTarget($this, 'run')
410 );
411 }
412
413 if ($this->checkPermissionBool("write")) {
414 $this->tabs_gui->addTab(
415 "survey_questions",
416 $this->lng->txt("survey_questions"),
417 $this->ctrl->getLinkTargetByClass(array("ilsurveyeditorgui"), "questions")
418 );
419 }
420
421 if ($this->checkPermissionBool("read")) {
422 $this->tabs_gui->addTab(
423 "info_short",
424 $this->lng->txt("info_short"),
425 $this->ctrl->getLinkTarget($this, 'infoScreen')
426 );
427 }
428
429 // properties
430 if ($this->checkPermissionBool("write")) {
431 $this->tabs_gui->addTab(
432 "settings",
433 $this->lng->txt("settings"),
434 $this->ctrl->getLinkTarget($this, 'properties')
435 );
436 } elseif ($this->checkPermissionBool("read")) {
437 if ($this->feature_config->usesAppraisees() &&
438 $this->object->get360SelfRaters() &&
439 $this->object->isAppraisee($ilUser->getId()) &&
440 !$this->object->isAppraiseeClosed($ilUser->getId())) {
441 $this->tabs_gui->addTab(
442 "survey_360_edit_raters",
443 $this->lng->txt("survey_360_edit_raters"),
444 $this->ctrl->getLinkTargetByClass('ilsurveyparticipantsgui', 'editRaters')
445 );
446
447 // :TODO: mail to raters
448 }
449 }
450
451 // questions
452 if ($this->checkPermissionBool("write") &&
453 $this->object->getMode() === ilObjSurvey::MODE_STANDARD) {
454 // constraints (tab called routing)
455 $this->tabs_gui->addTab(
456 "constraints",
457 $this->lng->txt("constraints"),
458 $this->ctrl->getLinkTargetByClass("ilsurveyconstraintsgui", "constraints")
459 );
460 }
461
462 if ($this->checkPermissionBool("write")) {
463 if ($feature_config && $feature_config->supportsCompetences()) {
464 $skmg_set = new ilSkillManagementSettings();
465 if ($this->object->getSkillService() && $skmg_set->isActivated()) {
466 $this->tabs_gui->addTab(
467 "survey_competences",
468 $this->lng->txt("survey_competences"),
469 $this->ctrl->getLinkTargetByClass("ilsurveyskillgui", "listQuestionAssignment")
470 );
471 }
472 }
473
474 if ($feature_config && $feature_config->usesAppraisees()) {
475 $this->tabs_gui->addTab(
476 "survey_360_appraisees",
477 $this->lng->txt("survey_360_appraisees"),
478 $this->ctrl->getLinkTargetByClass('ilsurveyparticipantsgui', 'listAppraisees')
479 );
480 } else {
481 $this->tabs_gui->addTab(
482 "maintenance",
483 $this->lng->txt("svy_participants"),
484 $this->ctrl->getLinkTargetByClass('ilsurveyparticipantsgui', 'maintenance')
485 );
486 }
487 }
488
489 if ($this->access_manager->canAccessEvaluation()) {
490 // evaluation
491 $this->tabs_gui->addTab(
492 "svy_results",
493 $this->lng->txt("svy_results"),
494 $this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "openEvaluation")
495 );
496 }
497
498 // learning progress
499 if (ilLearningProgressAccess::checkAccess($this->object->getRefId())) {
500 $this->tabs_gui->addTarget(
501 "learning_progress",
502 $this->ctrl->getLinkTargetByClass(array("ilobjsurveygui", "illearningprogressgui"), ""),
503 "",
504 array("illplistofobjectsgui", "illplistofsettingsgui", "illearningprogressgui", "illplistofprogressgui")
505 );
506 }
507
508 if ($this->checkPermissionBool("write")) {
509 // meta data
510 $mdgui = new ilObjectMetaDataGUI($this->object);
511 $mdtab = $mdgui->getTab();
512 if ($mdtab) {
513 $this->tabs_gui->addTab(
514 "meta_data",
515 $this->lng->txt("meta_data"),
516 $mdtab
517 );
518 }
519
520 // export
521 $this->tabs_gui->addTab(
522 "export",
523 $this->lng->txt("export"),
524 $this->ctrl->getLinkTargetByClass("ilexportgui", "")
525 );
526 }
527
528 if ($this->checkPermissionBool("edit_permission")) {
529 // permissions
530 $this->tabs_gui->addTab(
531 "perm_settings",
532 $this->lng->txt("perm_settings"),
533 $this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm")
534 );
535 }
536 }
static checkAccess(int $a_ref_id, bool $a_allow_only_read=true)
check access to learning progress
ILIAS Survey Mode FeatureConfig $feature_config
Class ilObjSurveyQuestionPool.

References $feature_config, $help, ilObjectGUI\$user, ilLearningProgressAccess\checkAccess(), ilObjectGUI\checkPermissionBool(), ILIAS\Repository\ctrl(), ILIAS\Repository\lng(), ilObjSurvey\MODE_STANDARD, and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getUserResultsPlain()

ilObjSurveyGUI::getUserResultsPlain ( int  $a_active_id)
protected
Todo:
move to evaluation sub-service

Definition at line 894 of file class.ilObjSurveyGUI.php.

896 : string {
897 $res = array();
898
899 $show_titles = (bool) $this->object->getShowQuestionTitles();
900
901 foreach ($this->object->getSurveyPages() as $page) {
902 if (count($page) > 0) {
903 $res[] = "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
904
905 // question block
906 if (count($page) > 1) {
907 if ($page[0]["questionblock_show_blocktitle"]) {
908 $res[$this->lng->txt("questionblock")] = trim($page[0]["questionblock_title"] ?? "") . "\n";
909 }
910 }
911
912 // questions
913
914 $page_res = array();
915
916 foreach ($page as $question) {
917 $question_gui = $this->object->getQuestionGUI($question["type_tag"], $question["question_id"]);
918 $question_parts = array();
919
920 // heading
921 if (strlen($question["heading"] ?? "")) {
922 $question_parts[$this->lng->txt("heading")] = trim($question["heading"] ?? "");
923 }
924
925 if ($show_titles) {
926 $question_parts[$this->lng->txt("title")] = trim($question["title"] ?? "");
927 }
928
929 if ($question["questionblock_show_questiontext"]) {
930 $question_parts[$this->lng->txt("question")] = trim(strip_tags($question_gui->object->getQuestionText()));
931 }
932
933 $answers = $question_gui->getParsedAnswers(
934 $this->object->loadWorkingData($question["question_id"], $a_active_id),
935 true
936 );
937
938 if (count($answers)) {
939 $multiline = false;
940 if (count($answers) > 1 ||
941 get_class($question_gui) === "SurveyTextQuestionGUI") {
942 $multiline = true;
943 }
944
945 $parts = array();
946 foreach ($answers as $answer) {
947 $text = null;
948 if ($answer["textanswer"] ?? false) {
949 $text = ' ("' . $answer["textanswer"] . '")';
950 }
951 if (!isset($answer["cols"])) {
952 if (isset($answer["title"])) {
953 $parts[] = $answer["title"] . $text;
954 } elseif (isset($answer["value"])) {
955 $parts[] = $answer["value"];
956 } elseif ($text) {
957 $parts[] = substr($text, 2, -1);
958 }
959 }
960 // matrix
961 else {
962 $tmp = array();
963 foreach ($answer["cols"] as $col) {
964 $tmp[] = $col["title"];
965 }
966 $parts[] = $answer["title"] . ": " . implode(", ", $tmp) . $text;
967 }
968 }
969 $question_parts[$this->lng->txt("answer")] =
970 ($multiline ? "\n" : "") . implode("\n", $parts);
971 }
972
973 $tmp = array();
974 foreach ($question_parts as $type => $value) {
975 $tmp[] = $type . ": " . $value;
976 }
977 $page_res[] = implode("\n", $tmp);
978 }
979
980 $res[] = implode("\n\n-------------------------------\n\n", $page_res);
981 }
982 }
983
984 $res[] = "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
985
986 return implode("\n", $res);
987 }
$res
Definition: ltiservices.php:69
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:61

References $parts, $res, ILIAS\Repository\lng(), and ILIAS\Repository\object().

+ Here is the call graph for this function:

◆ getUserResultsTable()

ilObjSurveyGUI::getUserResultsTable ( int  $a_active_id)
Todo:
move to evaluation sub-service

Definition at line 817 of file class.ilObjSurveyGUI.php.

819 : string {
820 $rtpl = new ilTemplate("tpl.svy_view_user_results.html", true, true, "components/ILIAS/Survey");
821
822 $show_titles = $this->object->getShowQuestionTitles();
823
824 foreach ($this->object->getSurveyPages() as $page) {
825 if (count($page) > 0) {
826 // question block
827 if (count($page) > 1) {
828 if ($page[0]["questionblock_show_blocktitle"]) {
829 $rtpl->setVariable("BLOCK_TITLE", trim($page[0]["questionblock_title"] ?? ""));
830 }
831 }
832
833 // questions
834 foreach ($page as $question) {
835 $question_gui = $this->object->getQuestionGUI($question["type_tag"], $question["question_id"]);
836 $rtpl->setCurrentBlock("question_bl");
837
838 // heading
839 if (strlen($question["heading"] ?? "")) {
840 $rtpl->setVariable("HEADING", trim($question["heading"] ?? ""));
841 }
842
843 $rtpl->setVariable(
844 "QUESTION_DATA",
845 $question_gui->getPrintView(
846 $show_titles,
847 (bool) $question["questionblock_show_questiontext"],
848 $this->object->getId(),
849 $this->object->loadWorkingData($question["question_id"], $a_active_id)
850 )
851 );
852
853 $rtpl->parseCurrentBlock();
854 }
855
856 $rtpl->setCurrentBlock("block_bl");
857 $rtpl->parseCurrentBlock();
858 }
859 }
860
861 return $rtpl->get();
862 }
special template class to simplify handling of ITX/PEAR

References HTML_Template_IT\setVariable().

+ Here is the call graph for this function:

◆ importSurveyObject()

ilObjSurveyGUI::importSurveyObject ( )

Definition at line 635 of file class.ilObjSurveyGUI.php.

635 : void
636 {
638
639 $new_type = $this->edit_request->getNewType();
640
641 // create permission is already checked in createObject. This check here is done to prevent hacking attempts
642 $this->checkPermission("create", "", $new_type);
643
644 $this->lng->loadLanguageModule($new_type);
645 $this->ctrl->setParameter($this, "new_type", $new_type);
646
647 $form = $this->initImportForm($new_type);
648 if ($form->checkInput()) {
649 $newObj = new ilObjSurvey();
650 $newObj->setType($new_type);
651 $newObj->setTitle("dummy");
652 $newObj->create();
653 $this->putObjectInTree($newObj);
654
655 // copy uploaded file to import directory
656
657 $this->log->debug("form->getInput(spl) = " . $form->getInput("spl"));
658
659 $error = $newObj->importObject($_FILES["importfile"], (int) $form->getInput("spl"));
660 if ($error !== '') {
661 $newObj->delete();
662 $this->tpl->setOnScreenMessage('failure', $error);
663 return;
664 }
665
666 $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_imported"), true);
667 ilUtil::redirect("ilias.php?ref_id=" . $newObj->getRefId() .
668 "&baseClass=ilObjSurveyGUI");
669 }
670
671 // display form to correct errors
672 $form->setValuesByPost();
673 $tpl->setContent($form->getHTML());
674 }
ilGlobalTemplateInterface $tpl
ilErrorHandling $error
putObjectInTree(ilObject $obj, ?int $parent_node_id=null)
Add object to tree at given position.
setContent(string $a_html)
Sets content for standard template.

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

+ Here is the call graph for this function:

◆ infoScreen()

ilObjSurveyGUI::infoScreen ( )

show information screen

Definition at line 694 of file class.ilObjSurveyGUI.php.

694 : void
695 {
696 $ilTabs = $this->tabs;
697 if (!$this->access_manager->canAccessInfoScreen()) {
698 $this->noPermission();
699 }
700 $ilTabs->activateTab("info_short");
701
702 $info = $this->survey_service->gui()->infoScreen($this, $this->toolbar);
703
704 $this->ctrl->forwardCommand($info);
705 }

References $info, ILIAS\Repository\ctrl(), and ILIAS\Repository\toolbar().

Referenced by executeCommand().

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

◆ infoScreenObject()

ilObjSurveyGUI::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 686 of file class.ilObjSurveyGUI.php.

686 : void
687 {
688 $this->ctrl->redirectByClass(ilInfoScreenGUI::class, "showSummary");
689 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ initPropertiesForm()

ilObjSurveyGUI::initPropertiesForm ( )

Definition at line 564 of file class.ilObjSurveyGUI.php.

565 {
566 $form = $this->survey_service
567 ->gui()->surveySettings($this->survey)->form("ilObjSurveyGUI");
568 return $form;
569 }
This class represents a property form user interface.

◆ mailUserResultsObject()

ilObjSurveyGUI::mailUserResultsObject ( )

Definition at line 1024 of file class.ilObjSurveyGUI.php.

1024 : void
1025 {
1026 $ilUser = $this->user;
1027
1028 $anonymous_code = $this->run_manager->getCode();
1029 $active_id = $this->object->getActiveID($ilUser->getId(), $anonymous_code, 0);
1030 if (!$this->run_manager->hasFinished() ||
1031 !$active_id) {
1032 $this->ctrl->redirect($this, "infoScreen");
1033 }
1034
1035 $recipient = $this->edit_request->getMail();
1036 if (!$recipient) {
1037 $recipient = $ilUser->getEmail();
1038 }
1039 if (!ilUtil::is_email($recipient)) {
1040 $this->ctrl->redirect($this, "infoScreen");
1041 }
1042
1043 $this->sendUserResultsMail($active_id, $recipient);
1044
1045 $this->tpl->setOnScreenMessage('success', $this->lng->txt("mail_sent"), true);
1046 $this->ctrl->redirect($this, "infoScreen");
1047 }
sendUserResultsMail(int $a_active_id, string $a_recipient)
static is_email(string $a_email, ?ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
This preg-based function checks whether an e-mail address is formally valid.

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

+ Here is the call graph for this function:

◆ noPermission()

ilObjSurveyGUI::noPermission ( )
protected

Definition at line 307 of file class.ilObjSurveyGUI.php.

307 : void
308 {
309 throw new ilObjectException($this->lng->txt("permission_denied"));
310 }
Base exception class for object service.

References ILIAS\Repository\lng().

Referenced by executeCommand().

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

◆ propertiesObject()

ilObjSurveyGUI::propertiesObject ( ?ilPropertyFormGUI  $a_form = null)

Display the properties form.

Definition at line 594 of file class.ilObjSurveyGUI.php.

596 : void {
597 $ilTabs = $this->tabs;
598 $ilHelp = $this->help;
599
600 $this->checkPermission("write");
601
602 $this->addSubTabs('settings');
603 $ilTabs->activateTab("settings");
604 $ilTabs->activateSubTab('settings');
605
606 if ($this->object->get360Mode()) {
607 $ilHelp->setScreenId("settings_360");
608 }
609
610 if (!$a_form) {
611 $a_form = $this->initPropertiesForm();
612 }
613
614 $this->tpl->setContent($a_form->getHTML());
615 }

Referenced by savePropertiesObject().

+ Here is the caller graph for this function:

◆ retrieveAdditionalDidacticTemplateOptions()

ilObjSurveyGUI::retrieveAdditionalDidacticTemplateOptions ( )
protected
Returns
array<string>

Reimplemented from ilObjectGUI.

Definition at line 334 of file class.ilObjSurveyGUI.php.

334 : array
335 {
336 $a_options = [];
337 // JF, 2013-06-10
338 $a_options["svy360_1"] = array($this->lng->txt("survey_360_mode"),
339 $this->lng->txt("survey_360_mode_info"));
340
341 //Self evaluation only
342 $a_options["svyselfeval_1"] = array($this->lng->txt("svy_self_ev_mode"),
343 $this->lng->txt("svy_self_ev_info"));
344
345 // individual feedback
346 $a_options["individfeedb_1"] = array($this->lng->txt("svy_ind_feedb_mode"),
347 $this->lng->txt("svy_ind_feedb_info"));
348
349 return $a_options;
350 }

References ILIAS\Repository\lng().

+ Here is the call graph for this function:

◆ runObject()

ilObjSurveyGUI::runObject ( )
protected

Definition at line 1064 of file class.ilObjSurveyGUI.php.

1064 : void
1065 {
1066 $this->ctrl->redirectByClass(
1067 \ILIAS\Survey\Execution\LaunchGUI::class
1068 );
1069 }

References ILIAS\Repository\ctrl().

+ Here is the call graph for this function:

◆ savePropertiesObject()

ilObjSurveyGUI::savePropertiesObject ( )

Definition at line 543 of file class.ilObjSurveyGUI.php.

543 : void
544 {
545 $settings_ui = $this->survey_service->gui()->surveySettings($this->survey);
546
547 $form = $settings_ui->form("ilObjSurveyGUI");
548 if ($settings_ui->checkForm($form)) {
549 $settings_ui->saveForm($form);
550
551 // settings change clear the code
552 // this is adopted from ILIAS 7, unsure if or when this is necessary
553 $this->run_manager->clearCode();
554
555 $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
556 $this->ctrl->redirect($this, "properties");
557 }
558
559 $this->tpl->setOnScreenMessage('failure', $this->lng->txt("form_input_not_valid"));
560 $form->setValuesByPost();
561 $this->propertiesObject($form);
562 }
propertiesObject(?ilPropertyFormGUI $a_form=null)
Display the properties form.

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

+ Here is the call graph for this function:

◆ sendUserResultsMail()

ilObjSurveyGUI::sendUserResultsMail ( int  $a_active_id,
string  $a_recipient 
)

Definition at line 989 of file class.ilObjSurveyGUI.php.

992 : void {
993 $ilUser = $this->user;
994
995 $finished = $this->object->getSurveyParticipants(array($a_active_id));
996 $finished = array_pop($finished);
997 $finished = ilDatePresentation::formatDate(new ilDateTime($finished["finished_tstamp"], IL_CAL_UNIX));
998
999 $body = ilMail::getSalutation($ilUser->getId()) . "\n\n";
1000 $body .= $this->lng->txt("svy_mail_own_results_body") . "\n";
1001 $body .= "\n" . $this->lng->txt("obj_svy") . ": " . $this->object->getTitle() . "\n";
1002 $body .= ilLink::_getLink($this->object->getRefId(), "svy") . "\n";
1003 $body .= "\n" . $this->lng->txt("survey_results_finished") . ": " . $finished . "\n\n";
1004
1005 if ($this->object->hasMailOwnResults()) {
1006 $subject = "svy_mail_own_results_subject";
1007 $body .= $this->getUserResultsPlain($a_active_id);
1008 } else {
1009 $subject = "svy_mail_confirmation_subject";
1010 }
1011
1012 // $body .= ilMail::_getAutoGeneratedMessageString($this->lng);
1014
1015
1016 $mmail = new ilMimeMail();
1017 $mmail->From($this->senderFactory->system());
1018 $mmail->To($a_recipient);
1019 $mmail->Subject(sprintf($this->lng->txt($subject), $this->object->getTitle()), true);
1020 $mmail->Body($body);
1021 $mmail->Send();
1022 }
const IL_CAL_UNIX
static formatDate(ilDateTime $date, bool $a_skip_day=false, bool $a_include_wd=false, bool $include_seconds=false, ?ilObjUser $user=null,)
@classDescription Date and time handling
static getSalutation(int $a_usr_id, ?ilLanguage $a_language=null)
static _getInstallationSignature()
getUserResultsPlain(int $a_active_id)

◆ viewUserResultsObject()

ilObjSurveyGUI::viewUserResultsObject ( )
protected
Todo:
move to evaluation sub-service

Definition at line 867 of file class.ilObjSurveyGUI.php.

867 : void
868 {
869 $ilUser = $this->user;
871 $ilTabs = $this->tabs;
872
873 $anonymous_code = $this->run_manager->getCode();
874 $active_id = $this->object->getActiveID($ilUser->getId(), $anonymous_code, 0);
875
876 if (!$this->run_manager->hasFinished() ||
877 !$active_id) {
878 $this->ctrl->redirect($this, "infoScreen");
879 }
880
881 $ilTabs->clearTargets();
882 $ilTabs->setBackTarget(
883 $this->lng->txt("btn_back"),
884 $this->ctrl->getLinkTarget($this, "infoScreen")
885 );
886
887 $html = $this->getUserResultsTable($active_id);
889 }
getUserResultsTable(int $a_active_id)

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

+ Here is the call graph for this function:

Field Documentation

◆ $access_manager

ILIAS Survey Access AccessManager ilObjSurveyGUI::$access_manager = null
protected

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

Referenced by executeCommand().

◆ $edit_request

ILIAS Survey Editing EditingGUIRequest ilObjSurveyGUI::$edit_request
protected

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

◆ $execution_request

ILIAS Survey Execution ExecutionGUIRequest ilObjSurveyGUI::$execution_request
protected

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

◆ $feature_config

ILIAS Survey Mode FeatureConfig ilObjSurveyGUI::$feature_config = null
protected

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

Referenced by getTabs().

◆ $gui

InternalGUIService ilObjSurveyGUI::$gui
protected

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

Referenced by executeCommand().

◆ $help

ilHelpGUI ilObjSurveyGUI::$help
protected

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

Referenced by getTabs().

◆ $invitation_manager

Participants InvitationsManager ilObjSurveyGUI::$invitation_manager
protected

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

◆ $log

ilLogger ilObjSurveyGUI::$log
protected

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

◆ $nav_history

ilNavigationHistory ilObjSurveyGUI::$nav_history
protected

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

◆ $rbacsystem

ilRbacSystem ilObjSurveyGUI::$rbacsystem
protected

Definition at line 50 of file class.ilObjSurveyGUI.php.

◆ $run_manager

ILIAS Survey Execution RunManager ilObjSurveyGUI::$run_manager
protected

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

◆ $senderFactory

ilMailMimeSenderFactory ilObjSurveyGUI::$senderFactory
protected

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

◆ $status_manager

ILIAS Survey Participants StatusManager ilObjSurveyGUI::$status_manager
protected

Definition at line 48 of file class.ilObjSurveyGUI.php.

◆ $survey

ilObjSurvey ilObjSurveyGUI::$survey = null
protected

Definition at line 49 of file class.ilObjSurveyGUI.php.

Referenced by executeCommand().

◆ $survey_service

ILIAS Survey InternalService ilObjSurveyGUI::$survey_service
protected

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

◆ $tabs

ilTabsGUI ilObjSurveyGUI::$tabs
protected

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

Referenced by executeCommand().


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