ILIAS  eassessment Revision 61809
 All Data Structures Namespaces Files Functions Variables Groups Pages
ilObjSurveyGUI Class Reference

Class ilObjSurveyGUI. More...

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

Public Member Functions

 ilObjSurveyGUI ()
 Constructor public.
 backToRepositoryObject ()
 executeCommand ()
 execute command
 saveObject ()
 save object public
 cancelObject ($in_rep=false)
 cancel action and go back to previous page public
 cancelPropertiesObject ()
 Cancel actions in the properties form.
 handleWriteAccess ()
 Checks for write access and returns to the parent object.
 savePropertiesObject ()
 Save the survey properties.
 propertiesObject ($checkonly=FALSE)
 Display and fill the properties form of the test.
 removeQuestionsObject ()
 Remove questions from the survey.
 insertQuestionsObject ()
 Insert questions into the survey.
 insertQuestionblocksObject ()
 Insert question blocks into the survey.
 changeDatatypeObject ()
 Change the object type in the question browser.
 filterQuestionblockBrowserObject ()
 Filter the questionblock browser.
 resetfilterQuestionblockBrowserObject ()
 Reset the questionblock browser filter.
 browseForQuestionblocksObject ($arrFilter=null)
 list questions of question pool
 filterQuestionBrowserObject ()
 Filter the question browser.
 resetfilterQuestionBrowserObject ()
 Reset the question browser filter.
 browseForQuestionsObject ($arrFilter=null)
 list questions of question pool
 removeQuestionsForm ($checked_questions, $checked_questionblocks)
 Creates a confirmation form to remove questions from the survey.
 defineQuestionblock ($questionblock_id="")
 Displays the definition form for a question block.
 createQuestionObject ()
 Creates a form to select a survey question pool for storage.
 cancelCreateQuestionObject ()
 Cancel the creation of a new questions in a survey.
 executeCreateQuestionObject ()
 Execute the creation of a new questions in a survey.
 addHeadingObject ($checkonly=false, $question_id="")
 Creates a form to add a heading to a survey.
 confirmInsertQuestionObject ()
 Insert questions or question blocks into the survey after confirmation.
 cancelInsertQuestionObject ()
 Cancels insert questions or question blocks into the survey.
 saveHeadingObject ()
 Saves an edited heading in the survey questions list.
 cancelHeadingObject ()
 Cancels saving a heading in the survey questions list.
 confirmRemoveHeadingObject ()
 Remove a survey heading after confirmation.
 cancelRemoveHeadingObject ()
 Cancels the removal of survey headings.
 confirmRemoveHeadingForm ()
 Displays a confirmation form to delete a survey heading.
 confirmRemoveQuestionsObject ()
 Remove questions from survey after confirmation.
 cancelRemoveQuestionsObject ()
 Cancel remove questions from survey after confirmation.
 defineQuestionblockObject ()
 Cancel remove questions from survey after confirmation.
 saveDefineQuestionblockObject ()
 Confirm define a question block.
 unfoldQuestionblockObject ()
 Unfold a question block.
 cancelDefineQuestionblockObject ()
 Cancel define a question block.
 moveQuestionsObject ()
 Move questions.
 insertQuestions ($insert_mode)
 Insert questions from move clipboard.
 insertQuestionsBeforeObject ()
 Insert questions before selection.
 insertQuestionsAfterObject ()
 Insert questions after selection.
 saveObligatoryObject ()
 Save obligatory states.
 questionsObject ()
 Creates the questions form for the survey object.
 evaluationObject ()
 Redirects the evaluation object call to the ilSurveyEvaluationGUI class.
 disinviteUserGroupObject ()
 Disinvite users or groups from a survey.
 inviteUserGroupObject ()
 Invite users or groups to a survey.
 saveInvitationStatusObject ()
 Saves the status of the invitation tab.
 inviteObject ()
 Creates the output for user/group invitation to a survey.
 deleteAllUserDataObject ()
 Creates a confirmation form for delete all user data.
 confirmDeleteAllUserDataObject ()
 Deletes all user data of the survey after confirmation.
 cancelDeleteAllUserDataObject ()
 Cancels delete of all user data in maintenance.
 confirmDeleteSelectedUserDataObject ()
 Deletes all user data for the test object.
 cancelDeleteSelectedUserDataObject ()
 Cancels the deletion of all user data for the test object.
 deleteSingleUserResultsObject ()
 Asks for a confirmation to delete selected user data of the test object.
 maintenanceObject ()
 Participants maintenance.
 importObject ()
 display dialogue for importing tests
 uploadObject ($redirect=true)
 display status information or report errors messages in case of error
 createObject ()
 form for new content object creation
 importFileObject ()
 form for new survey object import
 exportObject ()
 createExportFileObject ()
 create export file
 downloadExportFileObject ()
 download export file
 confirmDeleteExportFileObject ()
 confirmation screen for export file deletion
 cancelDeleteExportFileObject ()
 cancel deletion of export files
 deleteExportFileObject ()
 delete export files
 setCodeLanguageObject ()
 Change survey language for direct access URL's.
 codesObject ()
 Display the survey access codes tab.
 deleteCodesObject ()
 Delete a list of survey codes.
 exportCodesObject ()
 Exports a list of survey codes.
 exportAllCodesObject ()
 Exports all survey codes.
 createSurveyCodesObject ()
 Create access codes for the survey.
 codesMailObject ($checkonly=false)
 Sending access codes via email.
 insertSavedMessageObject ()
 deleteSavedMessageObject ()
 mailCodesObject ()
 sendCodesMailObject ()
 cancelCodesMailObject ()
 deleteInternalMailRecipientObject ()
 importExternalRecipientsFromDatasetObject ()
 importExternalRecipientsFromTextObject ()
 importExternalRecipientsFromFileObject ()
 importExternalMailRecipientsObject ($checkonly=false, $formindex=-1)
 constraintsAddObject ()
 Add a precondition for a survey question or question block.
 constraintStep1Object ()
 Handles the first step of the precondition add action.
 constraintStep2Object ()
 Handles the second step of the precondition add action.
 constraintStep3Object ()
 Handles the third step of the precondition add action.
 constraintForm ($step, $postvalues, &$survey_questions, $questions=FALSE)
 deleteConstraintsObject ()
 Delete constraints of a survey.
 createConstraintsObject ()
 editPreconditionObject ()
 constraintsObject ()
 Administration page for survey constraints.
 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
 setNewTemplate ()
 infoScreen ()
 show information screen
 printViewObject ()
 Creates a print view of the survey questions.
 addLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 questionsSubtabs ($a_cmd)
 Set the subtabs for the questions tab.
 setCodesSubtabs ()
 Set the tabs for the access codes section.
 setEvalSubtabs ()
 Set the tabs for the evaluation output.
 setBrowseForQuestionsSubtabs ()
 getTabs (&$tabs_gui)
 adds tabs to tab gui object
 _goto ($a_target, $a_access_code="")
 redirect script
- 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
 getAdminTabs (&$tabs_gui)
 administration tabs show only permissions and trash folder
 getHTML ()
 undeleteObject ()
 Get objects back from trash.
 confirmedDeleteObject ()
 confirmed deletion of object -> objects are moved to trash or deleted immediately, if trash is disabled
 cancelDeleteObject ()
 cancel deletion of object
 removeFromSystemObject ()
 remove objects from trash bin and all entries therefore every object needs a specific deleteObject() method
 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.
 trashObject ()
 Show trash content of object.
 getTemplateFile ($a_cmd, $a_type="")
 get a template blockfile format: tpl.
 cloneAllObject ()
 Clone single (not container object) Method is overwritten in ilContainerGUI.
 copyWizardHasOptions ($a_mode)
 Check if there is any modules specific option.

Private Member Functions

 createQuestionPool ($name="dummy")
 Creates a new questionpool and returns the reference id.

Additional Inherited Members

- 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
- Protected Member Functions inherited from ilObjectGUI
 assignObject ()
 prepareOutput ()
 prepare output
 setTitleAndDescription ()
 called by prepare output
 showUpperIcon ()
 setTabs ()
 set admin tabs public
 setAdminTabs ()
 set admin tabs public
 setLocator ()
 set Locator
 omitLocator ($a_omit=true)
 addAdminLocatorItems ()
 should be overwritten to add object specific items (repository items are preloaded)
 displayEditForm ($fields)
 display edit form (usually called by editObject)
 afterUpdate ()
 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)
 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
 __showClipboardTable ($a_result_set, $a_from="")
 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="")

Detailed Description

Member Function Documentation

ilObjSurveyGUI::_goto (   $a_target,
  $a_access_code = "" 
)

redirect script

Parameters
string$a_target

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

References $_GET, $_SESSION, $ilErr, ilObjectGUI\$lng, ilObject\_lookupObjId(), ilObject\_lookupTitle(), exit, and ilUtil\sendFailure().

{
global $ilAccess, $ilErr, $lng;
if ($ilAccess->checkAccess("read", "", $a_target))
{
include_once "./Services/Utilities/classes/class.ilUtil.php";
if (strlen($a_access_code))
{
$_SESSION["anonymous_id"][ilObject::_lookupObjId($a_target)] = $a_access_code;
$_GET["baseClass"] = "ilObjSurveyGUI";
$_GET["cmd"] = "infoScreen";
$_GET["ref_id"] = $a_target;
include("ilias.php");
}
else
{
$_GET["baseClass"] = "ilObjSurveyGUI";
$_GET["cmd"] = "infoScreen";
$_GET["ref_id"] = $a_target;
include("ilias.php");
}
}
else if ($ilAccess->checkAccess("read", "", ROOT_FOLDER_ID))
{
$_GET["cmd"] = "frameset";
$_GET["target"] = "";
$_GET["ref_id"] = ROOT_FOLDER_ID;
ilUtil::sendFailure(sprintf($lng->txt("msg_no_perm_read_item"),
include("repository.php");
}
$ilErr->raiseError($lng->txt("msg_no_perm_read_lm"), $ilErr->FATAL);
}

+ Here is the call graph for this function:

ilObjSurveyGUI::addHeadingObject (   $checkonly = false,
  $question_id = "" 
)

Creates a form to add a heading to a survey.

Parameters
integer$question_idThe id of the question directly after the heading. If the id is given, an existing heading will be edited public

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

References $_GET, $_POST, $errors, ilObjAdvancedEditing\_getUsedHTMLTags(), questionsSubtabs(), ilSelectInputGUI\setOptions(), and ilTextAreaInputGUI\setValue().

Referenced by questionsObject(), and saveHeadingObject().

{
$this->questionsSubtabs("questions");
global $ilAccess;
$save = (strcmp($this->ctrl->getCmd(), "saveHeading") == 0) ? TRUE : FALSE;
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("100%");
$form->setId("survey_heading");
// general properties
$header = new ilFormSectionHeaderGUI();
if ($question_id)
{
$header->setTitle($this->lng->txt("edit_heading"));
}
else
{
$header->setTitle($this->lng->txt("add_heading"));
}
$form->addItem($header);
$survey_questions =& $this->object->getSurveyQuestions();
// heading
$heading = new ilTextAreaInputGUI($this->lng->txt("heading"), "heading");
$heading->setValue($this->object->prepareTextareaOutput(array_key_exists('heading', $_POST) ? $_POST['heading'] : $survey_questions[$question_id]["heading"]));
$heading->setRows(10);
$heading->setCols(80);
$heading->setUseRte(TRUE);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$heading->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("survey"));
$heading->removePlugin("ibrowser");
$heading->setRTESupport($this->object->getId(), "svy", "survey");
$heading->setRequired(true);
$form->addItem($heading);
$insertbefore = new ilSelectInputGUI($this->lng->txt("insert"), "insertbefore");
$options = array();
foreach ($survey_questions as $key => $value)
{
$options[$key] = $this->lng->txt("before") . ": \"" . $value["title"] . "\"";
}
$insertbefore->setOptions($options);
$insertbefore->setValue((array_key_exists('insertbefore', $_POST)) ? $_POST['insertbefore'] : $question_id);
$insertbefore->setRequired(true);
if ($question_id || array_key_exists('insertbefore', $_POST))
{
$insertbefore->setDisabled(true);
}
$form->addItem($insertbefore);
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form->addCommandButton("saveHeading", $this->lng->txt("save"));
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form->addCommandButton("cancelHeading", $this->lng->txt("cancel"));
$errors = false;
if ($save)
{
$errors = !$form->checkInput();
$form->setValuesByPost();
if ($errors) $checkonly = false;
}
if (!$checkonly) $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
return $errors;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::addLocatorItems ( )

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

Reimplemented from ilObjectGUI.

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

References $_GET.

{
global $ilLocator;
switch ($this->ctrl->getCmd())
{
case "next":
case "previous":
case "start":
case "resume":
case "redirectQuestion":
$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $_GET["ref_id"]);
break;
case "evaluation":
case "checkEvaluationAccess":
case "evaluationdetails":
case "evaluationuser":
$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluation"), "", $_GET["ref_id"]);
break;
case "create":
case "save":
case "cancel":
case "importFile":
case "cloneAll":
break;
case "infoScreen":
$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, "infoScreen"), "", $_GET["ref_id"]);
break;
default:
$ilLocator->addItem($this->object->getTitle(), $this->ctrl->getLinkTarget($this, ""), "", $_GET["ref_id"]);
break;
}
}
ilObjSurveyGUI::backToRepositoryObject ( )

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

References $path, ilObjectGUI\getReturnLocation(), and ilUtil\redirect().

{
include_once "./Services/Utilities/classes/class.ilUtil.php";
$path = $this->tree->getPathFull($this->object->getRefID());
ilUtil::redirect($this->getReturnLocation("cancel","./repository.php?cmd=frameset&ref_id=" . $path[count($path) - 2]["child"]));
}

+ Here is the call graph for this function:

ilObjSurveyGUI::browseForQuestionblocksObject (   $arrFilter = null)

list questions of question pool

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

References $_GET, ilObjectGUI\$data, setBrowseForQuestionsSubtabs(), and ilSurveyQuestionblockbrowserTableGUI\setEditable().

{
global $rbacsystem;
global $ilUser;
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_questionbrowser.html", "Modules/Survey");
include_once "./Modules/Survey/classes/tables/class.ilSurveyQuestionblockbrowserTableGUI.php";
$table_gui = new ilSurveyQuestionblockbrowserTableGUI($this, 'browseForQuestionblocks', (($rbacsystem->checkAccess('write', $_GET['ref_id']) ? true : false)));
$table_gui->setEditable($rbacsystem->checkAccess('write', $_GET['ref_id']));
$arrFilter = array();
foreach ($table_gui->getFilterItems() as $item)
{
if ($item->getValue() !== false)
{
$arrFilter[$item->getPostVar()] = $item->getValue();
}
}
$data = $this->object->getQuestionblocksTable($arrFilter);
$table_gui->setData($data);
$this->tpl->setVariable('TABLE', $table_gui->getHTML());
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, 'changeDatatype'));
$this->tpl->setVariable("OPTION_QUESTIONS", $this->lng->txt("questions"));
$this->tpl->setVariable("OPTION_QUESTIONBLOCKS", $this->lng->txt("questionblocks"));
$this->tpl->setVariable("SELECTED_QUESTIONBLOCKS", " selected=\"selected\"");
$this->tpl->setVariable("TEXT_DATATYPE", $this->lng->txt("display_all_available"));
$this->tpl->setVariable("BTN_CHANGE", $this->lng->txt("change"));
}

+ Here is the call graph for this function:

ilObjSurveyGUI::browseForQuestionsObject (   $arrFilter = null)

list questions of question pool

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

References $_GET, ilObjectGUI\$data, setBrowseForQuestionsSubtabs(), and ilSurveyQuestionbrowserTableGUI\setEditable().

{
global $rbacsystem;
global $ilUser;
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_questionbrowser.html", "Modules/Survey");
include_once "./Modules/Survey/classes/tables/class.ilSurveyQuestionbrowserTableGUI.php";
$table_gui = new ilSurveyQuestionbrowserTableGUI($this, 'browseForQuestions', (($rbacsystem->checkAccess('write', $_GET['ref_id']) ? true : false)));
$table_gui->setEditable($rbacsystem->checkAccess('write', $_GET['ref_id']));
$arrFilter = array();
foreach ($table_gui->getFilterItems() as $item)
{
if ($item->getValue() !== false)
{
$arrFilter[$item->getPostVar()] = $item->getValue();
}
}
$data = $this->object->getQuestionsTable($arrFilter);
$table_gui->setData($data);
$this->tpl->setVariable('TABLE', $table_gui->getHTML());
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, 'changeDatatype'));
$this->tpl->setVariable("OPTION_QUESTIONS", $this->lng->txt("questions"));
$this->tpl->setVariable("OPTION_QUESTIONBLOCKS", $this->lng->txt("questionblocks"));
$this->tpl->setVariable("SELECTED_QUESTIONS", " selected=\"selected\"");
$this->tpl->setVariable("TEXT_DATATYPE", $this->lng->txt("display_all_available"));
$this->tpl->setVariable("BTN_CHANGE", $this->lng->txt("change"));
}

+ Here is the call graph for this function:

ilObjSurveyGUI::cancelCodesMailObject ( )

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

{
$this->ctrl->redirect($this, 'codesMail');
}
ilObjSurveyGUI::cancelCreateQuestionObject ( )

Cancel the creation of a new questions in a survey.

private

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

{
$this->ctrl->redirect($this, "questions");
}
ilObjSurveyGUI::cancelDefineQuestionblockObject ( )

Cancel define a question block.

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

References ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt('msg_cancel'), true);
$this->ctrl->redirect($this, "questions");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::cancelDeleteAllUserDataObject ( )

Cancels delete of all user data in maintenance.

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

{
$this->ctrl->redirect($this, "maintenance");
}
ilObjSurveyGUI::cancelDeleteExportFileObject ( )

cancel deletion of export files

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

References ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt('msg_cancel'), true);
$this->ctrl->redirect($this, "export");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::cancelDeleteSelectedUserDataObject ( )

Cancels the deletion of all user data for the test object.

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

References ilUtil\sendInfo().

