ILIAS  release_8 Revision v8.19
All Data Structures Namespaces Files Functions Variables Modules Pages
ilObjSurveyGUI Class Reference

Class ilObjSurveyGUI. 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)
 
 mailUserResultsObject ()
 
- 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)
 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 ()
 
 addDidacticTemplateOptions (array &$a_options)
 
 afterSave (ilObject $new_object)
 
 getTabs ()
 
 initImportForm (string $new_type)
 
 addLocatorItems ()
 
 viewUserResultsObject ()
 
 getUserResultsPlain (int $a_active_id)
 
 checkRbacOrPositionPermission (string $a_rbac_permission, string $a_position_permission)
 
- 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

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
 
- 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 = ""
 

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

Member Function Documentation

◆ _goto()

static ilObjSurveyGUI::_goto ( string  $a_target)
static

redirect script

Exceptions
ilCtrlException

$am->canStartSurvey() &&

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

References ilObjectGUI\$ctrl, $DIC, ilObjectGUI\$lng, ilObjectGUI\$ref_id, ilObjectGUI\$request, ilObjectGUI\_gotoRepositoryRoot(), ilObject\_lookupObjId(), ilObject\_lookupTitle(), ILIAS\Repository\int(), ilCtrl\redirectByClass(), ROOT_FOLDER_ID, ilCtrl\setParameterByClass(), and ilLanguage\txt().

805  : void {
806  global $DIC;
807  $main_tpl = $DIC->ui()->mainTemplate();
808 
809  $request = $DIC->survey()->internal()->gui()->execution()->request();
810  $a_access_code = $request->getAccessCode();
811 
812  $ilAccess = $DIC->access();
813  $lng = $DIC->language();
814  $ctrl = $DIC->ctrl();
815 
816  $t_arr = explode("_", $a_target);
817  $ref_id = (int) $t_arr[0];
818  if ($a_access_code === "" && isset($t_arr[1])) {
819  $a_access_code = $t_arr[1];
820  }
821 
822  // see ilObjSurveyAccess::_checkGoto()
823  if ($a_access_code !== '') {
824  $sess = $DIC->survey()->internal()->repo()
825  ->execution()->runSession();
826  $sess->setCode(ilObject::_lookupObjId($ref_id), $a_access_code);
827  $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
828  $ctrl->redirectByClass("ilObjSurveyGUI", "infoScreen");
829  }
830 
831  // write permission -> info screen
832  if ($ilAccess->checkAccess("write", "", $ref_id)) {
833  $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
834  $ctrl->redirectByClass("ilObjSurveyGUI", "infoScreen");
835  }
836 
837  // read permission and evaluation access -> evaluation
838  if ($ilAccess->checkAccess("visible", "", $ref_id) ||
839  $ilAccess->checkAccess("read", "", $ref_id)) {
840  $am = $DIC->survey()->internal()->domain()->access($ref_id, $DIC->user()->getId());
841  if ( $am->canAccessEvaluation()) {
842  $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
843  $ctrl->redirectByClass(["ilObjSurveyGUI", "ilSurveyEvaluationGUI"], "openEvaluation");
844  }
845 
846  $ctrl->setParameterByClass("ilObjSurveyGUI", "ref_id", $ref_id);
847  $ctrl->redirectByClass("ilObjSurveyGUI", "infoScreen");
848  } elseif ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID)) {
849  $main_tpl->setOnScreenMessage('failure', sprintf(
850  $lng->txt("msg_no_perm_read_item"),
852  ), true);
854  }
855  }
redirectByClass( $a_class, string $a_cmd=null, string $a_anchor=null, bool $is_async=false)
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
setParameterByClass(string $a_class, string $a_parameter, $a_value)
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:

◆ addDidacticTemplateOptions()

ilObjSurveyGUI::addDidacticTemplateOptions ( array &  $a_options)
protected

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

References ilSettingsTemplate\getAllSettingsTemplates(), and ILIAS\Repository\lng().

