ILIAS  trunk Revision v12.0_alpha-377-g3641b37b9db
SurveyQuestion Class Reference

This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...

+ Inheritance diagram for SurveyQuestion:
+ Collaboration diagram for SurveyQuestion:

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...
 
 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 ()
 
 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
 

Detailed Description

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.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m

Definition at line 25 of file class.SurveyQuestion.php.

Constructor & Destructor Documentation

◆ __construct()

SurveyQuestion::__construct ( string  $title = "",
string  $description = "",
string  $author = "",
string  $questiontext = "",
int  $owner = -1 
)

Reimplemented in SurveyMatrixQuestion, and SurveyTextQuestion.

Definition at line 51 of file class.SurveyQuestion.php.

57 {
58 global $DIC;
59
60 $this->user = $DIC->user();
61 $this->db = $DIC->database();
62 $lng = $DIC->language();
63 $ilUser = $DIC->user();
64
65 $this->lng = $lng;
66 $this->complete = 0;
67 $this->title = $title;
68 $this->description = $description;
69 $this->questiontext = $questiontext;
70 $this->author = $author ?: $ilUser->getFullname();
71 $this->cumulated = array();
72 $this->owner = $owner;
73 if ($this->owner === -1) {
74 $this->owner = $ilUser->getId();
75 }
76 $this->id = -1;
77 $this->survey_id = -1;
78 $this->obligatory = 1;
79 $this->orientation = 0;
80 $this->materials = array();
81 $this->material = array();
82 $this->arrData = array();
83
84 $this->log = ilLoggerFactory::getLogger('svy');
85 $this->import_manager = $DIC->surveyQuestionPool()
86 ->internal()
87 ->repo()
88 ->import();
89
90 $this->edit_manager = $DIC->surveyQuestionPool()
91 ->internal()
92 ->repo()
93 ->editing();
94 }
static getLogger(string $a_component_id)
Get component logger.
global $DIC
Definition: shib_login.php:26

References $author, $description, $DIC, $lng, $owner, $questiontext, $title, ilLoggerFactory\getLogger(), ILIAS\Repository\lng(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __get()

SurveyQuestion::__get ( string  $value)

Definition at line 1344 of file class.SurveyQuestion.php.

1344 : ?string
1345 {
1346 switch ($value) {
1347 default:
1348 if (array_key_exists($value, $this->arrData)) {
1349 return (string) $this->arrData[$value];
1350 }
1351
1352 return null;
1353 }
1354 }

◆ __set()

SurveyQuestion::__set ( string  $key,
string  $value 
)

Definition at line 1356 of file class.SurveyQuestion.php.

1356 : void
1357 {
1358 switch ($key) {
1359 default:
1360 $this->arrData[$key] = $value;
1361 break;
1362 }
1363 }

◆ _changeOriginalId()

static SurveyQuestion::_changeOriginalId ( int  $a_question_id,
int  $a_original_id,
int  $a_object_id 
)
static

Change original id of existing question in db.

Definition at line 1368 of file class.SurveyQuestion.php.

1372 : void {
1373 global $DIC;
1374
1375 $ilDB = $DIC->database();
1376
1377 $ilDB->manipulate("UPDATE svy_question" .
1378 " SET original_id = " . $ilDB->quote($a_original_id, "integer") . "," .
1379 " obj_fi = " . $ilDB->quote($a_object_id, "integer") .
1380 " WHERE question_id = " . $ilDB->quote($a_question_id, "integer"));
1381 }

Referenced by ilSurveyEditorGUI\executeCopyQuestionsToPoolObject().

+ Here is the caller graph for this function:

◆ _getInternalLinkHref()

static SurveyQuestion::_getInternalLinkHref ( string  $target = "",
?int  $a_parent_ref_id = null 
)
static

Definition at line 961 of file class.SurveyQuestion.php.

964 : string {
965 $linktypes = array(
966 "lm" => "LearningModule",
967 "pg" => "PageObject",
968 "st" => "StructureObject",
969 "git" => "GlossaryItem",
970 "mob" => "MediaObject"
971 );
972 $href = "";
973 if (preg_match("/il__(\w+)_(\d+)/", $target, $matches)) {
974 $type = $matches[1];
975 $target_id = $matches[2];
976 switch ($linktypes[$matches[1]]) {
977 case "StructureObject":
978 case "PageObject":
979 case "GlossaryItem":
980 case "LearningModule":
981 $href = ilFileUtils::removeTrailingPathSeparators(ILIAS_HTTP_PATH) . "/goto.php?target=" . $type . "_" . $target_id;
982 break;
983 case "MediaObject":
985 ILIAS_HTTP_PATH
986 ) . "/ilias.php?baseClass=ilLMPresentationGUI&obj_type=" . $linktypes[$type] . "&cmd=media&ref_id=" . $a_parent_ref_id . "&mob_id=" . $target_id;
987 break;
988 }
989 }
990 return $href;
991 }
static removeTrailingPathSeparators(string $path)

References ilFileUtils\removeTrailingPathSeparators().

+ Here is the call graph for this function:

◆ _getOriginalId()

static SurveyQuestion::_getOriginalId ( int  $question_id,
bool  $a_return_question_id_if_no_original = true 
)
static

Returns the original id of a question.

Definition at line 800 of file class.SurveyQuestion.php.

803 : int {
804 global $DIC;
805
806 $ilDB = $DIC->database();
807 $result = $ilDB->queryF(
808 "SELECT * FROM svy_question WHERE question_id = %s",
809 array('integer'),
810 array($question_id)
811 );
812 if ($result->numRows() > 0) {
813 $row = $ilDB->fetchAssoc($result);
814 if ($row["original_id"] > 0) {
815 return (int) $row["original_id"];
816 } elseif ($a_return_question_id_if_no_original) { // #12419
817 return (int) $row["question_id"];
818 }
819 }
820 return 0;
821 }

References $ilDB.

◆ _getQuestionType()

static SurveyQuestion::_getQuestionType ( int  $question_id)
static

Returns the question type of a question with a given id.

Definition at line 753 of file class.SurveyQuestion.php.

753 : string
754 {
755 global $DIC;
756
757 $ilDB = $DIC->database();
758
759 if ($question_id < 1) {
760 return "";
761 }
762
763 $result = $ilDB->queryF(
764 "SELECT type_tag FROM svy_question, svy_qtype WHERE svy_question.question_id = %s AND svy_question.questiontype_fi = svy_qtype.questiontype_id",
765 array('integer'),
766 array($question_id)
767 );
768 if ($result->numRows() === 1) {
769 $data = $ilDB->fetchAssoc($result);
770 return $data["type_tag"];
771 } else {
772 return "";
773 }
774 }

References $data, $DIC, and $ilDB.

Referenced by SurveyQuestionGUI\_getGUIClassNameForId(), SurveyQuestionGUI\_getQuestionGUI(), ilObjSurveyGUI\addLocatorItems(), ilObjSurveyQuestionPoolGUI\addLocatorItems(), ilSurveyConstraintsGUI\confirmDeleteConstraintsObject(), and ilObjSurvey\getUserSpecificResults().

+ Here is the caller graph for this function:

◆ _getQuestionTypeName()

static SurveyQuestion::_getQuestionTypeName ( string  $type_tag)
static

Return the translation for a given question type.

Parameters
string$type_tagtype of the question type

Definition at line 1067 of file class.SurveyQuestion.php.

1069 : string {
1070 global $DIC;
1071 $lng = $DIC->language();
1072 return $lng->txt($type_tag);
1073 }
txt(string $a_topic, string $a_default_lang_fallback_mod="")
gets the text for a given topic if the topic is not in the list, the topic itself with "-" will be re...

Referenced by ilObjSurveyQuestionPoolGUI\deleteQuestionsObject(), ilSurveyQuestionsTableGUI\fillRow(), ilSurveyResultsCumulatedTableGUI\getItems(), and ilSurveyEditorGUI\removeQuestionsForm().