{
ilUtil::sendInfo($this->lng->txt('msg_cancel'), true);
$this->ctrl->redirect($this, "maintenance");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::cancelHeadingObject ( )

Cancels saving a heading in the survey questions list.

Cancels saving a heading in the survey questions list

public

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

{
$this->ctrl->redirect($this, "questions");
}
ilObjSurveyGUI::cancelInsertQuestionObject ( )

Cancels insert questions or question blocks into the survey.

public

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

{
$this->ctrl->redirect($this, "questions");
}
ilObjSurveyGUI::cancelObject (   $in_rep = false)

cancel action and go back to previous page public

Reimplemented from ilObjectGUI.

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

References $_GET, and ilUtil\redirect().

{
ilUtil::redirect("repository.php?cmd=frameset&ref_id=".$_GET["ref_id"]);
}

+ Here is the call graph for this function:

ilObjSurveyGUI::cancelPropertiesObject ( )

Cancel actions in the properties form.

Cancel actions in the properties form

private

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

{
$this->ctrl->redirect($this, "properties");
}
ilObjSurveyGUI::cancelRemoveHeadingObject ( )

Cancels the removal of survey headings.

Cancels the removal of survey headings

public

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

{
$this->ctrl->redirect($this, "questions");
}
ilObjSurveyGUI::cancelRemoveQuestionsObject ( )

Cancel remove questions from survey after confirmation.

Cancel remove questions from survey after confirmation

private

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

{
$this->ctrl->redirect($this, "questions");
}
ilObjSurveyGUI::changeDatatypeObject ( )

Change the object type in the question browser.

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

References $_POST.

{
global $ilUser;
$ilUser->writePref('svy_insert_type', $_POST['datatype']);
switch ($_POST["datatype"])
{
case 0:
$this->ctrl->redirect($this, 'browseForQuestionblocks');
break;
case 1:
default:
$this->ctrl->redirect($this, 'browseForQuestions');
break;
}
}
ilObjSurveyGUI::codesMailObject (   $checkonly = false)

Sending access codes via email.

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

References ilObjectGUI\$data, $errors, handleWriteAccess(), and setCodesSubtabs().

{
global $ilAccess;
$this->setCodesSubtabs();
$savefields = (strcmp($this->ctrl->getCmd(), "saveMailTableFields") == 0) ? TRUE : FALSE;
include_once "./Modules/Survey/classes/tables/class.ilSurveyCodesMailTableGUI.php";
$data = $this->object->getExternalCodeRecipients();
$table_gui = new ilSurveyCodesMailTableGUI($this, 'codesMail');
$table_gui->setData($data);
$table_gui->setTitle($this->lng->txt('externalRecipients'));
$table_gui->completeColumns();
$tabledata = $table_gui->getHTML();
if (!$checkonly)
{
$this->tpl->setVariable('ADM_CONTENT', $tabledata);
}
return $errors;
}

+ Here is the call graph for this function:

ilObjSurveyGUI::codesObject ( )

Display the survey access codes tab.

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

References $lang, handleWriteAccess(), ilUtil\sendInfo(), setCodesSubtabs(), and ilSelectInputGUI\setOptions().

{
$this->setCodesSubtabs();
global $ilUser, $ilToolbar;
if ($this->object->getAnonymize() != 1)
{
return ilUtil::sendInfo($this->lng->txt("survey_codes_no_anonymization"));
}
$default_lang = $ilUser->getPref("survey_code_language");
// creation buttons
$ilToolbar->setFormAction($this->ctrl->getFormAction($this));
$languages = $this->lng->getInstalledLanguages();
$options = array();
foreach ($languages as $lang)
{
$options[$lang] = $this->lng->txt("lang_$lang");
}
include_once("./Services/Form/classes/class.ilSelectInputGUI.php");
$si = new ilSelectInputGUI($this->lng->txt("survey_codes_lang"), "lang");
$si->setOptions($options);
$si->setValue($default_lang);
$ilToolbar->addInputItem($si, true);
$ilToolbar->addFormButton($this->lng->txt("set"), "setCodeLanguage");
include_once "./Modules/Survey/classes/tables/class.ilSurveyCodesTableGUI.php";
$table_gui = new ilSurveyCodesTableGUI($this, 'codes');
$survey_codes =& $this->object->getSurveyCodesTableData($default_lang);
$table_gui->setData($survey_codes);
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_codes.html", true);
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "codes"));
$this->tpl->setVariable("TEXT_CREATE", $this->lng->txt("create"));
$this->tpl->setVariable("TEXT_SURVEY_CODES", $this->lng->txt("new_survey_codes"));
$this->tpl->setVariable('TABLE', $table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::confirmDeleteAllUserDataObject ( )

Deletes all user data of the survey after confirmation.

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

References ilUtil\sendSuccess().

{
$this->object->deleteAllUserData();
ilUtil::sendSuccess($this->lng->txt("svy_all_user_data_deleted"), true);
$this->ctrl->redirect($this, "maintenance");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::confirmDeleteExportFileObject ( )

confirmation screen for export file deletion

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

References $_POST, ilObjectGUI\$data, handleWriteAccess(), IL_CAL_DATETIME, IL_CAL_UNIX, ilUtil\sendFailure(), and ilUtil\sendQuestion().

{
if (!isset($_POST["file"]))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
$this->ctrl->redirect($this, "export");
}
ilUtil::sendQuestion($this->lng->txt("info_delete_sure"));
$export_dir = $this->object->getExportDirectory();
$export_files = $this->object->getExportFiles($export_dir);
$data = array();
if (count($_POST["file"]) > 0)
{
foreach ($_POST["file"] as $exp_file)
{
$file_arr = explode("__", $exp_file);
$date = new ilDateTime($file_arr[0], IL_CAL_UNIX);
array_push($data, array(
'file' => $exp_file,
'size' => filesize($export_dir."/".$exp_file),
'date' => $date->get(IL_CAL_DATETIME)
));
}
}
include_once "./Modules/Survey/classes/tables/class.ilSurveyExportTableGUI.php";
$table_gui = new ilSurveyExportTableGUI($this, 'export', true);
$table_gui->setData($data);
$this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::confirmDeleteSelectedUserDataObject ( )

Deletes all user data for the test object.

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

References $_POST, and ilUtil\sendSuccess().

{
$this->object->removeSelectedSurveyResults($_POST["chbUser"]);
ilUtil::sendSuccess($this->lng->txt("svy_selected_user_data_deleted"), true);
$this->ctrl->redirect($this, "maintenance");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::confirmInsertQuestionObject ( )

Insert questions or question blocks into the survey after confirmation.

public

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

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

{
// insert questions from test after confirmation
foreach ($_POST as $key => $value) {
if (preg_match("/id_(\d+)/", $key, $matches)) {
if ($_GET["browsetype"] == 1)
{
$this->object->insertQuestion($matches[1]);
}
else
{
$this->object->insertQuestionBlock($matches[1]);
}
}
}
$this->object->saveCompletionStatus();
ilUtil::sendSuccess($this->lng->txt("questions_inserted"), true);
$this->ctrl->redirect($this, "questions");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::confirmRemoveHeadingForm ( )

Displays a confirmation form to delete a survey heading.

Displays a confirmation form to delete a survey heading

public

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

References $_GET, and ilUtil\sendQuestion().

Referenced by questionsObject().

{
ilUtil::sendQuestion($this->lng->txt("confirm_remove_heading"));
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_confirm_removeheading.html", "Modules/Survey");
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("BTN_CONFIRM_REMOVE", $this->lng->txt("confirm"));
$this->tpl->setVariable("BTN_CANCEL_REMOVE", $this->lng->txt("cancel"));
$this->tpl->setVariable("REMOVE_HEADING", $_GET["removeheading"]);
$this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "confirmRemoveHeading"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::confirmRemoveHeadingObject ( )

Remove a survey heading after confirmation.

Remove a survey heading after confirmation

public

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

References $_POST.

{
$this->object->saveHeading("", $_POST["removeheading"]);
$this->ctrl->redirect($this, "questions");
}
ilObjSurveyGUI::confirmRemoveQuestionsObject ( )

Remove questions from survey after confirmation.

Remove questions from survey after confirmation

private

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

References $_POST, and ilUtil\sendSuccess().

{
$checked_questions = array();
$checked_questionblocks = array();
foreach ($_POST as $key => $value)
{
if (preg_match("/id_(\d+)/", $key, $matches))
{
array_push($checked_questions, $matches[1]);
}
if (preg_match("/id_qb_(\d+)/", $key, $matches))
{
array_push($checked_questionblocks, $matches[1]);
}
}
$this->object->removeQuestions($checked_questions, $checked_questionblocks);
$this->object->saveCompletionStatus();
ilUtil::sendSuccess($this->lng->txt("questions_removed"), true);
$this->ctrl->redirect($this, "questions");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::constraintForm (   $step,
  $postvalues,
$survey_questions,
  $questions = FALSE 
)

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

References $_GET, $_SESSION, $title, SurveyQuestion\_getQuestionTypeName(), SurveyQuestion\_includeClass(), ilRadioGroupInputGUI\addOption(), and ilSelectInputGUI\setOptions().

Referenced by constraintStep1Object(), constraintStep2Object(), and constraintStep3Object().

{
if (strlen($_GET["start"])) $this->ctrl->setParameter($this, "start", $_GET["start"]);
$this->ctrl->saveParameter($this, "precondition");
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("100%");
$form->setId("constraintsForm");
$title = "";
if ($survey_questions[$_SESSION["constraintstructure"][$_GET["start"]][0]]["questionblock_id"] > 0)
{
$title = $this->lng->txt("questionblock") . ": " . $survey_questions[$_SESSION["constraintstructure"][$_GET["start"]][0]]["questionblock_title"];
}
else
{
$title = $this->lng->txt($survey_questions[$_SESSION["constraintstructure"][$_GET["start"]][0]]["type_tag"]) . ": " . $survey_questions[$_SESSION["constraintstructure"][$_GET["start"]][0]]["title"];
}
$header = new ilFormSectionHeaderGUI();
$header->setTitle($title);
$form->addItem($header);
$fulfilled = new ilRadioGroupInputGUI($this->lng->txt("constraint_fulfilled"), "c");
$fulfilled->addOption(new ilRadioOption($this->lng->txt("conjunction_and"), '0', ''));
$fulfilled->addOption(new ilRadioOption($this->lng->txt("conjunction_or"), '1', ''));
$fulfilled->setValue((strlen($postvalues['c'])) ? $postvalues['c'] : 0);
$form->addItem($fulfilled);
$step1 = new ilSelectInputGUI($this->lng->txt("step") . " 1: " . $this->lng->txt("select_prior_question"), "q");
$options = array();
if (is_array($questions))
{
foreach ($questions as $question)
{
$options[$question["question_id"]] = $question["title"] . " (" . SurveyQuestion::_getQuestionTypeName($question["type_tag"]) . ")";
}
}
$step1->setOptions($options);
$step1->setValue($postvalues["q"]);
$form->addItem($step1);
if ($step > 1)
{
$relations = $this->object->getAllRelations();
$step2 = new ilSelectInputGUI($this->lng->txt("step") . " 2: " . $this->lng->txt("select_relation"), "r");
$options = array();
foreach ($relations as $rel_id => $relation)
{
if (in_array($relation["short"], $survey_questions[$postvalues["q"]]["availableRelations"]))
{
$options[$rel_id] = $relation['short'];
}
}
$step2->setOptions($options);
$step2->setValue($postvalues["r"]);
$form->addItem($step2);
}
if ($step > 2)
{
$variables =& $this->object->getVariables($postvalues["q"]);
$question_type = $survey_questions[$postvalues["q"]]["type_tag"];
include_once "./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
$question = new $question_type();
$question->loadFromDb($postvalues["q"]);
$step3 = $question->getPreconditionSelectValue($postvalues["v"], $this->lng->txt("step") . " 3: " . $this->lng->txt("select_value"), "v");
$form->addItem($step3);
}
switch ($step)
{
case 1:
$cmd_continue = "constraintStep2";
$cmd_back = "constraints";
break;
case 2:
$cmd_continue = "constraintStep3";
$cmd_back = "constraintStep1";
break;
case 3:
$cmd_continue = "constraintsAdd";
$cmd_back = "constraintStep2";
break;
}
$form->addCommandButton($cmd_back, $this->lng->txt("back"));
$form->addCommandButton($cmd_continue, $this->lng->txt("continue"));
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::constraintsAddObject ( )

Add a precondition for a survey question or question block.

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

References $_GET, $_POST, $_SESSION, constraintStep3Object(), and ilUtil\sendFailure().

{
if (strlen($_POST["v"]) == 0)
{
ilUtil::sendFailure($this->lng->txt("msg_enter_value_for_valid_constraint"));
return $this->constraintStep3Object();
}
$survey_questions =& $this->object->getSurveyQuestions();
$structure =& $_SESSION["constraintstructure"];
$include_elements = $_SESSION["includeElements"];
foreach ($include_elements as $elementCounter)
{
if (is_array($structure[$elementCounter]))
{
if (strlen($_GET["precondition"]))
{
$this->object->updateConstraint($_GET['precondition'], $_POST["q"], $_POST["r"], $_POST["v"], $_POST['c']);
}
else
{
$constraint_id = $this->object->addConstraint($_POST["q"], $_POST["r"], $_POST["v"], $_POST['c']);
foreach ($structure[$elementCounter] as $key => $question_id)
{
$this->object->addConstraintToQuestion($question_id, $constraint_id);
}
}
if (count($structure[$elementCounter]) > 1)
{
$this->object->updateConjunctionForQuestions($structure[$elementCounter], $_POST['c']);
}
}
}
unset($_SESSION["includeElements"]);
unset($_SESSION["constraintstructure"]);
$this->ctrl->redirect($this, "constraints");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::constraintsObject ( )

Administration page for survey constraints.

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

References $_GET, $_SESSION, ilObjectGUI\$data, $title, $type, constraintStep1Object(), ilUtil\getImagePath(), handleWriteAccess(), and ilUtil\sendInfo().

{
global $rbacsystem;
$hasDatasets = $this->object->_hasDatasets($this->object->getSurveyId());
$step = 0;
if (array_key_exists("step", $_GET)) $step = $_GET["step"];
switch ($step)
{
case 1:
return;
break;
case 2:
return;
break;
case 3:
return;
break;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_constraints_list.html", "Modules/Survey");
$survey_questions =& $this->object->getSurveyQuestions();
$last_questionblock_title = "";
$counter = 1;
$hasPreconditions = FALSE;
$structure = array();
$colors = array("tblrow1", "tblrow2");
foreach ($survey_questions as $question_id => $data)
{
$title = $data["title"];
$show = true;
if ($data["questionblock_id"] > 0)
{
$title = $data["questionblock_title"];
$type = $this->lng->txt("questionblock");
if (strcmp($title, $last_questionblock_title) != 0)
{
$last_questionblock_title = $title;
$structure[$counter] = array();
array_push($structure[$counter], $data["question_id"]);
}
else
{
array_push($structure[$counter-1], $data["question_id"]);
$show = false;
}
}
else
{
$structure[$counter] = array($data["question_id"]);
$type = $this->lng->txt("question");
}
if ($show)
{
if ($counter == 1)
{
$this->tpl->setCurrentBlock("description");
$this->tpl->setVariable("DESCRIPTION", $this->lng->txt("constraints_first_question_description"));
$this->tpl->parseCurrentBlock();
}
else
{
$constraints =& $this->object->getConstraints($data["question_id"]);
$rowcount = 0;
if (count($constraints))
{
$hasPreconditions = TRUE;
foreach ($constraints as $constraint)
{
$this->tpl->setCurrentBlock("constraint");
$this->tpl->setVariable("SEQUENCE_ID", $counter);
$this->tpl->setVariable("CONSTRAINT_ID", $constraint["id"]);
$this->tpl->setVariable("CONSTRAINT_TEXT", $survey_questions[$constraint["question"]]["title"] . " " . $constraint["short"] . " " . $constraint["valueoutput"]);
$this->tpl->setVariable("TEXT_EDIT_PRECONDITION", $this->lng->txt("edit"));
$this->ctrl->setParameter($this, "precondition", $constraint["id"]);
$this->ctrl->setParameter($this, "start", $counter);
$this->tpl->setVariable("EDIT_PRECONDITION", $this->ctrl->getLinkTarget($this, "editPrecondition"));
$this->ctrl->setParameter($this, "precondition", "");
$this->ctrl->setParameter($this, "start", "");
$this->tpl->parseCurrentBlock();
}
if (count($constraints) > 1)
{
$this->tpl->setCurrentBlock("conjunction");
$this->tpl->setVariable("TEXT_CONJUNCTION", ($constraints[0]['conjunction']) ? $this->lng->txt('conjunction_or_title') : $this->lng->txt('conjunction_and_title'));
$this->tpl->parseCurrentBlock();
}
}
}
if ($counter != 1)
{
$this->tpl->setCurrentBlock("include_elements");
$this->tpl->setVariable("QUESTION_NR", "$counter");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("constraint_section");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->setVariable("QUESTION_NR", "$counter");
$this->tpl->setVariable("TITLE", "$title");
$icontype = "question.gif";
if ($data["questionblock_id"] > 0)
{
$icontype = "questionblock.gif";
}
$this->tpl->setVariable("TYPE", "$type: ");
include_once "./Services/Utilities/classes/class.ilUtil.php";
$this->tpl->setVariable("ICON_HREF", ilUtil::getImagePath($icontype, "Modules/Survey"));
$this->tpl->setVariable("ICON_ALT", $type);
$this->tpl->parseCurrentBlock();
$counter++;
}
}
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
if ($hasPreconditions)
{
$this->tpl->setCurrentBlock("selectall_preconditions");
$this->tpl->setVariable("SELECT_ALL_PRECONDITIONS", $this->lng->txt("select_all"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("selectall");
$counter++;
$this->tpl->setVariable("SELECT_ALL", $this->lng->txt("select_all"));
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
if ($hasPreconditions)
{
$this->tpl->setCurrentBlock("delete_button");
$this->tpl->setVariable("BTN_DELETE", $this->lng->txt("delete"));
include_once "./Services/Utilities/classes/class.ilUtil.php";
$this->tpl->setVariable("ARROW", "<img src=\"" . ilUtil::getImagePath("arrow_downright.gif") . "\" alt=\"".$this->lng->txt("arrow_downright")."\">");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("buttons");
$this->tpl->setVariable("ARROW", "<img src=\"" . ilUtil::getImagePath("arrow_downright.gif") . "\" alt=\"".$this->lng->txt("arrow_downright")."\">");
$this->tpl->setVariable("BTN_CREATE_CONSTRAINTS", $this->lng->txt("constraint_add"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("CONSTRAINTS_INTRODUCTION", $this->lng->txt("constraints_introduction"));
$this->tpl->setVariable("DEFINED_PRECONDITIONS", $this->lng->txt("existing_constraints"));
$this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "constraints"));
$this->tpl->setVariable("CONSTRAINTS_HEADER", $this->lng->txt("constraints_list_of_entities"));
$this->tpl->parseCurrentBlock();
$_SESSION["constraintstructure"] = $structure;
if ($hasDatasets)
{
ilUtil::sendInfo($this->lng->txt("survey_has_datasets_warning"));
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::constraintStep1Object ( )

Handles the first step of the precondition add action.

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

References $_GET, $_POST, $_SESSION, constraintForm(), and ilUtil\sendInfo().

Referenced by constraintsObject(), and createConstraintsObject().

{
$survey_questions =& $this->object->getSurveyQuestions();
$structure =& $_SESSION["constraintstructure"];
$start = $_GET["start"];
$option_questions = array();
for ($i = 1; $i < $start; $i++)
{
if (is_array($structure[$i]))
{
foreach ($structure[$i] as $key => $question_id)
{
if ($survey_questions[$question_id]["usableForPrecondition"])
{
array_push($option_questions, array("question_id" => $survey_questions[$question_id]["question_id"], "title" => $survey_questions[$question_id]["title"], "type_tag" => $survey_questions[$question_id]["type_tag"]));
}
}
}
}
if (count($option_questions) == 0)
{
unset($_SESSION["includeElements"]);
unset($_SESSION["constraintstructure"]);
ilUtil::sendInfo($this->lng->txt("constraints_no_nonessay_available"), true);
$this->ctrl->redirect($this, "constraints");
}
$this->constraintForm(1, $_POST, $survey_questions, $option_questions);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::constraintStep2Object ( )

Handles the second step of the precondition add action.

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

References $_POST, and constraintForm().

{
$survey_questions =& $this->object->getSurveyQuestions();
$option_questions = array();
array_push($option_questions, array("question_id" => $_POST["q"], "title" => $survey_questions[$_POST["q"]]["title"], "type_tag" => $survey_questions[$_POST["q"]]["type_tag"]));
$this->constraintForm(2, $_POST, $survey_questions, $option_questions);
}

+ Here is the call graph for this function:

ilObjSurveyGUI::constraintStep3Object ( )

Handles the third step of the precondition add action.

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

References $_GET, $_POST, and constraintForm().

Referenced by constraintsAddObject().

{
$survey_questions =& $this->object->getSurveyQuestions();
$option_questions = array();
if (strlen($_GET["precondition"]))
{
$pc = $this->object->getPrecondition($_GET["precondition"]);
$postvalues = array(
"c" => $pc["conjunction"],
"q" => $pc["question_fi"],
"r" => $pc["relation_id"],
"v" => $pc["value"]
);
array_push($option_questions, array("question_id" => $pc["question_fi"], "title" => $survey_questions[$pc["question_fi"]]["title"], "type_tag" => $survey_questions[$pc["question_fi"]]["type_tag"]));
$this->constraintForm(3, $postvalues, $survey_questions, $option_questions);
}
else
{
array_push($option_questions, array("question_id" => $_POST["q"], "title" => $survey_questions[$_POST["q"]]["title"], "type_tag" => $survey_questions[$_POST["q"]]["type_tag"]));
$this->constraintForm(3, $_POST, $survey_questions, $option_questions);
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::createConstraintsObject ( )

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

References $_GET, $_POST, $_SESSION, constraintStep1Object(), and ilUtil\sendInfo().

{
$include_elements = $_POST["includeElements"];
if ((!is_array($include_elements)) || (count($include_elements) == 0))
{
ilUtil::sendInfo($this->lng->txt("constraints_no_questions_or_questionblocks_selected"), true);
$this->ctrl->redirect($this, "constraints");
}
else if (count($include_elements) >= 1)
{
$_SESSION["includeElements"] = $include_elements;
sort($include_elements, SORT_NUMERIC);
$_GET["start"] = $include_elements[0];
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::createExportFileObject ( )

create export file

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

References handleWriteAccess().

{
include_once("./Modules/Survey/classes/class.ilSurveyExport.php");
$survey_exp = new ilSurveyExport($this->object);
$survey_exp->buildExportFile();
$this->ctrl->redirect($this, "export");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::createObject ( )

form for new content object creation

Reimplemented from ilObjectGUI.

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

References $_GET, $_POST, $_SESSION, ilObjectGUI\$data, ilFrameTargetInfo\_getFrame(), ilObjectGUI\fillCloneTemplate(), ilUtil\getImagePath(), ilObjectGUI\getTemplateFile(), and ilUtil\prepareFormOutput().

Referenced by importFileObject().

{
global $rbacsystem;
$new_type = $_POST["new_type"] ? $_POST["new_type"] : $_GET["new_type"];
if (!$rbacsystem->checkAccess("create", $_GET["ref_id"], $new_type))
{
$this->ilias->raiseError($this->lng->txt("permission_denied"),$this->ilias->error_obj->MESSAGE);
}
else
{
$this->getTemplateFile("create", $new_type);
include_once("./Modules/Survey/classes/class.ilObjSurvey.php");
$svy = new ilObjSurvey();
$this->fillCloneTemplate('DUPLICATE','svy');
$questionpools =& $svy->getAvailableQuestionpools($use_obj_id = TRUE, $could_be_offline = TRUE, $showPath = TRUE);
if (count($questionpools) > 0)
{
foreach ($questionpools as $key => $value)
{
$this->tpl->setCurrentBlock("option_spl");
$this->tpl->setVariable("OPTION_VALUE", $key);
$this->tpl->setVariable("TXT_OPTION", $value);
if ($_POST["spl"] == $key)
{
$this->tpl->setVariable("OPTION_SELECTED", " selected=\"selected\"");
}
$this->tpl->parseCurrentBlock();
}
}
// fill in saved values in case of error
$data = array();
$data["fields"] = array();
include_once "./Services/Utilities/classes/class.ilUtil.php";
$data["fields"]["title"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["title"],true);
$data["fields"]["desc"] = ilUtil::prepareFormOutput($_SESSION["error_post_vars"]["Fobject"]["desc"]);
foreach ($data["fields"] as $key => $val)
{
$this->tpl->setVariable("TXT_".strtoupper($key), $this->lng->txt($key));
$this->tpl->setVariable(strtoupper($key), $val);
if ($this->prepare_output)
{
$this->tpl->parseCurrentBlock();
}
}
$this->ctrl->setParameter($this, "new_type", $this->type);
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "create"));
$this->tpl->setVariable("TXT_HEADER", $this->lng->txt($new_type."_new"));
$this->tpl->setVariable("TXT_SELECT_QUESTIONPOOL", $this->lng->txt("select_questionpool_short"));
$this->tpl->setVariable("OPTION_SELECT_QUESTIONPOOL", $this->lng->txt("select_questionpool_option"));
$this->tpl->setVariable("TXT_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("TXT_SUBMIT", $this->lng->txt($new_type."_add"));
$this->tpl->setVariable("CMD_SUBMIT", "save");
$this->tpl->setVariable("TARGET", ' target="'.
ilFrameTargetInfo::_getFrame("MainContent").'" ');
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
$this->tpl->setVariable("TXT_IMPORT_SVY", $this->lng->txt("import_svy"));
$this->tpl->setVariable("TXT_SVY_FILE", $this->lng->txt("svy_upload_file"));
$this->tpl->setVariable("TXT_IMPORT", $this->lng->txt("import"));
$this->tpl->setVariable("TYPE_IMG", ilUtil::getImagePath('icon_svy.gif'));
$this->tpl->setVariable("ALT_IMG",$this->lng->txt("obj_svy"));
$this->tpl->setVariable("TYPE_IMG2", ilUtil::getImagePath('icon_svy.gif'));
$this->tpl->setVariable("ALT_IMG2",$this->lng->txt("obj_svy"));
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::createQuestionObject ( )

Creates a form to select a survey question pool for storage.

public

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

References $_GET, $_POST, ilObjectGUI\$tpl, and questionsSubtabs().

{
global $ilUser;
$this->questionsSubtabs("questions");
$tpl = new ilTemplate("tpl.il_svy_svy_qpl_select.html", TRUE, TRUE, "Modules/Survey");
$questionpools =& $this->object->getAvailableQuestionpools(FALSE, TRUE, TRUE, "write");
if (count($questionpools))
{
foreach ($questionpools as $key => $value)
{
$tpl->setCurrentBlock("option");
$tpl->setVariable("VALUE_OPTION", $key);
$tpl->setVariable("TEXT_OPTION", $value);
$tpl->parseCurrentBlock();
}
$tpl->setCurrentBlock("selection");
$tpl->setVariable("TXT_QPL_SELECT", $this->lng->txt("select_questionpool"));
$tpl->parseCurrentBlock();
}
else
{
$tpl->setCurrentBlock("selection");
$tpl->setVariable("TXT_QPL_ENTER", $this->lng->txt("cat_create_spl"));
$tpl->parseCurrentBlock();
}
$tpl->setVariable("BTN_SUBMIT", $this->lng->txt("submit"));
$sel_question_types = (strlen($_POST["sel_question_types"])) ? $_POST["sel_question_types"] : $_GET["sel_question_types"];
$this->ctrl->setParameter($this, "sel_question_types", $sel_question_types);
$tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "executeCreateQuestion"));
$tpl->setVariable("BTN_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("ADM_CONTENT", $tpl->get());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::createQuestionPool (   $name = "dummy")
private

Creates a new questionpool and returns the reference id.

Returns
integer Reference id of the newly created questionpool public

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

References $name, and ilObjectGUI\$tree.

Referenced by executeCreateQuestionObject().

{
global $tree;
$parent_ref = $tree->getParentId($this->object->getRefId());
include_once "./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php";
$qpl->setType("spl");
$qpl->setTitle($name);
$qpl->setDescription("");
$qpl->create();
$qpl->createReference();
$qpl->putInTree($parent_ref);
$qpl->setPermissions($parent_ref);
$qpl->setOnline(1); // must be online to be available
$qpl->saveToDb();
return $qpl->getRefId();
}

+ Here is the caller graph for this function:

ilObjSurveyGUI::createSurveyCodesObject ( )

Create access codes for the survey.

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

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

{
if (preg_match("/\d+/", $_POST["nrOfCodes"]))
{
$this->object->createSurveyCodes($_POST["nrOfCodes"]);
ilUtil::sendSuccess($this->lng->txt('codes_created'), true);
}
else
{
ilUtil::sendFailure($this->lng->txt("enter_valid_number_of_codes"), true);
}
$this->ctrl->redirect($this, 'codes');
}

+ Here is the call graph for this function:

ilObjSurveyGUI::defineQuestionblock (   $questionblock_id = "")

Displays the definition form for a question block.

Parameters
integer$questionblock_idThe database id of the questionblock to edit an existing questionblock public

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

References $_POST, questionsSubtabs(), and ilUtil\sendInfo().

Referenced by defineQuestionblockObject(), and questionsObject().

{
$this->questionsSubtabs("questions");
if ($questionblock_id)
{
$questionblock = $this->object->getQuestionblock($questionblock_id);
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_define_questionblock.html", "Modules/Survey");
foreach ($_POST as $key => $value)
{
if (preg_match("/cb_(\d+)/", $key, $matches))
{
$this->tpl->setCurrentBlock("hidden");
$this->tpl->setVariable("HIDDEN_NAME", "cb_$matches[1]");
$this->tpl->setVariable("HIDDEN_VALUE", $matches[1]);
$this->tpl->parseCurrentBlock();
}
}
if ($questionblock_id)
{
$this->tpl->setCurrentBlock("hidden");
$this->tpl->setVariable("HIDDEN_NAME", "questionblock_id");
$this->tpl->setVariable("HIDDEN_VALUE", $questionblock_id);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("TEXT_TITLE", $this->lng->txt("title"));
if ($questionblock_id)
{
$this->tpl->setVariable("VALUE_TITLE", $questionblock["title"]);
}
$this->tpl->setVariable("TXT_QUESTIONTEXT_DESCRIPTION", $this->lng->txt("show_questiontext_description"));
$this->tpl->setVariable("TXT_QUESTIONTEXT", $this->lng->txt("show_questiontext"));
if (($questionblock["show_questiontext"]) || (strlen($questionblock_id) == 0))
{
$this->tpl->setVariable("CHECKED_QUESTIONTEXT", " checked=\"checked\"");
}
$this->tpl->setVariable("TXT_REQUIRED_FLD", $this->lng->txt("required_field"));
$this->tpl->setVariable("HEADING_QUESTIONBLOCK", $this->lng->txt("define_questionblock"));
$this->tpl->setVariable("SAVE", $this->lng->txt("save"));
$this->tpl->setVariable("CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "saveDefineQuestionblock"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::defineQuestionblockObject ( )

Cancel remove questions from survey after confirmation.

Cancel remove questions from survey after confirmation

private

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

References $_POST, defineQuestionblock(), and ilUtil\sendInfo().

Referenced by saveDefineQuestionblockObject().

{
$questionblock = array();
foreach ($_POST as $key => $value)
{
if (preg_match("/cb_(\d+)/", $key, $matches))
{
array_push($questionblock, $value);
}
}
if (count($questionblock) < 2)
{
ilUtil::sendInfo($this->lng->txt("qpl_define_questionblock_select_missing"), true);
$this->ctrl->redirect($this, "questions");
}
else
{
return;
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::deleteAllUserDataObject ( )

Creates a confirmation form for delete all user data.

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

References ilUtil\sendQuestion().

{
ilUtil::sendQuestion($this->lng->txt("confirm_delete_all_user_data"));
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_maintenance.html", "Modules/Survey");
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("BTN_CONFIRM_DELETE_ALL", $this->lng->txt("confirm"));
$this->tpl->setVariable("BTN_CANCEL_DELETE_ALL", $this->lng->txt("cancel"));
$this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "deleteAllUserData"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

ilObjSurveyGUI::deleteCodesObject ( )

Delete a list of survey codes.

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

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

{
if (is_array($_POST["chb_code"]) && (count($_POST["chb_code"]) > 0))
{
foreach ($_POST["chb_code"] as $survey_code)
{
$this->object->deleteSurveyCode($survey_code);
}
ilUtil::sendSuccess($this->lng->txt('codes_deleted'), true);
}
else
{
ilUtil::sendInfo($this->lng->txt('no_checkbox'), true);
}
$this->ctrl->redirect($this, 'codes');
}

+ Here is the call graph for this function:

ilObjSurveyGUI::deleteConstraintsObject ( )

Delete constraints of a survey.

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

References $_POST, and $_SESSION.

{
$survey_questions =& $this->object->getSurveyQuestions();
$structure =& $_SESSION["constraintstructure"];
foreach ($_POST as $key => $value)
{
if (preg_match("/^constraint_(\d+)_(\d+)/", $key, $matches))
{
$this->object->deleteConstraint($matches[2]);
}
}
$this->ctrl->redirect($this, "constraints");
}
ilObjSurveyGUI::deleteExportFileObject ( )

delete export files

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

References $_POST, $file, ilUtil\delDir(), and ilUtil\sendSuccess().

{
$export_dir = $this->object->getExportDirectory();
foreach ($_POST["file"] as $file)
{
$exp_file = $export_dir."/".$file;
$exp_dir = $export_dir."/".substr($file, 0, strlen($file) - 4);
if (@is_file($exp_file))
{
unlink($exp_file);
}
if (@is_dir($exp_dir))
{
include_once "./Services/Utilities/classes/class.ilUtil.php";
ilUtil::delDir($exp_dir);
}
}
ilUtil::sendSuccess($this->lng->txt('msg_deleted_export_files'), true);
$this->ctrl->redirect($this, "export");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::deleteInternalMailRecipientObject ( )

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

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

{
if (!is_array($_POST['chb_ext']) || count(is_array($_POST['chb_ext'])) == 0)
{
ilUtil::sendInfo($this->lng->txt("err_no_selection"), true);
$this->ctrl->redirect($this, 'codesMail');
}
foreach ($_POST['chb_ext'] as $code)
{
$this->object->deleteSurveyCode($code);
}
ilUtil::sendSuccess($this->lng->txt('external_recipients_deleted'), true);
$this->ctrl->redirect($this, 'codesMail');
}

+ Here is the call graph for this function:

ilObjSurveyGUI::deleteSavedMessageObject ( )

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

References $ilLog, handleWriteAccess(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and setCodesSubtabs().

{
$this->setCodesSubtabs();
include_once("./Modules/Survey/classes/forms/FormMailCodesGUI.php");
$form_gui = new FormMailCodesGUI($this);
$form_gui->setValuesByPost();
try
{
if ($form_gui->getSavedMessages()->getValue() > 0)
{
$this->object->deleteUserSettings($form_gui->getSavedMessages()->getValue());
$form_gui = new FormMailCodesGUI($this);
$form_gui->setValuesByPost();
ilUtil::sendSuccess($this->lng->txt('msg_message_deleted'));
}
else
{
ilUtil::sendFailure($this->lng->txt('msg_no_message_deleted'));
}
}
catch (Exception $e)
{
global $ilLog;
$ilLog->write('Error: ' + $e->getMessage());
}
$this->tpl->setVariable("ADM_CONTENT", $form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::deleteSingleUserResultsObject ( )

Asks for a confirmation to delete selected user data of the test object.

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

References $_POST, ilObjectGUI\$data, $total, handleWriteAccess(), ilUtil\sendInfo(), and ilUtil\sendQuestion().

{
if (count($_POST["chbUser"]) == 0)
{
ilUtil::sendInfo($this->lng->txt('no_checkbox'), true);
$this->ctrl->redirect($this, "maintenance");
}
ilUtil::sendQuestion($this->lng->txt("confirm_delete_single_user_data"));
include_once "./Modules/Survey/classes/tables/class.ilSurveyMaintenanceTableGUI.php";
$table_gui = new ilSurveyMaintenanceTableGUI($this, 'maintenance', true);
$total =& $this->object->getSurveyParticipants();
$data = array();
foreach ($total as $user_data)
{
if (in_array($user_data['active_id'], $_POST['chbUser']))
{
$last_access = $this->object->_getLastAccess($user_data["active_id"]);
array_push($data, array(
'id' => $user_data["active_id"],
'name' => $user_data["sortname"],
'login' => $user_data["login"],
'last_access' => $last_access
));
}
}
$table_gui->setData($data);
$this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::disinviteUserGroupObject ( )

Disinvite users or groups from a survey.

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

References $_POST, and ilUtil\sendSuccess().

{
// disinvite users
if (is_array($_POST["user_select"]))
{
foreach ($_POST["user_select"] as $user_id)
{
$this->object->disinviteUser($user_id);
}
}
ilUtil::sendSuccess($this->lng->txt('msg_users_disinvited'), true);
$this->ctrl->redirect($this, "invite");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::downloadExportFileObject ( )

download export file

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

References $_POST, ilUtil\deliverFile(), and ilUtil\sendFailure().

{
if(!isset($_POST["file"]))
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
$this->ctrl->redirect($this, "export");
}
if (count($_POST["file"]) > 1)
{
ilUtil::sendFailure($this->lng->txt("select_max_one_item"), true);
$this->ctrl->redirect($this, "export");
}
$export_dir = $this->object->getExportDirectory();
include_once "./Services/Utilities/classes/class.ilUtil.php";
ilUtil::deliverFile($export_dir."/".$_POST["file"][0],
$_POST["file"][0]);
}

+ Here is the call graph for this function:

ilObjSurveyGUI::editPreconditionObject ( )

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

References $_GET, and $_SESSION.

{
$_SESSION["includeElements"] = array($_GET["start"]);
$this->ctrl->setParameter($this, "precondition", $_GET["precondition"]);
$this->ctrl->setParameter($this, "start", $_GET["start"]);
$this->ctrl->redirect($this, "constraintStep3");
}
ilObjSurveyGUI::evaluationObject ( )

Redirects the evaluation object call to the ilSurveyEvaluationGUI class.

Redirects the evaluation object call to the ilSurveyEvaluationGUI class

private

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

{
include_once("./Modules/Survey/classes/class.ilSurveyEvaluationGUI.php");
$eval_gui = new ilSurveyEvaluationGUI($this->object);
$this->ctrl->setCmdClass(get_class($eval_gui));
$this->ctrl->redirect($eval_gui, "evaluation");
}
ilObjSurveyGUI::executeCommand ( )

execute command

Reimplemented from ilObjectGUI.

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

References $_GET, $cmd, $ilCtrl, ilObjectGUI\$ilias, $ret, ilMDEditorGUI\addObserver(), ilObjectGUI\getCreationMode(), ilUtil\getStyleSheetLocation(), infoScreen(), and ilObjectGUI\prepareOutput().

{
global $ilAccess, $ilNavigationHistory,$ilCtrl;
if ((!$ilAccess->checkAccess("read", "", $_GET["ref_id"])) && (!$ilAccess->checkAccess("visible", "", $_GET["ref_id"])))
{
global $ilias;
$ilias->raiseError($this->lng->txt("permission_denied"), $ilias->error_obj->MESSAGE);
}
// add entry to navigation history
if (!$this->getCreationMode() &&
$ilAccess->checkAccess("read", "", $_GET["ref_id"]))
{
$ilNavigationHistory->addItem($_GET["ref_id"],
"ilias.php?baseClass=ilObjSurveyGUI&cmd=infoScreen&ref_id=".$_GET["ref_id"], "svy");
}
$cmd = $this->ctrl->getCmd("properties");
// workaround for bug #6288, needs better solution
if ($cmd == "saveTags")
{
$ilCtrl->setCmdClass("ilinfoscreengui");
}
$next_class = $this->ctrl->getNextClass($this);
$this->ctrl->setReturn($this, "properties");
$this->tpl->addCss(ilUtil::getStyleSheetLocation("output", "survey.css", "Modules/Survey"), "screen");
$this->prepareOutput();
//echo "<br>nextclass:$next_class:cmd:$cmd:qtype=$q_type";
switch($next_class)
{
case "ilinfoscreengui":
$this->infoScreen(); // forwards command
break;
case 'ilmdeditorgui':
include_once 'Services/MetaData/classes/class.ilMDEditorGUI.php';
$md_gui =& new ilMDEditorGUI($this->object->getId(), 0, $this->object->getType());
$md_gui->addObserver($this->object,'MDUpdateListener','General');
$this->ctrl->forwardCommand($md_gui);
break;
case "ilsurveyevaluationgui":
include_once("./Modules/Survey/classes/class.ilSurveyEvaluationGUI.php");
$eval_gui = new ilSurveyEvaluationGUI($this->object);
$ret =& $this->ctrl->forwardCommand($eval_gui);
break;
case 'ilrepositorysearchgui':
include_once('./Services/Search/classes/class.ilRepositorySearchGUI.php');
$rep_search =& new ilRepositorySearchGUI();
$rep_search->setCallback($this,
'inviteUserGroupObject',
array(
)
);
// Set tabs
$this->ctrl->setReturn($this, 'invite');
$ret =& $this->ctrl->forwardCommand($rep_search);
$this->tabs_gui->setTabActive('invitation');
break;
case "ilsurveyexecutiongui":
include_once("./Modules/Survey/classes/class.ilSurveyExecutionGUI.php");
$exec_gui = new ilSurveyExecutionGUI($this->object);
$ret =& $this->ctrl->forwardCommand($exec_gui);
break;
case 'ilpermissiongui':
include_once("Services/AccessControl/classes/class.ilPermissionGUI.php");
$perm_gui =& new ilPermissionGUI($this);
$ret =& $this->ctrl->forwardCommand($perm_gui);
break;
case 'ilobjectcopygui':
include_once './Services/Object/classes/class.ilObjectCopyGUI.php';
$cp = new ilObjectCopyGUI($this);
$cp->setType('svy');
$this->ctrl->forwardCommand($cp);
break;
default:
$cmd.= "Object";
$ret =& $this->$cmd();
break;
}
if (strtolower($_GET["baseClass"]) != "iladministrationgui" &&
$this->getCreationMode() != true)
{
$this->tpl->show();
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::executeCreateQuestionObject ( )

Execute the creation of a new questions in a survey.

private

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

References $_GET, $_POST, ilObjectGUI\$ref_id, createQuestionPool(), ilUtil\redirect(), and ilUtil\sendFailure().

{
if (strlen($_POST["sel_spl"]))
{
include_once "./Services/Utilities/classes/class.ilUtil.php";
ilUtil::redirect("ilias.php?baseClass=ilObjSurveyQuestionPoolGUI&ref_id=" . $_POST["sel_spl"] . "&cmd=createQuestionForSurvey&new_for_survey=".$_GET["ref_id"]."&sel_question_types=".$_GET["sel_question_types"]);
}
elseif (strlen($_POST["name_spl"]))
{
$ref_id = $this->createQuestionPool($_POST["name_spl"]);
ilUtil::redirect("ilias.php?baseClass=ilObjSurveyQuestionPoolGUI&ref_id=" . $ref_id . "&cmd=createQuestionForSurvey&new_for_survey=".$_GET["ref_id"]."&sel_question_types=".$_GET["sel_question_types"]);
}
else
{
ilUtil::sendFailure($this->lng->txt("err_no_pool_name"), true);
$this->ctrl->setParameter($this, "sel_question_types", $_GET["sel_question_types"]);
$this->ctrl->redirect($this, "createQuestion");
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::exportAllCodesObject ( )

Exports all survey codes.

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

References ilUtil\deliverData(), and ilUtil\getASCIIFilename().

{
$export = $this->object->getSurveyCodesForExport(array());
ilUtil::deliverData($export, ilUtil::getASCIIFilename($this->object->getTitle() . ".txt"));
}

+ Here is the call graph for this function:

ilObjSurveyGUI::exportCodesObject ( )

Exports a list of survey codes.

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

References $_POST, ilUtil\deliverData(), ilUtil\getASCIIFilename(), and ilUtil\sendFailure().

{
if (is_array($_POST["chb_code"]) && (count($_POST["chb_code"]) > 0))
{
$export = $this->object->getSurveyCodesForExport($_POST["chb_code"]);
ilUtil::deliverData($export, ilUtil::getASCIIFilename($this->object->getTitle() . ".txt"));
}
else
{
ilUtil::sendFailure($this->lng->txt("no_checkbox"), true);
$this->ctrl->redirect($this, 'codes');
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::exportObject ( )

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

References ilObjectGUI\$data, handleWriteAccess(), IL_CAL_DATETIME, and IL_CAL_UNIX.

{
$export_dir = $this->object->getExportDirectory();
$export_files = $this->object->getExportFiles($export_dir);
$data = array();
if(count($export_files) > 0)
{
foreach($export_files as $exp_file)
{
$file_arr = explode("__", $exp_file);
$date = new ilDateTime($file_arr[0], IL_CAL_UNIX);
array_push($data, array(
'file' => $exp_file,
'size' => filesize($export_dir."/".$exp_file),
'date' => $date->get(IL_CAL_DATETIME)
));
}
}
include_once "./Modules/Survey/classes/tables/class.ilSurveyExportTableGUI.php";
$table_gui = new ilSurveyExportTableGUI($this, 'export');
$table_gui->setData($data);
$this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::filterQuestionblockBrowserObject ( )

Filter the questionblock browser.

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

{
include_once "./Modules/Survey/classes/tables/class.ilSurveyQuestionblockbrowserTableGUI.php";
$table_gui = new ilSurveyQuestionblockbrowserTableGUI($this, 'browseForQuestionblocks');
$table_gui->writeFilterToSession();
$this->ctrl->redirect($this, 'browseForQuestionblocks');
}
ilObjSurveyGUI::filterQuestionBrowserObject ( )

Filter the question browser.

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

{
include_once "./Modules/Survey/classes/tables/class.ilSurveyQuestionbrowserTableGUI.php";
$table_gui = new ilSurveyQuestionbrowserTableGUI($this, 'browseForQuestions');
$table_gui->writeFilterToSession();
$this->ctrl->redirect($this, 'browseForQuestions');
}
ilObjSurveyGUI::getTabs ( $tabs_gui)

adds tabs to tab gui object

Parameters
object$tabs_guiilTabsGUI object

Reimplemented from ilObjectGUI.

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

References $_GET, ilObjSurveyAccess\_hasEvaluationAccess(), and setEvalSubtabs().

{
global $ilAccess, $ilUser;
if (strcmp($this->ctrl->getNextClass(), 'ilrepositorysearchgui') != 0)
{
switch ($this->ctrl->getCmd())
{
case "browseForQuestions":
case "browseForQuestionblocks":
case "insertQuestions":
case "filterQuestions":
case "resetFilterQuestions":
case "changeDatatype":
case "start":
case "resume":
case "next":
case "previous":
case "redirectQuestion":
return;
break;
case "evaluation":
case "checkEvaluationAccess":
case "evaluationdetails":
case "evaluationuser":
case "evaluationparticipantsstate": //Change Sn
$this->setEvalSubtabs();
break;
case "start":
case "resume":
case "next":
case "previous":
case "redirectQuestion":
return;
break;
case "evaluation":
case "checkEvaluationAccess":
case "evaluationdetails":
case "evaluationuser":
$this->setEvalSubtabs();
break;
}
}
// questions
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
$force_active = ($_GET["up"] != "" || $_GET["down"] != "")
? true
: false;
$tabs_gui->addTarget("survey_questions",
$this->ctrl->getLinkTarget($this,'questions'),
array("questions", "browseForQuestions", "createQuestion",
"filterQuestions", "resetFilterQuestions", "changeDatatype", "insertQuestions",
"removeQuestions", "cancelRemoveQuestions", "confirmRemoveQuestions",
"defineQuestionblock", "saveDefineQuestionblock", "cancelDefineQuestionblock",
"unfoldQuestionblock", "moveQuestions",
"insertQuestionsBefore", "insertQuestionsAfter", "saveObligatory",
"addHeading", "saveHeading", "cancelHeading", "editHeading",
"confirmRemoveHeading", "cancelRemoveHeading", "printView"),
"", "", $force_active);
}
if ($ilAccess->checkAccess("visible", "", $this->ref_id))
{
$tabs_gui->addTarget("info_short",
$this->ctrl->getLinkTarget($this,'infoScreen'),
array("infoScreen", "showSummary"));
}
// properties
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
$force_active = ($this->ctrl->getCmd() == "")
? true
: false;
$tabs_gui->addTarget("settings",
$this->ctrl->getLinkTarget($this,'properties'),
array("properties", "save", "cancel", 'saveProperties'), "",
"", $force_active);
}
// questions
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
// constraints
$tabs_gui->addTarget("constraints",
$this->ctrl->getLinkTarget($this, "constraints"),
array("constraints", "constraintStep1", "constraintStep2",
"constraintStep3", "constraintsAdd", "createConstraints",
"editPrecondition"),
"");
}
if (($ilAccess->checkAccess("write", "", $this->ref_id)) || ($ilAccess->checkAccess("invite", "", $this->ref_id)))
{
// invite
$tabs_gui->addTarget("invitation",
$this->ctrl->getLinkTarget($this, 'invite'),
array("invite", "saveInvitationStatus",
"inviteUserGroup", "disinviteUserGroup"),
"");
}
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
// maintenance
$tabs_gui->addTarget("maintenance",
$this->ctrl->getLinkTarget($this,'maintenance'),
array("maintenance", "deleteAllUserData"),
"");
if ($this->object->getAnonymize() == 1)
{
// code
$tabs_gui->addTarget("codes",
$this->ctrl->getLinkTarget($this,'codes'),
array("codes", "exportCodes", 'codesMail', 'saveMailTableFields', 'importExternalMailRecipients',
'mailCodes', 'sendCodesMail', 'importExternalRecipientsFromFile', 'importExternalRecipientsFromText',
'importExternalRecipientsFromDataset', 'insertSavedMessage', 'deleteSavedMessage'),
"");
}
}
include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php";
if ($ilAccess->checkAccess("write", "", $this->ref_id) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId()))
{
// evaluation
$tabs_gui->addTarget("svy_evaluation",
$this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluation"),
array("evaluation", "checkEvaluationAccess", "evaluationdetails",
"evaluationuser", "evaluationparticipantsstate"), // Change Sn
"");
}
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
// meta data
$tabs_gui->addTarget("meta_data",
$this->ctrl->getLinkTargetByClass('ilmdeditorgui','listSection'),
"", "ilmdeditorgui");
// export
$tabs_gui->addTarget("export",
$this->ctrl->getLinkTarget($this,'export'),
array("export", "createExportFile", "confirmDeleteExportFile",
"downloadExportFile"),
""
);
}
if ($ilAccess->checkAccess("edit_permission", "", $this->ref_id))
{
// permissions
$tabs_gui->addTarget("perm_settings",
$this->ctrl->getLinkTargetByClass(array(get_class($this),'ilpermissiongui'), "perm"), array("perm","info","owner"), 'ilpermissiongui');
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::handleWriteAccess ( )

Checks for write access and returns to the parent object.

Checks for write access and returns to the parent object

public

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

References ilUtil\sendInfo().

Referenced by codesMailObject(), codesObject(), confirmDeleteExportFileObject(), constraintsObject(), createExportFileObject(), deleteSavedMessageObject(), deleteSingleUserResultsObject(), exportObject(), importExternalMailRecipientsObject(), insertSavedMessageObject(), mailCodesObject(), maintenanceObject(), questionsObject(), and sendCodesMailObject().

{
global $ilAccess;
if (!$ilAccess->checkAccess("write", "", $this->ref_id))
{
// allow only write access
ilUtil::sendInfo($this->lng->txt("cannot_edit_survey"), TRUE);
$this->ctrl->redirect($this, "infoScreen");
}
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::ilObjSurveyGUI ( )

Constructor public.

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

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

{
global $lng, $ilCtrl;
$this->type = "svy";
$lng->loadLanguageModule("survey");
$lng->loadLanguageModule("mail"); // Change Sn
$this->ctrl =& $ilCtrl;
$this->ctrl->saveParameter($this, "ref_id");
$this->ilObjectGUI("",$_GET["ref_id"], true, false);
}

+ Here is the call graph for this function:

ilObjSurveyGUI::importExternalMailRecipientsObject (   $checkonly = false,
  $formindex = -1 
)

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

References $_GET, $_SESSION, $errors, handleWriteAccess(), setCodesSubtabs(), ilFormPropertyGUI\setInfo(), and ilTextAreaInputGUI\setValue().

Referenced by importExternalRecipientsFromDatasetObject(), importExternalRecipientsFromFileObject(), and importExternalRecipientsFromTextObject().

{
global $ilAccess;
$this->setCodesSubtabs();
$savefields = (
strcmp($this->ctrl->getCmd(), "importExternalRecipientsFromFile") == 0 ||
strcmp($this->ctrl->getCmd(), "importExternalRecipientsFromText") == 0 ||
strcmp($this->ctrl->getCmd(), "importExternalRecipientsFromDataset") == 0
) ? TRUE : FALSE;
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form_import_file = new ilPropertyFormGUI();
$form_import_file->setFormAction($this->ctrl->getFormAction($this));
$form_import_file->setTableWidth("100%");
$form_import_file->setId("codes_import_file");
$headerfile = new ilFormSectionHeaderGUI();
$headerfile->setTitle($this->lng->txt("import_from_file"));
$form_import_file->addItem($headerfile);
$externalmails = new ilFileInputGUI($this->lng->txt("externalmails"), "externalmails");
$externalmails->setInfo($this->lng->txt('externalmails_info'));
$externalmails->setRequired(true);
$form_import_file->addItem($externalmails);
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form_import_file->addCommandButton("importExternalRecipientsFromFile", $this->lng->txt("import"));
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form_import_file->addCommandButton("codesMail", $this->lng->txt("cancel"));
// import text
$form_import_text = new ilPropertyFormGUI();
$form_import_text->setFormAction($this->ctrl->getFormAction($this));
$form_import_text->setTableWidth("100%");
$form_import_text->setId("codes_import_text");
$headertext = new ilFormSectionHeaderGUI();
$headertext->setTitle($this->lng->txt("import_from_text"));
$form_import_text->addItem($headertext);
$inp = new ilTextAreaInputGUI($this->lng->txt('externaltext'), 'externaltext');
if (array_key_exists('externaltext', $_SESSION) && strlen($_SESSION['externaltext']))
{
$inp->setValue($_SESSION['externaltext']);
}
else
{
$inp->setValue($this->lng->txt('mail_import_example1') . "\n" . $this->lng->txt('mail_import_example2') . "\n" . $this->lng->txt('mail_import_example3') . "\n");
}
$inp->setRequired(true);
$inp->setCols(80);
$inp->setRows(10);
$inp->setInfo($this->lng->txt('externaltext_info'));
$form_import_text->addItem($inp);
unset($_SESSION['externaltext']);
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form_import_text->addCommandButton("importExternalRecipientsFromText", $this->lng->txt("import"));
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form_import_text->addCommandButton("codesMail", $this->lng->txt("cancel"));
// import dataset
$form_import_dataset = new ilPropertyFormGUI();
$form_import_dataset->setFormAction($this->ctrl->getFormAction($this));
$form_import_dataset->setTableWidth("100%");
$form_import_dataset->setId("codes_import_dataset");
$headerfile = new ilFormSectionHeaderGUI();
$headerfile->setTitle($this->lng->txt("import_from_dataset"));
$form_import_dataset->addItem($headerfile);
$existingdata = $this->object->getExternalCodeRecipients();
$existingcolumns = array('email');
if (count($existingdata))
{
$first = array_shift($existingdata);
foreach ($first as $key => $value)
{
if (strcmp($key, 'email') != 0 && strcmp($key, 'code') != 0 && strcmp($key, 'sent') != 0)
{
array_push($existingcolumns, $key);
}
}
}
foreach ($existingcolumns as $column)
{
$inp = new ilTextInputGUI($column, $column);
$inp->setSize(50);
if (strcmp($column, 'email') == 0)
{
$inp->setRequired(true);
}
else
{
$inp->setRequired(false);
}
$form_import_dataset->addItem($inp);
}
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form_import_dataset->addCommandButton("importExternalRecipientsFromDataset", $this->lng->txt("import"));
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form_import_dataset->addCommandButton("codesMail", $this->lng->txt("cancel"));
$errors = false;
if ($savefields)
{
switch ($formindex)
{
case 0:
$errors = !$form_import_file->checkInput();
$form_import_file->setValuesByPost();
if ($errors) $checkonly = false;
break;
case 1:
$errors = !$form_import_text->checkInput();
$form_import_text->setValuesByPost();
if ($errors) $checkonly = false;
break;
case 2:
$errors = !$form_import_dataset->checkInput();
$form_import_dataset->setValuesByPost();
if ($errors) $checkonly = false;
break;
}
}
if (!$checkonly)
{
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_external_mail.html", "Modules/Survey");
$this->tpl->setVariable("HEADLINE", $this->lng->txt("external_mails_import"));
$this->tpl->setVariable("FORM1", $form_import_file->getHTML());
$this->tpl->setVariable("FORM2", $form_import_text->getHTML());
$this->tpl->setVariable("FORM3", $form_import_dataset->getHTML());
}
return $errors;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::importExternalRecipientsFromDatasetObject ( )

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

References $_POST, ilObjectGUI\$data, importExternalMailRecipientsObject(), and ilUtil\sendSuccess().

{
$hasErrors = $this->importExternalMailRecipientsObject(true, 2);
if (!$hasErrors)
{
$data = array();
$existingdata = $this->object->getExternalCodeRecipients();
if (count($existingdata))
{
$first = array_shift($existingdata);
foreach ($first as $key => $value)
{
if (strcmp($key, 'code') != 0 && strcmp($key, 'sent') != 0)
{
$data[$key] = $_POST[$key];
}
}
}
if (count($data))
{
$this->object->createSurveyCodesForExternalData(array($data));
ilUtil::sendSuccess($this->lng->txt('external_recipients_imported'), true);
}
$this->ctrl->redirect($this, 'codesMail');
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::importExternalRecipientsFromFileObject ( )

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

References ilObjectGUI\$data, $reader, $row, importExternalMailRecipientsObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
$hasErrors = $this->importExternalMailRecipientsObject(true, 0);
if (!$hasErrors)
{
include_once "./Services/Utilities/classes/class.ilCSVReader.php";
$reader->open($_FILES['externalmails']['tmp_name']);
$data = $reader->getDataArrayFromCSVFile();
$fields = array_shift($data);
if (!in_array('email', $fields))
{
$reader->close();
ilUtil::sendFailure($this->lng->txt('err_external_rcp_no_email'), true);
$this->ctrl->redirect($this, 'codesMail');
}
$existingdata = $this->object->getExternalCodeRecipients();
$existingcolumns = array();
if (count($existingdata))
{
$first = array_shift($existingdata);
foreach ($first as $key => $value)
{
array_push($existingcolumns, $key);
}
}
$founddata = array();
foreach ($data as $row)
{
if (count($row) == count($fields))
{
$dataset = array();
foreach ($fields as $idx => $fieldname)
{
if (count($existingcolumns))
{
if (array_key_exists($idx, $existingcolumns))
{
$dataset[$fieldname] = $row[$idx];
}
}
else
{
$dataset[$fieldname] = $row[$idx];
}
}
if (strlen($dataset['email']))
{
array_push($founddata, $dataset);
}
}
}
$reader->close();
$this->object->createSurveyCodesForExternalData($founddata);
ilUtil::sendSuccess($this->lng->txt('external_recipients_imported'), true);
$this->ctrl->redirect($this, 'codesMail');
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::importExternalRecipientsFromTextObject ( )

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

References $_POST, $_SESSION, ilObjectGUI\$data, $row, importExternalMailRecipientsObject(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
$hasErrors = $this->importExternalMailRecipientsObject(true, 1);
if (!$hasErrors)
{
$data = preg_split("/[\n\r]/", $_POST['externaltext']);
$fields = preg_split("/;/", array_shift($data));
if (!in_array('email', $fields))
{
$_SESSION['externaltext'] = $_POST['externaltext'];
ilUtil::sendFailure($this->lng->txt('err_external_rcp_no_email_column'), true);
$this->ctrl->redirect($this, 'importExternalMailRecipients');
}
$existingdata = $this->object->getExternalCodeRecipients();
$existingcolumns = array();
if (count($existingdata))
{
$first = array_shift($existingdata);
foreach ($first as $key => $value)
{
array_push($existingcolumns, $key);
}
}
$founddata = array();
foreach ($data as $datarow)
{
$row = preg_split("/;/", $datarow);
if (count($row) == count($fields))
{
$dataset = array();
foreach ($fields as $idx => $fieldname)
{
if (count($existingcolumns))
{
if (array_key_exists($idx, $existingcolumns))
{
$dataset[$fieldname] = $row[$idx];
}
}
else
{
$dataset[$fieldname] = $row[$idx];
}
}
if (strlen($dataset['email']))
{
array_push($founddata, $dataset);
}
}
}
$this->object->createSurveyCodesForExternalData($founddata);
ilUtil::sendSuccess($this->lng->txt('external_recipients_imported'), true);
$this->ctrl->redirect($this, 'codesMail');
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::importFileObject ( )

form for new survey object import

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

References $_POST, ilObjectGUI\$ref_id, createObject(), ilUtil\redirect(), ilUtil\sendInfo(), ilUtil\sendSuccess(), and uploadObject().

{
if ($_POST["spl"] < 1)
{
ilUtil::sendInfo($this->lng->txt("svy_select_questionpools"));
$this->createObject();
return;
}
if (strcmp($_FILES["xmldoc"]["tmp_name"], "") == 0)
{
ilUtil::sendInfo($this->lng->txt("svy_select_file_for_import"));
$this->createObject();
return;
}
$this->ctrl->setParameter($this, "new_type", $this->type);
$ref_id = $this->uploadObject(false);
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_imported"),true);
ilUtil::redirect("ilias.php?ref_id=".$ref_id.
"&baseClass=ilObjSurveyGUI");
// $this->ctrl->redirect($this, "importFile");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::importObject ( )

display dialogue for importing tests

public

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

References ilObjectGUI\getTemplateFile().

Referenced by uploadObject().

{
$this->getTemplateFile("import", "svy");
$this->tpl->setCurrentBlock("option_qpl");
include_once("./Modules/Survey/classes/class.ilObjSurvey.php");
$svy = new ilObjSurvey();
$questionpools =& $svy->getAvailableQuestionpools(TRUE, FALSE, TRUE);
if (count($questionpools) == 0)
{
}
else
{
foreach ($questionpools as $key => $value)
{
$this->tpl->setCurrentBlock("option_spl");
$this->tpl->setVariable("OPTION_VALUE", $key);
$this->tpl->setVariable("TXT_OPTION", $value);
$this->tpl->parseCurrentBlock();
}
}
$this->tpl->setVariable("TXT_SELECT_QUESTIONPOOL", $this->lng->txt("select_questionpool"));
$this->tpl->setVariable("OPTION_SELECT_QUESTIONPOOL", $this->lng->txt("select_questionpool_option"));
$this->tpl->setVariable("FORMACTION", $this->ctrl->getFormAction($this, "import"));
$this->tpl->setVariable("BTN_NAME", "upload");
$this->tpl->setVariable("TXT_UPLOAD", $this->lng->txt("upload"));
$this->tpl->setVariable("TXT_IMPORT_TST", $this->lng->txt("import_tst"));
$this->tpl->setVariable("TXT_SELECT_MODE", $this->lng->txt("select_mode"));
$this->tpl->setVariable("TXT_SELECT_FILE", $this->lng->txt("select_file"));
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::infoScreen ( )

show information screen

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

References $_POST, $_SESSION, ilObjSurveyAccess\_hasEvaluationAccess(), ANONYMIZE_FREEACCESS, ANONYMIZE_OFF, ANONYMIZE_ON, and ilUtil\sendInfo().

Referenced by executeCommand(), and infoScreenObject().

{
global $ilAccess;
global $ilUser;
if (!$ilAccess->checkAccess("visible", "", $this->ref_id))
{
$this->ilias->raiseError($this->lng->txt("msg_no_perm_read"),$this->ilias->error_obj->MESSAGE);
}
include_once("./Services/InfoScreen/classes/class.ilInfoScreenGUI.php");
$info = new ilInfoScreenGUI($this);
include_once "./Modules/Survey/classes/class.ilSurveyExecutionGUI.php";
$output_gui =& new ilSurveyExecutionGUI($this->object);
$info->setFormAction($this->ctrl->getFormAction($output_gui, "infoScreen"));
$info->enablePrivateNotes();
$anonymize_key = NULL;
if ($this->object->getAnonymize() == 1)
{
if ($_SESSION["anonymous_id"][$this->object->getId()])
{
$anonymize_key = $_SESSION["anonymous_id"][$this->object->getId()];
}
else if ($_POST["anonymous_id"])
{
$anonymize_key = $_POST["anonymous_id"];
}
}
$canStart = $this->object->canStartSurvey($anonymize_key);
$showButtons = $canStart["result"];
if (!$showButtons) ilUtil::sendInfo(implode("<br />", $canStart["messages"]));
if ($showButtons)
{
// output of start/resume buttons for personalized surveys
if (!$this->object->getAnonymize())
{
$survey_started = $this->object->isSurveyStarted($ilUser->getId(), "");
// Anonymous User tries to start a personalized survey
if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
{
ilUtil::sendInfo($this->lng->txt("anonymous_with_personalized_survey"));
}
else
{
if ($survey_started === 1)
{
ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
}
elseif ($survey_started === 0)
{
$info->addFormButton("resume", $this->lng->txt("resume_survey"));
}
elseif ($survey_started === FALSE)
{
$info->addFormButton("start", $this->lng->txt("start_survey"));
}
}
}
// output of start/resume buttons for anonymized surveys
else if ($this->object->getAnonymize() && !$this->object->isAccessibleWithoutCode())
{
if (($_SESSION["AccountId"] == ANONYMOUS_USER_ID) && (strlen($_POST["anonymous_id"]) == 0) && (strlen($_SESSION["anonymous_id"][$this->object->getId()]) == 0))
{
$info->setFormAction($this->ctrl->getFormAction($this, "infoScreen"));
$info->addSection($this->lng->txt("anonymization"));
$info->addProperty("", $this->lng->txt("anonymize_anonymous_introduction"));
$info->addPropertyTextinput($this->lng->txt("enter_anonymous_id"), "anonymous_id", "", 8, "infoScreen", $this->lng->txt("submit"));
}
else
{
if (strlen($_POST["anonymous_id"]) > 0)
{
if (!$this->object->checkSurveyCode($_POST["anonymous_id"]))
{
ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
}
else
{
$anonymize_key = $_POST["anonymous_id"];
}
}
else if (strlen($_SESSION["anonymous_id"][$this->object->getId()]) > 0)
{
if (!$this->object->checkSurveyCode($_SESSION["anonymous_id"][$this->object->getId()]))
{
ilUtil::sendInfo($this->lng->txt("wrong_survey_code_used"));
}
else
{
$anonymize_key = $_SESSION["anonymous_id"][$this->object->getId()];
}
}
else
{
// registered users do not need to know that there is an anonymous key. The data is anonymized automatically
$anonymize_key = $this->object->getUserAccessCode($ilUser->getId());
if (!strlen($anonymize_key))
{
$anonymize_key = $this->object->createNewAccessCode();
$this->object->saveUserAccessCode($ilUser->getId(), $anonymize_key);
}
}
$info->addHiddenElement("anonymous_id", $anonymize_key);
$survey_started = $this->object->isSurveyStarted($ilUser->getId(), $anonymize_key);
if ($survey_started === 1)
{
ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
}
elseif ($survey_started === 0)
{
$info->addFormButton("resume", $this->lng->txt("resume_survey"));
}
elseif ($survey_started === FALSE)
{
$info->addFormButton("start", $this->lng->txt("start_survey"));
}
}
}
else
{
// free access
$survey_started = $this->object->isSurveyStarted($ilUser->getId(), "");
if ($survey_started === 1)
{
ilUtil::sendInfo($this->lng->txt("already_completed_survey"));
}
elseif ($survey_started === 0)
{
$info->addFormButton("resume", $this->lng->txt("resume_survey"));
}
elseif ($survey_started === FALSE)
{
$info->addFormButton("start", $this->lng->txt("start_survey"));
}
}
}
if (strlen($this->object->getIntroduction()))
{
$introduction = $this->object->getIntroduction();
$info->addSection($this->lng->txt("introduction"));
$info->addProperty("", $this->object->prepareTextareaOutput($introduction));
}
$info->addSection($this->lng->txt("svy_general_properties"));
if (strlen($this->object->getAuthor()))
{
$info->addProperty($this->lng->txt("author"), $this->object->getAuthor());
}
$info->addProperty($this->lng->txt("title"), $this->object->getTitle());
switch ($this->object->getAnonymize())
{
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("anonymize_personalized"));
break;
if ($_SESSION["AccountId"] == ANONYMOUS_USER_ID)
{
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_with_code"));
}
else
{
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_registered_user"));
}
break;
$info->addProperty($this->lng->txt("anonymization"), $this->lng->txt("info_anonymize_without_code"));
break;
}
include_once "./Modules/Survey/classes/class.ilObjSurveyAccess.php";
if ($ilAccess->checkAccess("write", "", $this->ref_id) || ilObjSurveyAccess::_hasEvaluationAccess($this->object->getId(), $ilUser->getId()))
{
$info->addProperty($this->lng->txt("evaluation_access"), $this->lng->txt("evaluation_access_info"));
}
$info->addMetaDataSections($this->object->getId(),0, $this->object->getType());
$this->ctrl->forwardCommand($info);
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

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

References infoScreen().

{
$this->ctrl->setCmd("showSummary");
$this->ctrl->setCmdClass("ilinfoscreengui");
$this->infoScreen();
}

+ Here is the call graph for this function:

ilObjSurveyGUI::insertQuestionblocksObject ( )

Insert question blocks into the survey.

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

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

{
$inserted_objects = 0;
if (is_array($_POST['cb']))
{
foreach ($_POST['cb'] as $questionblock_id)
{
$this->object->insertQuestionblock($questionblock_id);
$inserted_objects++;
}
}
if ($inserted_objects)
{
$this->object->saveCompletionStatus();
ilUtil::sendSuccess(($inserted_objects == 1) ? $this->lng->txt("questionblock_inserted") : $this->lng->txt("questionblocks_inserted"), true);
$this->ctrl->redirect($this, "questions");
}
else
{
ilUtil::sendInfo($this->lng->txt("insert_missing_questionblock"), true);
$this->ctrl->redirect($this, 'browseForQuestionblocks');
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::insertQuestions (   $insert_mode)

Insert questions from move clipboard.

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

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

Referenced by insertQuestionsAfterObject(), and insertQuestionsBeforeObject().

{
// get all questions to move
$move_questions = $_SESSION["move_questions"];
// get insert point
$insert_id = -1;
foreach ($_POST as $key => $value)
{
if (preg_match("/^cb_(\d+)$/", $key, $matches))
{
if ($insert_id < 0)
{
$insert_id = $matches[1];
}
}
if (preg_match("/^cb_qb_(\d+)$/", $key, $matches))
{
if ($insert_id < 0)
{
$ids =& $this->object->getQuestionblockQuestionIds($matches[1]);
if (count($ids))
{
if ($insert_mode == 0)
{
$insert_id = $ids[0];
}
else if ($insert_mode == 1)
{
$insert_id = $ids[count($ids)-1];
}
}
}
}
}
if ($insert_id <= 0)
{
ilUtil::sendInfo($this->lng->txt("no_target_selected_for_move"), true);
}
else
{
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
$this->object->moveQuestions($move_questions, $insert_id, $insert_mode);
}
unset($_SESSION["move_questions"]);
$this->ctrl->redirect($this, "questions");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::insertQuestionsAfterObject ( )

Insert questions after selection.

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

References insertQuestions().

{
$this->insertQuestions(1);
}

+ Here is the call graph for this function:

ilObjSurveyGUI::insertQuestionsBeforeObject ( )

Insert questions before selection.

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

References insertQuestions().

{
$this->insertQuestions(0);
}

+ Here is the call graph for this function:

ilObjSurveyGUI::insertQuestionsObject ( )

Insert questions into the survey.

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

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

{
$inserted_objects = 0;
if (is_array($_POST['q_id']))
{
foreach ($_POST['q_id'] as $question_id)
{
$this->object->insertQuestion($question_id);
$inserted_objects++;
}
}
if ($inserted_objects)
{
$this->object->saveCompletionStatus();
ilUtil::sendSuccess($this->lng->txt("questions_inserted"), true);
$this->ctrl->redirect($this, "questions");
}
else
{
ilUtil::sendInfo($this->lng->txt("insert_missing_question"), true);
$this->ctrl->redirect($this, 'browseForQuestions');
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::insertSavedMessageObject ( )

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

References $ilLog, handleWriteAccess(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and setCodesSubtabs().

{
$this->setCodesSubtabs();
include_once("./Modules/Survey/classes/forms/FormMailCodesGUI.php");
$form_gui = new FormMailCodesGUI($this);
$form_gui->setValuesByPost();
try
{
if ($form_gui->getSavedMessages()->getValue() > 0)
{
global $ilUser;
$settings = $this->object->getUserSettings($ilUser->getId(), 'savemessage');
$form_gui->getMailMessage()->setValue($settings[$form_gui->getSavedMessages()->getValue()]['value']);
ilUtil::sendSuccess($this->lng->txt('msg_message_inserted'));
}
else
{
ilUtil::sendFailure($this->lng->txt('msg_no_message_inserted'));
}
}
catch (Exception $e)
{
global $ilLog;
$ilLog->write('Error: ' + $e->getMessage());
}
$this->tpl->setVariable("ADM_CONTENT", $form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::inviteObject ( )

Creates the output for user/group invitation to a survey.

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

References $path, ilObjectGUI\getReturnLocation(), ilUtil\redirect(), ilUtil\sendInfo(), ilFormPropertyGUI\setInfo(), and STATUS_OFFLINE.

{
global $ilAccess;
global $rbacsystem;
global $ilToolbar;
if ((!$rbacsystem->checkAccess("visible,invite", $this->ref_id)) && (!$rbacsystem->checkAccess("write", $this->ref_id)))
{
// allow only read and write access
ilUtil::sendInfo($this->lng->txt("cannot_edit_survey"), true);
$path = $this->tree->getPathFull($this->object->getRefID());
include_once "./Services/Utilities/classes/class.ilUtil.php";
ilUtil::redirect($this->getReturnLocation("cancel","./repository.php?cmd=frameset&ref_id=" . $path[count($path) - 2]["child"]));
return;
}
if ($this->object->getStatus() == STATUS_OFFLINE)
{
ilUtil::sendInfo($this->lng->txt("survey_offline_message"));
return;
}
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("500");
$form->setId("invite");
// invitation
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("invitation"));
$form->addItem($header);
// invitation mode
$invitation = new ilRadioGroupInputGUI($this->lng->txt('invitation_mode'), "invitation");
$invitation->setInfo($this->lng->txt('invitation_mode_desc'));
$invitation->addOption(new ilRadioOption($this->lng->txt("invitation_off"), 0, ''));
$surveySetting = new ilSetting("survey");
if ($surveySetting->get("unlimited_invitation"))
{
$invitation->addOption(new ilRadioOption($this->lng->txt("unlimited_users"), 1, ''));
}
$invitation->addOption(new ilRadioOption($this->lng->txt("predefined_users"), 2, ''));
$inv = 0;
if ($this->object->getInvitation())
{
$inv = $this->object->getInvitationMode() + 1;
}
$invitation->setValue($inv);
$form->addItem($invitation);
$form->addCommandButton("saveInvitationStatus", $this->lng->txt("save"));
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_invite.html", "Modules/Survey");
$this->tpl->setVariable("INVITATION_TABLE", $form->getHTML());
if ($this->object->getInvitation() && $this->object->getInvitationMode() == 1)
{
// search button
$ilToolbar->addButton($this->lng->txt("svy_search_users"),
$this->ctrl->getLinkTargetByClass('ilRepositorySearchGUI','start'));
$this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
$invited_users = $this->object->getUserData($this->object->getInvitedUsers());
include_once "./Modules/Survey/classes/tables/class.ilSurveyInvitedUsersTableGUI.php";
$table_gui = new ilSurveyInvitedUsersTableGUI($this, 'invite');
$table_gui->setData($invited_users);
$this->tpl->setVariable('TBL_INVITED_USERS', $table_gui->getHTML());
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::inviteUserGroupObject ( )

Invite users or groups to a survey.

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

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

{
$invited = 0;
// add users to invitation
if (is_array($_POST["user"]))
{
foreach ($_POST["user"] as $user_id)
{
$this->object->inviteUser($user_id);
$invited++;
}
}
if ($invited == 0)
{
ilUtil::sendFailure($this->lng->txt('no_user_invited'), TRUE);
}
else
{
ilUtil::sendSuccess(sprintf($this->lng->txt('users_invited'), $invited), TRUE);
}
$this->ctrl->redirect($this, "invite");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::mailCodesObject ( )

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

References $_POST, handleWriteAccess(), and setCodesSubtabs().

{
$this->setCodesSubtabs();
$mailData['m_subject'] = (array_key_exists('m_subject', $_POST)) ? $_POST['m_subject'] : sprintf($this->lng->txt('default_codes_mail_subject'), $this->object->getTitle());
$mailData['m_message'] = (array_key_exists('m_message', $_POST)) ? $_POST['m_message'] : $this->lng->txt('default_codes_mail_message');
$mailData['m_notsent'] = (array_key_exists('m_notsent', $_POST)) ? $_POST['m_notsent'] : '1';
include_once("./Modules/Survey/classes/forms/FormMailCodesGUI.php");
$form_gui = new FormMailCodesGUI($this);
$form_gui->setValuesByArray($mailData);
$this->tpl->setVariable("ADM_CONTENT", $form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::maintenanceObject ( )

Participants maintenance.

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

References $_GET, ilObjectGUI\$data, $total, and handleWriteAccess().

{
if ($_GET["fill"] > 0)
{
for ($i = 0; $i < $_GET["fill"]; $i++) $this->object->fillSurveyForUser();
}
include_once "./Modules/Survey/classes/tables/class.ilSurveyMaintenanceTableGUI.php";
$table_gui = new ilSurveyMaintenanceTableGUI($this, 'maintenance');
$total =& $this->object->getSurveyParticipants();
$data = array();
foreach ($total as $user_data)
{
$last_access = $this->object->_getLastAccess($user_data["active_id"]);
array_push($data, array(
'id' => $user_data["active_id"],
'name' => $user_data["sortname"],
'login' => $user_data["login"],
'last_access' => $last_access
));
}
$table_gui->setData($data);
$this->tpl->setVariable('ADM_CONTENT', $table_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::moveQuestionsObject ( )

Move questions.

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

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

{
$move_questions = array();
foreach ($_POST as $key => $value)
{
if (preg_match("/cb_(\d+)/", $key, $matches))
{
array_push($move_questions, $matches[1]);
}
if (preg_match("/cb_qb_(\d+)/", $key, $matches))
{
$ids = $this->object->getQuestionblockQuestionIds($matches[1]);
foreach ($ids as $qkey => $qid)
{
array_push($move_questions, $qid);
}
}
}
if (count($move_questions) == 0)
{
ilUtil::sendInfo($this->lng->txt("no_question_selected_for_move"), true);
$this->ctrl->redirect($this, "questions");
}
else
{
$_SESSION["move_questions"] = $move_questions;
ilUtil::sendInfo($this->lng->txt("select_target_position_for_move_question"));
$this->questionsObject();
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::printViewObject ( )

Creates a print view of the survey questions.

public

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

References $_GET, ilObjectGUI\$ilias, ilUtil\getASCIIFilename(), ilUtil\getHtmlPath(), ilUtil\getImagePath(), questionsSubtabs(), and ilHTMLToPDFTransformer\transformerAvailable().

{
global $ilias;
$this->questionsSubtabs("printview");
$template = new ilTemplate("tpl.il_svy_svy_printview.html", TRUE, TRUE, "Modules/Survey");
include_once './Services/PDF/classes/class.ilHTMLToPDFTransformer.php';
{
$this->ctrl->setParameter($this, "pdf", "1");
$template->setCurrentBlock("pdf_export");
$template->setVariable("PDF_URL", $this->ctrl->getLinkTarget($this, "printView"));
$this->ctrl->setParameter($this, "pdf", "");
$template->setVariable("PDF_TEXT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_ALT", $this->lng->txt("pdf_export"));
$template->setVariable("PDF_IMG_URL", ilUtil::getHtmlPath(ilUtil::getImagePath("application-pdf.png")));
$template->parseCurrentBlock();
}
$template->setVariable("PRINT_TEXT", $this->lng->txt("print"));
$template->setVariable("PRINT_URL", "javascript:window.print();");
$pages =& $this->object->getSurveyPages();
foreach ($pages as $page)
{
if (count($page) > 0)
{
foreach ($page as $question)
{
$questionGUI = $this->object->getQuestionGUI($question["type_tag"], $question["question_id"]);
if (is_object($questionGUI))
{
if (strlen($question["heading"]))
{
$template->setCurrentBlock("textblock");
$template->setVariable("TEXTBLOCK", $question["heading"]);
$template->parseCurrentBlock();
}
$template->setCurrentBlock("question");
$template->setVariable("QUESTION_DATA", $questionGUI->getPrintView($this->object->getShowQuestionTitles(), $question["questionblock_show_questiontext"], $this->object->getSurveyId()));
$template->parseCurrentBlock();
}
}
if (count($page) > 1)
{
$template->setCurrentBlock("page");
$template->setVariable("BLOCKTITLE", $page[0]["questionblock_title"]);
$template->parseCurrentBlock();
}
else
{
$template->setCurrentBlock("page");
$template->parseCurrentBlock();
}
}
}
$this->tpl->addCss("./Modules/Survey/templates/default/survey_print.css", "print");
if (array_key_exists("pdf", $_GET) && ($_GET["pdf"] == 1))
{
$printbody = new ilTemplate("tpl.il_as_tst_print_body.html", TRUE, TRUE, "Modules/Test");
$printbody->setVariable("TITLE", sprintf($this->lng->txt("tst_result_user_name"), $uname));
$printbody->setVariable("ADM_CONTENT", $template->get());
$printoutput = $printbody->get();
$printoutput = preg_replace("/href=\".*?\"/", "", $printoutput);
$pdfSetting = new ilSetting("pdf");
include_once "./Services/PDF/classes/class.ilHTMLtoPDF.php";
$transformer = null;
switch ($pdfSetting->get('html_to_pdf_method'))
{
case 'fop':
include_once "./Services/PDF/classes/class.ilHTMLtoPDFTransformerUsingFOP.php";
$transformer = new ilHTMLtoPDFTransformerUsingFOP(ilUtil::getASCIIFilename($this->object->getTitle()) . ".pdf");
$transformer->xsl = "./Modules/Survey/xml/question2fo.xsl";
break;
case 'webkit':
include_once "./Services/PDF/classes/class.ilHTMLtoPDFTransformerUsingWebkit.php";
$transformer = new ilHTMLtoPDFTransformerUsingWebkit(ilUtil::getASCIIFilename($this->object->getTitle()) . ".pdf");
break;
}
if (is_object($transformer))
{
$generator = new ilHTMLtoPDF($transformer);
$generator->deliverPDFFromHTMLString($printoutput);
}
}
else
{
$this->tpl->setVariable("ADM_CONTENT", $template->get());
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::propertiesObject (   $checkonly = FALSE)

Display and fill the properties form of the test.

public

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

References $_GET, $_POST, $errors, $results, ilObjAdvancedEditing\_getUsedHTMLTags(), EVALUATION_ACCESS_ALL, EVALUATION_ACCESS_OFF, EVALUATION_ACCESS_PARTICIPANTS, IL_CAL_DATE, IL_CAL_UNIX, ilUtil\sendFailure(), ilFormPropertyGUI\setDisabled(), ilFormPropertyGUI\setInfo(), ilCheckboxInputGUI\setOptionTitle(), ilTextInputGUI\setSize(), ilTextInputGUI\setValue(), ilCheckboxInputGUI\setValue(), and ilTextAreaInputGUI\setValue().

Referenced by savePropertiesObject().

{
global $ilAccess;
$save = (strcmp($this->ctrl->getCmd(), "saveProperties") == 0) ? TRUE : FALSE;
include_once("./Services/Form/classes/class.ilPropertyFormGUI.php");
$form = new ilPropertyFormGUI();
$form->setFormAction($this->ctrl->getFormAction($this));
$form->setTableWidth("100%");
$form->setId("survey_properties");
// general properties
$header = new ilFormSectionHeaderGUI();
$header->setTitle($this->lng->txt("properties"));
$form->addItem($header);
// online
$online = new ilCheckboxInputGUI($this->lng->txt("online"), "online");
$online->setValue(1);
$online->setChecked($this->object->isOnline());
$form->addItem($online);
// introduction
$intro = new ilTextAreaInputGUI($this->lng->txt("introduction"), "introduction");
$intro->setValue($this->object->prepareTextareaOutput($this->object->getIntroduction()));
$intro->setRows(10);
$intro->setCols(80);
$intro->setUseRte(TRUE);
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$intro->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("survey"));
$intro->addPlugin("latex");
$intro->addButton("latex");
$intro->addPlugin("pastelatex");
$intro->setRTESupport($this->object->getId(), "svy", "survey");
$form->addItem($intro);
// enable start date
$enablestartingtime = new ilCheckboxInputGUI($this->lng->txt("start_date"), "enabled_start_date");
$enablestartingtime->setValue(1);
$enablestartingtime->setOptionTitle($this->lng->txt("enabled"));
$enablestartingtime->setChecked($this->object->getStartDateEnabled());
// start date
$startingtime = new ilDateTimeInputGUI('', 'start_date');
$startingtime->setShowDate(true);
$startingtime->setShowTime(true);
if ($this->object->getStartDateEnabled())
{
$startingtime->setDate(new ilDate($this->object->getStartDate(), IL_CAL_DATE));
}
else
{
$startingtime->setDate(new ilDate(time(), IL_CAL_UNIX));
}
$enablestartingtime->addSubItem($startingtime);
$form->addItem($enablestartingtime);
// enable end date
$enableendingtime = new ilCheckboxInputGUI($this->lng->txt("end_date"), "enabled_end_date");
$enableendingtime->setValue(1);
$enableendingtime->setOptionTitle($this->lng->txt("enabled"));
$enableendingtime->setChecked($this->object->getEndDateEnabled());
// end date
$endingtime = new ilDateTimeInputGUI('', 'end_date');
$endingtime->setShowDate(true);
$endingtime->setShowTime(true);
if ($this->object->getEndDateEnabled())
{
$endingtime->setDate(new ilDate($this->object->getEndDate(), IL_CAL_DATE));
}
else
{
$endingtime->setDate(new ilDate(time(), IL_CAL_UNIX));
}
$enableendingtime->addSubItem($endingtime);
$form->addItem($enableendingtime);
// anonymization
$anonymization = new ilCheckboxInputGUI($this->lng->txt("anonymization"), "anonymization");
$hasDatasets = $this->object->_hasDatasets($this->object->getSurveyId());
if ($hasDatasets)
{
$anonymization->setDisabled(true);
}
$anonymization->setOptionTitle($this->lng->txt("on"));
$anonymization->setValue(1);
$anonymization->setChecked($this->object->getAnonymize());
$anonymization->setInfo($this->lng->txt("anonymize_survey_description"));
$anonymization_options = new ilRadioGroupInputGUI('', "anonymization_options");
if ($hasDatasets)
{
$anonymization_options->setDisabled(true);
}
$anonymization_options->addOption(new ilCheckboxOption($this->lng->txt("anonymize_without_code"), 'anonymize_without_code', ''));
$anonymization_options->addOption(new ilCheckboxOption($this->lng->txt("anonymize_with_code"), 'anonymize_with_code', ''));
$anonymization_options->setValue(($this->object->isAccessibleWithoutCode()) ? 'anonymize_without_code' : 'anonymize_with_code');
$anonymization->addSubItem($anonymization_options);
$form->addItem($anonymization);
// show question titles
$show_question_titles = new ilCheckboxInputGUI('', "show_question_titles");
$show_question_titles->setOptionTitle($this->lng->txt("svy_show_questiontitles"));
$show_question_titles->setValue(1);
$show_question_titles->setChecked($this->object->getShowQuestionTitles());
$form->addItem($show_question_titles);
// final statement
$finalstatement = new ilTextAreaInputGUI($this->lng->txt("outro"), "outro");
$finalstatement->setValue($this->object->prepareTextareaOutput($this->object->getOutro()));
$finalstatement->setRows(10);
$finalstatement->setCols(80);
$finalstatement->setUseRte(TRUE);
$finalstatement->setRteTags(ilObjAdvancedEditing::_getUsedHTMLTags("survey"));
$finalstatement->addPlugin("latex");
$finalstatement->addButton("latex");
$finalstatement->addPlugin("pastelatex");
$finalstatement->setRTESupport($this->object->getId(), "svy", "survey");
$form->addItem($finalstatement);
/* Change Sn */
// redirect after survey
$redirect_after_survey = new ilTextInputGUI($this->lng->txt("redirect_after_survey"), "redirect_after_survey");
$redirect_after_survey->setSize(100);
$redirect_after_survey->setValue($this->object->getRedirectAfterSurvey());
$redirect_after_survey->setInfo($this->lng->txt("info_redirect_after_survey"));
$form->addItem($redirect_after_survey);
// redirect only in kiosk mode
$redirect_only_kiosk_mode = new ilCheckboxInputGUI($this->lng->txt("redirect_only_kiosk_mode"), "redirect_only_kiosk_mode");
$redirect_only_kiosk_mode->setValue(1);
$redirect_only_kiosk_mode->setChecked($this->object->getRedirectOnlyKioskMode());
$redirect_only_kiosk_mode->setInfo($this->lng->txt("info_redirect_only_kiosk_mode"));
$form->addItem($redirect_only_kiosk_mode);
//mail confirmation
$mail_confirmation = new ilCheckboxInputGUI($this->lng->txt("mail_confirmation"), "mail_confirmation");
$mail_confirmation->setValue(1);
$mail_confirmation->setChecked($this->object->getMailConfirmation());
//$mail_confirmation->setInfo($this->lng->txt("info_mail_confirmation"));
$form->addItem($mail_confirmation);
$mail_confirmation_subject = new ilTextInputGUI($this->lng->txt("mail_confirmation_subject"), "mail_confirmation_subject");
$mail_confirmation_subject->setSize(100);
$mail_confirmation_subject->setValue($this->object->getMailConfirmationSubject());
//$mail_confirmation_subject->setInfo($this->lng->txt("info_mail_confirmation_subject"));
$form->addItem($mail_confirmation_subject);
$mail_confirmation_body = new ilTextAreaInputGUI($this->lng->txt("mail_confirmation_body"), "mail_confirmation_body");
//$mail_confirmation_body->setValue($this->object->prepareTextareaOutput($this->object->getMailConfirmationBody()));
$mail_confirmation_body->setValue($this->object->getMailConfirmationBody());
$mail_confirmation_body->setRows(10);
$mail_confirmation_body->setCols(80);
$mail_confirmation_body->setInfo($this->lng->txt("info_mail_confirmation_body"));
$form->addItem($mail_confirmation_body);
/* Change Sn End */
// results properties
$results->setTitle($this->lng->txt("results"));
$form->addItem($results);
// evaluation access
$evaluation_access = new ilRadioGroupInputGUI($this->lng->txt('evaluation_access'), "evaluation_access");
$evaluation_access->setInfo($this->lng->txt('evaluation_access_description'));
$evaluation_access->addOption(new ilCheckboxOption($this->lng->txt("evaluation_access_off"), EVALUATION_ACCESS_OFF, ''));
$evaluation_access->addOption(new ilCheckboxOption($this->lng->txt("evaluation_access_all"), EVALUATION_ACCESS_ALL, ''));
$evaluation_access->addOption(new ilCheckboxOption($this->lng->txt("evaluation_access_participants"), EVALUATION_ACCESS_PARTICIPANTS, ''));
$evaluation_access->setValue($this->object->getEvaluationAccess());
$form->addItem($evaluation_access);
// mail notification
$mailnotification = new ilCheckboxInputGUI($this->lng->txt("mailnotification"), "mailnotification");
$mailnotification->setOptionTitle($this->lng->txt("activate"));
$mailnotification->setValue(1);
$mailnotification->setChecked($this->object->getMailNotification());
// addresses
$mailaddresses = new ilTextInputGUI($this->lng->txt("mailaddresses"), "mailaddresses");
$mailaddresses->setValue($this->object->getMailAddresses());
$mailaddresses->setSize(80);
$mailaddresses->setInfo($this->lng->txt('mailaddresses_info'));
$mailaddresses->setRequired(true);
if (($save) && !$_POST['mailnotification'])
{
$mailaddresses->setRequired(false);
}
// participant data
$participantdata = new ilTextAreaInputGUI($this->lng->txt("mailparticipantdata"), "mailparticipantdata");
$participantdata->setValue($this->object->getMailParticipantData());
$participantdata->setRows(6);
$participantdata->setCols(80);
$participantdata->setUseRte(false);
$participantdata->setInfo($this->lng->txt('mailparticipantdata_info'));
$mailnotification->addSubItem($mailaddresses);
$mailnotification->addSubItem($participantdata);
$form->addItem($mailnotification);
if ($ilAccess->checkAccess("write", "", $_GET["ref_id"])) $form->addCommandButton("saveProperties", $this->lng->txt("save"));
$errors = false;
if ($save)
{
$errors = !$form->checkInput();
$form->setValuesByPost();
if (!$errors)
{
if (($online->getChecked()) && (count($this->object->questions) == 0))
{
$online->setAlert($this->lng->txt("cannot_switch_to_online_no_questions"));
ilUtil::sendFailure($this->lng->txt('form_input_not_valid'));
$errors = true;
}
}
if ($errors) $checkonly = false;
}
$mailaddresses->setRequired(true);
if (!$checkonly) $this->tpl->setVariable("ADM_CONTENT", $form->getHTML());
return $errors;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::questionsObject ( )

Creates the questions form for the survey object.

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

References $_GET, $_SESSION, ilObjectGUI\$data, $path, ilObject\_getAllReferences(), ilObjSurveyQuestionPool\_getQuestiontypes(), addHeadingObject(), confirmRemoveHeadingForm(), defineQuestionblock(), ilUtil\getImagePath(), ilObjectGUI\getReturnLocation(), handleWriteAccess(), questionsSubtabs(), ilUtil\redirect(), ilUtil\sendFailure(), ilUtil\sendInfo(), ilUtil\sendQuestion(), and ilUtil\sendSuccess().

Referenced by moveQuestionsObject().

{
global $rbacsystem;
$hasDatasets = $this->object->_hasDatasets($this->object->getSurveyId());
include_once "./Services/Utilities/classes/class.ilUtil.php";
if ((!$rbacsystem->checkAccess("read", $this->ref_id)) && (!$rbacsystem->checkAccess("write", $this->ref_id)))
{
// allow only read and write access
ilUtil::sendInfo($this->lng->txt("cannot_edit_survey"), true);
$path = $this->tree->getPathFull($this->object->getRefID());
ilUtil::redirect($this->getReturnLocation("cancel","./repository.php?cmd=frameset&ref_id=" . $path[count($path) - 2]["child"]));
return;
}
if ($_GET["new_id"] > 0)
{
// add a question to the survey previous created in a questionpool
$existing = $this->object->getExistingQuestions();
if (!in_array($_GET["new_id"], $existing))
{
$inserted = $this->object->insertQuestion($_GET["new_id"]);
if (!$inserted)
{
ilUtil::sendFailure($this->lng->txt("survey_error_insert_incomplete_question"));
}
}
}
if ($_GET["eqid"] and $_GET["eqpl"])
{
ilUtil::redirect("ilias.php?baseClass=ilObjSurveyQuestionPoolGUI&ref_id=" . $_GET["eqpl"] . "&cmd=editQuestionForSurvey&calling_survey=".$_GET["ref_id"]."&q_id=" . $_GET["eqid"]);
}
$_SESSION["calling_survey"] = $this->object->getRefId();
unset($_SESSION["survey_id"]);
if ($_GET["editheading"])
{
$this->addHeadingObject(false, $_GET["editheading"]);
return;
}
if ($_GET["up"] > 0)
{
$this->object->moveUpQuestion($_GET["up"]);
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'));
}
if ($_GET["down"] > 0)
{
$this->object->moveDownQuestion($_GET["down"]);
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'));
}
if ($_GET["qbup"] > 0)
{
$this->object->moveUpQuestionblock($_GET["qbup"]);
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'));
}
if ($_GET["qbdown"] > 0)
{
$this->object->moveDownQuestionblock($_GET["qbdown"]);
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'));
}
if ($_GET["removeheading"])
{
return;
}
if ($_GET["editblock"])
{
$this->defineQuestionblock($_GET["editblock"]);
return;
}
if ($_GET["add"])
{
// called after a new question was created from a questionpool
$selected_array = array();
array_push($selected_array, $_GET["add"]);
ilUtil::sendQuestion($this->lng->txt("ask_insert_questions"));
$this->insertQuestionsForm($selected_array);
return;
}
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_questions.html", "Modules/Survey");
$survey_questions =& $this->object->getSurveyQuestions();
$questionpools =& $this->object->getQuestionpoolTitles();
$colors = array("tblrow1", "tblrow2");
$counter = 0;
$title_counter = 0;
$last_color_class = "";
$obligatory = "<img src=\"" . ilUtil::getImagePath("obligatory.gif", "Modules/Survey") . "\" alt=\"" . $this->lng->txt("question_obligatory") . "\" title=\"" . $this->lng->txt("question_obligatory") . "\" />";
include_once "./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php";
if (count($survey_questions) > 0)
{
foreach ($survey_questions as $question_id => $data)
{
$title_counter++;
if (($last_questionblock_id > 0) && ($data["questionblock_id"] == 0))
{
$counter++;
}
if (($last_questionblock_id > 0) && ($data["questionblock_id"] > 0) && ($data["questionblock_id"] != $last_questionblock_id))
{
$counter++;
}
if (($data["questionblock_id"] > 0) and ($data["questionblock_id"] != $last_questionblock_id))
{
// add a separator line for the beginning of a question block
$this->tpl->setCurrentBlock("separator");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("QTab");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("block");
$this->tpl->setVariable("TYPE_ICON", "<img src=\"" . ilUtil::getImagePath("questionblock.gif", "Modules/Survey") . "\" alt=\"".$this->lng->txt("questionblock_icon")."\" />");
$this->tpl->setVariable("TEXT_QUESTIONBLOCK", $this->lng->txt("questionblock") . ": " . $data["questionblock_title"]);
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
if ($data["question_id"] != $this->object->questions[0])
{
$this->tpl->setVariable("BUTTON_UP", "<a href=\"" . $this->ctrl->getLinkTarget($this, "questions") . "&qbup=" . $data["questionblock_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_up.gif") . "\" alt=\"" . $this->lng->txt("up") . "\" title=\"" . $this->lng->txt("up") . "\" border=\"0\" /></a>");
}
$akeys = array_keys($survey_questions);
if ($data["questionblock_id"] != $survey_questions[$akeys[count($akeys)-1]]["questionblock_id"])
{
$this->tpl->setVariable("BUTTON_DOWN", "<a href=\"" . $this->ctrl->getLinkTarget($this, "questions") . "&qbdown=" . $data["questionblock_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_down.gif") . "\" alt=\"" . $this->lng->txt("down") . "\" title=\"" . $this->lng->txt("down") . "\" border=\"0\" /></a>");
}
$this->tpl->setVariable("TEXT_EDIT", $this->lng->txt("edit"));
$this->tpl->setVariable("HREF_EDIT", $this->ctrl->getLinkTarget($this, "questions") . "&editblock=" . $data["questionblock_id"]);
}
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("QTab");
$this->tpl->setVariable("QUESTION_ID", "qb_" . $data["questionblock_id"]);
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
}
if (($last_questionblock_id > 0) && ($data["questionblock_id"] == 0))
{
// add a separator line for the end of a question block
$this->tpl->setCurrentBlock("separator");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("QTab");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
}
if ($data["heading"])
{
$this->tpl->setCurrentBlock("heading");
$this->tpl->setVariable("TEXT_HEADING", $data["heading"]);
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
$this->tpl->setVariable("TEXT_EDIT", $this->lng->txt("edit"));
$this->tpl->setVariable("HREF_EDIT", $this->ctrl->getLinkTarget($this, "questions") . "&editheading=" . $data["question_id"]);
$this->tpl->setVariable("TEXT_DELETE", $this->lng->txt("remove"));
$this->tpl->setVariable("HREF_DELETE", $this->ctrl->getLinkTarget($this, "questions") . "&removeheading=" . $data["question_id"]);
}
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("QTab");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
}
if (!$data["questionblock_id"])
{
$this->tpl->setCurrentBlock("checkable");
$this->tpl->setVariable("QUESTION_ID", $data["question_id"]);
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("QTab");
include_once "./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
$q_id = $data["question_id"];
$qpl_ref_id = current(ilObject::_getAllReferences($data["obj_fi"]));
$this->tpl->setVariable("QUESTION_TITLE", "$title_counter. <a href=\"" . $this->ctrl->getLinkTarget($this, "questions") . "&eqid=$q_id&eqpl=$qpl_ref_id" . "\">" . $data["title"] . "</a>");
}
else
{
$this->tpl->setVariable("QUESTION_TITLE", "$title_counter. ". $data["title"]);
}
$this->tpl->setVariable("TYPE_ICON", "<img src=\"" . ilUtil::getImagePath("question.gif", "Modules/Survey") . "\" alt=\"".$this->lng->txt("question_icon")."\" />");
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
$obligatory_checked = "";
if ($data["obligatory"] == 1)
{
$obligatory_checked = " checked=\"checked\"";
}
$this->tpl->setVariable("QUESTION_OBLIGATORY", "<input type=\"checkbox\" name=\"obligatory_" . $data["question_id"] . "\" value=\"1\"$obligatory_checked />");
}
else
{
if ($data["obligatory"] == 1)
{
$this->tpl->setVariable("QUESTION_OBLIGATORY", $obligatory);
}
}
$this->tpl->setVariable("QUESTION_COMMENT", $data["description"]);
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
if (!$data["questionblock_id"])
{
// up/down buttons for non-questionblock questions
if ($data["question_id"] != $this->object->questions[0])
{
$this->tpl->setVariable("BUTTON_UP", "<a href=\"" . $this->ctrl->getLinkTarget($this, "questions") . "&up=" . $data["question_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_up.gif") . "\" alt=\"".$this->lng->txt("up")."\" border=\"0\" /></a>");
}
if ($data["question_id"] != $this->object->questions[count($this->object->questions)-1])
{
$this->tpl->setVariable("BUTTON_DOWN", "<a href=\"" . $this->ctrl->getLinkTarget($this, "questions") . "&down=" . $data["question_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_down.gif") . "\" alt=\"".$this->lng->txt("down")."\" border=\"0\" /></a>");
}
}
else
{
// up/down buttons for questionblock questions
if ($data["questionblock_id"] == $last_questionblock_id)
{
$this->tpl->setVariable("BUTTON_UP", "<a href=\"" . $this->ctrl->getLinkTarget($this, "questions") . "&up=" . $data["question_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_up.gif") . "\" alt=\"".$this->lng->txt("up")."\" border=\"0\" /></a>");
}
$tmp_questions = array_keys($survey_questions);
$blockkey = array_search($question_id, $tmp_questions);
if (($blockkey !== FALSE) && ($blockkey < count($tmp_questions)-1))
{
if ($data["questionblock_id"] == $survey_questions[$tmp_questions[$blockkey+1]]["questionblock_id"])
{
$this->tpl->setVariable("BUTTON_DOWN", "<a href=\"" . $this->ctrl->getLinkTarget($this, "questions") . "&down=" . $data["question_id"] . "\"><img src=\"" . ilUtil::getImagePath("a_down.gif") . "\" alt=\"".$this->lng->txt("down")."\" border=\"0\" /></a>");
}
}
}
}
foreach ($questiontypes as $trans => $typedata)
{
if (strcmp($typedata["type_tag"], $data["type_tag"]) == 0)
{
$this->tpl->setVariable("QUESTION_TYPE", $trans);
}
}
$this->tpl->setVariable("QUESTION_AUTHOR", $data["author"]);
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$last_color_class = $colors[$counter % 2];
if (!$data["questionblock_id"])
{
$counter++;
}
$this->tpl->parseCurrentBlock();
$last_questionblock_id = $data["questionblock_id"];
}
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
$this->tpl->setCurrentBlock("selectall");
$this->tpl->setVariable("SELECT_ALL", $this->lng->txt("select_all"));
$this->tpl->setVariable("COLOR_CLASS", $last_color_class);
$this->tpl->parseCurrentBlock();
if (array_key_exists("move_questions", $_SESSION))
{
$this->tpl->setCurrentBlock("move_buttons");
$this->tpl->setVariable("INSERT_BEFORE", $this->lng->txt("insert_before"));
$this->tpl->setVariable("INSERT_AFTER", $this->lng->txt("insert_after"));
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("QFooter");
$this->tpl->setVariable("ARROW", "<img src=\"" . ilUtil::getImagePath("arrow_downright.gif") . "\" alt=\"".$this->lng->txt("arrow_downright")."\">");
$this->tpl->setVariable("REMOVE", $this->lng->txt("remove_question"));
$this->tpl->setVariable("MOVE", $this->lng->txt("move"));
$this->tpl->setVariable("QUESTIONBLOCK", $this->lng->txt("define_questionblock"));
$this->tpl->setVariable("UNFOLD", $this->lng->txt("unfold"));
$this->tpl->setVariable("SAVE", $this->lng->txt("save_obligatory_state"));
$this->tpl->parseCurrentBlock();
}
}
else
{
$this->tpl->setCurrentBlock("Emptytable");
$this->tpl->setVariable("TEXT_EMPTYTABLE", $this->lng->txt("no_questions_available"));
$this->tpl->parseCurrentBlock();
}
if (($last_questionblock_id > 0))
{
// add a separator line for the end of a question block (if the last question is a questionblock question)
$this->tpl->setCurrentBlock("separator");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
$this->tpl->setCurrentBlock("QTab");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->parseCurrentBlock();
}
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
$this->tpl->setCurrentBlock("QTypes");
include_once "./Modules/SurveyQuestionPool/classes/class.ilObjSurveyQuestionPool.php";
foreach ($qtypes as $translation => $data)
{
$this->tpl->setVariable("QUESTION_TYPE_ID", $data["type_tag"]);
$this->tpl->setVariable("QUESTION_TYPE", $translation);
$this->tpl->parseCurrentBlock();
}
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "questions"));
$this->tpl->setVariable("QUESTION_TITLE", $this->lng->txt("title"));
$this->tpl->setVariable("QUESTION_COMMENT", $this->lng->txt("description"));
$this->tpl->setVariable("QUESTION_OBLIGATORY", $this->lng->txt("obligatory"));
$this->tpl->setVariable("QUESTION_SEQUENCE", $this->lng->txt("sequence"));
$this->tpl->setVariable("QUESTION_TYPE", $this->lng->txt("question_type"));
$this->tpl->setVariable("QUESTION_AUTHOR", $this->lng->txt("author"));
if ($rbacsystem->checkAccess("write", $this->ref_id) and !$hasDatasets)
{
$this->tpl->setVariable("BUTTON_INSERT_QUESTION", $this->lng->txt("browse_for_questions"));
global $ilUser;
$this->tpl->setVariable('BROWSE_COMMAND', ($ilUser->getPref('svy_insert_type') == 1 || strlen($ilUser->getPref('svy_insert_type')) == 0) ? 'browseForQuestions' : 'browseForQuestionblocks');
$this->tpl->setVariable("TEXT_CREATE_NEW", " " . strtolower($this->lng->txt("or")) . " " . $this->lng->txt("create_new"));
$this->tpl->setVariable("BUTTON_CREATE_QUESTION", $this->lng->txt("create"));
$this->tpl->setVariable("HEADING", $this->lng->txt("add_heading"));
}
if ($hasDatasets)
{
ilUtil::sendInfo($this->lng->txt("survey_has_datasets_warning"));
}
$this->tpl->parseCurrentBlock();
$this->questionsSubtabs("questions");
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::questionsSubtabs (   $a_cmd)

Set the subtabs for the questions tab.

Set the subtabs for the questions tab

private

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

Referenced by addHeadingObject(), createQuestionObject(), defineQuestionblock(), printViewObject(), and questionsObject().

{
$questions = ($a_cmd == 'questions') ? true : false;
$printview = ($a_cmd == 'printview') ? true : false;
$this->tabs_gui->addSubTabTarget("survey_question_editor", $this->ctrl->getLinkTarget($this, "questions"),
"", "", "", $questions);
$this->tabs_gui->addSubTabTarget("print_view", $this->ctrl->getLinkTarget($this, "printView"),
"", "", "", $printview);
}

+ Here is the caller graph for this function:

ilObjSurveyGUI::removeQuestionsForm (   $checked_questions,
  $checked_questionblocks 
)

Creates a confirmation form to remove questions from the survey.

Parameters
array$checked_questionsAn array containing the id's of the questions to be removed
array$checked_questionblocksAn array containing the id's of the question blocks to be removed public

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

References ilObjectGUI\$data, SurveyQuestion\_getQuestionTypeName(), and ilUtil\sendInfo().

Referenced by removeQuestionsObject().

{
$this->tpl->addBlockFile("ADM_CONTENT", "adm_content", "tpl.il_svy_svy_remove_questions.html", "Modules/Survey");
$colors = array("tblrow1", "tblrow2");
$counter = 0;
$surveyquestions =& $this->object->getSurveyQuestions();
include_once "./Modules/SurveyQuestionPool/classes/class.SurveyQuestion.php";
foreach ($surveyquestions as $question_id => $data)
{
if (in_array($data["question_id"], $checked_questions) or (in_array($data["questionblock_id"], $checked_questionblocks)))
{
$this->tpl->setCurrentBlock("row");
$this->tpl->setVariable("COLOR_CLASS", $colors[$counter % 2]);
$this->tpl->setVariable("TEXT_TITLE", $data["title"]);
$this->tpl->setVariable("TEXT_DESCRIPTION", $data["description"]);
$this->tpl->setVariable("TEXT_TYPE", SurveyQuestion::_getQuestionTypeName($data["type_tag"]));
$this->tpl->setVariable("TEXT_QUESTIONBLOCK", $data["questionblock_title"]);
$this->tpl->parseCurrentBlock();
$counter++;
}
}
foreach ($checked_questions as $id)
{
$this->tpl->setCurrentBlock("hidden");
$this->tpl->setVariable("HIDDEN_NAME", "id_$id");
$this->tpl->setVariable("HIDDEN_VALUE", "$id");
$this->tpl->parseCurrentBlock();
}
foreach ($checked_questionblocks as $id)
{
$this->tpl->setCurrentBlock("hidden");
$this->tpl->setVariable("HIDDEN_NAME", "id_qb_$id");
$this->tpl->setVariable("HIDDEN_VALUE", "$id");
$this->tpl->parseCurrentBlock();
}
$this->tpl->setCurrentBlock("adm_content");
$this->tpl->setVariable("TEXT_TITLE", $this->lng->txt("title"));
$this->tpl->setVariable("TEXT_DESCRIPTION", $this->lng->txt("description"));
$this->tpl->setVariable("TEXT_TYPE", $this->lng->txt("question_type"));
$this->tpl->setVariable("TEXT_QUESTIONBLOCK", $this->lng->txt("questionblock"));
$this->tpl->setVariable("BTN_CONFIRM", $this->lng->txt("confirm"));
$this->tpl->setVariable("BTN_CANCEL", $this->lng->txt("cancel"));
$this->tpl->setVariable("FORM_ACTION", $this->ctrl->getFormAction($this, "confirmRemoveQuestions"));
$this->tpl->parseCurrentBlock();
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

ilObjSurveyGUI::removeQuestionsObject ( )

Remove questions from the survey.

Remove questions from the survey

private

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

References $_POST, removeQuestionsForm(), ilUtil\sendInfo(), and ilUtil\sendQuestion().

{
$checked_questions = array();
$checked_questionblocks = array();
foreach ($_POST as $key => $value)
{
if (preg_match("/cb_(\d+)/", $key, $matches))
{
array_push($checked_questions, $matches[1]);
}
if (preg_match("/cb_qb_(\d+)/", $key, $matches))
{
array_push($checked_questionblocks, $matches[1]);
}
}
if (count($checked_questions) + count($checked_questionblocks) > 0)
{
ilUtil::sendQuestion($this->lng->txt("remove_questions"));
$this->removeQuestionsForm($checked_questions, $checked_questionblocks);
return;
}
else
{
ilUtil::sendInfo($this->lng->txt("no_question_selected_for_removal"), true);
$this->ctrl->redirect($this, "questions");
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::resetfilterQuestionblockBrowserObject ( )

Reset the questionblock browser filter.

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

{
include_once "./Modules/Survey/classes/tables/class.ilSurveyQuestionblockbrowserTableGUI.php";
$table_gui = new ilSurveyQuestionblockbrowserTableGUI($this, 'browseForQuestionblocks');
$table_gui->resetFilter();
$this->ctrl->redirect($this, 'browseForQuestionblocks');
}
ilObjSurveyGUI::resetfilterQuestionBrowserObject ( )

Reset the question browser filter.

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

{
include_once "./Modules/Survey/classes/tables/class.ilSurveyQuestionbrowserTableGUI.php";
$table_gui = new ilSurveyQuestionbrowserTableGUI($this, 'browseForQuestions');
$table_gui->resetFilter();
$this->ctrl->redirect($this, 'browseForQuestions');
}
ilObjSurveyGUI::saveDefineQuestionblockObject ( )

Confirm define a question block.

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

References $_POST, defineQuestionblockObject(), ilUtil\sendInfo(), ilUtil\sendSuccess(), and ilUtil\stripSlashes().

{
if ($_POST["title"])
{
$show_questiontext = ($_POST["show_questiontext"]) ? 1 : 0;
if ($_POST["questionblock_id"])
{
include_once "./Services/Utilities/classes/class.ilUtil.php";
$this->object->modifyQuestionblock($_POST["questionblock_id"], ilUtil::stripSlashes($_POST["title"]), $show_questiontext);
}
else
{
$questionblock = array();
foreach ($_POST as $key => $value)
{
if (preg_match("/cb_(\d+)/", $key, $matches))
{
array_push($questionblock, $value);
}
}
include_once "./Services/Utilities/classes/class.ilUtil.php";
$this->object->createQuestionblock(ilUtil::stripSlashes($_POST["title"]), $show_questiontext, $questionblock);
}
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
$this->ctrl->redirect($this, "questions");
}
else
{
ilUtil::sendInfo($this->lng->txt("enter_questionblock_title"));
return;
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::saveHeadingObject ( )

Saves an edited heading in the survey questions list.

Saves an edited heading in the survey questions list

public

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

References $_POST, ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), addHeadingObject(), and ilUtil\stripSlashes().

{
$hasErrors = $this->addHeadingObject(true);
if (!$hasErrors)
{
$insertbefore = $_POST["insertbefore"];
if (!$insertbefore)
{
$insertbefore = $_POST["insertbefore_original"];
}
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$this->object->saveHeading(ilUtil::stripSlashes($_POST["heading"], TRUE, ilObjAdvancedEditing::_getUsedHTMLTagsAsString("survey")), $insertbefore);
$this->ctrl->redirect($this, "questions");
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::saveInvitationStatusObject ( )

Saves the status of the invitation tab.

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

References $_POST, and ilUtil\sendSuccess().

{
$mode = $_POST['invitation'];
switch ($mode)
{
case 0:
$this->object->setInvitation(0);
break;
case 1:
$this->object->setInvitation(1);
$this->object->setInvitationMode(0);
break;
case 2:
$this->object->setInvitation(1);
$this->object->setInvitationMode(1);
break;
}
$this->object->saveToDb();
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
$this->ctrl->redirect($this, "invite");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::saveObject ( )

save object public

Reimplemented from ilObjectGUI.

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

References $_GET, $_POST, ilUtil\redirect(), ilUtil\sendFailure(), and ilUtil\sendSuccess().

{
global $rbacadmin;
if (!strlen($_POST['Fobject']['title']))
{
ilUtil::sendFailure($this->lng->txt('title_required'), true);
$this->ctrl->setParameter($this, 'new_type', $_GET['new_type']);
$this->ctrl->redirect($this, 'create');
}
// create and insert forum in objecttree
$newObj = parent::saveObject();
// always send a message
ilUtil::sendSuccess($this->lng->txt("object_added"),true);
ilUtil::redirect("ilias.php?baseClass=ilObjSurveyGUI&ref_id=".$newObj->getRefId()."&cmd=properties");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::saveObligatoryObject ( )

Save obligatory states.

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

References $_POST, and ilUtil\sendSuccess().

{
$obligatory = array();
foreach ($_POST as $key => $value)
{
if (preg_match("/obligatory_(\d+)/", $key, $matches))
{
$obligatory[$matches[1]] = 1;
}
}
$this->object->setObligatoryStates($obligatory);
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
$this->ctrl->redirect($this, "questions");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::savePropertiesObject ( )

Save the survey properties.

Save the survey properties

private

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

References $_POST, $_SESSION, ANONYMIZE_FREEACCESS, propertiesObject(), and ilUtil\sendSuccess().

{
$hasErrors = $this->propertiesObject(true);
if (!$hasErrors)
{
$result = $this->object->setStatus($_POST['online']);
$this->object->setEvaluationAccess($_POST["evaluation_access"]);
$this->object->setStartDateEnabled($_POST["enabled_start_date"]);
if ($this->object->getStartDateEnabled())
{
$this->object->setStartDateAndTime($_POST["start_date"]['date'], $_POST["start_date"]['time']);
}
else
{
$this->object->setStartDate(null);
}
$this->object->setEndDateEnabled($_POST["enabled_end_date"]);
if ($this->object->getEndDateEnabled())
{
$this->object->setEndDateAndTime($_POST["end_date"]['date'], $_POST["end_date"]['time']);
}
else
{
$this->object->setEndDate(null);
}
include_once "./Services/AdvancedEditing/classes/class.ilObjAdvancedEditing.php";
$introduction = $_POST["introduction"];
$this->object->setIntroduction($introduction);
$outro = $_POST["outro"];
$this->object->setOutro($outro);
/* Change Sn */
$this->object->setRedirectAfterSurvey($_POST["redirect_after_survey"]);
$redirect_only_kiosk_mode = ($_POST["redirect_only_kiosk_mode"] ? 1 : 0);
$this->object->setRedirectOnlyKioskMode($redirect_only_kiosk_mode);
$mail_confirmation = ($_POST["mail_confirmation"] ? 1 : 0);
$this->object->setMailConfirmation($mail_confirmation);
$this->object->setMailConfirmationSubject($_POST["mail_confirmation_subject"]);
//$mail_confirmation_body = ilUtil::stripSlashes($_POST["mail_confirmation_body"], true, ilObjAdvancedEditing::_getUsedHTMLTagsAsString("survey"));
$mail_confirmation_body = $_POST["mail_confirmation_body"];
$this->object->setMailConfirmationBody($mail_confirmation_body);
/* Change Sn End */
$hasDatasets = $this->object->_hasDatasets($this->object->getSurveyId());
if (!$hasDatasets)
{
$anonymize = $_POST["anonymization"];
if ($anonymize)
{
if (strcmp($_POST['anonymization_options'], 'anonymize_without_code') == 0) $anonymize = ANONYMIZE_FREEACCESS;
}
$this->object->setAnonymize($anonymize);
}
$this->object->setShowQuestionTitles($_POST["show_question_titles"]);
$this->object->setMailNotification($_POST['mailnotification']);
$this->object->setMailAddresses($_POST['mailaddresses']);
$this->object->setMailParticipantData($_POST['mailparticipantdata']);
$this->object->saveToDb();
if (strcmp($_SESSION["info"], "") != 0)
{
ilUtil::sendSuccess($_SESSION["info"] . "<br />" . $this->lng->txt("settings_saved"), true);
}
else
{
ilUtil::sendSuccess($this->lng->txt("settings_saved"), true);
}
$this->ctrl->redirect($this, "properties");
}
}

+ Here is the call graph for this function:

ilObjSurveyGUI::sendCodesMailObject ( )

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

References $_POST, $title, handleWriteAccess(), ilUtil\sendFailure(), ilUtil\sendSuccess(), and setCodesSubtabs().

{
$this->setCodesSubtabs();
include_once("./Modules/Survey/classes/forms/FormMailCodesGUI.php");
$form_gui = new FormMailCodesGUI($this);
if ($form_gui->checkInput())
{
$code_exists = strpos($_POST['m_message'], '[code]') !== FALSE;
if (!$code_exists)
{
if (!$code_exists) ilUtil::sendFailure($this->lng->txt('please_enter_mail_code'));
$form_gui->setValuesByPost();
}
else
{
if ($_POST['savemessage'] == 1)
{
global $ilUser;
$title = (strlen($_POST['savemessagetitle'])) ? $_POST['savemessagetitle'] : ilStr::substr($_POST['m_message'], 0, 40) . '...';
$this->object->saveUserSettings($ilUser->getId(), 'savemessage', $title, $_POST['m_message']);
}
$this->object->sendCodes($_POST['m_notsent'], $_POST['m_subject'], $_POST['m_message']);
ilUtil::sendSuccess($this->lng->txt('mail_sent'), true);
$this->ctrl->redirect($this, 'codesMail');
}
}
else
{
$form_gui->setValuesByPost();
}
$this->tpl->setVariable("ADM_CONTENT", $form_gui->getHTML());
}

+ Here is the call graph for this function:

ilObjSurveyGUI::setBrowseForQuestionsSubtabs ( )

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

Referenced by browseForQuestionblocksObject(), and browseForQuestionsObject().

{
global $ilAccess;
global $ilTabs;
if ($ilAccess->checkAccess("write", "", $this->ref_id))
{
$ilTabs->setBackTarget($this->lng->txt("menubacktosurvey"), $this->ctrl->getLinkTarget($this, "questions"));
$ilTabs->addTarget("browse_for_questions",
$this->ctrl->getLinkTarget($this, "browseForQuestions"),
array("browseForQuestions", "browseForQuestionblocks"),
"", ""
);
}
}

+ Here is the caller graph for this function:

ilObjSurveyGUI::setCodeLanguageObject ( )

Change survey language for direct access URL's.

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

References $_POST, and ilUtil\sendSuccess().

{
if (strcmp($_POST["lang"], "-1") != 0)
{
global $ilUser;
$ilUser->writePref("survey_code_language", $_POST["lang"]);
}
ilUtil::sendSuccess($this->lng->txt('language_changed'), true);
$this->ctrl->redirect($this, 'codes');
}

+ Here is the call graph for this function:

ilObjSurveyGUI::setCodesSubtabs ( )

Set the tabs for the access codes section.

private

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

References ilObjectGUI\$data.

Referenced by codesMailObject(), codesObject(), deleteSavedMessageObject(), importExternalMailRecipientsObject(), insertSavedMessageObject(), mailCodesObject(), and sendCodesMailObject().

{
global $ilTabs;
global $ilAccess;
$ilTabs->addSubTabTarget
(
"codes",
$this->ctrl->getLinkTarget($this,'codes'),
array("codes", "createSurveyCodes", "setCodeLanguage", "deleteCodes", "exportCodes"),
""
);
$ilTabs->addSubTabTarget
(
"participating_users",
$this->ctrl->getLinkTarget($this, "codesMail"),
array("codesMail", "saveMailTableFields", "importExternalMailRecipients",
'importExternalRecipientsFromFile', 'importExternalRecipientsFromText',
'importExternalRecipientsFromDataset'),
""
);
$data = $this->object->getExternalCodeRecipients();
if (count($data))
{
$ilTabs->addSubTabTarget
(
"mail_survey_codes",
$this->ctrl->getLinkTarget($this, "mailCodes"),
array("mailCodes", "sendCodesMail", "insertSavedMessage", "deleteSavedMessage"),
""
);
}
}

+ Here is the caller graph for this function:

ilObjSurveyGUI::setEvalSubtabs ( )

Set the tabs for the evaluation output.

private

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

Referenced by getTabs().

{
global $ilTabs;
global $ilAccess;
/* Change Sn */
global $rbacreview;
global $ilUser;
$ilTabs->addSubTabTarget(
"svy_eval_cumulated",
$this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluation"),
array("evaluation", "checkEvaluationAccess"),
""
);
$ilTabs->addSubTabTarget(
"svy_eval_detail",
$this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluationdetails"),
array("evaluationdetails"),
""
);
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$ilTabs->addSubTabTarget(
"svy_eval_user",
$this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluationuser"),
array("evaluationuser"),
""
);
}
/* Change Sn */
if ($rbacreview->isAssigned($ilUser->getId(),2)) {
if ($ilAccess->checkAccess("write", "", $this->object->getRefId()))
{
$ilTabs->addSubTabTarget(
"svy_eval_participants_state",
$this->ctrl->getLinkTargetByClass("ilsurveyevaluationgui", "evaluationparticipantsstate"),
array("evaluationparticipantsstate"),
""
);
}
}
/* Change Sn End */
}

+ Here is the caller graph for this function:

ilObjSurveyGUI::setNewTemplate ( )

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

References ilObjectGUI\$tpl, and ilUtil\getStyleSheetLocation().

{
global $tpl;
$tpl = new ilTemplate("tpl.il_svy_svy_main.html", TRUE, TRUE, "Modules/Survey");
// load style sheet depending on user's settings
$location_stylesheet = ilUtil::getStyleSheetLocation();
$tpl->setVariable("LOCATION_STYLESHEET",$location_stylesheet);
$tpl->setVariable("LOCATION_JAVASCRIPT",dirname($location_stylesheet));
}

+ Here is the call graph for this function:

ilObjSurveyGUI::unfoldQuestionblockObject ( )

Unfold a question block.

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

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

{
$unfoldblocks = array();
foreach ($_POST as $key => $value)
{
if (preg_match("/cb_qb_(\d+)/", $key, $matches))
{
array_push($unfoldblocks, $matches[1]);
}
}
if (count($unfoldblocks))
{
ilUtil::sendSuccess($this->lng->txt('msg_obj_modified'), true);
$this->object->unfoldQuestionblocks($unfoldblocks);
}
else
{
ilUtil::sendInfo($this->lng->txt("qpl_unfold_select_none"), true);
}
$this->ctrl->redirect($this, "questions");
}

+ Here is the call graph for this function:

ilObjSurveyGUI::uploadObject (   $redirect = true)

display status information or report errors messages in case of error

public

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

References $_GET, $_POST, $error, $redirect, ilObjectGUI\$ref_id, ilObjectGUI\getReturnLocation(), importObject(), ilUtil\redirect(), and ilUtil\sendInfo().

Referenced by importFileObject().

{
if ($_POST["spl"] < 1)
{
ilUtil::sendInfo($this->lng->txt("svy_select_questionpools"));
$this->importObject();
return;
}
if (strcmp($_FILES["xmldoc"]["tmp_name"], "") == 0)
{
ilUtil::sendInfo($this->lng->txt("svy_select_file_for_import"));
$this->importObject();
return;
}
include_once("./Modules/Survey/classes/class.ilObjSurvey.php");
$newObj = new ilObjSurvey();
$newObj->setType($_GET["new_type"]);
$newObj->setTitle("dummy");
$newObj->setDescription("dummy");
$newObj->create(true);
$newObj->createReference();
$newObj->putInTree($_GET["ref_id"]);
$newObj->setPermissions($_GET["ref_id"]);
$newObj->notify("new",$_GET["ref_id"],$_GET["parent_non_rbac_id"],$_GET["ref_id"],$newObj->getRefId());
// copy uploaded file to import directory
$error = $newObj->importObject($_FILES["xmldoc"], $_POST["spl"]);
if (strlen($error))
{
$newObj->delete();
$this->ilias->raiseError($error, $this->ilias->error_obj->MESSAGE);
return;
}
else
{
$ref_id = $newObj->getRefId();
}
if ($redirect)
{
include_once "./Services/Utilities/classes/class.ilUtil.php";
ilUtil::redirect($this->getReturnLocation("upload",$this->ctrl->getTargetScript()."?".$this->link_params));
}
return $ref_id;
}

+ Here is the call graph for this function:

+ Here is the caller graph for this function:


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