|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
Class for text questions. More...
Inheritance diagram for assTextQuestion:
Collaboration diagram for assTextQuestion:Public Member Functions | |
| __construct (string $title="", string $comment="", string $author="", int $owner=-1, string $question="") | |
| assTextQuestion constructor More... | |
| getMatchcondition () | |
| setMatchcondition (int $matchcondition) | |
| isComplete () | |
| saveToDb (?int $original_id=null) | |
| loadFromDb (int $question_id) | |
| getMaxNumOfChars () | |
| setMaxNumOfChars (int $maxchars=0) | |
| isWordCounterEnabled () | |
| setWordCounterEnabled (bool $word_counter_enabled) | |
| getMaximumPoints () | |
| Returns the maximum points, a learner can reach answering the question. More... | |
| getMinimumPoints () | |
| isKeywordMatching ($answertext, $a_keyword) | |
| Checks if one of the keywords matches the answertext. More... | |
| calculateReachedPoints (int $active_id, ?int $pass=null, bool $authorized_solution=true) | |
| saveWorkingData (int $active_id, ?int $pass=null, bool $authorized=true) | |
| saveAdditionalQuestionDataToDb () | |
| Saves a record to the question types additional data table. More... | |
| getQuestionType () | |
| getTextRating () | |
| setTextRating ($a_text_rating) | |
| getAdditionalTableName () | |
| Returns the name of the additional question data table in the database. More... | |
| getRTETextWithMediaObjects () | |
| Collects all text in the question which could contain media objects which were created with the Rich Text Editor. More... | |
| toJSON () | |
| Returns a JSON representation of the question. More... | |
| getAnswerCount () | |
| addAnswer ( $answertext="", $points=0.0, $points_unchecked=0.0, $order=0, $answerimage="") | |
| Adds a possible answer for a multiple choice question. More... | |
| getAnswers () | |
| getAnswer ($index=0) | |
| Returns an answer with a given index. More... | |
| deleteAnswer ($index=0) | |
| Deletes an answer with a given index. More... | |
| getAnswerTableName () | |
| flushAnswers () | |
| Deletes all answers. More... | |
| setAnswers ($answers) | |
| duplicateAnswers ($original_id) | |
| getKeywordRelation () | |
| setKeywordRelation (?string $relation) | |
| This method implements a default behaviour. More... | |
| countLetters ($text) | |
| countWords ($text) | |
| getLatestAutosaveContent (int $active_id, int $pass) | |
| toLog (AdditionalInformationGenerator $additional_info) | |
| MUST return an array of the question settings that can be stored in the log. More... | |
| solutionValuesToText (array $solution_values) | |
| MUST convert the given solution values into text. More... | |
| getCorrectSolutionForTextOutput (int $active_id, int $pass) | |
| toNormalized (Transformations $transformations, array $context=[]) | |
| fromNormalized (array $normalized, Transformations $transformations) | |
Public Member Functions inherited from assQuestion | |
| getQuestionType () | |
| isComplete () | |
| saveWorkingData (int $active_id, ?int $pass=null, bool $authorized=true) | |
| calculateReachedPoints (int $active_id, ?int $pass=null, bool $authorized_solution=true) | |
| getAdditionalTableName () | |
| getAnswerTableName () | |
| toLog (AdditionalInformationGenerator $additional_info) | |
| MUST return an array of the question settings that can be stored in the log. More... | |
| getCurrentUser () | |
| getShuffler () | |
| setShuffler (Transformation $shuffler) | |
| setProcessLocker (ilAssQuestionProcessLocker $processLocker) | |
| getProcessLocker () | |
| fromXML (string $importdirectory, int $user_id, ilQTIItem $item, int $questionpool_id, ?int $tst_id, ?ilObject &$tst_object, int &$question_counter, array $import_mapping) | |
| toXML (bool $a_include_header=true, bool $a_include_binary=true, bool $a_shuffle=false, bool $test_output=false, bool $force_image_references=false) | |
| setTitle (string $title="") | |
| setId (int $id=-1) | |
| setTestId (int $id=-1) | |
| setComment (string $comment="") | |
| setShuffle (?bool $shuffle=true) | |
| setAuthor (string $author="") | |
| setOwner (int $owner=-1) | |
| getTitle () | |
| getTitleForHTMLOutput () | |
| getTitleFilenameCompliant () | |
| getId () | |
| getShuffle () | |
| getTestId () | |
| getComment () | |
| getDescriptionForHTMLOutput () | |
| getThumbSize () | |
| setThumbSize (int $a_size) | |
| getMinimumThumbSize () | |
| getMaximumThumbSize () | |
| getAuthor () | |
| getAuthorForHTMLOutput () | |
| getOwner () | |
| getObjId () | |
| setObjId (int $obj_id=0) | |
| getLifecycle () | |
| setLifecycle (ilAssQuestionLifecycle $lifecycle) | |
| setExternalId (?string $external_id) | |
| getExternalId () | |
| getSuggestedSolutionOutput () | |
| getSuggestedSolutions () | |
| getReachedPoints (int $active_id, int $pass) | |
| getMaximumPoints () | |
| getAdjustedReachedPoints (int $active_id, int $pass, bool $authorized_solution=true) | |
| calculateResultsFromSolution (int $active_id, int $pass) | |
| Calculates the question results from a previously saved question solution. More... | |
| persistWorkingState (int $active_id, $pass, bool $authorized=true) | |
| persists the working state for current testactive and testpass More... | |
| persistPreviewState (ilAssQuestionPreviewSession $preview_session) | |
| persists the preview state for current user and question More... | |
| validateSolutionSubmit () | |
| getSuggestedSolutionPath () | |
| getImagePath ($question_id=null, $object_id=null) | |
| Returns the image path for web accessable images of a question. More... | |
| getSuggestedSolutionPathWeb () | |
| getImagePathWeb () | |
| Returns the web image path for web accessable images of a question. More... | |
| getTestOutputSolutions (int $activeId, int $pass) | |
| getUserSolutionPreferingIntermediate (int $active_id, ?int $pass=null) | |
| getSolutionValues (int $active_id, ?int $pass=null, bool $authorized=true) | |
| Loads solutions of a given user from the database an returns it. More... | |
| deleteAnswers (int $question_id) | |
| deleteAdditionalTableData (int $question_id) | |
| delete (int $question_id) | |
| getTotalAnswers () | |
| cloneXHTMLMediaObjectsOfQuestion (int $source_question_id) | |
| createPageObject () | |
| clonePageOfQuestion (int $a_q_id) | |
| getPageOfQuestion () | |
| setOriginalId (?int $original_id) | |
| getOriginalId () | |
| fixSvgToPng (string $imageFilenameContainingString) | |
| fixUnavailableSkinImageSources (string $html) | |
| loadFromDb (int $question_id) | |
| createNewQuestion (bool $a_create_page=true) | |
| Creates a new question without an owner 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... | |
| saveQuestionDataToDb (?int $original_id=null) | |
| updateOriginalId (?int $original_id=null) | |
| duplicate (bool $set_original_id=true, string $title='', string $author='', int $owner=-1, $test_obj_id=null) | |
| copyObject (int $target_parent_id, string $title='') | |
| createNewOriginalFromThisDuplicate (int $target_parent_id, string $target_question_title='') | |
| saveToDb (?int $original_id=null) | |
| deleteSuggestedSolutions () | |
| getSuggestedSolution (int $subquestion_index=0) | |
| resolveInternalLink (string $internal_link) | |
| resolveSuggestedSolutionLinks () | |
| getInternalLinkHref (string $target) | |
| syncWithOriginal () | |
| getPoints () | |
| setPoints (float $points) | |
| getSolutionMaxPass (int $active_id) | |
| isWriteable () | |
| calculateReachedPointsFromPreviewSession (ilAssQuestionPreviewSession $preview_session) | |
| isPreviewSolutionCorrect (ilAssQuestionPreviewSession $preview_session) | |
| adjustReachedPointsByScoringOptions (float $points, int $active_id) | |
| Adjust the given reached points by checks for all special scoring options in the test container. More... | |
| buildHashedImageFilename (string $plain_image_filename, bool $unique=false) | |
| getQuestion () | |
| getQuestionForHTMLOutput () | |
| setQuestion (string $question="") | |
| getQuestionTypeID () | |
| cleanupMediaObjectUsage () | |
| getInstances () | |
| getActiveUserData (int $active_id) | |
| Returns the user id and the test id for a given active id. More... | |
| hasSpecificFeedback () | |
| getNrOfTries () | |
| setNrOfTries (int $a_nr_of_tries) | |
| setExportImagePath (string $path) | |
| formatSAQuestion ($a_q) | |
| setPreventRteUsage (bool $prevent_rte_usage) | |
| getPreventRteUsage () | |
| migrateContentForLearningModule (ilAssSelfAssessmentMigrator $migrator) | |
| setSelfAssessmentEditingMode (bool $selfassessmenteditingmode) | |
| getSelfAssessmentEditingMode () | |
| setDefaultNrOfTries (int $defaultnroftries) | |
| getDefaultNrOfTries () | |
| syncSkillAssignments (int $srcParentId, int $srcQuestionId, int $trgParentId, int $trgQuestionId) | |
| isAnswered (int $active_id, int $pass) | |
| getAdditionalContentEditingMode () | |
| setAdditionalContentEditingMode (?string $additionalContentEditingMode) | |
| isAdditionalContentEditingModePageObject () | |
| isValidAdditionalContentEditingMode (string $additionalContentEditingMode) | |
| getValidAdditionalContentEditingModes () | |
| getHtmlUserSolutionPurifier () | |
| getHtmlQuestionContentPurifier () | |
| setLastChange (int $lastChange) | |
| getLastChange () | |
| removeIntermediateSolution (int $active_id, int $pass) | |
| removeCurrentSolution (int $active_id, int $pass, bool $authorized=true) | |
| saveCurrentSolution (int $active_id, int $pass, $value1, $value2, bool $authorized=true, $tstamp=0) | |
| updateCurrentSolution (int $solutionId, $value1, $value2, bool $authorized=true) | |
| updateCurrentSolutionsAuthorization (int $activeId, int $pass, bool $authorized, bool $keepTime=false) | |
| setStep ($step) | |
| getStep () | |
| toJSON () | |
| intermediateSolutionExists (int $active_id, int $pass) | |
| authorizedSolutionExists (int $active_id, ?int $pass) | |
| authorizedOrIntermediateSolutionExists (int $active_id, int $pass) | |
| lookupForExistingSolutions (int $activeId, int $pass) | |
| Lookup if an authorized or intermediate solution exists. More... | |
| isAddableAnswerOptionValue (int $qIndex, string $answerOptionValue) | |
| addAnswerOptionValue (int $qIndex, string $answerOptionValue, float $points) | |
| removeAllExistingSolutions () | |
| removeExistingSolutions (int $activeId, int $pass) | |
| resetUsersAnswer (int $activeId, int $pass) | |
| removeResultRecord (int $activeId, int $pass) | |
| fetchValuePairsFromIndexedValues (array $indexedValues) | |
| fetchIndexedValuesFromValuePairs (array $value_pairs) | |
| updateTimestamp () | |
| getTestPresentationConfig () | |
| hasWritableOriginalInQuestionPool () | |
| answerToParticipantInteraction (AdditionalInformationGenerator $additional_info, int $test_ref_id, int $active_id, int $pass, string $source_ip, TestParticipantInteractionTypes $interaction_type) | |
| toQuestionAdministrationInteraction (AdditionalInformationGenerator $additional_info, int $test_ref_id, TestQuestionAdministrationInteractionTypes $interaction_type) | |
| getSolutionForTextOutput (int $active_id, int $pass) | |
| getCorrectSolutionForTextOutput (int $active_id, int $pass) | |
| getVariablesAsTextArray (int $active_id, int $pass) | |
| toNormalized (Transformations $transformations, array $context=[]) | |
| fromNormalized (array $normalized, Transformations $transformations) | |
| validateSolutionSubmit () | |
| toLog (AdditionalInformationGenerator $additional_info) | |
| answerToParticipantInteraction (AdditionalInformationGenerator $additional_info, int $test_id, int $active_id, int $pass, string $source_ip, TestParticipantInteractionTypes $interaction_type) | |
| toQuestionAdministrationInteraction (AdditionalInformationGenerator $additional_info, int $test_id, TestQuestionAdministrationInteractionTypes $interaction_type) | |
| saveAdditionalQuestionDataToDb () | |
| Saves a record to the question types additional data table. More... | |
Public Member Functions inherited from ilObjAnswerScoringAdjustable | |
| saveAnswerSpecificDataToDb () | |
| Saves the answer specific records into a question types answer table. More... | |
| toJSON () | |
| toNormalized (Transformations $transformations, array $context=[]) | |
| Convert the internal state of the implementing object into a language-neutral array structure. More... | |
| fromNormalized (array $normalized, Transformations $transformations) | |
| Restore the object from its normalized representation. More... | |
Static Public Member Functions | |
| static | getValidScoringModes () |
| static | getScoringModesWithPointsByQuestion () |
| static | getScoringModesWithPointsByKeyword () |
Static Public Member Functions inherited from assQuestion | |
| static | setForcePassResultUpdateEnabled (bool $force_pass_results_update_enabled) |
| static | isForcePassResultUpdateEnabled () |
| static | _getSuggestedSolutionOutput (int $question_id) |
| static | _getReachedPoints (int $active_id, int $question_id, int $pass) |
| static | isFileAvailable (string $file) |
| static | saveOriginalId (int $questionId, int $originalId) |
| static | resetOriginalId (int $questionId) |
| static | instantiateQuestion (int $question_id) |
| static | _getSolutionMaxPass (int $question_id, int $active_id) |
| Returns the maximum pass a users question solution. More... | |
| static | getFeedbackClassNameByQuestionType (string $questionType) |
| static | _questionExistsInTest (int $question_id, int $test_id) |
| static | lookupParentObjId (int $question_id) |
| static | implodeKeyValues (array $keyValues) |
| static | explodeKeyValues (string $keyValues) |
| static | convertISO8601FormatH_i_s_ExtendedToSeconds (string $time) |
| static | extendedTrim (string $value) |
| Trim non-printable characters from the beginning and end of a string. More... | |
Data Fields | |
| const | SCORING_MODE_KEYWORD_RELATION_NONE = 'non' |
| const | SCORING_MODE_KEYWORD_RELATION_ANY = 'any' |
| const | SCORING_MODE_KEYWORD_RELATION_ALL = 'all' |
| const | SCORING_MODE_KEYWORD_RELATION_ONE = 'one' |
| array | $keywords |
| array | $answers = [] |
Data Fields inherited from assQuestion | |
| const | ADDITIONAL_CONTENT_EDITING_MODE_RTE = 'default' |
| const | ADDITIONAL_CONTENT_EDITING_MODE_IPE = 'pageobject' |
| const | TRIM_PATTERN = '/^[\p{C}\p{Z}]+|[\p{C}\p{Z}]+$/u' |
| ilAssQuestionFeedback | $feedbackOBJ |
| bool | $prevent_rte_usage = false |
| bool | $selfassessmenteditingmode = false |
| int | $defaultnroftries = 0 |
| string | $questionActionCmd = 'handleQuestionAction' |
| const | KEY_VALUES_IMPLOSION_SEPARATOR = ':' |
Protected Member Functions | |
| calculateReachedPointsForSolution (string $solution) | |
| getSolutionSubmit () | |
| solutionValuesToLog (AdditionalInformationGenerator $additional_info, array $solution_values) | |
| MUST convert the given solution values into an array or a string that can be stored in the log. More... | |
Protected Member Functions inherited from assQuestion | |
| solutionValuesToLog (AdditionalInformationGenerator $additional_info, array $solution_values) | |
| MUST convert the given solution values into an array or a string that can be stored in the log. More... | |
| solutionValuesToText (array $solution_values) | |
| MUST convert the given solution values into text. More... | |
| getQuestionAction () | |
| isNonEmptyItemListPostSubmission (string $post_submission_field_name) | |
| savePreviewData (ilAssQuestionPreviewSession $preview_session) | |
| deletePageOfQuestion (int $question_id) | |
| cloneQuestionTypeSpecificProperties (self $target) | |
| removeAllImageFiles (string $image_target_path) | |
| onDuplicate (int $original_parent_id, int $original_question_id, int $duplicate_parent_id, int $duplicate_question_id) | |
| afterSyncWithOriginal (int $original_question_id, int $clone_question_id, int $original_parent_id, int $clone_parent_id) | |
| onCopy (int $sourceParentId, int $sourceQuestionId, int $targetParentId, int $targetQuestionId) | |
| duplicateComments (int $parent_source_id, int $source_id, int $parent_target_id, int $target_id) | |
| deleteComments () | |
| getNotesManager () | |
| getNotesDataService () | |
| getNotesRepo () | |
| cloneSuggestedSolutions (int $source_question_id, int $target_question_id) | |
| duplicateSuggestedSolutionFiles (int $parent_id, int $question_id) | |
| Duplicates the files of a suggested solution if the question is duplicated. More... | |
| cloneSuggestedSolutionFiles (int $source_question_id, int $target_question_id) | |
| copySuggestedSolutions (int $target_question_id) | |
| ensureNonNegativePoints (float $points) | |
| purifyAndPrepareTextAreaOutput (string $content) | |
| getRTETextWithMediaObjects () | |
| getSelfAssessmentFormatter () | |
| lmMigrateQuestionTypeGenericContent (ilAssSelfAssessmentMigrator $migrator) | |
| lmMigrateQuestionTypeSpecificContent (ilAssSelfAssessmentMigrator $migrator) | |
| duplicateSkillAssignments (int $srcParentId, int $srcQuestionId, int $trgParentId, int $trgQuestionId) | |
| buildQuestionDataQuery () | |
| getCurrentSolutionResultSet (int $active_id, int $pass, bool $authorized=true) | |
| removeSolutionRecordById (int $solutionId) | |
| getSolutionRecordById (int $solutionId) | |
| deleteDummySolutionRecord (int $activeId, int $passIndex) | |
| isDummySolutionRecord (array $solutionRecord) | |
| deleteSolutionRecordByValues (int $activeId, int $passIndex, bool $authorized, array $matchValues) | |
| duplicateIntermediateSolutionAuthorized (int $activeId, int $passIndex) | |
| forceExistingIntermediateSolution (int $activeId, int $passIndex, bool $considerDummyRecordCreation) | |
| lookupMaxStep (int $active_id, int $pass) | |
| buildTestPresentationConfig () | |
| getSuggestedSolutionsRepo () | |
| loadSuggestedSolutions () | |
| answerToLog (AdditionalInformationGenerator $additional_info, int $active_id, int $pass) | |
Private Member Functions | |
| isValidTextRating ($textRating) | |
| getScoringModeLangVar (string $scoring_mode) | |
Private Attributes | |
| int | $max_num_of_chars = 0 |
| bool | $word_counter_enabled = false |
| string | $text_rating = assClozeGap::TEXTGAP_RATING_CASEINSENSITIVE |
| int | $matchcondition = 0 |
| string | $keyword_relation = self::SCORING_MODE_KEYWORD_RELATION_NONE |
Additional Inherited Members | |
Static Protected Member Functions inherited from assQuestion | |
| static | getNumExistingSolutionRecords (int $activeId, int $pass, int $questionId) |
Static Protected Attributes inherited from assQuestion | |
| static | $force_pass_results_update_enabled = false |
| static | $imageSourceFixReplaceMap |
Class for text questions.
assTextQuestion is a class for text questions
Definition at line 41 of file class.assTextQuestion.php.
| assTextQuestion::__construct | ( | string | $title = "", |
| string | $comment = "", |
||
| string | $author = "", |
||
| int | $owner = -1, |
||
| string | $question = "" |
||
| ) |
assTextQuestion constructor
The constructor takes possible arguments an creates an instance of the assTextQuestion object.
| string | $title | A title string to describe the question |
| string | $comment | A comment string to describe the question |
| string | $author | A string containing the name of the questions author |
| integer | $owner | A numerical ID to identify the owner/creator |
| string | $question | The question string of the text question |
Definition at line 80 of file class.assTextQuestion.php.
References assQuestion\$author, assQuestion\$comment, assQuestion\$owner, assQuestion\$question, assQuestion\$title, and ILIAS\GlobalScreen\Provider\__construct().
Here is the call graph for this function:| assTextQuestion::addAnswer | ( | $answertext = "", |
|
$points = 0.0, |
|||
$points_unchecked = 0.0, |
|||
$order = 0, |
|||
$answerimage = "" |
|||
| ) |
Adds a possible answer for a multiple choice question.
A ASS_AnswerBinaryStateImage object will be created and assigned to the array $this->answers.
| string | $answertext | The answer text |
| double | $points | The points for selecting the answer (even negative points can be used) |
| boolean | $state | Defines the answer as correct (TRUE) or incorrect (FALSE) |
| integer | $order | A possible display order of the answer |
| double | $points | The points for not selecting the answer (even negative points can be used) @access public |
Definition at line 550 of file class.assTextQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assTextQuestion::calculateReachedPoints | ( | int | $active_id, |
| ?int | $pass = null, |
||
| bool | $authorized_solution = true |
||
| ) |
Reimplemented from assQuestion.
Definition at line 364 of file class.assTextQuestion.php.
References assQuestion\getSolutionMaxPass().
Here is the call graph for this function:
|
protected |
Definition at line 314 of file class.assTextQuestion.php.
References $answers, assQuestion\$points, getAnswers(), getKeywordRelation(), getMaximumPoints(), getMinimumPoints(), and isKeywordMatching().
Here is the call graph for this function:| assTextQuestion::countLetters | ( | $text | ) |
Definition at line 722 of file class.assTextQuestion.php.
References $text, and ilStr\strLen().
Here is the call graph for this function:| assTextQuestion::countWords | ( | $text | ) |
Definition at line 737 of file class.assTextQuestion.php.
References $text.
| assTextQuestion::deleteAnswer | ( | $index = 0 | ) |
Deletes an answer with a given index.
The index of the first answer is 0, the index of the second answer is 1 and so on.
| integer | $index | A nonnegative index of the n-th answer @access public |
Definition at line 601 of file class.assTextQuestion.php.
References ILIAS\UI\Implementation\Component\Table\getOrder().
Here is the call graph for this function:| assTextQuestion::duplicateAnswers | ( | $original_id | ) |
Definition at line 665 of file class.assTextQuestion.php.
References ILIAS\Survey\Mode\getId().
Here is the call graph for this function:| assTextQuestion::flushAnswers | ( | ) |
Deletes all answers.
@access public
Definition at line 636 of file class.assTextQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assTextQuestion::fromNormalized | ( | array | $normalized, |
| Transformations | $transformations | ||
| ) |
| array<array-key,mixed> | $normalized |
Reimplemented from assQuestion.
Definition at line 880 of file class.assTextQuestion.php.
References ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\bool(), ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\denormalize(), ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\int(), and ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\string().
Here is the call graph for this function:| assTextQuestion::getAdditionalTableName | ( | ) |
Returns the name of the additional question data table in the database.
Reimplemented from assQuestion.
Definition at line 502 of file class.assTextQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assTextQuestion::getAnswer | ( | $index = 0 | ) |
Returns an answer with a given index.
The index of the first answer is 0, the index of the second answer is 1 and so on.
| integer | $index | A nonnegative index of the n-th answer |
Definition at line 578 of file class.assTextQuestion.php.
| assTextQuestion::getAnswerCount | ( | ) |
Definition at line 532 of file class.assTextQuestion.php.
| assTextQuestion::getAnswers | ( | ) |
Definition at line 564 of file class.assTextQuestion.php.
Referenced by calculateReachedPointsForSolution().
Here is the caller graph for this function:| assTextQuestion::getAnswerTableName | ( | ) |
Reimplemented from assQuestion.
Definition at line 625 of file class.assTextQuestion.php.
| assTextQuestion::getCorrectSolutionForTextOutput | ( | int | $active_id, |
| int | $pass | ||
| ) |
Reimplemented from assQuestion.
Definition at line 849 of file class.assTextQuestion.php.
References ASS_AnswerSimple\getAnswertext().
Here is the call graph for this function:| assTextQuestion::getKeywordRelation | ( | ) |
Definition at line 685 of file class.assTextQuestion.php.
Referenced by calculateReachedPointsForSolution(), getMaximumPoints(), and getMinimumPoints().
Here is the caller graph for this function:| assTextQuestion::getLatestAutosaveContent | ( | int | $active_id, |
| int | $pass | ||
| ) |
Definition at line 753 of file class.assTextQuestion.php.
References ILIAS\Survey\Mode\getId().
Here is the call graph for this function:| assTextQuestion::getMatchcondition | ( | ) |
Definition at line 91 of file class.assTextQuestion.php.
References $matchcondition.
| assTextQuestion::getMaximumPoints | ( | ) |
Returns the maximum points, a learner can reach answering the question.
@access public
Reimplemented from assQuestion.
Definition at line 199 of file class.assTextQuestion.php.
References assQuestion\$points, and getKeywordRelation().
Referenced by calculateReachedPointsForSolution(), and isComplete().
Here is the call graph for this function:
Here is the caller graph for this function:| assTextQuestion::getMaxNumOfChars | ( | ) |
Definition at line 173 of file class.assTextQuestion.php.
References $max_num_of_chars.
| assTextQuestion::getMinimumPoints | ( | ) |
Definition at line 216 of file class.assTextQuestion.php.
References assQuestion\$points, and getKeywordRelation().
Referenced by calculateReachedPointsForSolution().
Here is the call graph for this function:
Here is the caller graph for this function:| assTextQuestion::getQuestionType | ( | ) |
Reimplemented from assQuestion.
Definition at line 468 of file class.assTextQuestion.php.
| assTextQuestion::getRTETextWithMediaObjects | ( | ) |
Collects all text in the question which could contain media objects which were created with the Rich Text Editor.
Reimplemented from assQuestion.
Definition at line 511 of file class.assTextQuestion.php.
|
private |
Definition at line 811 of file class.assTextQuestion.php.
References SCORING_MODE_KEYWORD_RELATION_ALL, SCORING_MODE_KEYWORD_RELATION_ANY, SCORING_MODE_KEYWORD_RELATION_NONE, and SCORING_MODE_KEYWORD_RELATION_ONE.
|
static |
Definition at line 715 of file class.assTextQuestion.php.
Referenced by assTextQuestionGUI\getBestAnswer().
Here is the caller graph for this function:
|
static |
Definition at line 706 of file class.assTextQuestion.php.
|
protected |
Definition at line 412 of file class.assTextQuestion.php.
References $text, ilUtil\isHTML(), ILIAS\Repository\lng(), and ilUtil\stripSlashes().
Here is the call graph for this function:| assTextQuestion::getTextRating | ( | ) |
Definition at line 473 of file class.assTextQuestion.php.
Referenced by isKeywordMatching().
Here is the caller graph for this function:
|
static |
Definition at line 701 of file class.assTextQuestion.php.
| assTextQuestion::isComplete | ( | ) |
Reimplemented from assQuestion.
Definition at line 101 of file class.assTextQuestion.php.
References getMaximumPoints().
Here is the call graph for this function:| assTextQuestion::isKeywordMatching | ( | $answertext, | |
| $a_keyword | |||
| ) |
Checks if one of the keywords matches the answertext.
| string | $answertext | The answertext of the user |
| string | $a_keyword | The keyword which should be checked |
Definition at line 257 of file class.assTextQuestion.php.
References $DIC, assQuestion\$refinery, getTextRating(), ilStr\strPos(), ilStr\strToLower(), assClozeGap\TEXTGAP_RATING_CASEINSENSITIVE, assClozeGap\TEXTGAP_RATING_CASESENSITIVE, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN1, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN2, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN3, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN4, and assClozeGap\TEXTGAP_RATING_LEVENSHTEIN5.
Referenced by calculateReachedPointsForSolution().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 233 of file class.assTextQuestion.php.
References assClozeGap\TEXTGAP_RATING_CASEINSENSITIVE, assClozeGap\TEXTGAP_RATING_CASESENSITIVE, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN1, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN2, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN3, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN4, and assClozeGap\TEXTGAP_RATING_LEVENSHTEIN5.
Referenced by loadFromDb().
Here is the caller graph for this function:| assTextQuestion::isWordCounterEnabled | ( | ) |
Definition at line 183 of file class.assTextQuestion.php.
References $word_counter_enabled.
| assTextQuestion::loadFromDb | ( | int | $question_id | ) |
Reimplemented from assQuestion.
Definition at line 121 of file class.assTextQuestion.php.
References $data, Vendor\Package\$e, ilRTE\_replaceMediaObjectImageSrc(), addAnswer(), flushAnswers(), getAdditionalTableName(), assQuestion\getId(), isValidTextRating(), assQuestion\setAdditionalContentEditingMode(), assQuestion\setAuthor(), assQuestion\setComment(), assQuestion\setId(), setKeywordRelation(), assQuestion\setLifecycle(), setMaxNumOfChars(), assQuestion\setNrOfTries(), assQuestion\setObjId(), assQuestion\setOriginalId(), assQuestion\setOwner(), assQuestion\setPoints(), assQuestion\setQuestion(), assQuestion\setShuffle(), setTextRating(), assQuestion\setTitle(), setWordCounterEnabled(), and assClozeGap\TEXTGAP_RATING_CASEINSENSITIVE.
Here is the call graph for this function:| assTextQuestion::saveAdditionalQuestionDataToDb | ( | ) |
Saves a record to the question types additional data table.
Implements ilObjQuestionScoringAdjustable.
Definition at line 423 of file class.assTextQuestion.php.
References ILIAS\Survey\Mode\getId(), and ILIAS\Repository\int().
Referenced by saveToDb().
Here is the call graph for this function:
Here is the caller graph for this function:| assTextQuestion::saveToDb | ( | ?int | $original_id = null | ) |
Reimplemented from assQuestion.
Definition at line 113 of file class.assTextQuestion.php.
References assQuestion\$original_id, saveAdditionalQuestionDataToDb(), ilObjAnswerScoringAdjustable\saveAnswerSpecificDataToDb(), and assQuestion\saveQuestionDataToDb().
Here is the call graph for this function:| assTextQuestion::saveWorkingData | ( | int | $active_id, |
| ?int | $pass = null, |
||
| bool | $authorized = true |
||
| ) |
Reimplemented from assQuestion.
Definition at line 389 of file class.assTextQuestion.php.
References ilObjTest\_getPass().
Here is the call graph for this function:| assTextQuestion::setAnswers | ( | $answers | ) |
Definition at line 641 of file class.assTextQuestion.php.
References ILIAS\Repository\refinery().
Here is the call graph for this function:| assTextQuestion::setKeywordRelation | ( | ?string | $relation | ) |
This method implements a default behaviour.
During the creation of a text question, the record which holds the keyword relation is not existing, so keyword_relation defaults to 'one'.
Definition at line 694 of file class.assTextQuestion.php.
References $relation.
Referenced by loadFromDb().
Here is the caller graph for this function:| assTextQuestion::setMatchcondition | ( | int | $matchcondition | ) |
Definition at line 96 of file class.assTextQuestion.php.
References $matchcondition.
| assTextQuestion::setMaxNumOfChars | ( | int | $maxchars = 0 | ) |
Definition at line 178 of file class.assTextQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assTextQuestion::setTextRating | ( | $a_text_rating | ) |
Definition at line 478 of file class.assTextQuestion.php.
References assClozeGap\TEXTGAP_RATING_CASEINSENSITIVE, assClozeGap\TEXTGAP_RATING_CASESENSITIVE, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN1, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN2, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN3, assClozeGap\TEXTGAP_RATING_LEVENSHTEIN4, and assClozeGap\TEXTGAP_RATING_LEVENSHTEIN5.
Referenced by loadFromDb().
Here is the caller graph for this function:| assTextQuestion::setWordCounterEnabled | ( | bool | $word_counter_enabled | ) |
Definition at line 188 of file class.assTextQuestion.php.
References $word_counter_enabled.
Referenced by loadFromDb().
Here is the caller graph for this function:
|
protected |
MUST convert the given solution values into an array or a string that can be stored in the log.
Language variables must be generated through the corresponding functions in the AdditionalInformationGenerator. If an array is returned it will be rendered into a line per array entry in the format "key: value". If the key exists as a language variable, it will be translated.
Reimplemented from assQuestion.
Definition at line 827 of file class.assTextQuestion.php.
| assTextQuestion::solutionValuesToText | ( | array | $solution_values | ) |
MUST convert the given solution values into text.
If the text has multiple lines each line MUST be placed as an entry in an array.
Reimplemented from assQuestion.
Definition at line 840 of file class.assTextQuestion.php.
| assTextQuestion::toJSON | ( | ) |
Returns a JSON representation of the question.
Reimplemented from assQuestion.
Definition at line 519 of file class.assTextQuestion.php.
References ILIAS\Survey\Mode\getId().
Here is the call graph for this function:| assTextQuestion::toLog | ( | AdditionalInformationGenerator | $additional_info | ) |
MUST return an array of the question settings that can be stored in the log.
Language variables must be generated through the corresponding functions in the AdditionalInformationGenerator. If an array is returned it will be rendered into a line per array entry in the format "key: value". If the key exists as a language variable, it will be translated.
Reimplemented from assQuestion.
Definition at line 784 of file class.assTextQuestion.php.
References ASS_AnswerSimple\getAnswertext(), ILIAS\Test\Logging\AdditionalInformationGenerator\getEnabledDisabledTagForBool(), ASS_AnswerSimple\getPoints(), and ILIAS\Test\Logging\AdditionalInformationGenerator\getTagForLangVar().
Here is the call graph for this function:| assTextQuestion::toNormalized | ( | Transformations | $transformations, |
| array | $context = [] |
||
| ) |
| array<string,mixed> | $context |
Reimplemented from assQuestion.
Definition at line 863 of file class.assTextQuestion.php.
References ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\normalize().
Here is the call graph for this function:| array assTextQuestion::$answers = [] |
Definition at line 66 of file class.assTextQuestion.php.
Referenced by calculateReachedPointsForSolution().
|
private |
Definition at line 54 of file class.assTextQuestion.php.
| array assTextQuestion::$keywords |
Definition at line 60 of file class.assTextQuestion.php.
|
private |
Definition at line 53 of file class.assTextQuestion.php.
Referenced by getMatchcondition(), and setMatchcondition().
|
private |
Definition at line 50 of file class.assTextQuestion.php.
Referenced by getMaxNumOfChars().
|
private |
Definition at line 52 of file class.assTextQuestion.php.
|
private |
Definition at line 51 of file class.assTextQuestion.php.
Referenced by isWordCounterEnabled(), and setWordCounterEnabled().
|
protected |
Definition at line 43 of file class.assTextQuestion.php.
| const assTextQuestion::SCORING_MODE_KEYWORD_RELATION_ALL = 'all' |
Definition at line 47 of file class.assTextQuestion.php.
Referenced by assTextQuestionGUI\getBestAnswer(), getScoringModeLangVar(), assTextQuestionGUI\populateAnswerSpecificFormPart(), and assTextQuestionGUI\writeAnswerSpecificPostData().
| const assTextQuestion::SCORING_MODE_KEYWORD_RELATION_ANY = 'any' |
Definition at line 46 of file class.assTextQuestion.php.
Referenced by assTextQuestionGUI\getBestAnswer(), getScoringModeLangVar(), assTextQuestionGUI\populateAnswerSpecificFormPart(), and assTextQuestionGUI\writeAnswerSpecificPostData().
| const assTextQuestion::SCORING_MODE_KEYWORD_RELATION_NONE = 'non' |
Definition at line 45 of file class.assTextQuestion.php.
Referenced by getScoringModeLangVar(), assTextQuestionGUI\populateAnswerSpecificFormPart(), and assTextQuestionGUI\writeAnswerSpecificPostData().
| const assTextQuestion::SCORING_MODE_KEYWORD_RELATION_ONE = 'one' |
Definition at line 48 of file class.assTextQuestion.php.
Referenced by assTextQuestionGUI\getBestAnswer(), getScoringModeLangVar(), assTextQuestionGUI\populateAnswerSpecificFormPart(), and assTextQuestionGUI\writeAnswerSpecificPostData().