+ Here is the caller graph for this function:

◆ _getTitle()

static SurveyQuestion::_getTitle ( int  $question_id)
static

Returns the question title of a question with a given id.

Definition at line 779 of file class.SurveyQuestion.php.

779 : string
780 {
781 global $DIC;
782
783 $ilDB = $DIC->database();
784
785 $result = $ilDB->queryF(
786 "SELECT title FROM svy_question WHERE svy_question.question_id = %s",
787 array('integer'),
788 array($question_id)
789 );
790
791 if ($data = $ilDB->fetchAssoc($result)) {
792 return (string) $data["title"];
793 }
794 return "";
795 }

References $data, $DIC, and $ilDB.

Referenced by ilObjSurveyGUI\addLocatorItems(), ilObjSurveyQuestionPoolGUI\addLocatorItems(), ILIAS\components\ILIAS\Glossary\Table\TermUsagesTable\getDataRetrieval(), and ilSurveySyncTableGUI\importData().

+ Here is the caller graph for this function:

◆ _includeClass()

static SurveyQuestion::_includeClass ( string  $question_type,
int  $gui = 0 
)
static

Include the php class file for a given question type.

Parameters
int$gui0 if the class should be included, 1 if the GUI class should be included

Definition at line 1047 of file class.SurveyQuestion.php.

1050 : bool {
1051 $type = $question_type;
1052 if ($gui === 1) {
1053 $type .= "GUI";
1054 } elseif ($gui === 2) {
1055 $type .= "Evaluation";
1056 }
1057 if (file_exists("./components/ILIAS/SurveyQuestionPool/Questions/class." . $type . ".php")) {
1058 return true;
1059 }
1060 return false;
1061 }

Referenced by ilSurveyConstraintsGUI\confirmDeleteConstraintsObject(), ilObjSurvey\getUserSpecificResults(), ilObjSurveyQuestionPool\toXML(), and ilObjSurveyQuestionPool\toXmlForExport().

+ Here is the caller graph for this function:

◆ _instanciateQuestion()

static SurveyQuestion::_instanciateQuestion ( int  $question_id)
static

Get question object.

Definition at line 1079 of file class.SurveyQuestion.php.

1080 {
1081 $question_type = self::_getQuestionType($question_id);
1082 if ($question_type) {
1083 self::_includeClass($question_type);
1084 $question = new $question_type();
1085 $question->loadFromDb($question_id);
1086 return $question;
1087 }
1088 return null;
1089 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _includeClass(string $question_type, int $gui=0)
Include the php class file for a given question type.
static _getQuestionType(int $question_id)
Returns the question type of a question with a given id.

Referenced by ilSurveySkill\determineMaxScale(), ilObjSurveyQuestionPool\removeQuestion(), and ilSurveyExecutionGUI\saveActiveQuestionData().

+ Here is the caller graph for this function:

◆ _instanciateQuestionEvaluation()

static SurveyQuestion::_instanciateQuestionEvaluation ( int  $question_id,
?array  $a_finished_ids = null 
)
static

Definition at line 1107 of file class.SurveyQuestion.php.

1111 $question = self::_instanciateQuestion($question_id);
1112 if (is_null($a_finished_ids)) {
1113 $a_finished_ids = [];
1114 }
1115 if ($question) {
1116 $question_type = self::_getQuestionType($question_id);
1117 self::_includeClass($question_type, 2);
1118 $class = $question_type . "Evaluation";
1119 $ev = new $class($question, $a_finished_ids);
1120 return $ev;
1121 }
1122 return null;
1123 }
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Le...
static _instanciateQuestion(int $question_id)
Get question object.

Referenced by ilSurveyEvaluationGUI\exportEvaluationUser(), ILIAS\Survey\PrintView\ResultsDetailsPrintViewProviderGUI\getPages(), ILIAS\Survey\Evaluation\EvaluationManager\getUserSpecificResults(), and ilObjSurvey\getUserSpecificResults().

+ Here is the caller graph for this function:

◆ _instanciateQuestionGUI()

static SurveyQuestion::_instanciateQuestionGUI ( int  $question_id)
static

Get question gui object.

Definition at line 1094 of file class.SurveyQuestion.php.

1097 $question_type = self::_getQuestionType($question_id);
1098 if ($question_type) {
1099 self::_includeClass($question_type, 1);
1100 $guitype = $question_type . "GUI";
1101 $question = new $guitype($question_id);
1102 return $question;
1103 }
1104 return null;
1105 }
Basic class for all survey question types The SurveyQuestionGUI class defines and encapsulates basic ...

◆ _isComplete()

static SurveyQuestion::_isComplete ( int  $question_id)
static

Checks whether the question is complete or not.

Definition at line 398 of file class.SurveyQuestion.php.

398 : bool
399 {
400 global $DIC;
401
402 $ilDB = $DIC->database();
403
404 $result = $ilDB->queryF(
405 "SELECT complete FROM svy_question WHERE question_id = %s",
406 array('integer'),
407 array($question_id)
408 );
409 if ($result->numRows()) {
410 $row = $ilDB->fetchAssoc($result);
411 if ((int) $row["complete"] === 1) {
412 return true;
413 }
414 }
415 return false;
416 }

References $DIC, and $ilDB.

Referenced by SurveyQuestionGUI\save().

+ Here is the caller graph for this function:

◆ _isWriteable()

static SurveyQuestion::_isWriteable ( int  $question_id,
int  $user_id 
)
static

is question writeable by a certain user

Definition at line 996 of file class.SurveyQuestion.php.

999 : bool {
1000 global $DIC;
1001
1002 $ilDB = $DIC->database();
1003
1004 if (($question_id < 1) || ($user_id < 1)) {
1005 return false;
1006 }
1007
1008 $result = $ilDB->queryF(
1009 "SELECT obj_fi FROM svy_question WHERE question_id = %s",
1010 array('integer'),
1011 array($question_id)
1012 );
1013 if ($result->numRows() === 1) {
1014 $row = $ilDB->fetchAssoc($result);
1015 $qpl_object_id = $row["obj_fi"];
1016 return ilObjSurveyQuestionPool::_isWriteable($qpl_object_id);
1017 }
1018
1019 return false;
1020 }
static _isWriteable(int $object_id)
Returns true, if the question pool is writeable for the current user.

Referenced by SurveyQuestionGUI\save().

+ Here is the caller graph for this function:

◆ _lookupSurveyObjId()

static SurveyQuestion::_lookupSurveyObjId ( int  $a_question_id)
static

Definition at line 1409 of file class.SurveyQuestion.php.

1411 : ?int {
1412 global $DIC;
1413
1414 $ilDB = $DIC->database();
1415
1416 $set = $ilDB->query("SELECT svy_svy.obj_fi FROM svy_svy_qst" .
1417 " JOIN svy_svy ON (svy_svy.survey_id = svy_svy_qst.survey_fi)" .
1418 " WHERE svy_svy_qst.question_fi = " . $ilDB->quote($a_question_id, "integer"));
1419 $row = $ilDB->fetchAssoc($set);
1420 if ($ilDB->numRows($set)) {
1421 return (int) $row["obj_fi"];
1422 }
1423 return null;
1424 }

◆ _questionExists()

static SurveyQuestion::_questionExists ( int  $question_id)
static

Definition at line 863 of file class.SurveyQuestion.php.

863 : bool
864 {
865 global $DIC;
866
867 $ilDB = $DIC->database();
868
869 if ($question_id < 1) {
870 return false;
871 }
872
873 $result = $ilDB->queryF(
874 "SELECT question_id FROM svy_question WHERE question_id = %s",
875 array('integer'),
876 array($question_id)
877 );
878 return $result->numRows() === 1;
879 }

References $DIC, and $ilDB.

Referenced by ilSurveySkill\read(), and SurveyQuestionGUI\save().

