ILIAS
release_8 Revision v8.19
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Public Member Functions | |
__construct (string $title="", string $description="", string $author="", string $questiontext="", int $owner=-1) | |
setComplete (bool $a_complete) | |
isComplete () | |
questionTitleExists (string $title, int $questionpool_object=0) | |
setTitle (string $title="") | |
setObligatory (bool $obligatory=true) | |
setOrientation (int $orientation=0) | |
setId (int $id=-1) | |
setSurveyId (int $id=-1) | |
setDescription (string $description="") | |
addMaterials (string $materials_file, string $materials_name="") | |
setMaterialsfile (string $materials_filename, string $materials_tempfilename="", string $materials_name="") | |
Uploads and adds a material. More... | |
deleteMaterial (string $materials_name="") | |
flushMaterials () | |
Deletes all materials uris. More... | |
setAuthor (string $author="") | |
setQuestiontext (string $questiontext="") | |
setOwner (int $owner=0) | |
getTitle () | |
getLabel () | |
getId () | |
getObligatory () | |
getSurveyId () | |
getOrientation () | |
getDescription () | |
getAuthor () | |
getOwner () | |
getQuestiontext () | |
getObjId () | |
Get the reference(?) id of the container object. More... | |
setObjId (int $obj_id=0) | |
Set the reference(?) id of the container object. More... | |
duplicate (bool $for_survey=true, string $title="", string $author="", int $owner=0, int $a_survey_id=0) | |
copyObject (int $target_questionpool, string $title="") | |
copyXHTMLMediaObjectsOfQuestion (int $a_q_id) | |
Copy media object usages from other question. More... | |
loadFromDb (int $question_id) | |
load question data into object note: this base implementation only loads the material data More... | |
saveCompletionStatus (int $original_id=0) | |
Saves the complete flag to the database. More... | |
saveToDb (int $original_id=0) | |
Saves a SurveyQuestion object to a database. More... | |
saveMaterial () | |
createNewQuestion () | |
Creates a new question with a 0 timestamp when a new question is created This assures that an ID is given to the question if a file upload or something else occurs. More... | |
getImagePath () | |
Returns the image path for web accessible images of a question. More... | |
getMaterialsPath () | |
Returns the materials path for web accessible materials of a question. More... | |
getImagePathWeb () | |
Returns the web image path for web accessible images of a question. More... | |
getMaterialsPathWeb () | |
Returns the web image path for web accessable images of a question. More... | |
saveCategoryToDb (string $categorytext, int $neutral=0) | |
Saves a category to the database. More... | |
deleteAdditionalTableData (int $question_id) | |
Deletes datasets from the additional question table in the database. More... | |
delete (int $question_id) | |
Deletes a question and all materials from the database. More... | |
syncWithOriginal () | |
getPhrase (int $phrase_id) | |
Returns a phrase title for phrase id. More... | |
phraseExists (string $title) | |
Returns true if the phrase title already exists for the current user(!) More... | |
deleteMaterials (array $a_array) | |
duplicateMaterials (int $question_id) | |
Duplicates the materials of a question. More... | |
addMaterial (ilSurveyMaterial $obj_material) | |
getQuestionTypeID () | |
getQuestionType () | |
isHTML (string $a_text) | |
QTIMaterialToString (ilQTIMaterial $a_material) | |
Reads an QTI material tag an creates a text string. More... | |
addMaterialTag (ilXmlWriter $a_xml_writer, string $a_material, bool $close_material_tag=true, bool $add_mobs=true, ?array $a_attrs=null) | |
Creates an XML material tag from a plain text or xhtml text. More... | |
prepareTextareaOutput (string $txt_output, bool $prepare_for_latex_output=false) | |
Prepares string for a text area output in surveys. More... | |
getQuestionDataArray (int $id) | |
Returns the question data. More... | |
getWorkingDataFromUserInput (array $post_data) | |
Creates the user data of the svy_answer table from the POST data. More... | |
importAdditionalMetadata (array $a_meta) | |
Import additional meta data from the question import file. More... | |
importResponses (array $a_data) | |
Import response data from the question import file. More... | |
importAdjectives (array $a_data) | |
Import bipolar adjectives from the question import file. More... | |
importMatrix (array $a_data) | |
Import matrix rows from the question import file. More... | |
usableForPrecondition () | |
Returns if the question is usable for preconditions. More... | |
getAvailableRelations () | |
Returns the available relations for the question. More... | |
getPreconditionOptions () | |
Returns the options for preconditions. More... | |
getPreconditionValueOutput (string $value) | |
Returns the output for a precondition value. More... | |
getPreconditionSelectValue (string $default, string $title, string $variable) | |
Creates a form property for the precondition value. More... | |
setOriginalId (?int $original_id) | |
getOriginalId () | |
getMaterial () | |
setSubtype (int $a_subtype) | |
getSubtype () | |
__get (string $value) | |
__set (string $key, string $value) | |
getCopyIds (bool $a_group_by_survey=false) | |
hasCopies () | |
stripSlashesAddSpaceFallback (string $a_str) | |
Strip slashes with add space fallback, see https://mantis.ilias.de/view.php?id=19727 and https://mantis.ilias.de/view.php?id=24200. More... | |
Static Public Member Functions | |
static | _isComplete (int $question_id) |
Checks whether the question is complete or not. More... | |
static | _getQuestionType (int $question_id) |
Returns the question type of a question with a given id. More... | |
static | _getTitle (int $question_id) |
Returns the question title of a question with a given id. More... | |
static | _getOriginalId (int $question_id, bool $a_return_question_id_if_no_original=true) |
Returns the original id of a question. More... | |
static | _questionExists (int $question_id) |
static | _resolveInternalLink (string $internal_link) |
static | _resolveIntLinks (int $question_id) |
static | _getInternalLinkHref (string $target="", int $a_parent_ref_id=null) |
static | _isWriteable (int $question_id, int $user_id) |
is question writeable by a certain user More... | |
static | _includeClass (string $question_type, int $gui=0) |
Include the php class file for a given question type. More... | |
static | _getQuestionTypeName (string $type_tag) |
Return the translation for a given question type. More... | |
static | _instanciateQuestion (int $question_id) |
Get question object. More... | |
static | _instanciateQuestionGUI (int $question_id) |
Get question gui object. More... | |
static | _instanciateQuestionEvaluation (int $question_id, array $a_finished_ids=null) |
static | _changeOriginalId (int $a_question_id, int $a_original_id, int $a_object_id) |
Change original id of existing question in db. More... | |
static | _lookupSurveyObjId (int $a_question_id) |
static | lookupObjFi (int $a_qid) |
static | getMaxSumScore (int $survey_id) |
Get max sum score for specific survey (and this question type) More... | |
Data Fields | |
int | $id |
string | $title |
string | $description |
int | $owner |
string | $author |
array | $materials |
int | $survey_id |
int | $obj_id |
string | $questiontext |
bool | $obligatory |
ilLanguage | $lng |
int | $orientation |
array | $material |
bool | $complete |
Protected Attributes | |
int | $original_id |
ILIAS SurveyQuestionPool Editing EditSessionRepository | $edit_manager |
ilObjUser | $user |
ilDBInterface | $db |
array | $cumulated |
ilLogger | $log |
ILIAS SurveyQuestionPool Export ImportSessionRepository | $import_manager |
Private Attributes | |
array | $arrData |
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V.
ILIAS is licensed with the GPL-3.0, see https://www.gnu.org/licenses/gpl-3.0.en.html You should have received a copy of said license along with the source code, too.
If this is not the case or you just want to try ILIAS, you'll find us at: https://www.ilias.de https://github.com/ILIAS-eLearning Basic class for all survey question types The SurveyQuestion class defines and encapsulates basic methods and attributes for survey question types to be used for all parent classes.
Definition at line 25 of file class.SurveyQuestion.php.
SurveyQuestion::__construct | ( | string | $title = "" , |
string | $description = "" , |
||
string | $author = "" , |
||
string | $questiontext = "" , |
||
int | $owner = -1 |
||
) |
Definition at line 52 of file class.SurveyQuestion.php.
References $author, $description, $DIC, $ilUser, $lng, $owner, $questiontext, $title, ilLoggerFactory\getLogger(), ILIAS\Repository\lng(), and ILIAS\Repository\user().
SurveyQuestion::__get | ( | string | $value | ) |
Definition at line 1614 of file class.SurveyQuestion.php.
SurveyQuestion::__set | ( | string | $key, |
string | $value | ||
) |
|
static |
Change original id of existing question in db.
Definition at line 1638 of file class.SurveyQuestion.php.
Referenced by ilSurveyEditorGUI\executeCopyQuestionsToPoolObject().
|
static |
Definition at line 1211 of file class.SurveyQuestion.php.
References $target_id, $type, and ilFileUtils\removeTrailingPathSeparators().
Referenced by SurveyQuestionGUI\getMaterialOutput(), and SurveyQuestionGUI\material().
|
static |
Returns the original id of a question.
Definition at line 868 of file class.SurveyQuestion.php.
Referenced by ilObjSurvey\importObject().
|
static |
Returns the question type of a question with a given id.
Definition at line 821 of file class.SurveyQuestion.php.
References $data, $DIC, and $ilDB.
Referenced by SurveyQuestionGUI\_getGUIClassNameForId(), SurveyQuestionGUI\_getQuestionGUI(), ilObjSurvey\_instanciateQuestion(), ilObjSurveyQuestionPoolGUI\addLocatorItems(), ilObjSurveyGUI\addLocatorItems(), ilSurveyConstraintsGUI\confirmDeleteConstraintsObject(), ilObjSurvey\getConstraints(), and ilObjSurvey\getUserSpecificResults().
|
static |
Return the translation for a given question type.
string | $type_tag | type of the question type |
Definition at line 1326 of file class.SurveyQuestion.php.
References $DIC, and ilLanguage\txt().
Referenced by ilSurveyConstraintsGUI\constraintForm(), ilObjSurveyQuestionPoolGUI\deleteQuestionsObject(), SurveyMatrixQuestionEvaluation\exportResults(), SurveyQuestionEvaluation\exportResults(), ilSurveyEvaluationGUI\exportResultsDetailsExcel(), ilSurveyQuestionsTableGUI\fillRow(), ilSurveyResultsCumulatedTableGUI\getItems(), ILIAS\Survey\Mode\AbstractUIModifier\getPanelCard(), and ilSurveyEditorGUI\removeQuestionsForm().
|
static |
Returns the question title of a question with a given id.
Definition at line 847 of file class.SurveyQuestion.php.
References $data, $DIC, and $ilDB.
Referenced by ilObjSurveyQuestionPoolGUI\addLocatorItems(), ilObjSurveyGUI\addLocatorItems(), ilTermUsagesTableGUI\fillRow(), and ilSurveySyncTableGUI\importData().
|
static |
Include the php class file for a given question type.
int | $gui | 0 if the class should be included, 1 if the GUI class should be included |
Definition at line 1297 of file class.SurveyQuestion.php.
Referenced by SurveyQuestionGUI\_getQuestionGUI(), ilObjSurvey\_instanciateQuestion(), ilSurveyConstraintsGUI\confirmDeleteConstraintsObject(), ilSurveyConstraintsGUI\constraintForm(), ilObjSurvey\getConstraints(), ilObjSurvey\getUserSpecificResults(), SurveyImportParser\handlerBeginTag(), and ilObjSurveyQuestionPool\toXML().
|
static |
Get question object.
Definition at line 1349 of file class.SurveyQuestion.php.
Referenced by ilSurveySkill\determineMaxScale(), ilObjSurveyQuestionPool\duplicateQuestion(), ilObjMediaObject\getParentObjectIdForUsage(), ilSurveyImporter\getSurvey(), SurveySingleChoiceQuestion\isSumScoreValid(), ilObjSurveyQuestionPool\removeQuestion(), and ilSurveyExecutionGUI\saveActiveQuestionData().
|
static |
Definition at line 1377 of file class.SurveyQuestion.php.
Referenced by ilSurveyEvaluationGUI\evaluation(), ilSurveyEvaluationGUI\exportCumulatedResults(), ilSurveyEvaluationGUI\exportEvaluationUser(), ILIAS\Survey\PrintView\ResultsDetailsPrintViewProviderGUI\getPages(), ilSurveyEvaluationGUI\getSumScores(), ILIAS\Survey\Evaluation\EvaluationManager\getUserSpecificResults(), and ilObjSurvey\getUserSpecificResults().
|
static |
Get question gui object.
Definition at line 1364 of file class.SurveyQuestion.php.
|
static |
Checks whether the question is complete or not.
Definition at line 431 of file class.SurveyQuestion.php.
Referenced by ilSurveyPageEditGUI\insertNewQuestion(), ilObjSurvey\insertQuestion(), and SurveyQuestionGUI\save().
|
static |
is question writeable by a certain user
Definition at line 1246 of file class.SurveyQuestion.php.
References $DIC, $ilDB, and ilObjSurveyQuestionPool\_isWriteable().
Referenced by SurveyQuestionGUI\save().
|
static |
Definition at line 1679 of file class.SurveyQuestion.php.
Referenced by ilObjMediaObject\getParentObjectIdForUsage().
|
static |
Definition at line 965 of file class.SurveyQuestion.php.
References $DIC, $ilDB, $target_id, $type, ilGlossaryTerm\_lookGlossaryTerm(), ilLMObject\_lookupContObjID(), addMaterial(), ILIAS\Repository\lng(), and saveMaterial().
Referenced by ilSurveySkill\read(), and SurveyQuestionGUI\save().
|
static |
Definition at line 1132 of file class.SurveyQuestion.php.
References ilInternalLink\_getIdForImportId(), and ilLMObject\_getIdForImportId().
|
static |
Definition at line 1163 of file class.SurveyQuestion.php.
References $DIC, $ilDB, ilInternalLink\_deleteAllLinksOfSource(), and ilInternalLink\_saveLink().
Referenced by ilQuestionPageParser\processPagesToParse().
SurveyQuestion::addMaterial | ( | ilSurveyMaterial | $obj_material | ) |
Definition at line 1064 of file class.SurveyQuestion.php.
References $target_id, $type, ilGlossaryTerm\_lookGlossaryTerm(), ilLMObject\_lookupContObjID(), ILIAS\Repository\lng(), and saveMaterial().
Referenced by _questionExists().
SurveyQuestion::addMaterials | ( | string | $materials_file, |
string | $materials_name = "" |
||
) |
Definition at line 161 of file class.SurveyQuestion.php.
Referenced by setMaterialsfile().
SurveyQuestion::addMaterialTag | ( | ilXmlWriter | $a_xml_writer, |
string | $a_material, | ||
bool | $close_material_tag = true , |
||
bool | $add_mobs = true , |
||
?array | $a_attrs = null |
||
) |
Creates an XML material tag from a plain text or xhtml text.
Definition at line 1438 of file class.SurveyQuestion.php.
References $mobs, ilObjMediaObject\_getMobsOfObject(), ilRTE\_replaceMediaObjectImageSrc(), getId(), IL_INST_ID, isHTML(), ilXmlWriter\xmlElement(), ilXmlWriter\xmlEndTag(), and ilXmlWriter\xmlStartTag().
Referenced by SurveyTextQuestion\insertXML(), SurveyMultipleChoiceQuestion\insertXML(), SurveyMetricQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), and SurveyMatrixQuestion\insertXML().
SurveyQuestion::copyObject | ( | int | $target_questionpool, |
string | $title = "" |
||
) |
Definition at line 361 of file class.SurveyQuestion.php.
References getId(), and getObjId().
SurveyQuestion::copyXHTMLMediaObjectsOfQuestion | ( | int | $a_q_id | ) |
Copy media object usages from other question.
Definition at line 390 of file class.SurveyQuestion.php.
References $mobs, ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_saveUsage(), and getId().
SurveyQuestion::createNewQuestion | ( | ) |
Creates a new question with a 0 timestamp when a new question is created This assures that an ID is given to the question if a file upload or something else occurs.
Definition at line 569 of file class.SurveyQuestion.php.
References $db, $ilDB, getAuthor(), getId(), getObjId(), getOwner(), getQuestionTypeID(), and setId().
SurveyQuestion::delete | ( | int | $question_id | ) |
Deletes a question and all materials from the database.
Definition at line 708 of file class.SurveyQuestion.php.
References $db, $ilDB, $mobs, ilInternalLink\_deleteAllLinksOfSource(), ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), CLIENT_WEB_DIR, ilFileUtils\delDir(), deleteAdditionalTableData(), and ilSurveySkill\handleQuestionDeletion().
SurveyQuestion::deleteAdditionalTableData | ( | int | $question_id | ) |
Deletes datasets from the additional question table in the database.
Definition at line 692 of file class.SurveyQuestion.php.
Referenced by delete().
SurveyQuestion::deleteMaterial | ( | string | $materials_name = "" | ) |
Definition at line 198 of file class.SurveyQuestion.php.
References ILIAS\LTI\ToolProvider\$key, and getMaterialsPath().
SurveyQuestion::deleteMaterials | ( | array | $a_array | ) |
array | $a_array | Array with indexes of the materials to delete |
Definition at line 1036 of file class.SurveyQuestion.php.
References saveMaterial().
SurveyQuestion::duplicate | ( | bool | $for_survey = true , |
string | $title = "" , |
||
string | $author = "" , |
||
int | $owner = 0 , |
||
int | $a_survey_id = 0 |
||
) |
Definition at line 322 of file class.SurveyQuestion.php.
References getId().
SurveyQuestion::duplicateMaterials | ( | int | $question_id | ) |
Duplicates the materials of a question.
int | $question_id |
ilSurveyException |
Definition at line 1050 of file class.SurveyQuestion.php.
References $filename, getMaterialsPath(), and ilFileUtils\makeDirParents().
SurveyQuestion::flushMaterials | ( | ) |
Deletes all materials uris.
Definition at line 215 of file class.SurveyQuestion.php.
SurveyQuestion::getAuthor | ( | ) |
Definition at line 291 of file class.SurveyQuestion.php.
References $author.
Referenced by createNewQuestion(), SurveyTextQuestion\insertXML(), SurveyMultipleChoiceQuestion\insertXML(), SurveyMetricQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), SurveyMatrixQuestion\insertXML(), SurveyTextQuestion\isComplete(), SurveyMultipleChoiceQuestion\isComplete(), SurveyMetricQuestion\isComplete(), SurveySingleChoiceQuestion\isComplete(), SurveyMatrixQuestion\isComplete(), and saveToDb().
SurveyQuestion::getAvailableRelations | ( | ) |
Returns the available relations for the question.
Definition at line 1550 of file class.SurveyQuestion.php.
SurveyQuestion::getCopyIds | ( | bool | $a_group_by_survey = false | ) |
Definition at line 1653 of file class.SurveyQuestion.php.
References $db, $ilDB, $res, and ILIAS\Repository\int().
Referenced by hasCopies().
SurveyQuestion::getDescription | ( | ) |
Definition at line 286 of file class.SurveyQuestion.php.
References $description.
Referenced by SurveyTextQuestion\insertXML(), SurveyMultipleChoiceQuestion\insertXML(), SurveyMetricQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), SurveyMatrixQuestion\insertXML(), and saveToDb().
SurveyQuestion::getId | ( | ) |
Definition at line 253 of file class.SurveyQuestion.php.
References $id.
Referenced by addMaterialTag(), SurveyTextQuestion\checkUserInput(), SurveyMultipleChoiceQuestion\checkUserInput(), SurveyMetricQuestion\checkUserInput(), SurveySingleChoiceQuestion\checkUserInput(), SurveyMatrixQuestion\checkUserInput(), copyObject(), copyXHTMLMediaObjectsOfQuestion(), createNewQuestion(), duplicate(), SurveyTextQuestion\getWorkingDataFromUserInput(), SurveyMultipleChoiceQuestion\getWorkingDataFromUserInput(), SurveyMetricQuestion\getWorkingDataFromUserInput(), SurveySingleChoiceQuestion\getWorkingDataFromUserInput(), SurveyMatrixQuestion\getWorkingDataFromUserInput(), SurveyTextQuestion\insertXML(), SurveyMultipleChoiceQuestion\insertXML(), SurveyMetricQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), SurveyMatrixQuestion\insertXML(), loadFromDb(), SurveyMatrixQuestion\saveBipolarAdjectives(), SurveyMultipleChoiceQuestion\saveCategoriesToDb(), SurveySingleChoiceQuestion\saveCategoriesToDb(), SurveyMatrixQuestion\saveColumnsToDb(), saveCompletionStatus(), SurveyMatrixQuestion\saveLayout(), saveMaterial(), SurveyMatrixQuestion\saveRowsToDb(), SurveyMultipleChoiceQuestion\saveToDb(), SurveyTextQuestion\saveToDb(), SurveyMetricQuestion\saveToDb(), SurveySingleChoiceQuestion\saveToDb(), SurveyMatrixQuestion\saveToDb(), saveToDb(), SurveyTextQuestion\saveUserInput(), SurveyMultipleChoiceQuestion\saveUserInput(), SurveyMetricQuestion\saveUserInput(), SurveySingleChoiceQuestion\saveUserInput(), SurveyMatrixQuestion\saveUserInput(), and syncWithOriginal().
SurveyQuestion::getImagePath | ( | ) |
Returns the image path for web accessible images of a question.
Definition at line 609 of file class.SurveyQuestion.php.
References CLIENT_WEB_DIR.
SurveyQuestion::getImagePathWeb | ( | ) |
Returns the web image path for web accessible images of a question.
Definition at line 625 of file class.SurveyQuestion.php.
References CLIENT_WEB_DIR, and ilFileUtils\removeTrailingPathSeparators().
SurveyQuestion::getLabel | ( | ) |
Definition at line 248 of file class.SurveyQuestion.php.
SurveyQuestion::getMaterial | ( | ) |
SurveyQuestion::getMaterialsPath | ( | ) |
Returns the materials path for web accessible materials of a question.
Definition at line 617 of file class.SurveyQuestion.php.
References CLIENT_WEB_DIR.
Referenced by deleteMaterial(), duplicateMaterials(), and setMaterialsfile().
SurveyQuestion::getMaterialsPathWeb | ( | ) |
Returns the web image path for web accessable images of a question.
Definition at line 638 of file class.SurveyQuestion.php.
References CLIENT_WEB_DIR, and ilFileUtils\removeTrailingPathSeparators().
|
static |
Get max sum score for specific survey (and this question type)
Definition at line 1729 of file class.SurveyQuestion.php.
SurveyQuestion::getObjId | ( | ) |
Get the reference(?) id of the container object.
Definition at line 309 of file class.SurveyQuestion.php.
References $obj_id.
Referenced by copyObject(), createNewQuestion(), and saveToDb().
SurveyQuestion::getObligatory | ( | ) |
Definition at line 258 of file class.SurveyQuestion.php.
References $obligatory.
Referenced by SurveyTextQuestion\checkUserInput(), SurveyMultipleChoiceQuestion\checkUserInput(), SurveyMetricQuestion\checkUserInput(), SurveySingleChoiceQuestion\checkUserInput(), SurveyMatrixQuestion\checkUserInput(), SurveyTextQuestion\insertXML(), SurveyMultipleChoiceQuestion\insertXML(), SurveyMetricQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), SurveyMatrixQuestion\insertXML(), and saveToDb().
SurveyQuestion::getOrientation | ( | ) |
Definition at line 271 of file class.SurveyQuestion.php.
References $orientation.
Referenced by SurveyMultipleChoiceQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), SurveyMultipleChoiceQuestion\saveToDb(), and SurveySingleChoiceQuestion\saveToDb().
SurveyQuestion::getOriginalId | ( | ) |
Definition at line 1593 of file class.SurveyQuestion.php.
References $original_id.
Referenced by SurveyMatrixQuestion\syncWithOriginal(), and syncWithOriginal().
SurveyQuestion::getOwner | ( | ) |
Definition at line 296 of file class.SurveyQuestion.php.
References $owner.
Referenced by createNewQuestion(), and saveToDb().
SurveyQuestion::getPhrase | ( | int | $phrase_id | ) |
SurveyQuestion::getPreconditionOptions | ( | ) |
Returns the options for preconditions.
Definition at line 1559 of file class.SurveyQuestion.php.
Referenced by SurveyMatrixQuestion\getPreconditionSelectValue().
SurveyQuestion::getPreconditionSelectValue | ( | string | $default, |
string | $title, | ||
string | $variable | ||
) |
Creates a form property for the precondition value.
Definition at line 1579 of file class.SurveyQuestion.php.
SurveyQuestion::getPreconditionValueOutput | ( | string | $value | ) |
Returns the output for a precondition value.
string | $value | The precondition value |
Definition at line 1570 of file class.SurveyQuestion.php.
SurveyQuestion::getQuestionDataArray | ( | int | $id | ) |
Returns the question data.
Definition at line 1488 of file class.SurveyQuestion.php.
SurveyQuestion::getQuestiontext | ( | ) |
Definition at line 301 of file class.SurveyQuestion.php.
References $questiontext.
Referenced by SurveyMatrixQuestionEvaluation\exportResults(), SurveyQuestionEvaluation\exportResults(), SurveyTextQuestion\insertXML(), SurveyMultipleChoiceQuestion\insertXML(), SurveyMetricQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), SurveyMatrixQuestion\insertXML(), SurveyTextQuestion\isComplete(), SurveyMultipleChoiceQuestion\isComplete(), SurveyMetricQuestion\isComplete(), SurveySingleChoiceQuestion\isComplete(), SurveyMatrixQuestion\isComplete(), and saveToDb().
SurveyQuestion::getQuestionType | ( | ) |
Definition at line 1288 of file class.SurveyQuestion.php.
Referenced by SurveyMatrixQuestionEvaluation\exportResults(), SurveyQuestionEvaluation\exportResults(), and getQuestionTypeID().
SurveyQuestion::getQuestionTypeID | ( | ) |
Definition at line 1272 of file class.SurveyQuestion.php.
References $db, $ilDB, and getQuestionType().
Referenced by createNewQuestion(), and saveToDb().
SurveyQuestion::getSubtype | ( | ) |
Definition at line 1608 of file class.SurveyQuestion.php.
SurveyQuestion::getSurveyId | ( | ) |
SurveyQuestion::getTitle | ( | ) |
Definition at line 243 of file class.SurveyQuestion.php.
References $title.
Referenced by SurveyMatrixQuestionEvaluation\exportResults(), SurveyQuestionEvaluation\exportResults(), SurveyTextQuestion\insertXML(), SurveyMultipleChoiceQuestion\insertXML(), SurveyMetricQuestion\insertXML(), SurveySingleChoiceQuestion\insertXML(), SurveyMatrixQuestion\insertXML(), SurveyTextQuestion\isComplete(), SurveyMultipleChoiceQuestion\isComplete(), SurveyMetricQuestion\isComplete(), SurveySingleChoiceQuestion\isComplete(), SurveyMatrixQuestion\isComplete(), and saveToDb().
SurveyQuestion::getWorkingDataFromUserInput | ( | array | $post_data | ) |
Creates the user data of the svy_answer table from the POST data.
Definition at line 1497 of file class.SurveyQuestion.php.
References $data.
SurveyQuestion::hasCopies | ( | ) |
Definition at line 1674 of file class.SurveyQuestion.php.
References getCopyIds().
SurveyQuestion::importAdditionalMetadata | ( | array | $a_meta | ) |
Import additional meta data from the question import file.
Usually the meta data section is used to store question elements which are not part of the standard XML schema.
Definition at line 1509 of file class.SurveyQuestion.php.
SurveyQuestion::importAdjectives | ( | array | $a_data | ) |
Import bipolar adjectives from the question import file.
Definition at line 1525 of file class.SurveyQuestion.php.
SurveyQuestion::importMatrix | ( | array | $a_data | ) |
Import matrix rows from the question import file.
Definition at line 1533 of file class.SurveyQuestion.php.
SurveyQuestion::importResponses | ( | array | $a_data | ) |
Import response data from the question import file.
Definition at line 1517 of file class.SurveyQuestion.php.
SurveyQuestion::isComplete | ( | ) |
Definition at line 105 of file class.SurveyQuestion.php.
Referenced by saveCompletionStatus(), and saveToDb().
SurveyQuestion::isHTML | ( | string | $a_text | ) |
Definition at line 1398 of file class.SurveyQuestion.php.
Referenced by addMaterialTag().
SurveyQuestion::loadFromDb | ( | int | $question_id | ) |
load question data into object note: this base implementation only loads the material data
Definition at line 403 of file class.SurveyQuestion.php.
References $db, $ilDB, and getId().
|
static |
Definition at line 1696 of file class.SurveyQuestion.php.
Referenced by ilTermUsagesTableGUI\fillRow(), and ilSurveyQuestionTableGUI\importData().
SurveyQuestion::phraseExists | ( | string | $title | ) |
SurveyQuestion::prepareTextareaOutput | ( | string | $txt_output, |
bool | $prepare_for_latex_output = false |
||
) |
Prepares string for a text area output in surveys.
Definition at line 1478 of file class.SurveyQuestion.php.
References ilLegacyFormElementsUtil\prepareTextareaOutput().
SurveyQuestion::QTIMaterialToString | ( | ilQTIMaterial | $a_material | ) |
Reads an QTI material tag an creates a text string.
Definition at line 1410 of file class.SurveyQuestion.php.
References $i, ilLoggerFactory\getLogger(), ilQTIMaterial\getMaterial(), and ilQTIMaterial\getMaterialCount().
SurveyQuestion::questionTitleExists | ( | string | $title, |
int | $questionpool_object = 0 |
||
) |
Definition at line 110 of file class.SurveyQuestion.php.
SurveyQuestion::saveCategoryToDb | ( | string | $categorytext, |
int | $neutral = 0 |
||
) |
Saves a category to the database.
Definition at line 651 of file class.SurveyQuestion.php.
References $db, $ilDB, $ilUser, and $user.
Referenced by SurveyMultipleChoiceQuestion\saveCategoriesToDb(), and SurveySingleChoiceQuestion\saveCategoriesToDb().
SurveyQuestion::saveCompletionStatus | ( | int | $original_id = 0 | ) |
Saves the complete flag to the database.
Definition at line 454 of file class.SurveyQuestion.php.
References $db, $ilDB, $original_id, getId(), and isComplete().
Referenced by SurveyMultipleChoiceQuestion\saveCategoriesToDb(), SurveySingleChoiceQuestion\saveCategoriesToDb(), SurveyMatrixQuestion\saveColumnsToDb(), and SurveyMatrixQuestion\saveRowsToDb().
SurveyQuestion::saveMaterial | ( | ) |
Definition at line 529 of file class.SurveyQuestion.php.
References $db, $ilDB, ilInternalLink\_deleteAllLinksOfSource(), ilInternalLink\_saveLink(), and getId().
Referenced by _questionExists(), addMaterial(), deleteMaterials(), SurveyMultipleChoiceQuestion\saveToDb(), SurveyTextQuestion\saveToDb(), SurveyMetricQuestion\saveToDb(), SurveySingleChoiceQuestion\saveToDb(), and SurveyMatrixQuestion\saveToDb().
SurveyQuestion::saveToDb | ( | int | $original_id = 0 | ) |
Saves a SurveyQuestion object to a database.
Definition at line 479 of file class.SurveyQuestion.php.
References $db, $ilDB, ilRTE\_cleanupMediaObjectUsage(), ilRTE\_replaceMediaObjectImageSrc(), getAuthor(), getDescription(), getId(), getObjId(), getObligatory(), getOwner(), getQuestiontext(), getQuestionTypeID(), getTitle(), isComplete(), and setId().
Referenced by syncWithOriginal().
SurveyQuestion::setAuthor | ( | string | $author = "" | ) |
Definition at line 220 of file class.SurveyQuestion.php.
References $author, $ilUser, and $user.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::setComplete | ( | bool | $a_complete | ) |
Definition at line 100 of file class.SurveyQuestion.php.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::setDescription | ( | string | $description = "" | ) |
Definition at line 156 of file class.SurveyQuestion.php.
References $description.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::setId | ( | int | $id = -1 | ) |
Definition at line 146 of file class.SurveyQuestion.php.
References $id.
Referenced by createNewQuestion(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), SurveyMatrixQuestion\loadFromDb(), saveToDb(), and syncWithOriginal().
SurveyQuestion::setMaterialsfile | ( | string | $materials_filename, |
string | $materials_tempfilename = "" , |
||
string | $materials_name = "" |
||
) |
Uploads and adds a material.
Definition at line 176 of file class.SurveyQuestion.php.
References addMaterials(), getMaterialsPath(), ilFileUtils\makeDirParents(), and ilFileUtils\moveUploadedFile().
SurveyQuestion::setObjId | ( | int | $obj_id = 0 | ) |
Set the reference(?) id of the container object.
Definition at line 317 of file class.SurveyQuestion.php.
References $obj_id.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::setObligatory | ( | bool | $obligatory = true | ) |
Definition at line 136 of file class.SurveyQuestion.php.
References $obligatory.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::setOrientation | ( | int | $orientation = 0 | ) |
Definition at line 141 of file class.SurveyQuestion.php.
References $orientation.
Referenced by SurveySingleChoiceQuestion\importAdditionalMetadata(), SurveyMultipleChoiceQuestion\importAdditionalMetadata(), SurveyMultipleChoiceQuestion\loadFromDb(), and SurveySingleChoiceQuestion\loadFromDb().
SurveyQuestion::setOriginalId | ( | ?int | $original_id | ) |
Definition at line 1588 of file class.SurveyQuestion.php.
References $original_id.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), SurveyMatrixQuestion\loadFromDb(), and syncWithOriginal().
SurveyQuestion::setOwner | ( | int | $owner = 0 | ) |
int | $owner | user id of owner |
Definition at line 238 of file class.SurveyQuestion.php.
References $owner.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::setQuestiontext | ( | string | $questiontext = "" | ) |
Definition at line 230 of file class.SurveyQuestion.php.
References $questiontext.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::setSubtype | ( | int | $a_subtype | ) |
Definition at line 1603 of file class.SurveyQuestion.php.
SurveyQuestion::setSurveyId | ( | int | $id = -1 | ) |
SurveyQuestion::setTitle | ( | string | $title = "" | ) |
Definition at line 131 of file class.SurveyQuestion.php.
References $title.
Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyMatrixQuestion\loadFromDb().
SurveyQuestion::stripSlashesAddSpaceFallback | ( | string | $a_str | ) |
Strip slashes with add space fallback, see https://mantis.ilias.de/view.php?id=19727 and https://mantis.ilias.de/view.php?id=24200.
Definition at line 1717 of file class.SurveyQuestion.php.
References ilUtil\stripSlashes().
Referenced by SurveyTextQuestion\saveUserInput(), SurveyMultipleChoiceQuestion\saveUserInput(), SurveySingleChoiceQuestion\saveUserInput(), and SurveyMatrixQuestion\saveUserInput().
SurveyQuestion::syncWithOriginal | ( | ) |
Definition at line 891 of file class.SurveyQuestion.php.
References $db, $ilDB, ilInternalLink\_deleteAllLinksOfSource(), ilInternalLink\_saveLink(), getId(), getOriginalId(), saveToDb(), setId(), and setOriginalId().
SurveyQuestion::usableForPrecondition | ( | ) |
Returns if the question is usable for preconditions.
Definition at line 1541 of file class.SurveyQuestion.php.
|
private |
Definition at line 47 of file class.SurveyQuestion.php.
string SurveyQuestion::$author |
Definition at line 35 of file class.SurveyQuestion.php.
Referenced by SurveyMultipleChoiceQuestion\__construct(), SurveySingleChoiceQuestion\__construct(), SurveyTextQuestion\__construct(), SurveyMetricQuestion\__construct(), __construct(), SurveyMatrixQuestion\__construct(), getAuthor(), and setAuthor().
bool SurveyQuestion::$complete |
Definition at line 45 of file class.SurveyQuestion.php.
|
protected |
Definition at line 46 of file class.SurveyQuestion.php.
|
protected |
Definition at line 30 of file class.SurveyQuestion.php.
Referenced by SurveySingleChoiceQuestion\addPhrase(), SurveyMatrixQuestion\addPhrase(), createNewQuestion(), delete(), deleteAdditionalTableData(), SurveyMatrixQuestion\deleteAdditionalTableData(), SurveySingleChoiceQuestion\getCategoriesForPhrase(), getCopyIds(), SurveyMultipleChoiceQuestion\getMaxSumScore(), SurveySingleChoiceQuestion\getMaxSumScore(), SurveyMatrixQuestion\getMaxSumScore(), getPhrase(), SurveyMultipleChoiceQuestion\getQuestionDataArray(), SurveyTextQuestion\getQuestionDataArray(), SurveyMetricQuestion\getQuestionDataArray(), SurveySingleChoiceQuestion\getQuestionDataArray(), SurveyMatrixQuestion\getQuestionDataArray(), SurveyMetricQuestion\getQuestionTypeID(), getQuestionTypeID(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveyTextQuestion\loadFromDb(), SurveyMetricQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), SurveyMatrixQuestion\loadFromDb(), loadFromDb(), phraseExists(), questionTitleExists(), SurveyMatrixQuestion\saveBipolarAdjectives(), SurveyMultipleChoiceQuestion\saveCategoriesToDb(), SurveySingleChoiceQuestion\saveCategoriesToDb(), saveCategoryToDb(), SurveyMatrixQuestion\saveColumnsToDb(), SurveyMatrixQuestion\saveColumnToDb(), saveCompletionStatus(), SurveyMatrixQuestion\saveLayout(), saveMaterial(), SurveySingleChoiceQuestion\savePhrase(), SurveyMatrixQuestion\savePhrase(), SurveyMatrixQuestion\saveRowsToDb(), SurveyMultipleChoiceQuestion\saveToDb(), SurveyTextQuestion\saveToDb(), SurveyMetricQuestion\saveToDb(), SurveySingleChoiceQuestion\saveToDb(), SurveyMatrixQuestion\saveToDb(), saveToDb(), SurveyTextQuestion\saveUserInput(), SurveyMultipleChoiceQuestion\saveUserInput(), SurveyMetricQuestion\saveUserInput(), SurveySingleChoiceQuestion\saveUserInput(), SurveyMatrixQuestion\saveUserInput(), and syncWithOriginal().
string SurveyQuestion::$description |
Definition at line 33 of file class.SurveyQuestion.php.
Referenced by SurveyMultipleChoiceQuestion\__construct(), SurveySingleChoiceQuestion\__construct(), SurveyTextQuestion\__construct(), SurveyMetricQuestion\__construct(), __construct(), SurveyMatrixQuestion\__construct(), getDescription(), and setDescription().
|
protected |
Definition at line 28 of file class.SurveyQuestion.php.
int SurveyQuestion::$id |
Definition at line 31 of file class.SurveyQuestion.php.
Referenced by getId(), SurveyTextQuestion\importResponses(), SurveyMetricQuestion\importResponses(), SurveyMultipleChoiceQuestion\importResponses(), SurveySingleChoiceQuestion\importResponses(), SurveyMatrixQuestion\importResponses(), setId(), and setSurveyId().
|
protected |
Definition at line 50 of file class.SurveyQuestion.php.
ilLanguage SurveyQuestion::$lng |
Definition at line 41 of file class.SurveyQuestion.php.
Referenced by __construct().
|
protected |
Definition at line 48 of file class.SurveyQuestion.php.
array SurveyQuestion::$material |
Definition at line 44 of file class.SurveyQuestion.php.
Referenced by getMaterial(), SurveyMultipleChoiceQuestion\importResponses(), SurveySingleChoiceQuestion\importResponses(), and SurveyMatrixQuestion\importResponses().
array SurveyQuestion::$materials |
Definition at line 36 of file class.SurveyQuestion.php.
int SurveyQuestion::$obj_id |
Definition at line 38 of file class.SurveyQuestion.php.
Referenced by getObjId(), and setObjId().
bool SurveyQuestion::$obligatory |
Definition at line 40 of file class.SurveyQuestion.php.
Referenced by getObligatory(), and setObligatory().
int SurveyQuestion::$orientation |
Definition at line 42 of file class.SurveyQuestion.php.
Referenced by SurveyMultipleChoiceQuestion\__construct(), SurveySingleChoiceQuestion\__construct(), getOrientation(), and setOrientation().
|
protected |
Definition at line 27 of file class.SurveyQuestion.php.
Referenced by getOriginalId(), SurveyMatrixQuestion\saveColumnsToDb(), saveCompletionStatus(), SurveyMatrixQuestion\saveRowsToDb(), SurveyMultipleChoiceQuestion\saveToDb(), SurveyTextQuestion\saveToDb(), SurveyMetricQuestion\saveToDb(), SurveySingleChoiceQuestion\saveToDb(), SurveyMatrixQuestion\saveToDb(), and setOriginalId().
int SurveyQuestion::$owner |
Definition at line 34 of file class.SurveyQuestion.php.
Referenced by SurveyMultipleChoiceQuestion\__construct(), SurveySingleChoiceQuestion\__construct(), SurveyTextQuestion\__construct(), SurveyMetricQuestion\__construct(), __construct(), SurveyMatrixQuestion\__construct(), getOwner(), and setOwner().
string SurveyQuestion::$questiontext |
Definition at line 39 of file class.SurveyQuestion.php.
Referenced by SurveyMultipleChoiceQuestion\__construct(), SurveySingleChoiceQuestion\__construct(), SurveyTextQuestion\__construct(), SurveyMetricQuestion\__construct(), __construct(), SurveyMatrixQuestion\__construct(), getQuestiontext(), and setQuestiontext().
int SurveyQuestion::$survey_id |
Definition at line 37 of file class.SurveyQuestion.php.
Referenced by getSurveyId().
string SurveyQuestion::$title |
Definition at line 32 of file class.SurveyQuestion.php.
Referenced by SurveyMultipleChoiceQuestion\__construct(), SurveySingleChoiceQuestion\__construct(), SurveyTextQuestion\__construct(), SurveyMetricQuestion\__construct(), __construct(), SurveyMatrixQuestion\__construct(), SurveySingleChoiceQuestion\getPreconditionValueOutput(), getTitle(), and setTitle().
|
protected |
Definition at line 29 of file class.SurveyQuestion.php.
Referenced by SurveySingleChoiceQuestion\addPhrase(), SurveyMatrixQuestion\addPhrase(), phraseExists(), saveCategoryToDb(), SurveyMatrixQuestion\saveColumnToDb(), SurveySingleChoiceQuestion\savePhrase(), SurveyMatrixQuestion\savePhrase(), and setAuthor().