328  : void
329  {
331  if ($templates) {
332  foreach ($templates as $item) {
333  $a_options["svytpl_" . $item["id"]] = array($item["title"],
334  nl2br(trim($item["description"])));
335  }
336  }
337 
338  // JF, 2013-06-10
339  $a_options["svy360_1"] = array($this->lng->txt("survey_360_mode"),
340  $this->lng->txt("survey_360_mode_info"));
341 
342  //Self evaluation only
343  $a_options["svyselfeval_1"] = array($this->lng->txt("svy_self_ev_mode"),
344  $this->lng->txt("svy_self_ev_info"));
345 
346  // individual feedback
347  $a_options["individfeedb_1"] = array($this->lng->txt("svy_ind_feedb_mode"),
348  $this->lng->txt("svy_ind_feedb_info"));
349  }
static getAllSettingsTemplates(string $a_type, bool $a_include_auto_generated=false)
Get all settings templates of type.
+ Here is the call graph for this function:

◆ addLocatorItems()

ilObjSurveyGUI::addLocatorItems ( )
protected

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

References ilObjectGUI\$locator, ilObjectGUI\$requested_ref_id, SurveyQuestion\_getQuestionType(), SurveyQuestion\_getTitle(), ilLocatorGUI\addItem(), ILIAS\Repository\ctrl(), and ILIAS\Repository\object().

755  : void
756  {
757  $ilLocator = $this->locator;
758  switch ($this->ctrl->getCmd()) {
759  case "next":
760  case "previous":
761  case "start":
762  case "resume":
763  case "infoScreen":
764  case "redirectQuestion":
765  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $this->requested_ref_id);
766  break;
767  case "evaluation":
768  case "checkEvaluationAccess":
769  case "evaluationdetails":
770  case "evaluationuser":
771  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluation"), "", $this->requested_ref_id);
772  break;
773  case "create":
774  case "save":
775  case "cancel":
776  case "importSurvey":
777  case "cloneAll":
778  break;
779  default:
780  $ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $this->requested_ref_id);
781 
782  // this has to be done here because ilSurveyEditorGUI is called after finalizing the locator
783  if ($this->edit_request->getQuestionId() > 0 &&
784  !$this->edit_request->getNewForSurvey()) {
785  // not on create
786  // see ilObjSurveyQuestionPool::addLocatorItems
787  $q_id = $this->edit_request->getQuestionId();
788  $q_type = SurveyQuestion::_getQuestionType($q_id) . "GUI";
789  $this->ctrl->setParameterByClass($q_type, "q_id", $q_id);
790  $ilLocator->addItem(
792  $this->ctrl->getLinkTargetByClass(array("ilSurveyEditorGUI", $q_type), "editQuestion")
793  );
794  }
795  break;
796  }
797  }
static _getQuestionType(int $question_id)
Returns the question type of a question with a given id.
static _getTitle(int $question_id)
Returns the question title of a question with a given id.
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:

◆ addSubTabs()

ilObjSurveyGUI::addSubTabs ( string  $a_section)

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

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

Referenced by executeCommand(), and propertiesObject().

558  : void {
559  if ($a_section === 'settings') {
560  $this->tabs_gui->addSubTabTarget(
561  "settings",
562  $this->ctrl->getLinkTarget($this, 'properties')
563  );
564 
565  $lti_settings = new ilLTIProviderObjectSettingGUI($this->object->getRefId());
566  if ($lti_settings->hasSettingsAccess()) {
567  $this->tabs_gui->addSubTabTarget(
568  'lti_provider',
569  $this->ctrl->getLinkTargetByClass(ilLTIProviderObjectSettingGUI::class)
570  );
571  }
572  }
573  }
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:
+ Here is the caller graph for this function:

◆ addToNavigationHistory()

ilObjSurveyGUI::addToNavigationHistory ( )
protected

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

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

Referenced by executeCommand().

305  : void
306  {
307  $external_rater = $this->status_manager->isExternalRater();
308  // add entry to navigation history
309  if (!$external_rater && !$this->getCreationMode() &&
310  $this->checkPermissionBool("read")) {
311  $this->ctrl->setParameterByClass("ilobjsurveygui", "ref_id", $this->ref_id);
312  $link = $this->ctrl->getLinkTargetByClass("ilobjsurveygui", "infoScreen");
313  $this->nav_history->addItem($this->ref_id, $link, "svy");
314  }
315  }
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:

◆ afterSave()

ilObjSurveyGUI::afterSave ( ilObject  $new_object)
protected

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

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

351  : void
352  {
353  // #16446
354  $new_object->loadFromDb();
355 
356  //set the mode depending on didactic template
357  if ($this->getDidacticTemplateVar("svy360")) {
358  $new_object->setMode(ilObjSurvey::MODE_360);
359  } elseif ($this->getDidacticTemplateVar("svyselfeval")) {
360  $new_object->setMode(ilObjSurvey::MODE_SELF_EVAL);
361  } elseif ($this->getDidacticTemplateVar("individfeedb")) {
362  $new_object->setMode(ilObjSurvey::MODE_IND_FEEDB);
363  }
364 
365  $svy_mode = $new_object->getMode();
366  if ($svy_mode === ilObjSurvey::MODE_360) {
367  // this should rather be ilObjSurvey::ANONYMIZE_ON - see ilObjSurvey::getUserDataFromActiveId()
368  $new_object->setAnonymize(ilObjSurvey::ANONYMIZE_CODE_ALL);
369  $new_object->setEvaluationAccess(ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS);
370  } elseif ($svy_mode === ilObjSurvey::MODE_SELF_EVAL) {
371  $new_object->setEvaluationAccess(ilObjSurvey::EVALUATION_ACCESS_PARTICIPANTS);
372  }
373  $new_object->saveToDB();
374 
375  // always send a message
376  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_added"), true);
377  ilUtil::redirect("ilias.php?baseClass=ilObjSurveyGUI&ref_id=" .
378  $new_object->getRefId() . "&cmd=properties");
379  }
const EVALUATION_ACCESS_PARTICIPANTS
getDidacticTemplateVar(string $type)
Get didactic template setting from creation screen.
static redirect(string $a_script)
const ANONYMIZE_CODE_ALL
+ 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 1097 of file class.ilObjSurveyGUI.php.

References ilObjectGUI\$access, $GLOBALS, ilOrgUnitPositionAndRBACAccessHandler\checkRbacOrPositionPermissionAccess(), and ILIAS\Repository\object().

Referenced by executeCommand().

1100  : bool {
1101  $access = $GLOBALS['DIC']->access();
1103  $a_rbac_permission,
1104  $a_position_permission,
1105  $this->object->getRefId()
1106  );
1107  }
checkRbacOrPositionPermissionAccess(string $rbac_perm, string $pos_perm, int $ref_id)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']
Definition: PEAR.php:64
ilAccessHandler $access
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ doAutoCompleteObject()

ilObjSurveyGUI::doAutoCompleteObject ( )

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

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

602  : void
603  {
604  $fields = array('login','firstname','lastname','email');
605 
606  $auto = new ilUserAutoComplete();
607  $auto->setSearchFields($fields);
608  $auto->setResultField('login');
609  $auto->enableFieldSearchableCheck(true);
610  $auto->setMoreLinkAvailable(true);
611 
612  if ($this->edit_request->getFetchAll()) {
613  $auto->setLimit(ilUserAutoComplete::MAX_ENTRIES);
614  }
615 
616  echo $auto->getList(ilUtil::stripSlashes($this->edit_request->getTerm()));
617  exit();
618  }
exit
Definition: login.php:28
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")
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:

◆ evaluationObject()

ilObjSurveyGUI::evaluationObject ( )

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

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

References ILIAS\Repository\ctrl().

321  : void
322  {
323  $eval_gui = new ilSurveyEvaluationGUI($this->survey);
324  $this->ctrl->setCmdClass(get_class($eval_gui));
325  $this->ctrl->redirect($eval_gui, "openEvaluation");
326  }
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:

◆ executeCommand()

ilObjSurveyGUI::executeCommand ( )

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

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

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

◆ getTabs()

ilObjSurveyGUI::getTabs ( )
protected

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

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

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

References $GLOBALS, $ilUser, $parts, $res, ilObjectGUI\$type, ilObjectGUI\$user, ilMail\_getInstallationSignature(), ilLink\_getLink(), ilDatePresentation\formatDate(), ilMail\getSalutation(), IL_CAL_UNIX, ILIAS\Repository\lng(), and ILIAS\Repository\object().