+ Here is the caller graph for this function:

◆ _resolveInternalLink()

static SurveyQuestion::_resolveInternalLink ( string  $internal_link)
static

Definition at line 882 of file class.SurveyQuestion.php.

884 : string {
885 $resolved_link = "";
886 if (preg_match("/il_(\d+)_(\w+)_(\d+)/", $internal_link, $matches)) {
887 switch ($matches[2]) {
888 case "lm":
889 $resolved_link = ilLMObject::_getIdForImportId($internal_link);
890 break;
891 case "pg":
892 $resolved_link = ilInternalLink::_getIdForImportId("PageObject", $internal_link);
893 break;
894 case "st":
895 $resolved_link = ilInternalLink::_getIdForImportId("StructureObject", $internal_link);
896 break;
897 case "git":
898 $resolved_link = ilInternalLink::_getIdForImportId("GlossaryItem", $internal_link);
899 break;
900 case "mob":
901 $resolved_link = ilInternalLink::_getIdForImportId("MediaObject", $internal_link);
902 break;
903 }
904 if (strcmp($resolved_link, "") === 0) {
905 $resolved_link = $internal_link;
906 }
907 } else {
908 $resolved_link = $internal_link;
909 }
910 return $resolved_link;
911 }
static _getIdForImportId(string $a_import_id)
get current object id for import id (static)

References ilLMObject\_getIdForImportId(), and ilInternalLink\_getIdForImportId().

+ Here is the call graph for this function:

◆ _resolveIntLinks()

static SurveyQuestion::_resolveIntLinks ( int  $question_id)
static

Definition at line 913 of file class.SurveyQuestion.php.

915 : void {
916 global $DIC;
917
918 $ilDB = $DIC->database();
919 $resolvedlinks = 0;
920 $result = $ilDB->queryF(
921 "SELECT * FROM svy_material WHERE question_fi = %s",
922 array('integer'),
923 array($question_id)
924 );
925 if ($result->numRows()) {
926 while ($row = $ilDB->fetchAssoc($result)) {
927 $internal_link = $row["internal_link"];
928 $resolved_link = self::_resolveInternalLink($internal_link);
929 if (strcmp($internal_link, $resolved_link) !== 0) {
930 // internal link was resolved successfully
931 $affectedRows = $ilDB->manipulateF(
932 "UPDATE svy_material SET internal_link = %s, tstamp = %s WHERE material_id = %s",
933 array('text', 'integer', 'integer'),
934 array($resolved_link, time(), $row["material_id"])
935 );
936 $resolvedlinks++;
937 }
938 }
939 }
940 if ($resolvedlinks) {
941 // there are resolved links -> reenter theses links to the database
942
943 // delete all internal links from the database
944 ilInternalLink::_deleteAllLinksOfSource("sqst", $question_id);
945
946 $result = $ilDB->queryF(
947 "SELECT * FROM svy_material WHERE question_fi = %s",
948 array('integer'),
949 array($question_id)
950 );
951 if ($result->numRows()) {
952 while ($row = $ilDB->fetchAssoc($result)) {
953 if (preg_match("/il_(\d*?)_(\w+)_(\d+)/", $row["internal_link"], $matches)) {
954 ilInternalLink::_saveLink("sqst", $question_id, $matches[2], $matches[3], $matches[1]);
955 }
956 }
957 }
958 }
959 }
static _resolveInternalLink(string $internal_link)

References $ilDB.

◆ addMaterials()

SurveyQuestion::addMaterials ( string  $materials_file,
string  $materials_name = "" 
)

Definition at line 157 of file class.SurveyQuestion.php.

160 : void {
161 if (empty($materials_name)) {
162 $materials_name = $materials_file;
163 }
164 if ((!empty($materials_name)) && (!array_key_exists($materials_name, $this->materials))) {
165 $this->materials[$materials_name] = $materials_file;
166 }
167 }

◆ addMaterialTag()

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 1168 of file class.SurveyQuestion.php.

1174 : void {
1175 $a_xml_writer->xmlStartTag("material");
1176 $attrs = array(
1177 "type" => "text/plain"
1178 );
1179 if ($this->isHTML($a_material)) {
1180 $attrs["type"] = "text/xhtml";
1181 }
1182 if (is_array($a_attrs)) {
1183 $attrs = array_merge($attrs, $a_attrs);
1184 }
1185 $a_xml_writer->xmlElement("mattext", $attrs, ilRTE::_replaceMediaObjectImageSrc($a_material, 0));
1186
1187 if ($add_mobs) {
1188 $mobs = ilObjMediaObject::_getMobsOfObject("spl:html", $this->getId());
1189 foreach ($mobs as $mob) {
1190 $mob_obj = new ilObjMediaObject($mob);
1191 $imgattrs = array(
1192 "label" => "il_" . IL_INST_ID . "_mob_" . $mob,
1193 "uri" => "objects/" . "il_" . IL_INST_ID . "_mob_" . $mob . "/" . $mob_obj->getTitle(),
1194 "type" => "spl:html",
1195 "id" => $this->getId()
1196 );
1197 $a_xml_writer->xmlElement("matimage", $imgattrs, null);
1198 }
1199 }
1200 if ($close_material_tag) {
1201 $a_xml_writer->xmlEndTag("material");
1202 }
1203 }
isHTML(string $a_text)
static _getMobsOfObject(string $a_type, int $a_id, int|false $a_usage_hist_nr=0, string $a_lang="-")
static _replaceMediaObjectImageSrc(string $a_text, int $a_direction=0, string $nic='')
Replaces image source from mob image urls with the mob id or replaces mob id with the correct image s...
xmlElement(string $tag, $attrs=null, $data=null, $encode=true, $escape=true)
Writes a basic element (no children, just textual content)
xmlEndTag(string $tag)
Writes an endtag.
xmlStartTag(string $tag, ?array $attrs=null, bool $empty=false, bool $encode=true, bool $escape=true)
Writes a starttag.
const IL_INST_ID
Definition: constants.php:40

◆ copyObject()

SurveyQuestion::copyObject ( int  $target_questionpool,
string  $title = "" 
)

Definition at line 350 of file class.SurveyQuestion.php.

353 : ?int {
354 if ($this->getId() <= 0) {
355 // The question has not been saved. It cannot be copied
356 return null;
357 }
358 $clone = $this;
359 $original_id = self::_getOriginalId($this->getId(), false);
360 $clone->setId(-1);
361 $source_questionpool = $this->getObjId();
362 $clone->setObjId($target_questionpool);
363 if ($title) {
364 $clone->setTitle($title);
365 }
366
367 $clone->saveToDb();
368
369 // copy XHTML media objects
370 $clone->copyXHTMLMediaObjectsOfQuestion($original_id);
371 return $clone->getId();
372 }
static _getOriginalId(int $question_id, bool $a_return_question_id_if_no_original=true)
Returns the original id of a question.
getObjId()
Get the reference(?) id of the container object.

◆ copyXHTMLMediaObjectsOfQuestion()

SurveyQuestion::copyXHTMLMediaObjectsOfQuestion ( int  $a_q_id)

Copy media object usages from other question.

Definition at line 377 of file class.SurveyQuestion.php.

