ILIAS
trunk Revision v11.0_alpha-1749-g1a06bdef097
|
Class for text questions. More...
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) | |
solutionValuesToText (array $solution_values) | |
getCorrectSolutionForTextOutput (int $active_id, int $pass) | |
![]() | |
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, array $solutionhints=[]) | |
toXML (bool $a_include_header=true, bool $a_include_binary=true, bool $a_shuffle=false, bool $test_output=false, bool $force_image_references=false) | |
Returns a QTI xml representation of the question. More... | |
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 () | |
static | 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) | |
duplicate (bool $for_test=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 () | |
deductHintPointsFromReachedPoints (ilAssQuestionPreviewSession $preview_session, $reached_points) | |
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 () | |
cloneHints (int $source_question_id, int $target_question_id) | |
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) | |
ensureHintPageObjectExists ($pageObjectId) | |
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) | |
![]() | |
saveAnswerSpecificDataToDb () | |
Saves the answer specific records into a question types answer table. More... | |
Static Public Member Functions | |
static | getValidScoringModes () |
static | getScoringModesWithPointsByQuestion () |
static | getScoringModesWithPointsByKeyword () |
![]() | |
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 | _setReachedPoints (int $active_id, int $question_id, float $points, float $maxpoints, int $pass, bool $manualscoring) |
Sets the points, a learner has reached answering the question Additionally objective results are updated. 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 = [] |
![]() | |
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) | |
![]() | |
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) | |
duplicateQuestionHints (int $original_question_id, int $duplicate_question_id) | |
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) | |
Protected Attributes | |
const | HAS_SPECIFIC_FEEDBACK = false |
![]() | |
const | HAS_SPECIFIC_FEEDBACK = true |
GeneralQuestionPropertiesRepository | $questionrepository |
RequestDataCollector | $questionpool_request |
QuestionFiles | $question_files |
ilAssQuestionProcessLocker | $processLocker |
ilTestQuestionConfig | $testQuestionConfig |
SuggestedSolutionsDatabaseRepository | $suggestedsolution_repo |
ILIAS | $ilias |
ilGlobalPageTemplate | $tpl |
ilLanguage | $lng |
ilDBInterface | $db |
ilObjUser | $current_user |
SkillUsageService | $skillUsageService |
HTTPServices | $http |
Refinery | $refinery |
Transformation | $shuffler |
LoggingServices | $log |
Container | $dic |
ilAssQuestionLifecycle | $lifecycle |
ilAssQuestionPage | $page |
int | $id |
string | $title |
string | $comment |
int | $owner |
string | $author |
int | $thumb_size |
string | $question |
float | $points = 0.0 |
bool | $shuffle = true |
int | $test_id |
int | $obj_id = 0 |
int | $original_id = null |
int | $lastChange = null |
string | $external_id = null |
int | $step = null |
array | $suggested_solutions |
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 | getNumExistingSolutionRecords (int $activeId, int $pass, int $questionId) |
![]() | |
static | $force_pass_results_update_enabled = false |
static | $imageSourceFixReplaceMap |
Class for text questions.
assTextQuestion is a class for text questions
Definition at line 38 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 77 of file class.assTextQuestion.php.
References assQuestion\$author, assQuestion\$comment, assQuestion\$owner, assQuestion\$question, assQuestion\$title, and ILIAS\GlobalScreen\Provider\__construct().
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) public |
Definition at line 547 of file class.assTextQuestion.php.
References assQuestion\$points.
Referenced by loadFromDb(), and setAnswers().
assTextQuestion::calculateReachedPoints | ( | int | $active_id, |
?int | $pass = null , |
||
bool | $authorized_solution = true |
||
) |
Definition at line 361 of file class.assTextQuestion.php.
References calculateReachedPointsForSolution(), assQuestion\getCurrentSolutionResultSet(), getMinimumPoints(), assQuestion\getSolutionMaxPass(), and null.
|
protected |
Definition at line 311 of file class.assTextQuestion.php.
References assQuestion\$points, getAnswers(), getKeywordRelation(), getMaximumPoints(), getMinimumPoints(), and isKeywordMatching().
Referenced by calculateReachedPoints().
assTextQuestion::countLetters | ( | $text | ) |
Definition at line 719 of file class.assTextQuestion.php.
References ilStr\strLen().
assTextQuestion::countWords | ( | $text | ) |
Definition at line 734 of file class.assTextQuestion.php.
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 public |
Definition at line 598 of file class.assTextQuestion.php.
References ILIAS\UI\Implementation\Component\Table\getOrder().
assTextQuestion::duplicateAnswers | ( | $original_id | ) |
Definition at line 662 of file class.assTextQuestion.php.
References assQuestion\$original_id, and assQuestion\getId().
assTextQuestion::flushAnswers | ( | ) |
Deletes all answers.
public
Definition at line 633 of file class.assTextQuestion.php.
Referenced by loadFromDb(), and setAnswers().
assTextQuestion::getAdditionalTableName | ( | ) |
Returns the name of the additional question data table in the database.
Definition at line 499 of file class.assTextQuestion.php.
Referenced by loadFromDb(), and saveAdditionalQuestionDataToDb().
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 575 of file class.assTextQuestion.php.
References null.
assTextQuestion::getAnswerCount | ( | ) |
Definition at line 529 of file class.assTextQuestion.php.
assTextQuestion::getAnswers | ( | ) |
Definition at line 561 of file class.assTextQuestion.php.
References $answers.
Referenced by calculateReachedPointsForSolution(), getCorrectSolutionForTextOutput(), and toLog().
assTextQuestion::getAnswerTableName | ( | ) |
Definition at line 622 of file class.assTextQuestion.php.
assTextQuestion::getCorrectSolutionForTextOutput | ( | int | $active_id, |
int | $pass | ||
) |
Definition at line 846 of file class.assTextQuestion.php.
References getAnswers(), ASS_AnswerSimple\getAnswertext(), and getKeywordRelation().
assTextQuestion::getKeywordRelation | ( | ) |
Definition at line 682 of file class.assTextQuestion.php.
References $keyword_relation.
Referenced by calculateReachedPointsForSolution(), getCorrectSolutionForTextOutput(), getMaximumPoints(), getMinimumPoints(), saveAdditionalQuestionDataToDb(), and toLog().
assTextQuestion::getLatestAutosaveContent | ( | int | $active_id, |
int | $pass | ||
) |
Definition at line 750 of file class.assTextQuestion.php.
References assQuestion\getId(), and null.
assTextQuestion::getMatchcondition | ( | ) |
Definition at line 88 of file class.assTextQuestion.php.
References $matchcondition.
Referenced by saveAdditionalQuestionDataToDb().
assTextQuestion::getMaximumPoints | ( | ) |
Returns the maximum points, a learner can reach answering the question.
public
Definition at line 196 of file class.assTextQuestion.php.
References assQuestion\$points, and getKeywordRelation().
Referenced by calculateReachedPointsForSolution(), isComplete(), and toLog().
assTextQuestion::getMaxNumOfChars | ( | ) |
Definition at line 170 of file class.assTextQuestion.php.
References $max_num_of_chars.
Referenced by saveAdditionalQuestionDataToDb(), toJSON(), and toLog().
assTextQuestion::getMinimumPoints | ( | ) |
Definition at line 213 of file class.assTextQuestion.php.
References assQuestion\$points, and getKeywordRelation().
Referenced by calculateReachedPoints(), and calculateReachedPointsForSolution().
assTextQuestion::getQuestionType | ( | ) |
Definition at line 465 of file class.assTextQuestion.php.
Referenced by toJSON(), and toLog().
assTextQuestion::getRTETextWithMediaObjects | ( | ) |
Collects all text in the question which could contain media objects which were created with the Rich Text Editor.
Definition at line 508 of file class.assTextQuestion.php.
|
private |
Definition at line 808 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.
Referenced by toLog().
|
static |
Definition at line 712 of file class.assTextQuestion.php.
Referenced by assTextQuestionGUI\getBestAnswer().
|
static |
Definition at line 703 of file class.assTextQuestion.php.
|
protected |
Definition at line 409 of file class.assTextQuestion.php.
References ilObjAdvancedEditing\_getRichTextEditor(), assQuestion\getHtmlUserSolutionPurifier(), ilUtil\isHTML(), and ilUtil\stripSlashes().
Referenced by saveWorkingData().
assTextQuestion::getTextRating | ( | ) |
Definition at line 470 of file class.assTextQuestion.php.
References $text_rating.
Referenced by isKeywordMatching(), and saveAdditionalQuestionDataToDb().
|
static |
Definition at line 698 of file class.assTextQuestion.php.
assTextQuestion::isComplete | ( | ) |
Definition at line 98 of file class.assTextQuestion.php.
References getMaximumPoints().
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 254 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().
|
private |
Definition at line 230 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().
assTextQuestion::isWordCounterEnabled | ( | ) |
Definition at line 180 of file class.assTextQuestion.php.
References $word_counter_enabled.
Referenced by saveAdditionalQuestionDataToDb(), and toLog().
assTextQuestion::loadFromDb | ( | int | $question_id | ) |
Definition at line 118 of file class.assTextQuestion.php.
References $data, Vendor\Package\$e, ilRTE\_replaceMediaObjectImageSrc(), addAnswer(), flushAnswers(), getAdditionalTableName(), ilAssQuestionLifecycle\getDraftInstance(), assQuestion\getId(), ilAssQuestionLifecycle\getInstance(), 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.
assTextQuestion::saveAdditionalQuestionDataToDb | ( | ) |
Saves a record to the question types additional data table.
Implements ilObjQuestionScoringAdjustable.
Definition at line 420 of file class.assTextQuestion.php.
References getAdditionalTableName(), assQuestion\getId(), getKeywordRelation(), getMatchcondition(), getMaxNumOfChars(), getTextRating(), ILIAS\Repository\int(), isWordCounterEnabled(), null, and ilObjAnswerScoringAdjustable\saveAnswerSpecificDataToDb().
Referenced by saveToDb().
assTextQuestion::saveToDb | ( | ?int | $original_id = null | ) |
Definition at line 110 of file class.assTextQuestion.php.
References assQuestion\$original_id, saveAdditionalQuestionDataToDb(), ilObjAnswerScoringAdjustable\saveAnswerSpecificDataToDb(), and assQuestion\saveQuestionDataToDb().
assTextQuestion::saveWorkingData | ( | int | $active_id, |
?int | $pass = null , |
||
bool | $authorized = true |
||
) |
Definition at line 386 of file class.assTextQuestion.php.
References ilObjTest\_getPass(), assQuestion\getProcessLocker(), getSolutionSubmit(), null, assQuestion\removeCurrentSolution(), and assQuestion\saveCurrentSolution().
assTextQuestion::setAnswers | ( | $answers | ) |
Definition at line 638 of file class.assTextQuestion.php.
References addAnswer(), flushAnswers(), and ILIAS\Repository\refinery().
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 691 of file class.assTextQuestion.php.
References $relation, and null.
Referenced by loadFromDb().
assTextQuestion::setMatchcondition | ( | int | $matchcondition | ) |
assTextQuestion::setMaxNumOfChars | ( | int | $maxchars = 0 | ) |
Definition at line 175 of file class.assTextQuestion.php.
Referenced by loadFromDb().
assTextQuestion::setTextRating | ( | $a_text_rating | ) |
Definition at line 475 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().
assTextQuestion::setWordCounterEnabled | ( | bool | $word_counter_enabled | ) |
Definition at line 185 of file class.assTextQuestion.php.
References $word_counter_enabled.
Referenced by loadFromDb().
|
protected |
Definition at line 824 of file class.assTextQuestion.php.
References ILIAS\Repository\refinery().
assTextQuestion::solutionValuesToText | ( | array | $solution_values | ) |
Definition at line 837 of file class.assTextQuestion.php.
assTextQuestion::toJSON | ( | ) |
Returns a JSON representation of the question.
Implements ILIAS\TestQuestionPool\Questions\QuestionLMExportable.
Definition at line 516 of file class.assTextQuestion.php.
References assQuestion\formatSAQuestion(), assQuestion\getId(), getMaxNumOfChars(), assQuestion\getNrOfTries(), assQuestion\getQuestion(), getQuestionType(), assQuestion\getShuffle(), and assQuestion\getTitleForHTMLOutput().
assTextQuestion::toLog | ( | AdditionalInformationGenerator | $additional_info | ) |
Implements ILIAS\TestQuestionPool\Questions\Question.
Definition at line 781 of file class.assTextQuestion.php.
References assQuestion\formatSAQuestion(), getAnswers(), ASS_AnswerSimple\getAnswertext(), ILIAS\Test\Logging\AdditionalInformationGenerator\getEnabledDisabledTagForBool(), getKeywordRelation(), getMaximumPoints(), getMaxNumOfChars(), ASS_AnswerSimple\getPoints(), assQuestion\getQuestion(), getQuestionType(), getScoringModeLangVar(), ILIAS\Test\Logging\AdditionalInformationGenerator\getTagForLangVar(), assQuestion\getTitleForHTMLOutput(), and isWordCounterEnabled().
array assTextQuestion::$answers = [] |
Definition at line 63 of file class.assTextQuestion.php.
Referenced by getAnswers().
|
private |
Definition at line 51 of file class.assTextQuestion.php.
Referenced by getKeywordRelation().
array assTextQuestion::$keywords |
Definition at line 57 of file class.assTextQuestion.php.
|
private |
Definition at line 50 of file class.assTextQuestion.php.
Referenced by getMatchcondition(), and setMatchcondition().
|
private |
Definition at line 47 of file class.assTextQuestion.php.
Referenced by getMaxNumOfChars().
|
private |
Definition at line 49 of file class.assTextQuestion.php.
Referenced by getTextRating().
|
private |
Definition at line 48 of file class.assTextQuestion.php.
Referenced by isWordCounterEnabled(), and setWordCounterEnabled().
|
protected |
Definition at line 40 of file class.assTextQuestion.php.
const assTextQuestion::SCORING_MODE_KEYWORD_RELATION_ALL = 'all' |
Definition at line 44 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 43 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 42 of file class.assTextQuestion.php.
Referenced by getScoringModeLangVar(), assTextQuestionGUI\populateAnswerSpecificFormPart(), and assTextQuestionGUI\writeAnswerSpecificPostData().
const assTextQuestion::SCORING_MODE_KEYWORD_RELATION_ONE = 'one' |
Definition at line 45 of file class.assTextQuestion.php.
Referenced by assTextQuestionGUI\getBestAnswer(), getScoringModeLangVar(), assTextQuestionGUI\populateAnswerSpecificFormPart(), and assTextQuestionGUI\writeAnswerSpecificPostData().