939  : string {
940  $res = array();
941 
942  $show_titles = (bool) $this->object->getShowQuestionTitles();
943 
944  foreach ($this->object->getSurveyPages() as $page) {
945  if (count($page) > 0) {
946  $res[] = "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
947 
948  // question block
949  if (count($page) > 1) {
950  if ($page[0]["questionblock_show_blocktitle"]) {
951  $res[$this->lng->txt("questionblock")] = trim($page[0]["questionblock_title"]) . "\n";
952  }
953  }
954 
955  // questions
956 
957  $page_res = array();
958 
959  foreach ($page as $question) {
960  $question_gui = $this->object->getQuestionGUI($question["type_tag"], $question["question_id"]);
961  $question_parts = array();
962 
963  // heading
964  if (strlen($question["heading"])) {
965  $question_parts[$this->lng->txt("heading")] = trim($question["heading"]);
966  }
967 
968  if ($show_titles) {
969  $question_parts[$this->lng->txt("title")] = trim($question["title"]);
970  }
971 
972  if ($question["questionblock_show_questiontext"]) {
973  $question_parts[$this->lng->txt("question")] = trim(strip_tags($question_gui->object->getQuestionText()));
974  }
975 
976  $answers = $question_gui->getParsedAnswers(
977  $this->object->loadWorkingData($question["question_id"], $a_active_id),
978  true
979  );
980 
981  if (count($answers)) {
982  $multiline = false;
983  if (count($answers) > 1 ||
984  get_class($question_gui) === "SurveyTextQuestionGUI") {
985  $multiline = true;
986  }
987 
988  $parts = array();
989  foreach ($answers as $answer) {
990  $text = null;
991  if ($answer["textanswer"] ?? false) {
992  $text = ' ("' . $answer["textanswer"] . '")';
993  }
994  if (!isset($answer["cols"])) {
995  if (isset($answer["title"])) {
996  $parts[] = $answer["title"] . $text;
997  } elseif (isset($answer["value"])) {
998  $parts[] = $answer["value"];
999  } elseif ($text) {
1000  $parts[] = substr($text, 2, -1);
1001  }
1002  }
1003  // matrix
1004  else {
1005  $tmp = array();
1006  foreach ($answer["cols"] as $col) {
1007  $tmp[] = $col["title"];
1008  }
1009  $parts[] = $answer["title"] . ": " . implode(", ", $tmp) . $text;
1010  }
1011  }
1012  $question_parts[$this->lng->txt("answer")] =
1013  ($multiline ? "\n" : "") . implode("\n", $parts);
1014  }
1015 
1016  $tmp = array();
1017  foreach ($question_parts as $type => $value) {
1018  $tmp[] = $type . ": " . $value;
1019  }
1020  $page_res[] = implode("\n", $tmp);
1021  }
1022 
1023  $res[] = implode("\n\n-------------------------------\n\n", $page_res);
1024  }
1025  }
1026 
1027  $res[] = "\n~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~\n";
1028 
1029  return implode("\n", $res);
1030  }
$res
Definition: ltiservices.php:69
if($clientAssertionType !='urn:ietf:params:oauth:client-assertion-type:jwt-bearer'|| $grantType !='client_credentials') $parts
Definition: ltitoken.php:64
+ Here is the call graph for this function:

◆ getUserResultsTable()

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

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

References ILIAS\Repository\object().

Referenced by viewUserResultsObject().