379 : void {
380 $mobs = ilObjMediaObject::_getMobsOfObject("spl:html", $a_q_id);
381 foreach ($mobs as $mob) {
382 ilObjMediaObject::_saveUsage($mob, "spl:html", $this->getId());
383 }
384 }
static _saveUsage(int $a_mob_id, string $a_type, int $a_id, int $a_usage_hist_nr=0, string $a_lang="-")
Save usage of mob within another container (e.g.

References ilObjMediaObject\_saveUsage(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ createNewQuestion()

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.

Returns
int ID of the new question

Definition at line 501 of file class.SurveyQuestion.php.

501 : int
502 {
504
505 $obj_id = $this->getObjId();
506 if ($obj_id > 0) {
507 $next_id = $ilDB->nextId('svy_question');
508 $affectedRows = $ilDB->manipulateF(
509 "INSERT INTO svy_question (question_id, questiontype_fi, " .
510 "obj_fi, owner_fi, title, description, author, questiontext, obligatory, complete, " .
511 "created, original_id, tstamp) VALUES " .
512 "(%s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s, %s)",
513 array('integer', 'integer', 'integer', 'integer', 'text', 'text', 'text', 'text',
514 'text', 'text', 'integer', 'integer', 'integer'),
515 array(
516 $next_id,
517 $this->getQuestionTypeID(),
518 $obj_id,
519 $this->getOwner(),
520 null,
521 null,
522 $this->getAuthor(),
523 null,
524 "1",
525 "0",
526 time(),
527 null,
528 0
529 )
530 );
531 $this->log->debug("INSERT INTO svy_question question_id= " . $next_id . " questiontype_fi= " . $this->getQuestionTypeID());
532
533 $this->setId($next_id);
534 }
535 return $this->getId();
536 }

References $ilDB, and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ delete()

SurveyQuestion::delete ( int  $question_id)

Deletes a question and all materials from the database.

Definition at line 640 of file class.SurveyQuestion.php.

640 : void
641 {
643 $this->log->debug("Question Delete... " . $question_id);
644 if ($question_id < 1) {
645 return;
646 }
647
648 $result = $ilDB->queryF(
649 "SELECT obj_fi FROM svy_question WHERE question_id = %s",
650 array('integer'),
651 array($question_id)
652 );
653 if ($result->numRows() === 1) {
654 $row = $ilDB->fetchAssoc($result);
655 $obj_id = $row["obj_fi"];
656 } else {
657 return;
658 }
659
660 $affectedRows = $ilDB->manipulateF(
661 "DELETE FROM svy_answer WHERE question_fi = %s",
662 array('integer'),
663 array($question_id)
664 );
665
666 $affectedRows = $ilDB->manipulateF(
667 "DELETE FROM svy_constraint WHERE question_fi = %s",
668 array('integer'),
669 array($question_id)
670 );
671
672 $result = $ilDB->queryF(
673 "SELECT constraint_fi FROM svy_qst_constraint WHERE question_fi = %s",
674 array('integer'),
675 array($question_id)
676 );
677 while ($row = $ilDB->fetchObject($result)) {
678 $affectedRows = $ilDB->manipulateF(
679 "DELETE FROM svy_constraint WHERE constraint_id = %s",
680 array('integer'),
681 array($row->constraint_fi)
682 );
683 }
684
685 $affectedRows = $ilDB->manipulateF(
686 "DELETE FROM svy_qst_constraint WHERE question_fi = %s",
687 array('integer'),
688 array($question_id)
689 );
690 $affectedRows = $ilDB->manipulateF(
691 "DELETE FROM svy_qblk_qst WHERE question_fi = %s",
692 array('integer'),
693 array($question_id)
694 );
695 $affectedRows = $ilDB->manipulateF(
696 "DELETE FROM svy_svy_qst WHERE question_fi = %s",
697 array('integer'),
698 array($question_id)
699 );
700 $affectedRows = $ilDB->manipulateF(
701 "DELETE FROM svy_variable WHERE question_fi = %s",
702 array('integer'),
703 array($question_id)
704 );
705 $affectedRows = $ilDB->manipulateF(
706 "DELETE FROM svy_question WHERE question_id = %s",
707 array('integer'),
708 array($question_id)
709 );
710
711 $this->deleteAdditionalTableData($question_id);
712
713 $affectedRows = $ilDB->manipulateF(
714 "DELETE FROM svy_material WHERE question_fi = %s",
715 array('integer'),
716 array($question_id)
717 );
718
719 $this->log->debug("SET OF DELETES svy_answer, svy_constraint, svy_qst_constraint, svy_qblk_qst, svy_qst_oblig, svy_svy_qst, svy_variable, svy_question, svy_material WHERE question_fi = " . $question_id);
720
721 ilInternalLink::_deleteAllLinksOfSource("sqst", $question_id);
722
723 $directory = CLIENT_WEB_DIR . "/survey/" . $obj_id . "/$question_id";
724 if (preg_match("/\d+/", $obj_id) and preg_match("/\d+/", $question_id) and is_dir($directory)) {
725 ilFileUtils::delDir($directory);
726 }
727
728 $mobs = ilObjMediaObject::_getMobsOfObject("spl:html", $question_id);
729 // remaining usages are not in text anymore -> delete them
730 // and media objects (note: delete method of ilObjMediaObject
731 // checks whether object is used in another context; if yes,
732 // the object is not deleted!)
733 foreach ($mobs as $mob) {
734 ilObjMediaObject::_removeUsage($mob, "spl:html", $question_id);
735 $mob_obj = new ilObjMediaObject($mob);
736 $mob_obj->delete();
737 }
738 $this->log->debug("Call ilSurveySkill::handleQuestionDeletion, q id: " . $question_id .
739 ", obj id: " . $obj_id);
741
742 $this->log->debug("UPDATE svy_question");
743
744 // #12772 - untie question copies from pool question
745 $ilDB->manipulate("UPDATE svy_question" .
746 " SET original_id = NULL" .
747 " WHERE original_id = " . $ilDB->quote($question_id, "integer"));
748 }
deleteAdditionalTableData(int $question_id)
Deletes datasets from the additional question table in the database.
static delDir(string $a_dir, bool $a_clean_only=false)
removes a dir and all its content (subdirs and files) recursively
static _removeUsage(int $a_mob_id, string $a_type, int $a_id, int $a_usage_hist_nr=0, string $a_lang="-")
Remove usage of mob in another container.
static handleQuestionDeletion(int $a_question_id, int $a_obj_id)
Remove question skill assignment.
const CLIENT_WEB_DIR
Definition: constants.php:47

References $ilDB, ilInternalLink\_deleteAllLinksOfSource(), ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), CLIENT_WEB_DIR, ilFileUtils\delDir(), and ilSurveySkill\handleQuestionDeletion().

+ Here is the call graph for this function:

◆ deleteAdditionalTableData()

SurveyQuestion::deleteAdditionalTableData ( int  $question_id)

Deletes datasets from the additional question table in the database.

Reimplemented in SurveyMatrixQuestion.

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

624 : void
625 {
627
628 $this->log->debug("DELETE FROM " . $this->getAdditionalTableName());
629
630 $ilDB->manipulateF(
631 "DELETE FROM " . $this->getAdditionalTableName() . " WHERE question_fi = %s",
632 array('integer'),
633 array($question_id)
634 );
635 }

References $ilDB.

◆ deleteMaterial()

SurveyQuestion::deleteMaterial ( string  $materials_name = "")

Definition at line 194 of file class.SurveyQuestion.php.

196 : void {
197 foreach ($this->materials as $key => $value) {
198 if (strcmp($key, $materials_name) === 0) {
199 if (file_exists($this->getMaterialsPath() . $value)) {
200 unlink($this->getMaterialsPath() . $value);
201 }
202 unset($this->materials[$key]);
203 }
204 }
205 }
getMaterialsPath()
Returns the materials path for web accessible materials of a question.

◆ duplicate()

SurveyQuestion::duplicate ( bool  $for_survey = true,
string  $title = "",
string  $author = "",
int  $owner = 0,
int  $a_survey_id = 0 
)

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

319 : ?int {
320 if ($this->getId() <= 0) {
321 // The question has not been saved. It cannot be duplicated
322 return null;
323 }
324 // duplicate the question in database
325 $clone = $this;
326 $original_id = $this->getId();
327 $clone->setId(-1);
328 if ($a_survey_id > 0) {
329 $clone->setObjId($a_survey_id);
330 }
331 if ($title) {
332 $clone->setTitle($title);
333 }
334 if ($author) {
335 $clone->setAuthor($author);
336 }
337 if ($owner) {
338 $clone->setOwner($owner);
339 }
340 if ($for_survey) {
341 $clone->saveToDb($original_id);
342 } else {
343 $clone->saveToDb();
344 }
345 // copy XHTML media objects
346 $clone->copyXHTMLMediaObjectsOfQuestion($original_id);
347 return $clone->getId();
348 }

◆ flushMaterials()

SurveyQuestion::flushMaterials ( )

Deletes all materials uris.

Todo:
check if unlink is necessary

Definition at line 211 of file class.SurveyQuestion.php.

211 : void
212 {
213 $this->materials = array();
214 }

◆ getAuthor()

SurveyQuestion::getAuthor ( )

Definition at line 282 of file class.SurveyQuestion.php.

282 : string
283 {
284 return $this->author;
285 }

Referenced by SurveyMetricQuestion\isComplete(), SurveyMultipleChoiceQuestion\isComplete(), SurveySingleChoiceQuestion\isComplete(), and SurveyTextQuestion\isComplete().

+ Here is the caller graph for this function:

◆ getAvailableRelations()

SurveyQuestion::getAvailableRelations ( )

Returns the available relations for the question.

Reimplemented in SurveyMetricQuestion, SurveyMultipleChoiceQuestion, and SurveySingleChoiceQuestion.

Definition at line 1280 of file class.SurveyQuestion.php.

1280 : array
1281 {
1282 // overwrite in inherited classes
1283 return array();
1284 }

◆ getCopyIds()

SurveyQuestion::getCopyIds ( bool  $a_group_by_survey = false)

Definition at line 1383 of file class.SurveyQuestion.php.

1385 : array {
1386 $ilDB = $this->db;
1387
1388 $set = $ilDB->query("SELECT q.question_id,s.obj_fi" .
1389 " FROM svy_question q" .
1390 " JOIN svy_svy_qst sq ON (sq.question_fi = q.question_id)" .
1391 " JOIN svy_svy s ON (s.survey_id = sq.survey_fi)" .
1392 " WHERE original_id = " . $ilDB->quote($this->getId(), "integer"));
1393 $res = array();
1394 while ($row = $ilDB->fetchAssoc($set)) {
1395 if (!$a_group_by_survey) {
1396 $res[] = (int) $row["question_id"];
1397 } else {
1398 $res[$row["obj_fi"]][] = (int) $row["question_id"];
1399 }
1400 }
1401 return $res;
1402 }
$res
Definition: ltiservices.php:69

◆ getDescription()

SurveyQuestion::getDescription ( )

Definition at line 277 of file class.SurveyQuestion.php.

277 : string
278 {
279 return $this->description;
280 }

◆ getId()

◆ getImagePath()

SurveyQuestion::getImagePath ( )

Returns the image path for web accessible images of a question.

Definition at line 541 of file class.SurveyQuestion.php.

541 : string
542 {
543 return CLIENT_WEB_DIR . "/survey/$this->obj_id/$this->id/images/";
544 }

References CLIENT_WEB_DIR.

◆ getImagePathWeb()

SurveyQuestion::getImagePathWeb ( )

Returns the web image path for web accessible images of a question.

Definition at line 557 of file class.SurveyQuestion.php.

557 : string
558 {
559 $webdir = ilFileUtils::removeTrailingPathSeparators(CLIENT_WEB_DIR) . "/survey/$this->obj_id/$this->id/images/";
560 return str_replace(
563 $webdir
564 );
565 }

References CLIENT_WEB_DIR, and ilFileUtils\removeTrailingPathSeparators().

+ Here is the call graph for this function:

◆ getLabel()

SurveyQuestion::getLabel ( )

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

239 : string
240 {
241 return $this->label;
242 }

◆ getMaterial()

SurveyQuestion::getMaterial ( )

Definition at line 1328 of file class.SurveyQuestion.php.

1328 : array
1329 {
1330 return $this->material;
1331 }

◆ getMaterialsPath()

SurveyQuestion::getMaterialsPath ( )

Returns the materials path for web accessible materials of a question.

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

549 : string
550 {
551 return CLIENT_WEB_DIR . "/survey/$this->obj_id/$this->id/materials/";
552 }

References CLIENT_WEB_DIR.

◆ getMaterialsPathWeb()

SurveyQuestion::getMaterialsPathWeb ( )

Returns the web image path for web accessable images of a question.

Definition at line 570 of file class.SurveyQuestion.php.

570 : string
571 {
572 $webdir = ilFileUtils::removeTrailingPathSeparators(CLIENT_WEB_DIR) . "/survey/$this->obj_id/$this->id/materials/";
573 return str_replace(
576 $webdir
577 );
578 }

References CLIENT_WEB_DIR, and ilFileUtils\removeTrailingPathSeparators().

+ Here is the call graph for this function:

◆ getMaxSumScore()

static SurveyQuestion::getMaxSumScore ( int  $survey_id)
static

Get max sum score for specific survey (and this question type)

Reimplemented in SurveyMatrixQuestion, SurveyMultipleChoiceQuestion, and SurveySingleChoiceQuestion.

Definition at line 1459 of file class.SurveyQuestion.php.

1459 : int
1460 {
1461 return 0;
1462 }

◆ getObjId()

SurveyQuestion::getObjId ( )

Get the reference(?) id of the container object.

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

300 : int
301 {
302 return $this->obj_id;
303 }

◆ getObligatory()

SurveyQuestion::getObligatory ( )

Definition at line 249 of file class.SurveyQuestion.php.

249 : bool
250 {
251 return $this->obligatory;
252 }

◆ getOrientation()

SurveyQuestion::getOrientation ( )
Returns
int 0 = vertical, 1 = horizontal

Definition at line 262 of file class.SurveyQuestion.php.

262 : int
263 {
264 switch ($this->orientation) {
265 case 0:
266 case 1:
267 case 2:
268 break;
269 default:
270 $this->orientation = 0;
271 break;
272 }
273 return $this->orientation;
274 }

Referenced by SurveyMultipleChoiceQuestion\saveToDb(), and SurveySingleChoiceQuestion\saveToDb().

+ Here is the caller graph for this function:

◆ getOriginalId()

SurveyQuestion::getOriginalId ( )

Definition at line 1323 of file class.SurveyQuestion.php.

1323 : ?int
1324 {
1325 return $this->original_id;
1326 }

◆ getOwner()

SurveyQuestion::getOwner ( )

Definition at line 287 of file class.SurveyQuestion.php.

287 : int
288 {
289 return $this->owner;
290 }

◆ getPreconditionOptions()

SurveyQuestion::getPreconditionOptions ( )

Returns the options for preconditions.

Reimplemented in SurveyMultipleChoiceQuestion, and SurveySingleChoiceQuestion.

Definition at line 1289 of file class.SurveyQuestion.php.

1289 : array
1290 {
1291 // overwrite in inherited classes
1292 return [];
1293 }

◆ getPreconditionSelectValue()

SurveyQuestion::getPreconditionSelectValue ( string  $default,
string  $title,
string  $variable 
)

Creates a form property for the precondition value.

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, and SurveySingleChoiceQuestion.

Definition at line 1309 of file class.SurveyQuestion.php.

1314 // overwrite in inherited classes
1315 return null;
1316 }
This class represents a property in a property form.

