ILIAS
release_4-3 Revision
|
Basic class for all survey question types. More...
Public Member Functions | |
SurveyQuestionGUI () | |
SurveyQuestion constructor. | |
addErrorMessage ($errormessage) | |
outErrorMessages () | |
& | executeCommand () |
execute command | |
getCommand ($cmd) | |
_getGUIClassNameForId ($a_q_id) | |
_getClassNameForQType ($q_type) | |
originalSyncForm () | |
sync () | |
cancelSync () | |
redirectAfterSaving ($a_return=false) | |
Redirect to calling survey or to edit form. | |
saveSync () | |
save question and return to calling survey | |
saveReturn () | |
save question and return to calling survey | |
save ($a_return=false, $a_sync=false) | |
save question | |
cancel () | |
cancelDeleteCategory () | |
Cancels the form adding a phrase. | |
material ($checkonly=FALSE) | |
Material tab of the survey questions. | |
deleteMaterial () | |
addMaterial () | |
Add materials to a question. | |
removeMaterial () | |
cancelExplorer () | |
addPG () | |
addST () | |
addGIT () | |
linkChilds () | |
getPrintView ($question_title=1, $show_questiontext=1) | |
Creates a HTML representation of the question. | |
setQuestionTabsForClass ($guiclass) | |
getQuestionType () | |
Returns the question type string. | |
getCumulatedResultRow ($counter, $css_class, $survey_id) | |
Creates a the cumulated results row for the question. | |
editQuestion () | |
isSaveCommand (array $a_cmds=array()) | |
preview () | |
Creates a preview of the question. |
Static Public Member Functions | |
static & | _getQuestionGUI ($questiontype, $question_id=-1) |
Creates a question gui representation. |
Data Fields | |
$object | |
$tpl | |
$lng | |
$cumulated | |
An array containing the cumulated results of the question for a given survey. |
Protected Member Functions | |
addCommandButtons ($a_form) | |
getMaterialOutput () | |
Creates the HTML output of the question material(s) | |
outQuestionText ($template) | |
renderChart ($a_id, $a_variables) | |
copySyncForm () | |
syncCopies () |
Private Attributes | |
$errormessages |
Basic class for all survey question types.
The SurveyQuestionGUI class defines and encapsulates basic methods and attributes for survey question types to be used for all parent classes.
Definition at line 36 of file class.SurveyQuestionGUI.php.
SurveyQuestionGUI::_getClassNameForQType | ( | $q_type | ) |
Definition at line 149 of file class.SurveyQuestionGUI.php.
Referenced by _getGUIClassNameForId().
SurveyQuestionGUI::_getGUIClassNameForId | ( | $a_q_id | ) |
Definition at line 140 of file class.SurveyQuestionGUI.php.
References _getClassNameForQType().
Referenced by ilSurveyQuestionsTableGUI\fillRow().
|
static |
Creates a question gui representation.
Creates a question gui representation and returns the alias to the question gui note: please do not use $this inside this method to allow static calls
string | $question_type | The question type as it is used in the language database |
integer | $question_id | The database ID of an existing question to load it into ASS_QuestionGUI |
Definition at line 127 of file class.SurveyQuestionGUI.php.
References SurveyQuestion\_includeClass().
Referenced by ilObjSurveyQuestionPoolGUI\createQuestionForSurveyObject(), ilObjSurveyQuestionPoolGUI\createQuestionObject(), ilObjSurveyQuestionPoolGUI\editQuestionForSurveyObject(), ilObjSurveyQuestionPoolGUI\executeCommand(), ilObjSurvey\getQuestionGUI(), and ilObjSurveyQuestionPoolGUI\previewObject().
|
protected |
Definition at line 239 of file class.SurveyQuestionGUI.php.
References ilObject\_lookupType().
Referenced by SurveyTextQuestionGUI\editQuestion(), SurveyMetricQuestionGUI\editQuestion(), SurveySingleChoiceQuestionGUI\editQuestion(), SurveyMultipleChoiceQuestionGUI\editQuestion(), and SurveyMatrixQuestionGUI\editQuestion().
SurveyQuestionGUI::addErrorMessage | ( | $errormessage | ) |
Definition at line 79 of file class.SurveyQuestionGUI.php.
SurveyQuestionGUI::addGIT | ( | ) |
Definition at line 545 of file class.SurveyQuestionGUI.php.
References $_GET, $_SESSION, and ilUtil\sendSuccess().
SurveyQuestionGUI::addMaterial | ( | ) |
Add materials to a question.
Definition at line 456 of file class.SurveyQuestionGUI.php.
References $_GET, $_POST, $_SESSION, $path, material(), and ilUtil\sendInfo().
SurveyQuestionGUI::addPG | ( | ) |
Definition at line 527 of file class.SurveyQuestionGUI.php.
References $_GET, $_SESSION, and ilUtil\sendSuccess().
SurveyQuestionGUI::addST | ( | ) |
Definition at line 536 of file class.SurveyQuestionGUI.php.
References $_GET, $_SESSION, and ilUtil\sendSuccess().
SurveyQuestionGUI::cancel | ( | ) |
Definition at line 313 of file class.SurveyQuestionGUI.php.
References $_GET, and ilUtil\redirect().
SurveyQuestionGUI::cancelDeleteCategory | ( | ) |
Cancels the form adding a phrase.
public
Definition at line 338 of file class.SurveyQuestionGUI.php.
SurveyQuestionGUI::cancelExplorer | ( | ) |
Definition at line 520 of file class.SurveyQuestionGUI.php.
References $_SESSION, and ilUtil\sendInfo().
SurveyQuestionGUI::cancelSync | ( | ) |
Definition at line 179 of file class.SurveyQuestionGUI.php.
References $_REQUEST, redirectAfterSaving(), and ilUtil\sendInfo().
|
protected |
Definition at line 850 of file class.SurveyQuestionGUI.php.
Referenced by syncCopies().
SurveyQuestionGUI::deleteMaterial | ( | ) |
Definition at line 439 of file class.SurveyQuestionGUI.php.
References $_POST, ilUtil\sendFailure(), and ilUtil\sendSuccess().
SurveyQuestionGUI::editQuestion | ( | ) |
Reimplemented in SurveyTextQuestionGUI.
Definition at line 745 of file class.SurveyQuestionGUI.php.
References outErrorMessages().
Referenced by SurveySingleChoiceQuestionGUI\addanswers(), SurveyMultipleChoiceQuestionGUI\addanswers(), SurveyMatrixQuestionGUI\addcolumns(), SurveyMatrixQuestionGUI\addrows(), SurveySingleChoiceQuestionGUI\downanswers(), SurveyMultipleChoiceQuestionGUI\downanswers(), SurveyMatrixQuestionGUI\downcolumns(), SurveyMatrixQuestionGUI\downrows(), SurveySingleChoiceQuestionGUI\removeanswers(), SurveyMultipleChoiceQuestionGUI\removeanswers(), SurveyMatrixQuestionGUI\removecolumns(), removeMaterial(), SurveyMatrixQuestionGUI\removerows(), SurveySingleChoiceQuestionGUI\upanswers(), SurveyMultipleChoiceQuestionGUI\upanswers(), SurveyMatrixQuestionGUI\upcolumns(), SurveyMatrixQuestionGUI\uprows(), SurveyMetricQuestionGUI\writePostData(), SurveySingleChoiceQuestionGUI\writePostData(), SurveyMultipleChoiceQuestionGUI\writePostData(), and SurveyMatrixQuestionGUI\writePostData().
& SurveyQuestionGUI::executeCommand | ( | ) |
execute command
Reimplemented in SurveyMatrixQuestionGUI.
Definition at line 96 of file class.SurveyQuestionGUI.php.
References $cmd, $ret, and getCommand().
SurveyQuestionGUI::getCommand | ( | $cmd | ) |
Definition at line 111 of file class.SurveyQuestionGUI.php.
References $cmd.
Referenced by SurveyMatrixQuestionGUI\executeCommand(), and executeCommand().
SurveyQuestionGUI::getCumulatedResultRow | ( | $counter, | |
$css_class, | |||
$survey_id | |||
) |
Creates a the cumulated results row for the question.
Definition at line 739 of file class.SurveyQuestionGUI.php.
|
protected |
Creates the HTML output of the question material(s)
Definition at line 346 of file class.SurveyQuestionGUI.php.
References SurveyQuestion\_getInternalLinkHref(), and ilUtil\prepareFormOutput().
Referenced by SurveyTextQuestionGUI\getWorkingForm(), SurveyMetricQuestionGUI\getWorkingForm(), SurveyMultipleChoiceQuestionGUI\getWorkingForm(), SurveySingleChoiceQuestionGUI\getWorkingForm(), and SurveyMatrixQuestionGUI\getWorkingForm().
SurveyQuestionGUI::getPrintView | ( | $question_title = 1 , |
|
$show_questiontext = 1 |
|||
) |
Creates a HTML representation of the question.
private
Reimplemented in SurveyMatrixQuestionGUI.
Definition at line 657 of file class.SurveyQuestionGUI.php.
SurveyQuestionGUI::getQuestionType | ( | ) |
Returns the question type string.
Definition at line 728 of file class.SurveyQuestionGUI.php.
Referenced by SurveySingleChoiceQuestionGUI\setQuestionTabs(), SurveyMatrixQuestionGUI\setQuestionTabs(), and setQuestionTabsForClass().
SurveyQuestionGUI::isSaveCommand | ( | array | $a_cmds = array() | ) |
Definition at line 764 of file class.SurveyQuestionGUI.php.
Referenced by SurveyTextQuestionGUI\editQuestion(), SurveyMetricQuestionGUI\editQuestion(), SurveySingleChoiceQuestionGUI\editQuestion(), SurveyMultipleChoiceQuestionGUI\editQuestion(), and SurveyMatrixQuestionGUI\editQuestion().
SurveyQuestionGUI::linkChilds | ( | ) |
Definition at line 554 of file class.SurveyQuestionGUI.php.
References $_GET, $_SESSION, ilLMPageObject\getPageList(), and ilUtil\sendSuccess().
SurveyQuestionGUI::material | ( | $checkonly = FALSE | ) |
Material tab of the survey questions.
Definition at line 375 of file class.SurveyQuestionGUI.php.
References $_GET, $data, $errors, $title, SurveyQuestion\_getInternalLinkHref(), ilUtil\prepareFormOutput(), and ilFormPropertyGUI\setRequired().
Referenced by addMaterial().
SurveyQuestionGUI::originalSyncForm | ( | ) |
Definition at line 154 of file class.SurveyQuestionGUI.php.
References ilUtil\sendQuestion().
SurveyQuestionGUI::outErrorMessages | ( | ) |
Definition at line 84 of file class.SurveyQuestionGUI.php.
References $out, and ilUtil\sendInfo().
Referenced by editQuestion().
|
protected |
Definition at line 750 of file class.SurveyQuestionGUI.php.
Referenced by SurveyMetricQuestionGUI\getPrintView(), SurveyTextQuestionGUI\getPrintView(), SurveyMultipleChoiceQuestionGUI\getPrintView(), SurveySingleChoiceQuestionGUI\getPrintView(), SurveyMatrixQuestionGUI\getPrintView(), SurveyTextQuestionGUI\getWorkingForm(), SurveyMetricQuestionGUI\getWorkingForm(), SurveyMultipleChoiceQuestionGUI\getWorkingForm(), SurveySingleChoiceQuestionGUI\getWorkingForm(), and SurveyMatrixQuestionGUI\getWorkingForm().
SurveyQuestionGUI::preview | ( | ) |
Creates a preview of the question.
private
Definition at line 776 of file class.SurveyQuestionGUI.php.
SurveyQuestionGUI::redirectAfterSaving | ( | $a_return = false | ) |
Redirect to calling survey or to edit form.
bool | $a_return |
Definition at line 190 of file class.SurveyQuestionGUI.php.
References $_GET, $_REQUEST, $_SESSION, and ilUtil\redirect().
Referenced by cancelSync(), save(), sync(), and syncCopies().
SurveyQuestionGUI::removeMaterial | ( | ) |
Definition at line 513 of file class.SurveyQuestionGUI.php.
References editQuestion().
|
protected |
Reimplemented in SurveyMetricQuestionGUI.
Definition at line 791 of file class.SurveyQuestionGUI.php.
References $data, $legend, and ilUtil\prepareFormOutput().
Referenced by SurveyMultipleChoiceQuestionGUI\getCumulatedResultsDetails(), SurveySingleChoiceQuestionGUI\getCumulatedResultsDetails(), and SurveyMatrixQuestionGUI\getCumulatedResultsDetails().
SurveyQuestionGUI::save | ( | $a_return = false , |
|
$a_sync = false |
|||
) |
save question
Definition at line 273 of file class.SurveyQuestionGUI.php.
References $_GET, $ilUser, $result, SurveyQuestion\_isWriteable(), redirectAfterSaving(), and ilUtil\sendSuccess().
Referenced by saveReturn(), and saveSync().
SurveyQuestionGUI::saveReturn | ( | ) |
save question and return to calling survey
Definition at line 265 of file class.SurveyQuestionGUI.php.
References save().
SurveyQuestionGUI::saveSync | ( | ) |
SurveyQuestionGUI::setQuestionTabsForClass | ( | $guiclass | ) |
Definition at line 662 of file class.SurveyQuestionGUI.php.
References $_GET, $_REQUEST, $_SESSION, $ref_id, $title, and getQuestionType().
Referenced by SurveyTextQuestionGUI\setQuestionTabs(), SurveyMetricQuestionGUI\setQuestionTabs(), and SurveyMultipleChoiceQuestionGUI\setQuestionTabs().
SurveyQuestionGUI::SurveyQuestionGUI | ( | ) |
SurveyQuestion constructor.
The constructor takes possible arguments an creates an instance of the SurveyQuestion object.
string | $title | A title string to describe the question |
string | $description | A description string to describe the question |
string | $author | A string containing the name of the questions author |
integer | $owner | A numerical ID to identify the owner/creator public |
Definition at line 66 of file class.SurveyQuestionGUI.php.
References $_GET, $ilCtrl, $lng, and $tpl.
Referenced by SurveyMatrixQuestionGUI\SurveyMatrixQuestionGUI(), SurveyMetricQuestionGUI\SurveyMetricQuestionGUI(), SurveyMultipleChoiceQuestionGUI\SurveyMultipleChoiceQuestionGUI(), SurveySingleChoiceQuestionGUI\SurveySingleChoiceQuestionGUI(), and SurveyTextQuestionGUI\SurveyTextQuestionGUI().
SurveyQuestionGUI::sync | ( | ) |
Definition at line 167 of file class.SurveyQuestionGUI.php.
References $_REQUEST, redirectAfterSaving(), and ilUtil\sendSuccess().
|
protected |
Definition at line 858 of file class.SurveyQuestionGUI.php.
References $_POST, $_REQUEST, $lng, $ref_id, ilObject\_getAllReferences(), copySyncForm(), redirectAfterSaving(), ilUtil\sendFailure(), and ilUtil\sendSuccess().
SurveyQuestionGUI::$cumulated |
An array containing the cumulated results of the question for a given survey.
Definition at line 53 of file class.SurveyQuestionGUI.php.
|
private |
Definition at line 48 of file class.SurveyQuestionGUI.php.
SurveyQuestionGUI::$lng |
Definition at line 47 of file class.SurveyQuestionGUI.php.
Referenced by SurveyQuestionGUI(), and syncCopies().
SurveyQuestionGUI::$object |
Definition at line 45 of file class.SurveyQuestionGUI.php.
SurveyQuestionGUI::$tpl |
Definition at line 46 of file class.SurveyQuestionGUI.php.
Referenced by SurveyQuestionGUI().