ILIAS  trunk Revision v13.0_alpha-62-g3b72d83f2e5
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, mixed $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 27 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 53 of file class.SurveyQuestion.php.

59 {
60 global $DIC;
61
62 $this->user = $DIC->user();
63 $this->db = $DIC->database();
64 $lng = $DIC->language();
65 $ilUser = $DIC->user();
66
67 $this->lng = $lng;
68 $this->complete = false;
69 $this->title = $title;
70 $this->description = $description;
71 $this->questiontext = $questiontext;
72 $this->author = $author ?: $ilUser->getFullname();
73 $this->cumulated = array();
74 $this->owner = $owner;
75 if ($this->owner === -1) {
76 $this->owner = $ilUser->getId();
77 }
78 $this->id = -1;
79 $this->survey_id = -1;
80 $this->obligatory = true;
81 $this->orientation = 0;
82 $this->materials = array();
83 $this->material = array();
84 $this->arrData = array();
85
86 $this->log = ilLoggerFactory::getLogger('svy');
87 $this->import_manager = $DIC->surveyQuestionPool()
88 ->internal()
89 ->repo()
90 ->import();
91
92 $this->edit_manager = $DIC->surveyQuestionPool()
93 ->internal()
94 ->repo()
95 ->editing();
96 }
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(), ILIAS\UI\examples\Symbol\Glyph\Owner\owner(), and ILIAS\Repository\user().

+ Here is the call graph for this function:

Member Function Documentation

◆ __get()

SurveyQuestion::__get ( string  $value)

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

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

◆ __set()

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

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

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

◆ _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 1370 of file class.SurveyQuestion.php.

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

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

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

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

References $ilDB.

◆ _getQuestionType()

static SurveyQuestion::_getQuestionType ( int  $question_id)
static

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

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

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

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

1071 : string {
1072 global $DIC;
1073 $lng = $DIC->language();
1074 return $lng->txt($type_tag);
1075 }
txt(string|LanguageIdentifier $a_topic, ?int $n=null)
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 781 of file class.SurveyQuestion.php.

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

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

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

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

1082 {
1083 $question_type = self::_getQuestionType($question_id);
1084 if ($question_type) {
1085 self::_includeClass($question_type);
1086 $question = new $question_type();
1087 $question->loadFromDb($question_id);
1088 return $question;
1089 }
1090 return null;
1091 }
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 1109 of file class.SurveyQuestion.php.

1113 $question = self::_instanciateQuestion($question_id);
1114 if (is_null($a_finished_ids)) {
1115 $a_finished_ids = [];
1116 }
1117 if ($question) {
1118 $question_type = self::_getQuestionType($question_id);
1119 self::_includeClass($question_type, 2);
1120 $class = $question_type . "Evaluation";
1121 $ev = new $class($question, $a_finished_ids);
1122 return $ev;
1123 }
1124 return null;
1125 }
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 1096 of file class.SurveyQuestion.php.

1099 $question_type = self::_getQuestionType($question_id);
1100 if ($question_type) {
1101 self::_includeClass($question_type, 1);
1102 $guitype = $question_type . "GUI";
1103 $question = new $guitype($question_id);
1104 return $question;
1105 }
1106 return null;
1107 }
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 400 of file class.SurveyQuestion.php.

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

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

1001 : bool {
1002 global $DIC;
1003
1004 $ilDB = $DIC->database();
1005
1006 if (($question_id < 1) || ($user_id < 1)) {
1007 return false;
1008 }
1009
1010 $result = $ilDB->queryF(
1011 "SELECT obj_fi FROM svy_question WHERE question_id = %s",
1012 array('integer'),
1013 array($question_id)
1014 );
1015 if ($result->numRows() === 1) {
1016 $row = $ilDB->fetchAssoc($result);
1017 $qpl_object_id = (int) $row["obj_fi"];
1018 return ilObjSurveyQuestionPool::_isWriteable($qpl_object_id);
1019 }
1020
1021 return false;
1022 }
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 1411 of file class.SurveyQuestion.php.

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

◆ _questionExists()

static SurveyQuestion::_questionExists ( int  $question_id)
static

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

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

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