◆ getPreconditionValueOutput()

SurveyQuestion::getPreconditionValueOutput ( string  $value)

Returns the output for a precondition value.

Parameters
string$valueThe precondition value
Returns
string The output of the precondition value

Reimplemented in SurveyMatrixQuestion, SurveyMultipleChoiceQuestion, and SurveySingleChoiceQuestion.

Definition at line 1300 of file class.SurveyQuestion.php.

1300 : string
1301 {
1302 // overwrite in inherited classes
1303 return $value;
1304 }

◆ getQuestionDataArray()

SurveyQuestion::getQuestionDataArray ( int  $id)

Returns the question data.

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 1218 of file class.SurveyQuestion.php.

1218 : array
1219 {
1220 return array();
1221 }

◆ getQuestiontext()

SurveyQuestion::getQuestiontext ( )

Definition at line 292 of file class.SurveyQuestion.php.

292 : string
293 {
294 return $this->questiontext;
295 }

Referenced by SurveyMetricQuestion\isComplete(), SurveyMultipleChoiceQuestion\isComplete(), SurveySingleChoiceQuestion\isComplete(), and SurveyTextQuestion\isComplete().

+ Here is the caller graph for this function:

◆ getQuestionType()

SurveyQuestion::getQuestionType ( )

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 1038 of file class.SurveyQuestion.php.

