|
ILIAS
release_8 Revision v8.24
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Inheritance diagram for SurveySingleChoiceQuestion:
Collaboration diagram for SurveySingleChoiceQuestion:Public Member Functions | |
| __construct (string $title="", string $description="", string $author="", string $questiontext="", int $owner=-1, int $orientation=1) | |
| getCategoriesForPhrase (int $phrase_id) | |
| Gets the available categories for a given phrase. More... | |
| addPhrase (int $phrase_id) | |
| Adds a phrase to the question. More... | |
| getQuestionDataArray (int $id) | |
| Returns the question data. More... | |
| loadFromDb (int $question_id) | |
| load question data into object note: this base implementation only loads the material data More... | |
| isComplete () | |
| saveToDb (int $original_id=0) | |
| Saves a SurveyQuestion object to a database. More... | |
| saveCategoriesToDb () | |
| toXML (bool $a_include_header=true, bool $obligatory_state=false) | |
| insertXML (ilXmlWriter $a_xml_writer, bool $a_include_header=true) | |
| importAdditionalMetadata (array $a_meta) | |
| Import additional meta data from the question import file. More... | |
| addStandardNumbers (int $lower_limit, int $upper_limit) | |
| Adds standard numbers as categories. More... | |
| savePhrase (string $title) | |
| Saves a set of categories to a default phrase note: data comes from session. More... | |
| getQuestionType () | |
| getAdditionalTableName () | |
| getWorkingDataFromUserInput (array $post_data) | |
| Creates the user data of the svy_answer table from the POST data. More... | |
| checkUserInput (array $post_data, int $survey_id) | |
| Checks the input of the active user for obligatory status and entered values. More... | |
| saveUserInput (array $post_data, int $active_id, bool $a_return=false) | |
| importResponses (array $a_data) | |
| Import response data 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... | |
| getPreconditionSelectValue (string $default, string $title, string $variable) | |
| Creates a form property for the precondition value. More... | |
| getPreconditionValueOutput (string $value) | |
| Returns the output for a precondition value. More... | |
| getCategories () | |
Public Member Functions inherited from SurveyQuestion | |
| __construct (string $title="", string $description="", string $author="", string $questiontext="", int $owner=-1) | |
| setComplete (bool $a_complete) | |
| isComplete () | |
| questionTitleExists (string $title, int $questionpool_object=0) | |
| setTitle (string $title="") | |
| setObligatory (bool $obligatory=true) | |
| setOrientation (int $orientation=0) | |
| setId (int $id=-1) | |
| setSurveyId (int $id=-1) | |
| setDescription (string $description="") | |
| addMaterials (string $materials_file, string $materials_name="") | |
| setMaterialsfile (string $materials_filename, string $materials_tempfilename="", string $materials_name="") | |
| Uploads and adds a material. More... | |
| deleteMaterial (string $materials_name="") | |
| flushMaterials () | |
| Deletes all materials uris. More... | |
| setAuthor (string $author="") | |
| setQuestiontext (string $questiontext="") | |
| setOwner (int $owner=0) | |
| getTitle () | |
| getLabel () | |
| getId () | |
| getObligatory () | |
| getSurveyId () | |
| getOrientation () | |
| getDescription () | |
| getAuthor () | |
| getOwner () | |
| getQuestiontext () | |
| getObjId () | |
| Get the reference(?) id of the container object. More... | |
| setObjId (int $obj_id=0) | |
| Set the reference(?) id of the container object. More... | |
| duplicate (bool $for_survey=true, string $title="", string $author="", int $owner=0, int $a_survey_id=0) | |
| copyObject (int $target_questionpool, string $title="") | |
| copyXHTMLMediaObjectsOfQuestion (int $a_q_id) | |
| Copy media object usages from other question. More... | |
| loadFromDb (int $question_id) | |
| load question data into object note: this base implementation only loads the material data More... | |
| saveCompletionStatus (int $original_id=0) | |
| Saves the complete flag to the database. More... | |
| saveToDb (int $original_id=0) | |
| Saves a SurveyQuestion object to a database. More... | |
| saveMaterial () | |
| createNewQuestion () | |
| Creates a new question with a 0 timestamp when a new question is created This assures that an ID is given to the question if a file upload or something else occurs. More... | |
| getImagePath () | |
| Returns the image path for web accessible images of a question. More... | |
| getMaterialsPath () | |
| Returns the materials path for web accessible materials of a question. More... | |
| getImagePathWeb () | |
| Returns the web image path for web accessible images of a question. More... | |
| getMaterialsPathWeb () | |
| Returns the web image path for web accessable images of a question. More... | |
| saveCategoryToDb (string $categorytext, int $neutral=0) | |
| Saves a category to the database. More... | |
| deleteAdditionalTableData (int $question_id) | |
| Deletes datasets from the additional question table in the database. More... | |
| delete (int $question_id) | |
| Deletes a question and all materials from the database. More... | |
| syncWithOriginal () | |
| getPhrase (int $phrase_id) | |
| Returns a phrase title for phrase id. More... | |
| phraseExists (string $title) | |
| Returns true if the phrase title already exists for the current user(!) More... | |
| deleteMaterials (array $a_array) | |
| duplicateMaterials (int $question_id) | |
| Duplicates the materials of a question. More... | |
| addMaterial (ilSurveyMaterial $obj_material) | |
| getQuestionTypeID () | |
| getQuestionType () | |
| isHTML (string $a_text) | |
| QTIMaterialToString (ilQTIMaterial $a_material) | |
| Reads an QTI material tag an creates a text string. More... | |
| addMaterialTag (ilXmlWriter $a_xml_writer, string $a_material, bool $close_material_tag=true, bool $add_mobs=true, ?array $a_attrs=null) | |
| Creates an XML material tag from a plain text or xhtml text. More... | |
| prepareTextareaOutput (string $txt_output, bool $prepare_for_latex_output=false) | |
| Prepares string for a text area output in surveys. More... | |
| getQuestionDataArray (int $id) | |
| Returns the question data. More... | |
| getWorkingDataFromUserInput (array $post_data) | |
| Creates the user data of the svy_answer table from the POST data. More... | |
| importAdditionalMetadata (array $a_meta) | |
| Import additional meta data from the question import file. More... | |
| importResponses (array $a_data) | |
| Import response data from the question import file. More... | |
| importAdjectives (array $a_data) | |
| Import bipolar adjectives from the question import file. More... | |
| importMatrix (array $a_data) | |
| Import matrix rows from the question import file. More... | |
| usableForPrecondition () | |
| Returns if the question is usable for preconditions. More... | |
| getAvailableRelations () | |
| Returns the available relations for the question. More... | |
| getPreconditionOptions () | |
| Returns the options for preconditions. More... | |
| getPreconditionValueOutput (string $value) | |
| Returns the output for a precondition value. More... | |
| getPreconditionSelectValue (string $default, string $title, string $variable) | |
| Creates a form property for the precondition value. More... | |
| setOriginalId (?int $original_id) | |
| getOriginalId () | |
| getMaterial () | |
| setSubtype (int $a_subtype) | |
| getSubtype () | |
| __get (string $value) | |
| __set (string $key, string $value) | |
| getCopyIds (bool $a_group_by_survey=false) | |
| hasCopies () | |
| stripSlashesAddSpaceFallback (string $a_str) | |
| Strip slashes with add space fallback, see https://mantis.ilias.de/view.php?id=19727 and https://mantis.ilias.de/view.php?id=24200. More... | |
Static Public Member Functions | |
| static | getMaxSumScore (int $survey_id) |
| Get max sum score for specific survey (and this question type) More... | |
| static | getCompressCompareString (SurveySingleChoiceQuestion $q) |
Static Public Member Functions inherited from SurveyQuestion | |
| 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 | |
| SurveyCategories | $categories |
Data Fields inherited from SurveyQuestion | |
| 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 Member Functions | |
| isSumScoreValid (int $nr_answer_records) | |
Additional Inherited Members | |
Protected Attributes inherited from SurveyQuestion | |
| int | $original_id |
| ILIAS SurveyQuestionPool Editing EditSessionRepository | $edit_manager |
| ilObjUser | $user |
| ilDBInterface | $db |
| array | $cumulated |
| ilLogger | $log |
| ILIAS SurveyQuestionPool Export ImportSessionRepository | $import_manager |
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 SingleChoice survey question
The SurveySingleChoiceQuestion class defines and encapsulates basic methods and attributes for single choice survey question types.
Definition at line 27 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::__construct | ( | string | $title = "", |
| string | $description = "", |
||
| string | $author = "", |
||
| string | $questiontext = "", |
||
| int | $owner = -1, |
||
| int | $orientation = 1 |
||
| ) |
Definition at line 31 of file class.SurveySingleChoiceQuestion.php.
References SurveyQuestion\$author, SurveyQuestion\$description, $DIC, SurveyQuestion\$orientation, SurveyQuestion\$owner, SurveyQuestion\$questiontext, SurveyQuestion\$title, ILIAS\GlobalScreen\Provider\__construct(), ILIAS\Repository\lng(), and ILIAS\Repository\user().
Here is the call graph for this function:| SurveySingleChoiceQuestion::addPhrase | ( | int | $phrase_id | ) |
Adds a phrase to the question.
Definition at line 75 of file class.SurveySingleChoiceQuestion.php.
References SurveyQuestion\$db, $ilDB, $ilUser, SurveyQuestion\$user, and ILIAS\Repository\lng().
Here is the call graph for this function:| SurveySingleChoiceQuestion::addStandardNumbers | ( | int | $lower_limit, |
| int | $upper_limit | ||
| ) |
Adds standard numbers as categories.
Definition at line 323 of file class.SurveySingleChoiceQuestion.php.
References $i.
| SurveySingleChoiceQuestion::checkUserInput | ( | array | $post_data, |
| int | $survey_id | ||
| ) |
Checks the input of the active user for obligatory status and entered values.
Definition at line 409 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::getAdditionalTableName | ( | ) |
Definition at line 374 of file class.SurveySingleChoiceQuestion.php.
Referenced by getQuestionDataArray(), loadFromDb(), and saveToDb().
Here is the caller graph for this function:| SurveySingleChoiceQuestion::getAvailableRelations | ( | ) |
Returns the available relations for the question.
Reimplemented from SurveyQuestion.
Definition at line 499 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::getCategories | ( | ) |
Definition at line 545 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::getCategoriesForPhrase | ( | int | $phrase_id | ) |
Gets the available categories for a given phrase.
Definition at line 53 of file class.SurveySingleChoiceQuestion.php.
References $categories, SurveyQuestion\$db, $ilDB, and ILIAS\Repository\lng().
Here is the call graph for this function:
|
static |
Definition at line 594 of file class.SurveySingleChoiceQuestion.php.
References $i.
|
static |
Get max sum score for specific survey (and this question type)
Reimplemented from SurveyQuestion.
Definition at line 550 of file class.SurveySingleChoiceQuestion.php.
References $DIC.
| SurveySingleChoiceQuestion::getPreconditionOptions | ( | ) |
Returns the options for preconditions.
Reimplemented from SurveyQuestion.
Definition at line 504 of file class.SurveySingleChoiceQuestion.php.
References $i.
| SurveySingleChoiceQuestion::getPreconditionSelectValue | ( | string | $default, |
| string | $title, | ||
| string | $variable | ||
| ) |
Creates a form property for the precondition value.
Reimplemented from SurveyQuestion.
Definition at line 514 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::getPreconditionValueOutput | ( | string | $value | ) |
Returns the output for a precondition value.
| string | $value | The precondition value |
Reimplemented from SurveyQuestion.
Definition at line 526 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::getQuestionDataArray | ( | int | $id | ) |
Returns the question data.
Reimplemented from SurveyQuestion.
Definition at line 95 of file class.SurveySingleChoiceQuestion.php.
References SurveyQuestion\$db, SurveyQuestion\$id, $ilDB, and getAdditionalTableName().
Here is the call graph for this function:| SurveySingleChoiceQuestion::getQuestionType | ( | ) |
Reimplemented from SurveyQuestion.
Definition at line 369 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::getWorkingDataFromUserInput | ( | array | $post_data | ) |
Creates the user data of the svy_answer table from the POST data.
Reimplemented from SurveyQuestion.
Definition at line 379 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::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 from SurveyQuestion.
Definition at line 309 of file class.SurveySingleChoiceQuestion.php.
References ILIAS\LTI\ToolProvider\$key.
| SurveySingleChoiceQuestion::importResponses | ( | array | $a_data | ) |
Import response data from the question import file.
Reimplemented from SurveyQuestion.
Definition at line 477 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::insertXML | ( | ilXmlWriter | $a_xml_writer, |
| bool | $a_include_header = true |
||
| ) |
Definition at line 234 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::isComplete | ( | ) |
Reimplemented from SurveyQuestion.
Definition at line 150 of file class.SurveySingleChoiceQuestion.php.
References SurveyQuestion\getAuthor(), SurveyQuestion\getQuestiontext(), and SurveyQuestion\getTitle().
Here is the call graph for this function:
|
protected |
Definition at line 569 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::loadFromDb | ( | int | $question_id | ) |
load question data into object note: this base implementation only loads the material data
Reimplemented from SurveyQuestion.
Definition at line 111 of file class.SurveySingleChoiceQuestion.php.
References $data, SurveyQuestion\$db, $ilDB, ilRTE\_replaceMediaObjectImageSrc(), getAdditionalTableName(), SurveyQuestion\setAuthor(), SurveyQuestion\setComplete(), SurveyQuestion\setDescription(), SurveyQuestion\setId(), SurveyQuestion\setObjId(), SurveyQuestion\setObligatory(), SurveyQuestion\setOrientation(), SurveyQuestion\setOriginalId(), SurveyQuestion\setOwner(), SurveyQuestion\setQuestiontext(), and SurveyQuestion\setTitle().
Here is the call graph for this function:| SurveySingleChoiceQuestion::saveCategoriesToDb | ( | ) |
Definition at line 191 of file class.SurveySingleChoiceQuestion.php.
References SurveyQuestion\$db, $i, $ilDB, SurveyQuestion\getId(), SurveyQuestion\saveCategoryToDb(), and SurveyQuestion\saveCompletionStatus().
Referenced by saveToDb().
Here is the call graph for this function:
Here is the caller graph for this function:| SurveySingleChoiceQuestion::savePhrase | ( | string | $title | ) |
Saves a set of categories to a default phrase note: data comes from session.
Definition at line 336 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::saveToDb | ( | int | $original_id = 0 | ) |
Saves a SurveyQuestion object to a database.
Reimplemented from SurveyQuestion.
Definition at line 164 of file class.SurveySingleChoiceQuestion.php.
References SurveyQuestion\$db, $ilDB, SurveyQuestion\$original_id, getAdditionalTableName(), SurveyQuestion\getId(), SurveyQuestion\getOrientation(), saveCategoriesToDb(), and SurveyQuestion\saveMaterial().
Here is the call graph for this function:| SurveySingleChoiceQuestion::saveUserInput | ( | array | $post_data, |
| int | $active_id, | ||
| bool | $a_return = false |
||
| ) |
Definition at line 441 of file class.SurveySingleChoiceQuestion.php.
References ILIAS\Survey\Mode\getId().
Here is the call graph for this function:| SurveySingleChoiceQuestion::toXML | ( | bool | $a_include_header = true, |
| bool | $obligatory_state = false |
||
| ) |
Definition at line 219 of file class.SurveySingleChoiceQuestion.php.
| SurveySingleChoiceQuestion::usableForPrecondition | ( | ) |
Returns if the question is usable for preconditions.
Reimplemented from SurveyQuestion.
Definition at line 494 of file class.SurveySingleChoiceQuestion.php.
| SurveyCategories SurveySingleChoiceQuestion::$categories |
Definition at line 29 of file class.SurveySingleChoiceQuestion.php.
Referenced by getCategoriesForPhrase().