886 : string {
887 $resolved_link = "";
888 if (preg_match("/il_(\d+)_(\w+)_(\d+)/", $internal_link, $matches)) {
889 switch ($matches[2]) {
890 case "lm":
891 $resolved_link = (string) ilLMObject::_getIdForImportId($internal_link);
892 break;
893 case "pg":
894 $resolved_link = (string) ilInternalLink::_getIdForImportId("PageObject", $internal_link);
895 break;
896 case "st":
897 $resolved_link = (string) ilInternalLink::_getIdForImportId("StructureObject", $internal_link);
898 break;
899 case "git":
900 $resolved_link = (string) ilInternalLink::_getIdForImportId("GlossaryItem", $internal_link);
901 break;
902 case "mob":
903 $resolved_link = (string) ilInternalLink::_getIdForImportId("MediaObject", $internal_link);
904 break;
905 }
906 if (strcmp($resolved_link, "") === 0) {
907 $resolved_link = $internal_link;
908 }
909 } else {
910 $resolved_link = $internal_link;
911 }
912 return $resolved_link;
913 }
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 915 of file class.SurveyQuestion.php.

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

References $ilDB.

◆ addMaterials()

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

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

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

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

1176 : void {
1177 $a_xml_writer->xmlStartTag("material");
1178 $attrs = array(
1179 "type" => "text/plain"
1180 );
1181 if ($this->isHTML($a_material)) {
1182 $attrs["type"] = "text/xhtml";
1183 }
1184 if (is_array($a_attrs)) {
1185 $attrs = array_merge($attrs, $a_attrs);
1186 }
1187 $a_xml_writer->xmlElement("mattext", $attrs, ilRTE::_replaceMediaObjectImageSrc($a_material, 0));
1188
1189 if ($add_mobs) {
1190 $mobs = ilObjMediaObject::_getMobsOfObject("spl:html", $this->getId());
1191 foreach ($mobs as $mob) {
1192 $mob_obj = new ilObjMediaObject($mob);
1193 $imgattrs = array(
1194 "label" => "il_" . IL_INST_ID . "_mob_" . $mob,
1195 "uri" => "objects/" . "il_" . IL_INST_ID . "_mob_" . $mob . "/" . $mob_obj->getTitle(),
1196 "type" => "spl:html",
1197 "id" => $this->getId()
1198 );
1199 $a_xml_writer->xmlElement("matimage", $imgattrs, null);
1200 }
1201 }
1202 if ($close_material_tag) {
1203 $a_xml_writer->xmlEndTag("material");
1204 }
1205 }
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 352 of file class.SurveyQuestion.php.

355 : ?int {
356 if ($this->getId() <= 0) {
357 // The question has not been saved. It cannot be copied
358 return null;
359 }
360 $clone = $this;
361 $original_id = self::_getOriginalId($this->getId(), false);
362 $clone->setId(-1);
363 $source_questionpool = $this->getObjId();
364 $clone->setObjId($target_questionpool);
365 if ($title) {
366 $clone->setTitle($title);
367 }
368
369 $clone->saveToDb();
370
371 // copy XHTML media objects
372 $clone->copyXHTMLMediaObjectsOfQuestion($original_id);
373 return $clone->getId();
374 }
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 379 of file class.SurveyQuestion.php.

381 : void {
382 $mobs = ilObjMediaObject::_getMobsOfObject("spl:html", $a_q_id);
383 foreach ($mobs as $mob) {
384 ilObjMediaObject::_saveUsage($mob, "spl:html", $this->getId());
385 }
386 }
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 503 of file class.SurveyQuestion.php.

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

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

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

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

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

References $ilDB.

◆ deleteMaterial()

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

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

198 : void {
199 foreach ($this->materials as $key => $value) {
200 if (strcmp((string) $key, $materials_name) === 0) {
201 if (file_exists($this->getMaterialsPath() . $value)) {
202 unlink($this->getMaterialsPath() . $value);
203 }
204 unset($this->materials[$key]);
205 }
206 }
207 }
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 315 of file class.SurveyQuestion.php.

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

◆ flushMaterials()

SurveyQuestion::flushMaterials ( )

Deletes all materials uris.

Todo:
check if unlink is necessary

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

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

◆ getAuthor()

SurveyQuestion::getAuthor ( )

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

284 : string
285 {
286 return $this->author;
287 }

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

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

◆ getCopyIds()

SurveyQuestion::getCopyIds ( bool  $a_group_by_survey = false)

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

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

◆ getDescription()

SurveyQuestion::getDescription ( )

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

279 : string
280 {
281 return $this->description;
282 }