1038 : string
1039 {
1040 return "";
1041 }

◆ getQuestionTypeID()

SurveyQuestion::getQuestionTypeID ( )

Reimplemented in SurveyMetricQuestion.

Definition at line 1022 of file class.SurveyQuestion.php.

1022 : int
1023 {
1024 $ilDB = $this->db;
1025 $result = $ilDB->queryF(
1026 "SELECT questiontype_id FROM svy_qtype WHERE type_tag = %s",
1027 array('text'),
1028 array($this->getQuestionType())
1029 );
1030 if ($result->numRows() === 1) {
1031 $row = $ilDB->fetchAssoc($result);
1032 return (int) $row["questiontype_id"];
1033 }
1034
1035 return 0;
1036 }

References $ilDB.

◆ getSubtype()

SurveyQuestion::getSubtype ( )

Reimplemented in SurveyMatrixQuestion, and SurveyMetricQuestion.

Definition at line 1338 of file class.SurveyQuestion.php.

1338 : ?int
1339 {
1340 // do nothing
1341 return null;
1342 }

◆ getSurveyId()

SurveyQuestion::getSurveyId ( )

Definition at line 254 of file class.SurveyQuestion.php.

254 : int
255 {
256 return $this->survey_id;
257 }

◆ getTitle()

SurveyQuestion::getTitle ( )

Definition at line 234 of file class.SurveyQuestion.php.

234 : string
235 {
236 return $this->title;
237 }

Referenced by SurveyMetricQuestion\isComplete(), SurveyMultipleChoiceQuestion\isComplete(), SurveySingleChoiceQuestion\isComplete(), and SurveyTextQuestion\isComplete().

+ Here is the caller graph for this function:

◆ getWorkingDataFromUserInput()

SurveyQuestion::getWorkingDataFromUserInput ( array  $post_data)

Creates the user data of the svy_answer table from the POST data.

Returns
array User data according to the svy_answer table

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 1227 of file class.SurveyQuestion.php.

1227 : array
1228 {
1229 // overwrite in inherited classes
1230 $data = array();
1231 return $data;
1232 }

References $data.

◆ hasCopies()

SurveyQuestion::hasCopies ( )

Definition at line 1404 of file class.SurveyQuestion.php.

1404 : bool
1405 {
1406 return (bool) count($this->getCopyIds());
1407 }
getCopyIds(bool $a_group_by_survey=false)

◆ importAdditionalMetadata()

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.

Reimplemented in SurveyMatrixQuestion, SurveyMultipleChoiceQuestion, and SurveySingleChoiceQuestion.

Definition at line 1239 of file class.SurveyQuestion.php.

1239 : void
1240 {
1241 // overwrite in inherited classes
1242 }

◆ importAdjectives()

SurveyQuestion::importAdjectives ( array  $a_data)

Import bipolar adjectives from the question import file.

Reimplemented in SurveyMatrixQuestion.

Definition at line 1255 of file class.SurveyQuestion.php.

1255 : void
1256 {
1257 // overwrite in inherited classes
1258 }

◆ importMatrix()

SurveyQuestion::importMatrix ( array  $a_data)

Import matrix rows from the question import file.

Reimplemented in SurveyMatrixQuestion.

Definition at line 1263 of file class.SurveyQuestion.php.

1263 : void
1264 {
1265 // overwrite in inherited classes
1266 }

◆ importResponses()

SurveyQuestion::importResponses ( array  $a_data)

Import response data from the question import file.

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 1247 of file class.SurveyQuestion.php.

1247 : void
1248 {
1249 // overwrite in inherited classes
1250 }

◆ isComplete()

SurveyQuestion::isComplete ( )

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 101 of file class.SurveyQuestion.php.

101 : bool
102 {
103 return false;
104 }

◆ isHTML()

SurveyQuestion::isHTML ( string  $a_text)
Todo:
move to manager

Definition at line 1128 of file class.SurveyQuestion.php.

1128 : bool
1129 {
1130 if (preg_match("/<[^>]*?>/", $a_text)) {
1131 return true;
1132 }
1133
1134 return false;
1135 }

◆ loadFromDb()

SurveyQuestion::loadFromDb ( int  $question_id)

load question data into object note: this base implementation only loads the material data

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 390 of file class.SurveyQuestion.php.

390 : void
391 {
392 $this->material = [];
393 }

◆ lookupObjFi()

static SurveyQuestion::lookupObjFi ( int  $a_qid)
static

Definition at line 1426 of file class.SurveyQuestion.php.

1428 : ?int {
1429 global $DIC;
1430
1431 $ilDB = $DIC->database();
1432
1433 $set = $ilDB->query(
1434 "SELECT obj_fi FROM svy_question " .
1435 " WHERE question_id = " . $ilDB->quote($a_qid, "integer")
1436 );
1437 if ($rec = $ilDB->fetchAssoc($set)) {
1438 return (int) $rec["obj_fi"];
1439 }
1440 return null;
1441 }

Referenced by ILIAS\components\ILIAS\Glossary\Table\TermUsagesTable\getDataRetrieval(), and ilSurveyQuestionTableGUI\importData().

+ Here is the caller graph for this function:

◆ prepareTextareaOutput()

SurveyQuestion::prepareTextareaOutput ( string  $txt_output,
bool  $prepare_for_latex_output = false 
)

Prepares string for a text area output in surveys.

Definition at line 1208 of file class.SurveyQuestion.php.

1211 : string {
1212 return ilLegacyFormElementsUtil::prepareTextareaOutput($txt_output, $prepare_for_latex_output);
1213 }
static prepareTextareaOutput(string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false)
Prepares a string for a text area output where latex code may be in it If the text is HTML-free,...

◆ QTIMaterialToString()

SurveyQuestion::QTIMaterialToString ( ilQTIMaterial  $a_material)

Reads an QTI material tag an creates a text string.

Definition at line 1140 of file class.SurveyQuestion.php.

1140 : string
1141 {
1142 $svy_log = ilLoggerFactory::getLogger("svy");
1143 $svy_log->debug("material count: " . $a_material->getMaterialCount());
1144
1145 $result = "";
1146 for ($i = 0; $i < $a_material->getMaterialCount(); $i++) {
1147 $material = $a_material->getMaterial($i);
1148 if (strcmp($material["type"], "mattext") === 0) {
1149 $result .= $material["material"]->getContent();
1150 }
1151 if (strcmp($material["type"], "matimage") === 0) {
1152 $matimage = $material["material"];
1153 if (preg_match("/(il_([0-9]+)_mob_([0-9]+))/", $matimage->getLabel(), $matches)) {
1154 // import an mediaobject which was inserted using tiny mce
1155 $this->import_manager->addMob(
1156 $matimage->getLabel(),
1157 $matimage->getUri()
1158 );
1159 }
1160 }
1161 }
1162 return $result;
1163 }
getMaterial(int $a_index)

References ilLoggerFactory\getLogger(), ilQTIMaterial\getMaterial(), and ilQTIMaterial\getMaterialCount().

+ Here is the call graph for this function:

◆ questionTitleExists()

