ILIAS  Release_4_4_x_branch Revision 61816
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjSurveyAdministrationGUI Class Reference

Class ilObjSurveyAdministrationGUI. More...

+ Inheritance diagram for ilObjSurveyAdministrationGUI:
+ Collaboration diagram for ilObjSurveyAdministrationGUI:

Public Member Functions

 ilObjSurveyAdministrationGUI ($a_data, $a_id, $a_call_by_reference)
executeCommand ()
 execute command
 saveObject ()
 save object public
 searchObject ()
 addSpecialUserObject ()
 Add one or more users as special users.
 removeSpecialUserObject ()
 specialusersObject ()
 Add/remove users who may run a survey multiple times.
 settingsObject ()
 display survey settings form
 saveSettingsObject ()
 Save survey settings.
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getTabs (&$tabs_gui)
 get tabs public
- Public Member Functions inherited from ilObjectGUI
 ilObjectGUI ($a_data, $a_id=0, $a_call_by_reference=true, $a_prepare_output=true)
 Constructor public.
 withReferences ()
 determines wether objects are referenced or not (got ref ids or not)
 setCreationMode ($a_mode=true)
 if true, a creation screen is displayed the current $_GET[ref_id] don't belong to the current class! the mode is determined in ilrepositorygui
 getCreationMode ()
 get creation mode
 getHTML ()
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 createObject ()
 create new object form
 cancelCreation ()
 cancel create action and go back to repository parent
 editObject ()
 edit object
 updateObject ()
 updates object entry in object_data
 getFormAction ($a_cmd, $a_formaction="")
 get form action for command (command is method name without "Object", e.g.
 isVisible ($a_ref_id, $a_type)
 viewObject ()
 list childs of current object
 deleteObject ($a_error=false)
 Display deletion confirmation screen.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.

Data Fields

 $conditions
 Constructor public.
- Data Fields inherited from ilObjectGUI
const COPY_WIZARD_NEEDS_PAGE = 1
 $ilias
 $objDefinition
 $tpl
 $tree
 $lng
 $data
 $object
 $ref_id
 $obj_id
 $maxcount
 $formaction
 $return_location
 $target_frame
 $tab_target_script
 $actions
 $sub_objects
 $omit_locator = false
const CFORM_NEW = 1
const CFORM_IMPORT = 2
const CFORM_CLONE = 3

Private Member Functions

 getSettingsTemplateConfig ()
 Get settings template configuration object.

Additional Inherited Members

- Static Public Member Functions inherited from ilObjectGUI
static _gotoRepositoryRoot ($a_raise_error=false)
 Goto repository root.
static _gotoRepositoryNode ($a_ref_id, $a_cmd="frameset")
 Goto repository root.
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 initHeaderAction ($a_sub_type=null, $a_sub_id=null)
 Add header action menu.
 insertHeaderAction ($a_list_gui)
 Insert header action into main template.
 addHeaderAction ()
 Add header action menu.
 redrawHeaderActionObject ()
 Ajax call: redraw action header only.
 showMountWebfolderIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 omitLocator ($a_omit=true)
 addAdminLocatorItems ($a_do_not_add_object=false)
 should be overwritten to add object specific items (repository items are preloaded)
 initCreationForms ($a_new_type)
 Init creation froms.
 getCreationFormsHTML (array $a_forms)
 Get HTML for creation forms (accordion)
 initCreateForm ($a_new_type)
 Init object creation form.
 initDidacticTemplate (ilPropertyFormGUI $form)
 Show didactic template types.
 addDidacticTemplateOptions (array &$a_options)
 Add custom templates.
 getDidacticTemplateVar ($a_type)
 Get didactic template setting from creation screen.
 putObjectInTree (ilObject $a_obj, $a_parent_node_id=null)
 Add object to tree at given position.
 afterSave (ilObject $a_new_object)
 Post (successful) object creation hook.
 initEditForm ()
 Init object edit form.
 initEditCustomForm (ilPropertyFormGUI $a_form)
 Add custom fields to update form.
 getEditFormValues ()
 Get values for edit form.
 getEditFormCustomValues (array &$a_values)
 Add values to custom edit fields.
 updateCustom (ilPropertyFormGUI $a_form)
 Insert custom update form values into object.
 afterUpdate ()
 Post (successful) object update hook.
 initImportForm ($a_new_type)
 Init object import form.
 importFileObject ($parent_id=null)
 Import.
 afterImport (ilObject $a_new_object)
 Post (successful) object import hook.
 setFormAction ($a_cmd, $a_formaction)
 set specific form action for command
 getReturnLocation ($a_cmd, $a_location="")
 get return location for command (command is method name without "Object", e.g.
 setReturnLocation ($a_cmd, $a_location)
 set specific return location for command
 getTargetFrame ($a_cmd, $a_target_frame="")
 get target frame for command (command is method name without "Object", e.g.
 setTargetFrame ($a_cmd, $a_target_frame)
 set specific target frame for command
 showPossibleSubObjects ()
 show possible subobjects (pulldown menu)
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 getTitlesByRefId ($a_ref_ids)
 get Titles of objects this method is used for error messages in methods cut/copy/paste
 __showButton ($a_cmd, $a_text, $a_target= '')
 hitsperpageObject ()
__initTableGUI ()
 __setTableGUIBasicData (&$tbl, &$result_set, $a_from="")
 standard implementation for tables use 'from' variable use different initial setting of table
 redirectToRefId ($a_ref_id, $a_cmd="")
 redirects to (repository) view per ref id usually to a container and usually used at the end of a save/import method where the object gui type (of the new object) doesn't match with the type of the current $_GET["ref_id"] value
 fillCloneTemplate ($a_tpl_varname, $a_type)
 Fill object clone template This method can be called from any object GUI class that wants to offer object cloning.
 getCenterColumnHTML ()
 Get center column.
 getRightColumnHTML ()
 Display right column.
 setColumnSettings ($column_gui)
 May be overwritten in subclasses.
 checkPermission ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission and redirect on error.
 checkPermissionBool ($a_perm, $a_cmd="", $a_type="", $a_ref_id=null)
 Check permission.
 enableDragDropFileUpload ()
 Enables the file upload into this object by dropping files.
 handleAutoRating (ilObject $a_new_obj)
 Activate rating automatically if parent container setting.

Detailed Description

Member Function Documentation

ilObjSurveyAdministrationGUI::addSpecialUserObject ( )

Add one or more users as special users.

Definition at line 140 of file class.ilObjSurveyAdministrationGUI.php.

References exit.

{
// #7927: special users are deprecated
exit();
/*
if ((array_key_exists("user_id", $_POST)) && (count($_POST["user_id"])))
{
$this->object->addSpecialUsers($_POST["user_id"]);
unset($_SESSION["survey_adm_found_users"]);
}
else
{
ilUtil::sendInfo($this->lng->txt("adm_search_select_user"), TRUE);
}
$this->ctrl->redirect($this, "specialusers");
*/
}
& ilObjSurveyAdministrationGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

Definition at line 55 of file class.ilObjSurveyAdministrationGUI.php.

References $cmd, $ret, getSettingsTemplateConfig(), and ilObjectGUI\prepareOutput().

{
global $ilTabs;
$next_class = $this->ctrl->getNextClass($this);
$cmd = $this->ctrl->getCmd();
$this->prepareOutput();
switch($next_class)
{
case 'ilpermissiongui':
$ilTabs->activateTab("perm_settings");
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilsettingstemplategui':
$ilTabs->activateTab("templates");
include_once("./Services/Administration/classes/class.ilSettingsTemplateGUI.php");
$set_tpl_gui = new ilSettingsTemplateGUI($this->getSettingsTemplateConfig());
$this->ctrl->forwardCommand($set_tpl_gui);
break;
default:
if($cmd == "" || $cmd == "view")
{
$cmd = "settings";
}
$cmd .= "Object";
$this->$cmd();
break;
}
return true;
}

+ Here is the call graph for this function:

ilObjSurveyAdministrationGUI::getAdminTabs ( $tabs_gui)

administration tabs show only permissions and trash folder

Reimplemented from ilObjectGUI.

Definition at line 342 of file class.ilObjSurveyAdministrationGUI.php.

References getTabs().

{
$this->getTabs($tabs_gui);
}

+ Here is the call graph for this function:

ilObjSurveyAdministrationGUI::getSettingsTemplateConfig ( )
private

Get settings template configuration object.

Returns
object settings template configuration object

Definition at line 386 of file class.ilObjSurveyAdministrationGUI.php.

References ilObjectGUI\$lng, ilSettingsTemplateConfig\BOOL, and ilSettingsTemplateConfig\SELECT.

Referenced by executeCommand().

{
global $lng;
$lng->loadLanguageModule("survey");
include_once("./Services/Administration/classes/class.ilSettingsTemplateConfig.php");
$config = new ilSettingsTemplateConfig("svy");
$config->addHidableTab("survey_question_editor", $lng->txt("survey_question_editor_settings_template"));
$config->addHidableTab("constraints", $lng->txt("constraints"));
$config->addHidableTab("invitation", $lng->txt("invitation"));
$config->addHidableTab("meta_data", $lng->txt("meta_data"));
$config->addHidableTab("export", $lng->txt("export"));
$config->addSetting(
"use_pool",
$lng->txt("survey_question_pool_usage"),
true
);
$config->addSetting(
"anonymization_options",
$lng->txt("survey_auth_mode"),
true,
'personalized',
array('personalized' => $this->lng->txt("anonymize_personalized"),
'anonymize_without_code' => $this->lng->txt("anonymize_without_code"),
'anonymize_with_code' => $this->lng->txt("anonymize_with_code"))
);
$config->addSetting(
"rte_switch",
$lng->txt("set_edit_mode"),
true,
0,
array(0 => $this->lng->txt("rte_editor_disabled"),
1 => $this->lng->txt("rte_editor_enabled"))
);
$config->addSetting(
"enabled_start_date",
$lng->txt("start_date"),
true
);
$config->addSetting(
"enabled_end_date",
$lng->txt("end_date"),
true
);
$config->addSetting(
"show_question_titles",
$lng->txt("svy_show_questiontitles"),
true
);
return $config;
}

+ Here is the caller graph for this function:

ilObjSurveyAdministrationGUI::getTabs ( $tabs_gui)

get tabs public

Parameters
objecttabs gui object

Reimplemented from ilObjectGUI.

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

References ilObjectGUI\$lng.

Referenced by getAdminTabs().

{
global $ilAccess, $lng;
if ($ilAccess->checkAccess("read",'',$this->object->getRefId()))
{
$tabs_gui->addTab("settings",
$lng->txt("settings"),
$this->ctrl->getLinkTarget($this, "settings"));
// #7927: special users are deprecated
/*
$tabs_gui->addTab("specialusers",
$lng->txt("specialusers"),
$this->ctrl->getLinkTarget($this, "specialusers"));
*/
$tabs_gui->addTab("templates",
$lng->txt("adm_settings_templates"),
$this->ctrl->getLinkTargetByClass("ilsettingstemplategui", ""));
}
if ($ilAccess->checkAccess("edit_permission",'',$this->object->getRefId()))
{
$tabs_gui->addTab("perm_settings",
$lng->txt("perm_settings"),
$this->ctrl->getLinkTargetByClass('ilpermissiongui', "perm"));
}
}

+ Here is the caller graph for this function:

ilObjSurveyAdministrationGUI::ilObjSurveyAdministrationGUI (   $a_data,
  $a_id,
  $a_call_by_reference 
)

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

References ilObjectGUI\$lng, and ilObjectGUI\ilObjectGUI().

{
global $rbacsystem, $lng;
$this->type = "svyf";
$lng->loadLanguageModule("survey");
$this->ilObjectGUI($a_data,$a_id,$a_call_by_reference,false);
}

+ Here is the call graph for this function:

ilObjSurveyAdministrationGUI::removeSpecialUserObject ( )

Definition at line 159 of file class.ilObjSurveyAdministrationGUI.php.

References exit.

{
// #7927: special users are deprecated
exit();
/*
if ((array_key_exists("special_user_id", $_POST)) && (count($_POST["special_user_id"])))
{
$this->object->removeSpecialUsers($_POST["special_user_id"]);
unset($_SESSION["adm_removed_users"]);
}
else
{
ilUtil::sendInfo($this->lng->txt("adm_remove_select_user"), TRUE);
}
$this->ctrl->redirect($this, "specialusers");
*/
}
ilObjSurveyAdministrationGUI::saveObject ( )

save object public

Reimplemented from ilObjectGUI.

Definition at line 97 of file class.ilObjSurveyAdministrationGUI.php.

References ilUtil\sendSuccess().

{
global $rbacadmin;
// create and insert forum in objecttree
$newObj = parent::saveObject();
// put here object specific stuff
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_added"),true);
$this->ctrl->redirect($this);
}

+ Here is the call graph for this function:

ilObjSurveyAdministrationGUI::saveSettingsObject ( )

Save survey settings.

Definition at line 319 of file class.ilObjSurveyAdministrationGUI.php.

References $_POST, $ilCtrl, and ilUtil\sendSuccess().

{
global $ilCtrl, $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->object->getRefId())) $ilCtrl->redirect($this, "settings");
$surveySetting = new ilSetting("survey");
$surveySetting->set("unlimited_invitation", ($_POST["unlimited_invitation"]) ? "1" : "0");
$surveySetting->set("use_anonymous_id", ($_POST["use_anonymous_id"]) ? "1" : "0");
if($_POST["skcust"] == "lng")
{
$surveySetting->set("skipped_is_custom", false);
}
else
{
$surveySetting->set("skipped_is_custom", true);
$surveySetting->set("skipped_custom_value", trim($_POST["cust_value"]));
}
ilUtil::sendSuccess($this->lng->txt("msg_obj_modified"), true);
$ilCtrl->redirect($this, "settings");
}

+ Here is the call graph for this function:

ilObjSurveyAdministrationGUI::searchObject ( )

Definition at line 112 of file class.ilObjSurveyAdministrationGUI.php.

References $_POST, $_SESSION, ilObjUser\searchUsers(), and ilUtil\sendInfo().

{
unset($_SESSION["survey_adm_found_users"]);
if (strlen($_POST["search"]) < 2)
{
ilUtil::sendInfo($this->lng->txt("adm_search_string_too_small"), TRUE);
}
else
{
include_once "./Services/User/classes/class.ilObjUser.php";
$found = ilObjUser::searchUsers($_POST["search"], $active = 1, $a_return_ids_only = false, $filter_settings = FALSE);
if (count($found))
{
$_SESSION["survey_adm_found_users"] = $found;
}
else
{
ilUtil::sendInfo($this->lng->txt("adm_no_users_found"), TRUE);
}
}
$this->ctrl->redirect($this, "specialusers");
}

+ Here is the call graph for this function:

ilObjSurveyAdministrationGUI::settingsObject ( )

display survey settings form

Default settings tab for Survey settings

public

Definition at line 260 of file class.ilObjSurveyAdministrationGUI.php.

References $_GET, $ilCtrl, ilObjectGUI\$lng, ilObjectGUI\$tpl, ilCheckboxInputGUI\setChecked(), ilRadioOption\setInfo(), ilFormPropertyGUI\setRequired(), and ilTextInputGUI\setSize().

{
global $ilAccess, $rbacreview, $lng, $ilCtrl, $tpl, $ilTabs;
$ilTabs->activateTab("settings");
$surveySetting = new ilSetting("survey");
$unlimited_invitation = array_key_exists("unlimited_invitation", $_GET) ? $_GET["unlimited_invitation"] : $surveySetting->get("unlimited_invitation");
$use_anonymous_id = array_key_exists("use_anonymous_id", $_GET) ? $_GET["use_anonymous_id"] : $surveySetting->get("use_anonymous_id");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($ilCtrl->getFormAction($this));
$form->setTitle($lng->txt("survey_defaults"));
// unlimited invitation
$enable = new ilCheckboxInputGUI($lng->txt("survey_unlimited_invitation"), "unlimited_invitation");
$enable->setChecked($unlimited_invitation);
$enable->setInfo($lng->txt("survey_unlimited_invitation_desc"));
$form->addItem($enable);
// Survey Code
$code = new ilCheckboxInputGUI($lng->txt("use_anonymous_id"), "use_anonymous_id");
$code->setChecked($use_anonymous_id);
$code->setInfo($lng->txt("use_anonymous_id_desc"));
$form->addItem($code);
// Skipped
$eval_skipped = new ilRadioGroupInputGUI($lng->txt("svy_eval_skipped_value"), "skcust");
$eval_skipped->setRequired(true);
$form->addItem($eval_skipped);
$eval_skipped->setValue($surveySetting->get("skipped_is_custom", false)
? "cust"
: "lng");
$skipped_lng = new ilRadioOption($lng->txt("svy_eval_skipped_value_lng"), "lng");
$skipped_lng->setInfo(sprintf($lng->txt("svy_eval_skipped_value_lng_info"), $lng->txt("skipped")));
$eval_skipped->addOption($skipped_lng);
$skipped_cust = new ilRadioOption($lng->txt("svy_eval_skipped_value_custom"), "cust");
$skipped_cust->setInfo($lng->txt("svy_eval_skipped_value_custom_info"));
$eval_skipped->addOption($skipped_cust);
$skipped_cust_value = new ilTextInputGUI($lng->txt("svy_eval_skipped_value_custom_value"), "cust_value");
$skipped_cust_value->setSize(15);
$skipped_cust_value->setValue($surveySetting->get("skipped_custom_value", ""));
$skipped_cust->addSubItem($skipped_cust_value);
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$form->addCommandButton("saveSettings", $lng->txt("save"));
}
$tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyAdministrationGUI::specialusersObject ( )

Add/remove users who may run a survey multiple times.

public

Definition at line 183 of file class.ilObjSurveyAdministrationGUI.php.

References exit.

{
global $ilAccess, $ilTabs;
// #7927: special users are deprecated
exit();
/*
$ilTabs->activateTab("specialusers");
$a_write_access = ($ilAccess->checkAccess("write", "", $this->object->getRefId())) ? true : false;
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_adm_specialusers.html", "Modules/Survey");
$found_users = "";
if (array_key_exists("survey_adm_found_users", $_SESSION))
{
if (count($_SESSION["survey_adm_found_users"]))
{
$data = $_SESSION["survey_adm_found_users"];
include_once("./Modules/Survey/classes/tables/class.ilFoundUsersTableGUI.php");
$table_gui = new ilFoundUsersTableGUI($this, "specialusers");
$table_gui->setPrefix("fu");
$table_gui->setTitle($this->lng->txt("found_users"));
$table_gui->setData($data);
if ($a_write_access)
{
$table_gui->addCommandButton("addSpecialUser", $this->lng->txt("add"));
$table_gui->setSelectAllCheckbox("user_id");
}
$found_users = $table_gui->getHTML();
}
}
if (strlen($found_users))
{
$this->tpl->setCurrentBlock("search_results");
$this->tpl->setVariable("SEARCH_RESULTS", $found_users);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("TXT_SEARCH_USER", $this->lng->txt("search_users"));
$this->tpl->setVariable("TXT_SEARCH", $this->lng->txt("search"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "search"));
$special_users = $this->object->getSpecialUsers();
if (count($special_users))
{
include_once("./Modules/Survey/classes/tables/class.ilSpecialUsersTableGUI.php");
$table_gui = new ilSpecialUsersTableGUI($this, "specialusers", $a_write_access);
$table_gui->setPrefix("su");
$table_gui->setTitle($this->lng->txt("adm_special_users"));
$table_gui->setData($special_users);
if ($a_write_access)
{
$table_gui->addCommandButton("removeSpecialUser", $this->lng->txt("remove"));
$table_gui->setSelectAllCheckbox("special_user_id");
}
$this->tpl->setVariable("SPECIAL_USERS", $table_gui->getHTML());
}
else
{
$this->tpl->setVariable("SPECIAL_USERS", $this->lng->txt("adm_no_special_users"));
}
$this->tpl->parseCurrentBlock();
*/
}

Field Documentation

ilObjSurveyAdministrationGUI::$conditions

Constructor public.

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


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