862  : string {
863  $rtpl = new ilTemplate("tpl.svy_view_user_results.html", true, true, "Modules/Survey");
864 
865  $show_titles = $this->object->getShowQuestionTitles();
866 
867  foreach ($this->object->getSurveyPages() as $page) {
868  if (count($page) > 0) {
869  // question block
870  if (count($page) > 1) {
871  if ($page[0]["questionblock_show_blocktitle"]) {
872  $rtpl->setVariable("BLOCK_TITLE", trim($page[0]["questionblock_title"]));
873  }
874  }
875 
876  // questions
877  foreach ($page as $question) {
878  $question_gui = $this->object->getQuestionGUI($question["type_tag"], $question["question_id"]);
879  $rtpl->setCurrentBlock("question_bl");
880 
881  // heading
882  if (strlen($question["heading"])) {
883  $rtpl->setVariable("HEADING", trim($question["heading"]));
884  }
885 
886  $rtpl->setVariable(
887  "QUESTION_DATA",
888  $question_gui->getPrintView(
889  $show_titles,
890  (bool) $question["questionblock_show_questiontext"],
891  $this->object->getId(),
892  $this->object->loadWorkingData($question["question_id"], $a_active_id)
893  )
894  );
895 
896  $rtpl->parseCurrentBlock();
897  }
898 
899  $rtpl->setCurrentBlock("block_bl");
900  $rtpl->parseCurrentBlock();
901  }
902  }
903 
904  return $rtpl->get();
905  }
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ importSurveyObject()

ilObjSurveyGUI::importSurveyObject ( )

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

References ilObjectGUI\$error, ilObjectGUI\$tpl, ilGlobalTemplateInterface\addJavaScript(), ilObjectGUI\checkPermission(), ILIAS\Repository\ctrl(), ilSettingsTemplate\getAllSettingsTemplates(), initImportForm(), ILIAS\Repository\lng(), ilObjectGUI\putObjectInTree(), ilUtil\redirect(), and ilGlobalTemplateInterface\setContent().

650  : void
651  {
652  $tpl = $this->tpl;
653 
654  $new_type = $this->edit_request->getNewType();
655 
656  // create permission is already checked in createObject. This check here is done to prevent hacking attempts
657  $this->checkPermission("create", "", $new_type);
658 
659  $this->lng->loadLanguageModule($new_type);
660  $this->ctrl->setParameter($this, "new_type", $new_type);
661 
662  $form = $this->initImportForm($new_type);
663  if ($form->checkInput()) {
664  $newObj = new ilObjSurvey();
665  $newObj->setType($new_type);
666  $newObj->setTitle("dummy");
667  $newObj->create(true);
668  $this->putObjectInTree($newObj);
669 
670  // copy uploaded file to import directory
671 
672  $this->log->debug("form->getInput(spl) = " . $form->getInput("spl"));
673 
674  $error = $newObj->importObject($_FILES["importfile"], (int) $form->getInput("spl"));
675  if ($error !== '') {
676  $newObj->delete();
677  $this->tpl->setOnScreenMessage('failure', $error);
678  return;
679  }
680 
681  $this->tpl->setOnScreenMessage('success', $this->lng->txt("object_imported"), true);
682  ilUtil::redirect("ilias.php?ref_id=" . $newObj->getRefId() .
683  "&baseClass=ilObjSurveyGUI");
684 
685  // using template?
687  if ($templates) {
688  $tpl = $this->tpl;
689  $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/jquery.js");
690  // $tpl->addJavaScript("./Modules/Scorm2004/scripts/questions/jquery-ui-min.js");
691 
692  $this->tpl->setCurrentBlock("template_option");
693  $this->tpl->setVariable("VAL_TEMPLATE_OPTION", "");
694  $this->tpl->setVariable("TXT_TEMPLATE_OPTION", $this->lng->txt("none"));
695  $this->tpl->parseCurrentBlock();
696 
697  foreach ($templates as $item) {
698  $this->tpl->setCurrentBlock("template_option");
699  $this->tpl->setVariable("VAL_TEMPLATE_OPTION", $item["id"]);
700  $this->tpl->setVariable("TXT_TEMPLATE_OPTION", $item["title"]);
701  $this->tpl->parseCurrentBlock();
702 
703  $desc = str_replace(["\n", "\r"], "", nl2br($item["description"]));
704 
705  $this->tpl->setCurrentBlock("js_data");
706  $this->tpl->setVariable("JS_DATA_ID", $item["id"]);
707  $this->tpl->setVariable("JS_DATA_TEXT", $desc);
708  $this->tpl->parseCurrentBlock();
709  }
710 
711  $this->tpl->setCurrentBlock("templates");
712  $this->tpl->setVariable("TXT_TEMPLATE", $this->lng->txt("svy_settings_template"));
713  $this->tpl->parseCurrentBlock();
714  }
715  }
716 
717  // display form to correct errors
718  $form->setValuesByPost();
719  $tpl->setContent($form->getHTML());
720  }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
addJavaScript(string $a_js_file, bool $a_add_version_parameter=true, int $a_batch=2)
Add a javascript file that should be included in the header.
static getAllSettingsTemplates(string $a_type, bool $a_include_auto_generated=false)
Get all settings templates of type.
ilErrorHandling $error
static redirect(string $a_script)
putObjectInTree(ilObject $obj, int $parent_node_id=null)
Add object to tree at given position.
initImportForm(string $new_type)
checkPermission(string $perm, string $cmd="", string $type="", ?int $ref_id=null)
+ Here is the call graph for this function:

◆ infoScreen()

ilObjSurveyGUI::infoScreen ( )

show information screen

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

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

Referenced by executeCommand(), and infoScreenObject().

742  : void
743  {
744  $ilTabs = $this->tabs;
745  if (!$this->access_manager->canAccessInfoScreen()) {
746  $this->noPermission();
747  }
748  $ilTabs->activateTab("info_short");
749 
750  $info = $this->survey_service->gui()->infoScreen($this, $this->toolbar);
751 
752  $this->ctrl->forwardCommand($info);
753  }
+ 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 732 of file class.ilObjSurveyGUI.php.

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

732  : void
733  {
734  $this->ctrl->setCmd("showSummary");
735  $this->ctrl->setCmdClass("ilinfoscreengui");
736  $this->infoScreen();
737  }
infoScreen()
show information screen
+ Here is the call graph for this function:

◆ initImportForm()

ilObjSurveyGUI::initImportForm ( string  $new_type)
protected

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

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

Referenced by importSurveyObject().

625  {
626  $form = new ilPropertyFormGUI();
627  $form->setTarget("_top");
628  $form->setFormAction($this->ctrl->getFormAction($this));
629  $form->setTitle($this->lng->txt("import_svy"));
630 
631  $fi = new ilFileInputGUI($this->lng->txt("import_file"), "importfile");
632  $fi->setSuffixes(array("zip"));
633  $fi->setRequired(true);
634  $form->addItem($fi);
635 
636  $svy = new ilObjSurvey();
637  $questionspools = $svy->getAvailableQuestionpools(true, true, true);
638 
639  $pools = new ilSelectInputGUI($this->lng->txt("select_questionpool_short"), "spl");
640  $pools->setOptions(array("" => $this->lng->txt("dont_use_questionpool")) + $questionspools);
641  $pools->setRequired(false);
642  $form->addItem($pools);
643 
644  $form->addCommandButton("importSurvey", $this->lng->txt("import"));
645  $form->addCommandButton("cancel", $this->lng->txt("cancel"));
646 
647  return $form;
648  }
This class represents a file property in a property form.
setSuffixes(array $a_suffixes)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ initPropertiesForm()

ilObjSurveyGUI::initPropertiesForm ( )

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

Referenced by propertiesObject().

550  {
551  $form = $this->survey_service
552  ->gui()->surveySettings($this->survey)->form("ilObjSurveyGUI");
553  return $form;
554  }
+ Here is the caller graph for this function:

◆ mailUserResultsObject()

ilObjSurveyGUI::mailUserResultsObject ( )

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

References $ilUser, ilObjectGUI\$user, ILIAS\Repository\ctrl(), ilUtil\is_email(), and ILIAS\Repository\lng().

1069  : void
1070  {
1071  $ilUser = $this->user;
1072 
1073  $anonymous_code = $this->run_manager->getCode();
1074  $active_id = $this->object->getActiveID($ilUser->getId(), $anonymous_code, 0);
1075  if (!$this->run_manager->hasFinished() ||
1076  !$active_id) {
1077  $this->ctrl->redirect($this, "infoScreen");
1078  }
1079 
1080  $recipient = $this->edit_request->getMail();
1081  if (!$recipient) {
1082  $recipient = $ilUser->getEmail();
1083  }
1084  if (!ilUtil::is_email($recipient)) {
1085  $this->ctrl->redirect($this, "infoScreen");
1086  }
1087 
1088  $this->sendUserResultsMail($active_id, $recipient);
1089 
1090  $this->tpl->setOnScreenMessage('success', $this->lng->txt("mail_sent"), true);
1091  $this->ctrl->redirect($this, "infoScreen");
1092  }
static is_email(string $a_email, ilMailRfc822AddressParserFactory $mailAddressParserFactory=null)
This preg-based function checks whether an e-mail address is formally valid.
$ilUser
Definition: imgupload.php:34
+ Here is the call graph for this function:

◆ noPermission()

ilObjSurveyGUI::noPermission ( )
protected

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

References ILIAS\Repository\lng().

Referenced by executeCommand(), and infoScreen().

300  : void
301  {
302  throw new ilObjectException($this->lng->txt("permission_denied"));
303  }
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:
+ Here is the caller graph for this function:

◆ propertiesObject()

ilObjSurveyGUI::propertiesObject ( ilPropertyFormGUI  $a_form = null)

Display the properties form.

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

References $help, $tabs, addSubTabs(), ilObjectGUI\checkPermission(), initPropertiesForm(), and ILIAS\Repository\object().

Referenced by savePropertiesObject().

581  : void {
582  $ilTabs = $this->tabs;
583  $ilHelp = $this->help;
584 
585  $this->checkPermission("write");
586 
587  $this->addSubTabs('settings');
588  $ilTabs->activateTab("settings");
589  $ilTabs->activateSubTab('settings');
590 
591  if ($this->object->get360Mode()) {
592  $ilHelp->setScreenId("settings_360");
593  }
594 
595  if (!$a_form) {
596  $a_form = $this->initPropertiesForm();
597  }
598 
599  $this->tpl->setContent($a_form->getHTML());
600  }
addSubTabs(string $a_section)
checkPermission(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:

◆ savePropertiesObject()

ilObjSurveyGUI::savePropertiesObject ( )

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

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

528  : void
529  {
530  $settings_ui = $this->survey_service->gui()->surveySettings($this->survey);
531 
532  $form = $settings_ui->form("ilObjSurveyGUI");
533  if ($settings_ui->checkForm($form)) {
534  $settings_ui->saveForm($form);
535 
536  // settings change clear the code
537  // this is adopted from ILIAS 7, unsure if or when this is necessary
538  $this->run_manager->clearCode();
539 
540  $this->tpl->setOnScreenMessage('success', $this->lng->txt("settings_saved"), true);
541  $this->ctrl->redirect($this, "properties");
542  }
543 
544  $this->tpl->setOnScreenMessage('failure', $this->lng->txt("form_input_not_valid"));
545  $form->setValuesByPost();
546  $this->propertiesObject($form);
547  }
propertiesObject(ilPropertyFormGUI $a_form=null)
Display the properties form.
+ Here is the call graph for this function:

◆ viewUserResultsObject()

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

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

References ilObjectGUI\$html, $ilUser, $tabs, ilObjectGUI\$tpl, ilObjectGUI\$user, ILIAS\Repository\ctrl(), getUserResultsTable(), ILIAS\Repository\lng(), and ilGlobalTemplateInterface\setContent().

910  : void
911  {
913  $tpl = $this->tpl;
914  $ilTabs = $this->tabs;
915 
916  $anonymous_code = $this->run_manager->getCode();
917  $active_id = $this->object->getActiveID($ilUser->getId(), $anonymous_code, 0);
918 
919  if (!$this->run_manager->hasFinished() ||
920  !$active_id) {
921  $this->ctrl->redirect($this, "infoScreen");
922  }
923 
924  $ilTabs->clearTargets();
925  $ilTabs->setBackTarget(
926  $this->lng->txt("btn_back"),
927  $this->ctrl->getLinkTarget($this, "infoScreen")
928  );
929 
930  $html = $this->getUserResultsTable($active_id);
932  }
ilGlobalTemplateInterface $tpl
setContent(string $a_html)
Sets content for standard template.
getUserResultsTable(int $a_active_id)
$ilUser
Definition: imgupload.php:34
+ 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().

◆ $help

ilHelpGUI ilObjSurveyGUI::$help
protected

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

Referenced by getTabs(), and propertiesObject().

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

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

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