SurveyQuestion::questionTitleExists ( string  $title,
int  $questionpool_object = 0 
)

Definition at line 106 of file class.SurveyQuestion.php.

109 : bool {
111
112 $refwhere = "";
113 if ($questionpool_object > 0) {
114 $refwhere = sprintf(
115 " AND obj_fi = %s",
116 $ilDB->quote($questionpool_object, 'integer')
117 );
118 }
119 $result = $ilDB->queryF(
120 "SELECT question_id FROM svy_question WHERE title = %s$refwhere",
121 array('text'),
122 array($title)
123 );
124 return $result->numRows() > 0;
125 }

References $ilDB.

◆ saveCategoryToDb()

SurveyQuestion::saveCategoryToDb ( string  $categorytext,
int  $neutral = 0 
)

Saves a category to the database.

Definition at line 583 of file class.SurveyQuestion.php.

586 : int {
587 $ilUser = $this->user;
589
590 $result = $ilDB->queryF(
591 "SELECT title, category_id FROM svy_category WHERE title = %s AND neutral = %s AND owner_fi = %s",
592 array('text','text','integer'),
593 array($categorytext, $neutral, $ilUser->getId())
594 );
595 $insert = false;
596 $returnvalue = "";
597 $insert = true;
598 if ($result->numRows()) {
599 while ($row = $ilDB->fetchAssoc($result)) {
600 if (strcmp($row["title"], $categorytext) === 0) {
601 $returnvalue = $row["category_id"];
602 $insert = false;
603 }
604 }
605 }
606 if ($insert) {
607 $next_id = $ilDB->nextId('svy_category');
608 $affectedRows = $ilDB->manipulateF(
609 "INSERT INTO svy_category (category_id, title, neutral, owner_fi, tstamp) VALUES (%s, %s, %s, %s, %s)",
610 array('integer','text','text','integer','integer'),
611 array($next_id, $categorytext, $neutral, $ilUser->getId(), time())
612 );
613
614 $this->log->debug("INSERT INTO svy_category id=" . $next_id);
615
616 $returnvalue = $next_id;
617 }
618 return $returnvalue;
619 }

References $ilDB.

Referenced by SurveyMultipleChoiceQuestion\saveCategoriesToDb(), and SurveySingleChoiceQuestion\saveCategoriesToDb().

+ Here is the caller graph for this function:

◆ saveCompletionStatus()

SurveyQuestion::saveCompletionStatus ( int  $original_id = 0)

Saves the complete flag to the database.

Definition at line 421 of file class.SurveyQuestion.php.

423 : void {
425
426 $question_id = $this->getId();
427 if ($original_id > 0) {
428 $question_id = $original_id;
429 }
430
431 if ($this->getId() > 0) {
432 $this->log->debug("UPDATE svy_question question_id=" . $question_id);
433
434 // update existing dataset
435 $affectedRows = $ilDB->manipulateF(
436 "UPDATE svy_question SET complete = %s, tstamp = %s WHERE question_id = %s",
437 array('text', 'integer', 'integer'),
438 array($this->isComplete(), time(), $question_id)
439 );
440 }
441 }

Referenced by SurveyMultipleChoiceQuestion\saveCategoriesToDb(), and SurveySingleChoiceQuestion\saveCategoriesToDb().

+ Here is the caller graph for this function:

◆ saveToDb()

SurveyQuestion::saveToDb ( int  $original_id = 0)

Saves a SurveyQuestion object to a database.

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 446 of file class.SurveyQuestion.php.

446 : int
447 {
449
450 // cleanup RTE images which are not inserted into the question text
451 ilRTE::_cleanupMediaObjectUsage($this->getQuestiontext(), "spl:html", $this->getId());
452 $affectedRows = 0;
453 if ($this->getId() === -1) {
454 // Write new dataset
455 $next_id = $ilDB->nextId('svy_question');
456 $affectedRows = $ilDB->insert("svy_question", array(
457 "question_id" => array("integer", $next_id),
458 "questiontype_fi" => array("integer", $this->getQuestionTypeID()),
459 "obj_fi" => array("integer", $this->getObjId()),
460 "owner_fi" => array("integer", $this->getOwner()),
461 "title" => array("text", $this->getTitle()),
462 "label" => array("text", (strlen($this->label ?? "")) ? $this->label : null),
463 "description" => array("text", $this->getDescription()),
464 "author" => array("text", $this->getAuthor()),
465 "questiontext" => array("clob", ilRTE::_replaceMediaObjectImageSrc($this->getQuestiontext(), 0)),
466 "obligatory" => array("text", $this->getObligatory()),
467 "complete" => array("text", $this->isComplete()),
468 "created" => array("integer", time()),
469 "original_id" => array("integer", ($original_id) ?: null),
470 "tstamp" => array("integer", time())
471 ));
472
473 //$this->log->debug("INSERT: svy_question id=".$next_id." questiontype_fi=".$this->getQuestionTypeID()." obj_fi".$this->getObjId()." title=".$this->getTitle()." ...");
474
475 $this->setId($next_id);
476 } else {
477 // update existing dataset
478 $affectedRows = $ilDB->update("svy_question", array(
479 "title" => array("text", $this->getTitle()),
480 "label" => array("text", (strlen($this->label ?? "")) ? $this->label : null),
481 "description" => array("text", $this->getDescription()),
482 "author" => array("text", $this->getAuthor()),
483 "questiontext" => array("clob", ilRTE::_replaceMediaObjectImageSrc($this->getQuestiontext(), 0)),
484 "obligatory" => array("text", $this->getObligatory()),
485 "complete" => array("text", $this->isComplete()),
486 "tstamp" => array("integer", time())
487 ), array(
488 "question_id" => array("integer", $this->getId())
489 ));
490
491 $this->log->debug("UPDATE svy_question id=" . $this->getId() . " SET: title=" . $this->getTitle() . " ...");
492 }
493 return $affectedRows;
494 }
static _cleanupMediaObjectUsage(string $a_text, string $a_usage_type, int $a_usage_id)
Synchronises appearances of media objects in $a_text with media object usage table.

References $ilDB, ilRTE\_cleanupMediaObjectUsage(), ilRTE\_replaceMediaObjectImageSrc(), ILIAS\Survey\Mode\getId(), and ILIAS\GlobalScreen\Scope\Footer\Factory\getTitle().

+ Here is the call graph for this function:

◆ setAuthor()

SurveyQuestion::setAuthor ( string  $author = "")

Definition at line 216 of file class.SurveyQuestion.php.

216 : void
217 {
218 $this->author = $author ?: $this->user->getFullname();
219 }

References ILIAS\Repository\user().

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ setComplete()

SurveyQuestion::setComplete ( bool  $a_complete)

Definition at line 96 of file class.SurveyQuestion.php.

96 : void
97 {
98 $this->complete = $a_complete;
99 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setDescription()

SurveyQuestion::setDescription ( string  $description = "")

Definition at line 152 of file class.SurveyQuestion.php.

152 : void
153 {
154 $this->description = $description;
155 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setId()

SurveyQuestion::setId ( int  $id = -1)

Definition at line 142 of file class.SurveyQuestion.php.

142 : void
143 {
144 $this->id = $id;
145 }

References $id.

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setMaterialsfile()

SurveyQuestion::setMaterialsfile ( string  $materials_filename,
string  $materials_tempfilename = "",
string  $materials_name = "" 
)

Uploads and adds a material.

Definition at line 172 of file class.SurveyQuestion.php.

176 : void {
177 if (!empty($materials_filename)) {
178 $materialspath = $this->getMaterialsPath();
179 if (!file_exists($materialspath)) {
180 ilFileUtils::makeDirParents($materialspath);
181 }
183 $materials_tempfilename,
184 $materials_filename,
185 $materialspath . $materials_filename
186 )) {
187 print "image not uploaded!!!! ";
188 } else {
189 $this->addMaterials($materials_filename, $materials_name);
190 }
191 }
192 }
addMaterials(string $materials_file, string $materials_name="")
static makeDirParents(string $a_dir)
Create a new directory and all parent directories.
static moveUploadedFile(string $a_file, string $a_name, string $a_target, bool $a_raise_errors=true, string $a_mode="move_uploaded")
move uploaded file