◆ getId()

◆ getImagePath()

SurveyQuestion::getImagePath ( )

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

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

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

References CLIENT_WEB_DIR.

◆ getImagePathWeb()

SurveyQuestion::getImagePathWeb ( )

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

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

559 : string
560 {
561 $webdir = ilFileUtils::removeTrailingPathSeparators(CLIENT_WEB_DIR) . "/survey/$this->obj_id/$this->id/images/";
562 return str_replace(
565 $webdir
566 );
567 }

References CLIENT_WEB_DIR, and ilFileUtils\removeTrailingPathSeparators().

+ Here is the call graph for this function:

◆ getLabel()

SurveyQuestion::getLabel ( )

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

241 : string
242 {
243 return (string) $this->label;
244 }

◆ getMaterial()

SurveyQuestion::getMaterial ( )

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

1330 : array
1331 {
1332 return $this->material;
1333 }

◆ getMaterialsPath()

SurveyQuestion::getMaterialsPath ( )

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

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

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

References CLIENT_WEB_DIR.

◆ getMaterialsPathWeb()

SurveyQuestion::getMaterialsPathWeb ( )

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

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

572 : string
573 {
574 $webdir = ilFileUtils::removeTrailingPathSeparators(CLIENT_WEB_DIR) . "/survey/$this->obj_id/$this->id/materials/";
575 return str_replace(
578 $webdir
579 );
580 }

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

1461 : int
1462 {
1463 return 0;
1464 }

◆ getObjId()

SurveyQuestion::getObjId ( )

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

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

302 : int
303 {
304 return $this->obj_id;
305 }

◆ getObligatory()

SurveyQuestion::getObligatory ( )

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

251 : bool
252 {
253 return $this->obligatory;
254 }

◆ getOrientation()

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

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

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

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

+ Here is the caller graph for this function:

◆ getOriginalId()

SurveyQuestion::getOriginalId ( )

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

1325 : ?int
1326 {
1327 return $this->original_id;
1328 }

◆ getOwner()

SurveyQuestion::getOwner ( )

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

289 : int
290 {
291 return $this->owner;
292 }

◆ getPreconditionOptions()

SurveyQuestion::getPreconditionOptions ( )

Returns the options for preconditions.

Reimplemented in SurveyMultipleChoiceQuestion, and SurveySingleChoiceQuestion.

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

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

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

1316 // overwrite in inherited classes
1317 return null;
1318 }
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 1302 of file class.SurveyQuestion.php.

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

◆ getQuestionDataArray()

SurveyQuestion::getQuestionDataArray ( int  $id)

Returns the question data.

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

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

1220 : array
1221 {
1222 return array();
1223 }

◆ getQuestiontext()

SurveyQuestion::getQuestiontext ( )

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

294 : string
295 {
296 return $this->questiontext;
297 }

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

1040 : string
1041 {
1042 return "";
1043 }

◆ getQuestionTypeID()

SurveyQuestion::getQuestionTypeID ( )

Reimplemented in SurveyMetricQuestion.

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

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

References $ilDB.

◆ getSubtype()

SurveyQuestion::getSubtype ( )

Reimplemented in SurveyMatrixQuestion, and SurveyMetricQuestion.

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

1340 : ?int
1341 {
1342 // do nothing
1343 return null;
1344 }

◆ getSurveyId()

SurveyQuestion::getSurveyId ( )

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

256 : int
257 {
258 return $this->survey_id;
259 }

◆ getTitle()

SurveyQuestion::getTitle ( )

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

236 : string
237 {
238 return $this->title;
239 }

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

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

References $data.

◆ hasCopies()

SurveyQuestion::hasCopies ( )

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

1406 : bool
1407 {
1408 return (bool) count($this->getCopyIds());
1409 }
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 1241 of file class.SurveyQuestion.php.

1241 : void
1242 {
1243 // overwrite in inherited classes
1244 }

◆ importAdjectives()

SurveyQuestion::importAdjectives ( array  $a_data)

Import bipolar adjectives from the question import file.

Reimplemented in SurveyMatrixQuestion.

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

1257 : void
1258 {
1259 // overwrite in inherited classes
1260 }

◆ importMatrix()

SurveyQuestion::importMatrix ( array  $a_data)

Import matrix rows from the question import file.

Reimplemented in SurveyMatrixQuestion.

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

1265 : void
1266 {
1267 // overwrite in inherited classes
1268 }

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