References ilFileUtils\makeDirParents(), and ilFileUtils\moveUploadedFile().

+ Here is the call graph for this function:

◆ setObjId()

SurveyQuestion::setObjId ( int  $obj_id = 0)

Set the reference(?) id of the container object.

Definition at line 308 of file class.SurveyQuestion.php.

308 : void
309 {
310 $this->obj_id = $obj_id;
311 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setObligatory()

SurveyQuestion::setObligatory ( bool  $obligatory = true)

Definition at line 132 of file class.SurveyQuestion.php.

132 : void
133 {
134 $this->obligatory = $obligatory;
135 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setOrientation()

SurveyQuestion::setOrientation ( int  $orientation = 0)

Definition at line 137 of file class.SurveyQuestion.php.

137 : void
138 {
139 $this->orientation = $orientation;
140 }

Referenced by SurveyMultipleChoiceQuestion\loadFromDb(), and SurveySingleChoiceQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setOriginalId()

SurveyQuestion::setOriginalId ( ?int  $original_id)

Definition at line 1318 of file class.SurveyQuestion.php.

1318 : void
1319 {
1320 $this->original_id = $original_id;
1321 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setOwner()

SurveyQuestion::setOwner ( int  $owner = 0)
Parameters
int$owneruser id of owner

Definition at line 229 of file class.SurveyQuestion.php.

229 : void
230 {
231 $this->owner = $owner;
232 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setQuestiontext()

SurveyQuestion::setQuestiontext ( string  $questiontext = "")

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

221 : void
222 {
223 $this->questiontext = $questiontext;
224 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ setSubtype()

SurveyQuestion::setSubtype ( int  $a_subtype)

Reimplemented in SurveyMatrixQuestion, and SurveyMetricQuestion.

Definition at line 1333 of file class.SurveyQuestion.php.

1333 : void
1334 {
1335 // do nothing
1336 }

◆ setSurveyId()

SurveyQuestion::setSurveyId ( int  $id = -1)

Definition at line 147 of file class.SurveyQuestion.php.

147 : void
148 {
149 $this->survey_id = $id;
150 }

References $id.

◆ setTitle()

SurveyQuestion::setTitle ( string  $title = "")

Definition at line 127 of file class.SurveyQuestion.php.

127 : void
128 {
129 $this->title = $title;
130 }

Referenced by SurveyMetricQuestion\loadFromDb(), SurveyMultipleChoiceQuestion\loadFromDb(), SurveySingleChoiceQuestion\loadFromDb(), and SurveyTextQuestion\loadFromDb().

+ Here is the caller graph for this function:

◆ stripSlashesAddSpaceFallback()

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 1447 of file class.SurveyQuestion.php.

1447 : string
1448 {
1449 $str = ilUtil::stripSlashes($a_str);
1450 if ($str !== $a_str) {
1451 $str = ilUtil::stripSlashes(str_replace("<", "< ", $a_str));
1452 }
1453 return $str;
1454 }
static stripSlashes(string $a_str, bool $a_strip_html=true, string $a_allow="")

References ilUtil\stripSlashes().

+ Here is the call graph for this function:

◆ syncWithOriginal()

SurveyQuestion::syncWithOriginal ( )

Reimplemented in SurveyMatrixQuestion.

Definition at line 823 of file class.SurveyQuestion.php.

823 : void
824 {
826
827 if ($this->getOriginalId()) {
828 $id = $this->getId();
829 $original = $this->getOriginalId();
830
831 $this->setId($this->getOriginalId());
832 $this->setOriginalId(null);
833 $this->saveToDb();
834
835 $this->setId($id);
836 $this->setOriginalId($original);
837
838 $this->log->debug("DELETE FROM svy_material WHERE question_fi = " . $this->getOriginalId());
839
840 $affectedRows = $ilDB->manipulateF(
841 "DELETE FROM svy_material WHERE question_fi = %s",
842 array('integer'),
843 array($this->getOriginalId())
844 );
845 ilInternalLink::_deleteAllLinksOfSource("sqst", $this->original_id);
846 if (strlen($this->material["internal_link"] ?? "")) {
847 $next_id = $ilDB->nextId('svy_material');
848 $affectedRows = $ilDB->manipulateF(
849 "INSERT INTO svy_material (material_id, question_fi, internal_link, import_id, material_title, tstamp) VALUES (%s, %s, %s, %s, %s, %s)",
850 array('integer', 'integer', 'text', 'text', 'text', 'integer'),
851 array($next_id, $this->getOriginalId(), $this->material["internal_link"], $this->material["import_id"], $this->material["title"], time())
852 );
853
854 $this->log->debug("INSERT svy_material material_id=" . $next_id . " question_fi=" . $this->getOriginalId());
855
856 if (preg_match("/il_(\d*?)_(\w+)_(\d+)/", $this->material["internal_link"], $matches)) {
857 ilInternalLink::_saveLink("sqst", $this->getOriginalId(), $matches[2], $matches[3], $matches[1]);
858 }
859 }
860 }
861 }
saveToDb(int $original_id=0)
Saves a SurveyQuestion object to a database.
setOriginalId(?int $original_id)

References $id, $ilDB, ilInternalLink\_deleteAllLinksOfSource(), ilInternalLink\_saveLink(), and ILIAS\Survey\Mode\getId().

+ Here is the call graph for this function:

◆ usableForPrecondition()

SurveyQuestion::usableForPrecondition ( )

Returns if the question is usable for preconditions.

Reimplemented in SurveyMatrixQuestion, SurveyMetricQuestion, SurveyMultipleChoiceQuestion, SurveySingleChoiceQuestion, and SurveyTextQuestion.

Definition at line 1271 of file class.SurveyQuestion.php.

1271 : bool
1272 {
1273 // overwrite in inherited classes
1274 return false;
1275 }

Field Documentation

◆ $arrData

array SurveyQuestion::$arrData
private

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

◆ $author

◆ $complete

bool SurveyQuestion::$complete

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

◆ $cumulated

array SurveyQuestion::$cumulated
protected

Definition at line 45 of file class.SurveyQuestion.php.

◆ $db

◆ $description

◆ $edit_manager

ILIAS SurveyQuestionPool Editing EditSessionRepository SurveyQuestion::$edit_manager
protected

Definition at line 28 of file class.SurveyQuestion.php.

◆ $id

◆ $import_manager

ILIAS SurveyQuestionPool Export ImportSessionRepository SurveyQuestion::$import_manager
protected

Definition at line 49 of file class.SurveyQuestion.php.

◆ $lng

ilLanguage SurveyQuestion::$lng

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

Referenced by __construct().

◆ $log

ilLogger SurveyQuestion::$log
protected

Definition at line 47 of file class.SurveyQuestion.php.

◆ $material

array SurveyQuestion::$material

Definition at line 43 of file class.SurveyQuestion.php.

◆ $materials

array SurveyQuestion::$materials

Definition at line 36 of file class.SurveyQuestion.php.

◆ $obj_id

int SurveyQuestion::$obj_id

Definition at line 38 of file class.SurveyQuestion.php.

◆ $obligatory

bool SurveyQuestion::$obligatory

Definition at line 40 of file class.SurveyQuestion.php.

◆ $orientation

int SurveyQuestion::$orientation

◆ $original_id

◆ $owner

◆ $questiontext

◆ $survey_id

int SurveyQuestion::$survey_id

Definition at line 37 of file class.SurveyQuestion.php.

◆ $title

◆ $user

ilObjUser SurveyQuestion::$user
protected

Definition at line 29 of file class.SurveyQuestion.php.


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