1249 : void
1250 {
1251 // overwrite in inherited classes
1252 }

◆ isComplete()

SurveyQuestion::isComplete ( )

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

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

103 : bool
104 {
105 return false;
106 }

◆ isHTML()

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

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

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

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

392 : void
393 {
394 $this->material = [];
395 }

◆ lookupObjFi()

static SurveyQuestion::lookupObjFi ( int  $a_qid)
static

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

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

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

1213 : string {
1214 return ilLegacyFormElementsUtil::prepareTextareaOutput($txt_output, $prepare_for_latex_output);
1215 }
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 1142 of file class.SurveyQuestion.php.

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

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

References $ilDB.

◆ saveCategoryToDb()

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

Saves a category to the database.

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

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

References $ilDB, and ILIAS\Repository\int().

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

+ Here is the call graph for this function:
+ 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 423 of file class.SurveyQuestion.php.

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

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

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

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

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

98 : void
99 {
100 $this->complete = $a_complete;
101 }

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

154 : void
155 {
156 $this->description = $description;
157 }

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

144 : void
145 {
146 $this->id = $id;
147 }

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

178 : void {
179 if (!empty($materials_filename)) {
180 $materialspath = $this->getMaterialsPath();
181 if (!file_exists($materialspath)) {
182 ilFileUtils::makeDirParents($materialspath);
183 }
185 $materials_tempfilename,
186 $materials_filename,
187 $materialspath . $materials_filename
188 )) {
189 print "image not uploaded!!!! ";
190 } else {
191 $this->addMaterials($materials_filename, $materials_name);
192 }
193 }
194 }
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 310 of file class.SurveyQuestion.php.

310 : void
311 {
312 $this->obj_id = $obj_id;
313 }

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

134 : void
135 {
136 $this->obligatory = $obligatory;
137 }

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

139 : void
140 {
141 $this->orientation = $orientation;
142 }

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

+ Here is the caller graph for this function:

◆ setOriginalId()

SurveyQuestion::setOriginalId ( ?int  $original_id)

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

1320 : void
1321 {
1322 $this->original_id = $original_id;
1323 }

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

231 : void
232 {
233 $this->owner = $owner;
234 }

References ILIAS\UI\examples\Symbol\Glyph\Owner\owner().

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:

◆ setQuestiontext()

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

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

223 : void
224 {
225 $this->questiontext = $questiontext;
226 }

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

1335 : void
1336 {
1337 // do nothing
1338 }

◆ setSurveyId()

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

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

149 : void
150 {
151 $this->survey_id = $id;
152 }

References $id.

◆ setTitle()

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

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

129 : void
130 {
131 $this->title = $title;
132 }

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

1449 : string
1450 {
1451 $str = ilUtil::stripSlashes($a_str);
1452 if ($str !== $a_str) {
1453 $str = ilUtil::stripSlashes(str_replace("<", "< ", $a_str));
1454 }
1455 return $str;
1456 }
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 825 of file class.SurveyQuestion.php.

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

1273 : bool
1274 {
1275 // overwrite in inherited classes
1276 return false;
1277 }

Field Documentation

◆ $arrData

array SurveyQuestion::$arrData
private

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

◆ $author

◆ $complete

bool SurveyQuestion::$complete

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

◆ $cumulated

array SurveyQuestion::$cumulated
protected

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

◆ $db

◆ $description

◆ $edit_manager

ILIAS SurveyQuestionPool Editing EditSessionRepository SurveyQuestion::$edit_manager
protected

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

◆ $id

◆ $import_manager

ILIAS SurveyQuestionPool Export ImportSessionRepository SurveyQuestion::$import_manager
protected

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

◆ $lng

ilLanguage SurveyQuestion::$lng

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

Referenced by __construct().

◆ $log

ilLogger SurveyQuestion::$log
protected

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

◆ $material

array SurveyQuestion::$material

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

◆ $materials

array SurveyQuestion::$materials

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

◆ $obj_id

int SurveyQuestion::$obj_id

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

◆ $obligatory

bool SurveyQuestion::$obligatory

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

◆ $orientation

int SurveyQuestion::$orientation

◆ $original_id

◆ $owner

◆ $questiontext

◆ $survey_id

int SurveyQuestion::$survey_id

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

◆ $title

◆ $user

ilObjUser SurveyQuestion::$user
protected

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


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