|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Inheritance diagram for assClozeTest:
Collaboration diagram for assClozeTest:Public Member Functions | |
| __construct ( $title="", $comment="", $author="", $owner=-1, $question="") | |
| assClozeTest constructor More... | |
| isComplete () | |
| Returns TRUE, if a cloze test is complete for use. More... | |
| cleanQuestiontext ($text) | |
| Cleans cloze question text to remove attributes or tags from older ILIAS versions. More... | |
| replaceFirstGap ($gaptext, $content) | |
| Replace the first gap in a string without treating backreferences. More... | |
| loadFromDb ($question_id) | |
| Loads a assClozeTest object from a database. More... | |
| saveToDb ($original_id="") | |
| Saves a assClozeTest object to a database. More... | |
| saveAnswerSpecificDataToDb () | |
| Save all gaps to the database. More... | |
| saveAdditionalQuestionDataToDb () | |
| Saves the data for the additional data table. More... | |
| getGaps () | |
| Returns the array of gaps. More... | |
| flushGaps () | |
| Deletes all gaps without changing the cloze text. More... | |
| setClozeText ($cloze_text="") | |
| Evaluates the text gap solutions from the cloze text. More... | |
| setClozeTextValue ($cloze_text="") | |
| getClozeText () | |
| Returns the cloze text. More... | |
| getClozeTextForHTMLOutput () | |
| Returns the cloze text as HTML (with optional nl2br) Fix for Mantis 29987: We assume Tiny embeds any text in tags, so if no tags are present, we derive it's non-HTML content and apply nl2br. More... | |
| getStartTag () | |
| Returns the start tag of a cloze gap. More... | |
| setStartTag ($start_tag="[gap]") | |
| Sets the start tag of a cloze gap. More... | |
| getEndTag () | |
| Returns the end tag of a cloze gap. More... | |
| setEndTag ($end_tag="[/gap]") | |
| Sets the end tag of a cloze gap. More... | |
| getFeedbackMode () | |
| setFeedbackMode ($feedbackMode) | |
| createGapsFromQuestiontext () | |
| Create gap entries by parsing the question text. More... | |
| setGapType ($gap_index, $gap_type) | |
| Set the type of a gap with a given index. More... | |
| setGapShuffle ($gap_index=0, $shuffle=1) | |
| Sets the shuffle state of a gap with a given index. More... | |
| clearGapAnswers () | |
| Removes all answers from the gaps. More... | |
| getGapCount () | |
| Returns the number of gaps. More... | |
| addGapAnswer ($gap_index, $order, $answer) | |
| Sets the answer text of a gap with a given index. More... | |
| getGap ($gap_index=0) | |
| Returns the gap at a given index. More... | |
| setGapSize ($gap_index, $size) | |
| setGapAnswerPoints ($gap_index, $order, $points) | |
| Sets the points of a gap with a given index and an answer with a given order. More... | |
| addGapText ($gap_index) | |
| Adds a new answer text value to a text gap with a given index. More... | |
| addGapAtIndex ($gap, $index) | |
| Adds a ClozeGap object at a given index. More... | |
| setGapAnswerLowerBound ($gap_index, $order, $bound) | |
| Sets the lower bound of a gap with a given index and an answer with a given order. More... | |
| setGapAnswerUpperBound ($gap_index, $order, $bound) | |
| Sets the upper bound of a gap with a given index and an answer with a given order. More... | |
| getMaximumPoints () | |
| Returns the maximum points, a learner can reach answering the question. More... | |
| duplicate (bool $for_test=true, string $title="", string $author="", int $owner=-1, $testObjId=null) | |
| Duplicates an assClozeTest. More... | |
| copyObject ($target_questionpool_id, $title="") | |
| Copies an assClozeTest object. More... | |
| createNewOriginalFromThisDuplicate ($targetParentId, $targetQuestionTitle="") | |
| copyGapCombination ($orgID, $newID) | |
| updateClozeTextFromGaps () | |
| Updates the gap parameters in the cloze text from the form input. More... | |
| deleteAnswerText ($gap_index, $answer_index) | |
| Deletes the answer text of a gap with a given index and an answer with a given order. More... | |
| deleteGap ($gap_index) | |
| Deletes a gap with a given index. More... | |
| getTextgapPoints ($a_original, $a_entered, $max_points) | |
| Returns the points for a text gap and compares the given solution with the entered solution using the text gap rating options. More... | |
| getNumericgapPoints ($a_original, $a_entered, $max_points, $lowerBound, $upperBound) | |
| Returns the points for a text gap and compares the given solution with the entered solution using the text gap rating options. More... | |
| checkForValidFormula ($value) | |
| calculateReachedPoints ($active_id, $pass=null, $authorizedSolution=true, $returndetails=false) | |
| Returns the points, a learner has reached answering the question. More... | |
| validateSolutionSubmit () | |
| fetchSolutionSubmit ($submit) | |
| getSolutionSubmitValidation () | |
| getSolutionSubmit () | |
| saveWorkingData ($active_id, $pass=null, $authorized=true) | |
| Saves the learners input of the question to the database. More... | |
| getQuestionType () | |
| Returns the question type of the question. More... | |
| getTextgapRating () | |
| Returns the rating option for text gaps. More... | |
| setTextgapRating ($a_textgap_rating) | |
| Sets the rating option for text gaps. More... | |
| getIdenticalScoring () | |
| Returns the identical scoring status of the question. More... | |
| setIdenticalScoring ($a_identical_scoring) | |
| Sets the identical scoring option for cloze questions. More... | |
| getAdditionalTableName () | |
| Returns the name of the additional question data table in the database. More... | |
| getAnswerTableName () | |
| setFixedTextLength ($a_text_len) | |
| Sets a fixed text length for all text fields in the cloze question. More... | |
| getFixedTextLength () | |
| Gets the fixed text length for all text fields in the cloze question. More... | |
| getMaximumGapPoints ($gap_index) | |
| Returns the maximum points for a gap. More... | |
| getRTETextWithMediaObjects () | |
| Collects all text in the question which could contain media objects which were created with the Rich Text Editor. More... | |
| getGapCombinationsExists () | |
| getGapCombinations () | |
| setGapCombinationsExists ($value) | |
| setGapCombinations ($value) | |
| setExportDetailsXLSX (ilAssExcelFormatHelper $worksheet, int $startrow, int $col, int $active_id, int $pass) | |
| {} More... | |
| toJSON () | |
| Returns a JSON representation of the question. More... | |
| getOperators ($expression) | |
| Get all available operations for a specific question. More... | |
| getExpressionTypes () | |
| Get all available expression types for a specific question. More... | |
| getAvailableAnswerOptions ($index=null) | |
| If index is null, the function returns an array with all anwser options Else it returns the specific answer option. More... | |
| calculateCombinationResult ($user_result) | |
| calculateReachedPointsFromPreviewSession (ilAssQuestionPreviewSession $preview_session) | |
| fetchAnswerValueForGap ($userSolution, $gapIndex) | |
| isAddableAnswerOptionValue (int $qIndex, string $answerOptionValue) | |
| addAnswerOptionValue (int $qIndex, string $answerOptionValue, float $points) | |
Public Member Functions inherited from assQuestion | |
| __construct (string $title="", string $comment="", string $author="", int $owner=-1, string $question="") | |
| assQuestion constructor More... | |
| getShuffler () | |
| setShuffler (Transformation $shuffler) | |
| setProcessLocker (ilAssQuestionProcessLocker $processLocker) | |
| getProcessLocker () | |
| fromXML ($item, int $questionpool_id, ?int $tst_id, &$tst_object, int &$question_counter, array $import_mapping, array &$solutionhints=[]) | |
| Receives parameters from a QTI parser and creates a valid ILIAS question object. More... | |
| 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... | |
| isComplete () | |
| Returns true, if a question is complete for use. 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 $authorizedSolution=true) | |
| returns the reached points ... More... | |
| calculateResultsFromSolution (int $active_id, int $pass, bool $obligationsEnabled=false) | |
| Calculates the question results from a previously saved question solution. More... | |
| persistWorkingState (int $active_id, $pass, bool $obligationsEnabled=false, bool $authorized=true) | |
| persists the working state for current testactive and testpass More... | |
| persistPreviewState (ilAssQuestionPreviewSession $previewSession) | |
| persists the preview state for current user and question More... | |
| validateSolutionSubmit () | |
| saveWorkingData (int $active_id, int $pass, bool $authorized=true) | |
| Saves the learners input of the question to the database. More... | |
| 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, $pass=null) | |
| getSolutionValues ($active_id, $pass=null, bool $authorized=true) | |
| Loads solutions of a given user from the database an returns it. More... | |
| getAdditionalTableName () | |
| getAnswerTableName () | |
| deleteAnswers (int $question_id) | |
| deleteAdditionalTableData (int $question_id) | |
| delete (int $question_id) | |
| getTotalAnswers () | |
| copyXHTMLMediaObjectsOfQuestion (int $a_q_id) | |
| syncXHTMLMediaObjectsOfQuestion () | |
| createPageObject () | |
| copyPageOfQuestion (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=-1) | |
| saveToDb () | |
| deleteSuggestedSolutions () | |
| getSuggestedSolution (int $subquestion_index=0) | |
| resolveInternalLink (string $internal_link) | |
| resolveSuggestedSolutionLinks () | |
| syncWithOriginal () | |
| getPoints () | |
| setPoints (float $points) | |
| getSolutionMaxPass (int $active_id) | |
| calculateReachedPoints ($active_id, $pass=null, $authorizedSolution=true, $returndetails=false) | |
| Returns the points, a learner has reached answering the question. More... | |
| deductHintPointsFromReachedPoints (ilAssQuestionPreviewSession $previewSession, $reachedPoints) | |
| calculateReachedPointsFromPreviewSession (ilAssQuestionPreviewSession $previewSession) | |
| isPreviewSolutionCorrect (ilAssQuestionPreviewSession $previewSession) | |
| adjustReachedPointsByScoringOptions ($points, $active_id, $pass=null) | |
| 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="") | |
| getQuestionType () | |
| Returns the question type of the question. More... | |
| getQuestionTypeID () | |
| syncHints () | |
| cleanupMediaObjectUsage () | |
| getInstances () | |
| getActiveUserData (int $active_id) | |
| Returns the user id and the test id for a given active id. More... | |
| hasSpecificFeedback () | |
| setExportDetailsXLSX (ilAssExcelFormatHelper $worksheet, int $startrow, int $col, int $active_id, int $pass) | |
| 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 ($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 () | |
| duplicate (bool $for_test=true, string $title="", string $author="", int $owner=-1, $testObjId=null) | |
| 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 $valuePairs) | |
| areObligationsToBeConsidered () | |
| setObligationsToBeConsidered (bool $obligationsToBeConsidered) | |
| updateTimestamp () | |
| getTestPresentationConfig () | |
Public Member Functions inherited from iQuestionCondition | |
| getUserQuestionResult ($active_id, $pass) | |
| Get the user solution for a question by active_id and the test pass. More... | |
Data Fields | |
| array | $gaps = [] |
| $gap_combinations | |
| $gap_combinations_exists | |
| $start_tag | |
| $end_tag | |
| $textgap_rating | |
| $identical_scoring | |
| $fixedTextLength | |
| $cloze_text | |
| ilAssQuestionFeedback | $feedbackOBJ |
Data Fields inherited from assQuestion | |
| const | TRIM_PATTERN = '/^[\p{C}\p{Z}]+|[\p{C}\p{Z}]+$/u' |
| const | ADDITIONAL_CONTENT_EDITING_MODE_RTE = 'default' |
| const | ADDITIONAL_CONTENT_EDITING_MODE_IPE = 'pageobject' |
| ilAssQuestionFeedback | $feedbackOBJ |
| bool | $prevent_rte_usage = false |
| bool | $selfassessmenteditingmode = false |
| int | $defaultnroftries = 0 |
| string | $questionActionCmd = 'handleQuestionAction' |
| const | KEY_VALUES_IMPLOSION_SEPARATOR = ':' |
Data Fields inherited from iQuestionCondition | |
| const | StringResultExpression = '~TEXT~' |
| const | PercentageResultExpression = '%n%' |
| const | NumericResultExpression = '#n#' |
| const | MatchingResultExpression = ';n:m;' |
| const | OrderingResultExpression = '$n,m,o,p$' |
| const | NumberOfResultExpression = '+n+' |
| const | ExclusiveResultExpression = '*n,m,o,p*' |
| const | EmptyAnswerExpression = "?" |
Protected Member Functions | |
| saveClozeGapItemsToDb ($gap, $key) | |
| Save all items belonging to one cloze gap to the db. More... | |
| saveClozeTextGapRecordToDb ($next_id, $key, $item, $gap) | |
| Saves a gap-item record. More... | |
| saveClozeSelectGapRecordToDb ($next_id, $key, $item, $gap) | |
| Saves a gap-item record. More... | |
| saveClozeNumericGapRecordToDb ($next_id, $key, $item, $gap) | |
| Saves a gap-item record. More... | |
| isValidNumericSubmitValue ($submittedValue) | |
| lmMigrateQuestionTypeSpecificContent (ilAssSelfAssessmentMigrator $migrator) | |
| calculateReachedPointsForSolution ($user_result, &$detailed=null) | |
Protected Member Functions inherited from assQuestion | |
| getQuestionAction () | |
| isNonEmptyItemListPostSubmission (string $postSubmissionFieldname) | |
| log (int $active_id, string $langVar) | |
| savePreviewData (ilAssQuestionPreviewSession $previewSession) | |
| deletePageOfQuestion (int $question_id) | |
| onDuplicate (int $originalParentId, int $originalQuestionId, int $duplicateParentId, int $duplicateQuestionId) | |
| beforeSyncWithOriginal (int $origQuestionId, int $dupQuestionId, int $origParentObjId, int $dupParentObjId) | |
| afterSyncWithOriginal (int $origQuestionId, int $dupQuestionId, int $origParentObjId, int $dupParentObjId) | |
| 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 () | |
| syncSuggestedSolutions (int $target_question_id, int $target_obj_id) | |
| duplicateSuggestedSolutionFiles (int $parent_id, int $question_id) | |
| Duplicates the files of a suggested solution if the question is duplicated. More... | |
| syncSuggestedSolutionFiles (int $target_question_id, int $target_obj_id) | |
| copySuggestedSolutionFiles (int $source_questionpool_id, int $source_question_id) | |
| copySuggestedSolutions (int $target_question_id) | |
| ensureNonNegativePoints ($points) | |
| purifyAndPrepareTextAreaOutput (string $content) | |
| getRTETextWithMediaObjects () | |
| getSelfAssessmentFormatter () | |
| lmMigrateQuestionTypeGenericContent (ilAssSelfAssessmentMigrator $migrator) | |
| lmMigrateQuestionTypeSpecificContent (ilAssSelfAssessmentMigrator $migrator) | |
| duplicateQuestionHints (int $originalQuestionId, int $duplicateQuestionId) | |
| 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 () | |
| build basic test question configuration instance More... | |
| getSuggestedSolutionsRepo () | |
| loadSuggestedSolutions () | |
Private Attributes | |
| RandomGroup | $randomGroup |
Additional Inherited Members | |
Static Public Member Functions inherited from assQuestion | |
| static | setForcePassResultUpdateEnabled (bool $forcePassResultsUpdateEnabled) |
| static | isForcePassResultUpdateEnabled () |
| static | _getSuggestedSolutionOutput (int $question_id) |
| static | _getReachedPoints (int $active_id, int $question_id, int $pass) |
| static | logAction (string $logtext, int $active_id, int $question_id) |
| static | isFileAvailable (string $file) |
| static | saveOriginalId (int $questionId, int $originalId) |
| static | resetOriginalId (int $questionId) |
| static | _getInternalLinkHref (string $target="") |
| static | instantiateQuestion (int $question_id) |
| static | _getSolutionMaxPass (int $question_id, int $active_id) |
| Returns the maximum pass a users question solution. More... | |
| static | _isWriteable (int $question_id, int $user_id) |
| static | _setReachedPoints (int $active_id, int $question_id, float $points, float $maxpoints, int $pass, bool $manualscoring, bool $obligationsEnabled, ?int $test_id=null) |
| Sets the points, a learner has reached answering the question Additionally objective results are updated. More... | |
| static | _needsManualScoring (int $question_id) |
| static | getFeedbackClassNameByQuestionType (string $questionType) |
| static | instantiateQuestionGUI (int $a_question_id) |
| static | _questionExistsInTest (int $question_id, int $test_id) |
| static | lookupParentObjId (int $questionId) |
| static | isObligationPossible (int $questionId) |
| 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... | |
Static Protected Member Functions inherited from assQuestion | |
| static | getNumExistingSolutionRecords (int $activeId, int $pass, int $questionId) |
Static Protected Attributes inherited from assQuestion | |
| static | $forcePassResultsUpdateEnabled = false |
| static | $imageSourceFixReplaceMap |
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 Class for cloze tests
Definition at line 34 of file class.assClozeTest.php.
| assClozeTest::__construct | ( | $title = "", |
|
$comment = "", |
|||
$author = "", |
|||
$owner = -1, |
|||
$question = "" |
|||
| ) |
assClozeTest constructor
The constructor takes possible arguments an creates an instance of the assClozeTest 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 |
Definition at line 124 of file class.assClozeTest.php.
References assQuestion\$author, assQuestion\$comment, $DIC, assQuestion\$owner, assQuestion\$question, assQuestion\$title, ILIAS\MetaData\Repository\Validation\Data\__construct(), and assQuestion\setQuestion().
Here is the call graph for this function:| assClozeTest::addAnswerOptionValue | ( | int | $qIndex, |
| string | $answerOptionValue, | ||
| float | $points | ||
| ) |
Definition at line 2010 of file class.assClozeTest.php.
References getGap().
Here is the call graph for this function:| assClozeTest::addGapAnswer | ( | $gap_index, | |
| $order, | |||
| $answer | |||
| ) |
Sets the answer text of a gap with a given index.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $gap_index | A nonnegative index of the n-th gap |
| integer | $order | The order of the answer text |
| string | $answer | The answer text public |
Definition at line 766 of file class.assClozeTest.php.
References CLOZE_NUMERIC.
| assClozeTest::addGapAtIndex | ( | $gap, | |
| $index | |||
| ) |
Adds a ClozeGap object at a given index.
| object | $gap | The gap object |
| integer | $index | A nonnegative index of the n-th gap public |
Definition at line 844 of file class.assClozeTest.php.
| assClozeTest::addGapText | ( | $gap_index | ) |
Adds a new answer text value to a text gap with a given index.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $gap_index | A nonnegative index of the n-th gap public |
Definition at line 824 of file class.assClozeTest.php.
| assClozeTest::calculateCombinationResult | ( | $user_result | ) |
Definition at line 1790 of file class.assClozeTest.php.
References assQuestion\$points, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, assQuestion\getId(), getNumericgapPoints(), and getTextgapPoints().
Referenced by calculateReachedPointsForSolution().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::calculateReachedPoints | ( | $active_id, | |
$pass = null, |
|||
$authorizedSolution = true, |
|||
$returndetails = false |
|||
| ) |
Returns the points, a learner has reached answering the question.
The points are calculated from the given answers.
public
| integer | $active_id | |
| integer | $pass | |
| boolean | $returndetails | (deprecated !!) |
Definition at line 1249 of file class.assClozeTest.php.
References $data, assQuestion\$db, $ilDB, calculateReachedPointsForSolution(), assQuestion\getCurrentSolutionResultSet(), and assQuestion\getSolutionMaxPass().
Referenced by getExpressionTypes().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| array | $user_result | |
| array | $detailed |
Definition at line 1862 of file class.assClozeTest.php.
References assQuestion\$points, calculateCombinationResult(), CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, getIdenticalScoring(), getMaximumGapPoints(), getNumericgapPoints(), and getTextgapPoints().
Referenced by calculateReachedPoints(), and calculateReachedPointsFromPreviewSession().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::calculateReachedPointsFromPreviewSession | ( | ilAssQuestionPreviewSession | $preview_session | ) |
Definition at line 1959 of file class.assClozeTest.php.
References ILIAS\LTI\ToolProvider\$key, calculateReachedPointsForSolution(), assQuestion\deductHintPointsFromReachedPoints(), assQuestion\ensureNonNegativePoints(), and ilAssQuestionPreviewSession\getParticipantsSolution().
Here is the call graph for this function:| assClozeTest::checkForValidFormula | ( | $value | ) |
| assClozeTest::cleanQuestiontext | ( | $text | ) |
Cleans cloze question text to remove attributes or tags from older ILIAS versions.
| string | $text | The cloze question text |
Definition at line 169 of file class.assClozeTest.php.
Referenced by loadFromDb(), and setClozeText().
Here is the caller graph for this function:| assClozeTest::clearGapAnswers | ( | ) |
Removes all answers from the gaps.
public
Definition at line 733 of file class.assClozeTest.php.
| assClozeTest::copyGapCombination | ( | $orgID, | |
| $newID | |||
| ) |
Definition at line 1060 of file class.assClozeTest.php.
Referenced by copyObject(), createNewOriginalFromThisDuplicate(), and duplicate().
Here is the caller graph for this function:| assClozeTest::copyObject | ( | $target_questionpool_id, | |
$title = "" |
|||
| ) |
Copies an assClozeTest object.
public
Definition at line 991 of file class.assClozeTest.php.
References assQuestion\$original_id, assQuestion\$title, copyGapCombination(), assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:| assClozeTest::createGapsFromQuestiontext | ( | ) |
Create gap entries by parsing the question text.
public
Definition at line 680 of file class.assClozeTest.php.
References ILIAS\LTI\ToolProvider\$key, CLOZE_TEXT, and getClozeText().
Referenced by setClozeText().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::createNewOriginalFromThisDuplicate | ( | $targetParentId, | |
$targetQuestionTitle = "" |
|||
| ) |
Definition at line 1025 of file class.assClozeTest.php.
References assQuestion\$id, copyGapCombination(), assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:| assClozeTest::deleteAnswerText | ( | $gap_index, | |
| $answer_index | |||
| ) |
Deletes the answer text of a gap with a given index and an answer with a given order.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $gap_index | A nonnegative index of the n-th gap |
| integer | $answer_index | The order of the answer text public |
Definition at line 1097 of file class.assClozeTest.php.
References deleteGap(), and updateClozeTextFromGaps().
Here is the call graph for this function:| assClozeTest::deleteGap | ( | $gap_index | ) |
Deletes a gap with a given index.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $gap_index | A nonnegative index of the n-th gap public |
Definition at line 1119 of file class.assClozeTest.php.
References getClozeText(), getGaps(), and replaceFirstGap().
Referenced by deleteAnswerText().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::duplicate | ( | bool | $for_test = true, |
| string | $title = "", |
||
| string | $author = "", |
||
| int | $owner = -1, |
||
$testObjId = null |
|||
| ) |
Duplicates an assClozeTest.
public
Definition at line 936 of file class.assClozeTest.php.
References assQuestion\$author, assQuestion\$original_id, assQuestion\$owner, assQuestion\$title, copyGapCombination(), assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:| assClozeTest::fetchAnswerValueForGap | ( | $userSolution, | |
| $gapIndex | |||
| ) |
Definition at line 1979 of file class.assClozeTest.php.
| assClozeTest::fetchSolutionSubmit | ( | $submit | ) |
Definition at line 1310 of file class.assClozeTest.php.
References CLOZE_NUMERIC, CLOZE_SELECT, getGaps(), and ILIAS\Repository\int().
Referenced by getSolutionSubmit().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::flushGaps | ( | ) |
Deletes all gaps without changing the cloze text.
Definition at line 544 of file class.assClozeTest.php.
| assClozeTest::getAdditionalTableName | ( | ) |
Returns the name of the additional question data table in the database.
Definition at line 1502 of file class.assClozeTest.php.
Referenced by loadFromDb(), and saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assClozeTest::getAnswerTableName | ( | ) |
Definition at line 1507 of file class.assClozeTest.php.
| assClozeTest::getAvailableAnswerOptions | ( | $index = null | ) |
If index is null, the function returns an array with all anwser options Else it returns the specific answer option.
| null | int | $index |
Implements iQuestionCondition.
Definition at line 1781 of file class.assClozeTest.php.
References getGap(), and getGaps().
Here is the call graph for this function:| assClozeTest::getClozeText | ( | ) |
Returns the cloze text.
Definition at line 577 of file class.assClozeTest.php.
References $cloze_text.
Referenced by createGapsFromQuestiontext(), deleteGap(), getClozeTextForHTMLOutput(), getRTETextWithMediaObjects(), isComplete(), lmMigrateQuestionTypeSpecificContent(), saveAdditionalQuestionDataToDb(), toJSON(), and updateClozeTextFromGaps().
Here is the caller graph for this function:| assClozeTest::getClozeTextForHTMLOutput | ( | ) |
Returns the cloze text as HTML (with optional nl2br) Fix for Mantis 29987: We assume Tiny embeds any text in tags, so if no tags are present, we derive it's non-HTML content and apply nl2br.
Definition at line 590 of file class.assClozeTest.php.
References getClozeText(), assQuestion\getHtmlQuestionContentPurifier(), assQuestion\isAdditionalContentEditingModePageObject(), and ilLegacyFormElementsUtil\prepareTextareaOutput().
Here is the call graph for this function:| assClozeTest::getEndTag | ( | ) |
Returns the end tag of a cloze gap.
Definition at line 641 of file class.assClozeTest.php.
References $end_tag.
| assClozeTest::getExpressionTypes | ( | ) |
Get all available expression types for a specific question.
Implements iQuestionCondition.
Definition at line 1704 of file class.assClozeTest.php.
References $data, $DIC, $ilDB, assQuestion\$points, calculateReachedPoints(), iQuestionCondition\EmptyAnswerExpression, assQuestion\getId(), getMaximumPoints(), iQuestionCondition\getUserQuestionResult(), assQuestion\lookupMaxStep(), iQuestionCondition\NumberOfResultExpression, iQuestionCondition\NumericResultExpression, iQuestionCondition\PercentageResultExpression, and iQuestionCondition\StringResultExpression.
Here is the call graph for this function:| assClozeTest::getFeedbackMode | ( | ) |
Definition at line 661 of file class.assClozeTest.php.
References $feedbackMode.
Referenced by saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assClozeTest::getFixedTextLength | ( | ) |
Gets the fixed text length for all text fields in the cloze question.
Definition at line 1529 of file class.assClozeTest.php.
References $fixedTextLength.
Referenced by saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assClozeTest::getGap | ( | $gap_index = 0 | ) |
Returns the gap at a given index.
| integer | $gap_index | A nonnegative index of the n-th gap |
Definition at line 783 of file class.assClozeTest.php.
Referenced by addAnswerOptionValue(), getAvailableAnswerOptions(), getSolutionSubmitValidation(), isAddableAnswerOptionValue(), saveWorkingData(), and validateSolutionSubmit().
Here is the caller graph for this function:| assClozeTest::getGapCombinations | ( | ) |
| assClozeTest::getGapCombinationsExists | ( | ) |
| assClozeTest::getGapCount | ( | ) |
Returns the number of gaps.
Definition at line 747 of file class.assClozeTest.php.
| assClozeTest::getGaps | ( | ) |
Returns the array of gaps.
Definition at line 534 of file class.assClozeTest.php.
References $gaps.
Referenced by deleteGap(), fetchSolutionSubmit(), getAvailableAnswerOptions(), isComplete(), setExportDetailsXLSX(), toJSON(), and updateClozeTextFromGaps().
Here is the caller graph for this function:| assClozeTest::getIdenticalScoring | ( | ) |
Returns the identical scoring status of the question.
Definition at line 1479 of file class.assClozeTest.php.
Referenced by calculateReachedPointsForSolution(), and saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assClozeTest::getMaximumGapPoints | ( | $gap_index | ) |
Returns the maximum points for a gap.
| integer | $gap_index | The index of the gap |
Definition at line 1542 of file class.assClozeTest.php.
References assQuestion\$points.
Referenced by calculateReachedPointsForSolution().
Here is the caller graph for this function:| assClozeTest::getMaximumPoints | ( | ) |
Returns the maximum points, a learner can reach answering the question.
public
Definition at line 889 of file class.assClozeTest.php.
References assQuestion\$points, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, and assQuestion\getId().
Referenced by getExpressionTypes(), and isComplete().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::getNumericgapPoints | ( | $a_original, | |
| $a_entered, | |||
| $max_points, | |||
| $lowerBound, | |||
| $upperBound | |||
| ) |
Returns the points for a text gap and compares the given solution with the entered solution using the text gap rating options.
| string | $a_original | The original (correct) text |
| string | $a_entered | The text entered by the user |
| float | $max_points | The maximum number of points for the solution public |
Definition at line 1206 of file class.assClozeTest.php.
Referenced by calculateCombinationResult(), and calculateReachedPointsForSolution().
Here is the caller graph for this function:| assClozeTest::getOperators | ( | $expression | ) |
Get all available operations for a specific question.
| string | $expression |
Implements iQuestionCondition.
Definition at line 1695 of file class.assClozeTest.php.
References ilOperatorsExpressionMapping\getOperatorsByExpression().
Here is the call graph for this function:| assClozeTest::getQuestionType | ( | ) |
Returns the question type of the question.
Definition at line 1430 of file class.assClozeTest.php.
Referenced by toJSON().
Here is the caller graph for this function:| assClozeTest::getRTETextWithMediaObjects | ( | ) |
Collects all text in the question which could contain media objects which were created with the Rich Text Editor.
Definition at line 1562 of file class.assClozeTest.php.
References getClozeText().
Here is the call graph for this function:| assClozeTest::getSolutionSubmit | ( | ) |
Definition at line 1366 of file class.assClozeTest.php.
References fetchSolutionSubmit().
Referenced by saveWorkingData().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::getSolutionSubmitValidation | ( | ) |
Definition at line 1342 of file class.assClozeTest.php.
References ILIAS\LTI\ToolProvider\$key, CLOZE_NUMERIC, CLOZE_SELECT, and getGap().
Referenced by validateSolutionSubmit().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::getStartTag | ( | ) |
Returns the start tag of a cloze gap.
Definition at line 617 of file class.assClozeTest.php.
References $start_tag.
| assClozeTest::getTextgapPoints | ( | $a_original, | |
| $a_entered, | |||
| $max_points | |||
| ) |
Returns the points for a text gap and compares the given solution with the entered solution using the text gap rating options.
| string | $a_original | The original (correct) text |
| string | $a_entered | The text entered by the user |
| integer | $max_points | The maximum number of points for the solution public |
Definition at line 1154 of file class.assClozeTest.php.
References $DIC, assQuestion\$refinery, getTextgapRating(), ilStr\strToLower(), TEXTGAP_RATING_CASEINSENSITIVE, TEXTGAP_RATING_CASESENSITIVE, TEXTGAP_RATING_LEVENSHTEIN1, TEXTGAP_RATING_LEVENSHTEIN2, TEXTGAP_RATING_LEVENSHTEIN3, TEXTGAP_RATING_LEVENSHTEIN4, and TEXTGAP_RATING_LEVENSHTEIN5.
Referenced by calculateCombinationResult(), and calculateReachedPointsForSolution().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::getTextgapRating | ( | ) |
Returns the rating option for text gaps.
Definition at line 1442 of file class.assClozeTest.php.
References $textgap_rating.
Referenced by getTextgapPoints(), and saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assClozeTest::isAddableAnswerOptionValue | ( | int | $qIndex, |
| string | $answerOptionValue | ||
| ) |
Definition at line 1993 of file class.assClozeTest.php.
References CLOZE_TEXT, and getGap().
Here is the call graph for this function:| assClozeTest::isComplete | ( | ) |
Returns TRUE, if a cloze test is complete for use.
Definition at line 150 of file class.assClozeTest.php.
References assQuestion\getAuthor(), getClozeText(), getGaps(), getMaximumPoints(), and assQuestion\getTitle().
Here is the call graph for this function:
|
protected |
Definition at line 1279 of file class.assClozeTest.php.
Referenced by validateSolutionSubmit().
Here is the caller graph for this function:
|
protected |
| ilAssSelfAssessmentMigrator | $migrator |
Definition at line 1628 of file class.assClozeTest.php.
References getClozeText(), and ilAssSelfAssessmentMigrator\migrateToLmContent().
Here is the call graph for this function:| assClozeTest::loadFromDb | ( | $question_id | ) |
Loads a assClozeTest object from a database.
| integer | $question_id | A unique key which defines the cloze test in the database |
Definition at line 206 of file class.assClozeTest.php.
References $data, $DIC, Vendor\Package\$e, $ilDB, ilRTE\_replaceMediaObjectImageSrc(), cleanQuestiontext(), CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, ilAssClozeTestFeedback\FB_MODE_GAP_QUESTION, getAdditionalTableName(), ilAssQuestionLifecycle\getDraftInstance(), ilAssQuestionLifecycle\getInstance(), assQuestion\setAdditionalContentEditingMode(), assQuestion\setAuthor(), setClozeText(), assQuestion\setComment(), setFeedbackMode(), setFixedTextLength(), setGapCombinations(), setGapCombinationsExists(), assQuestion\setId(), setIdenticalScoring(), assQuestion\setLifecycle(), assQuestion\setNrOfTries(), assQuestion\setObjId(), assQuestion\setOriginalId(), assQuestion\setOwner(), assQuestion\setPoints(), assQuestion\setQuestion(), setTextgapRating(), and assQuestion\setTitle().
Here is the call graph for this function:| assClozeTest::replaceFirstGap | ( | $gaptext, | |
| $content | |||
| ) |
Replace the first gap in a string without treating backreferences.
| string | $gaptext | text with gap tags |
| string | $content | content for the first gap |
Definition at line 191 of file class.assClozeTest.php.
Referenced by deleteGap(), and updateClozeTextFromGaps().
Here is the caller graph for this function:| assClozeTest::saveAdditionalQuestionDataToDb | ( | ) |
Saves the data for the additional data table.
This method uses the ugly DELETE-INSERT. Here, this does no harm.
Implements ilObjQuestionScoringAdjustable.
Definition at line 356 of file class.assClozeTest.php.
References $DIC, ilRTE\_replaceMediaObjectImageSrc(), getAdditionalTableName(), getClozeText(), getFeedbackMode(), getFixedTextLength(), assQuestion\getId(), getIdenticalScoring(), and getTextgapRating().
Referenced by saveToDb().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::saveAnswerSpecificDataToDb | ( | ) |
Save all gaps to the database.
Implements ilObjAnswerScoringAdjustable.
Definition at line 335 of file class.assClozeTest.php.
References $DIC, $ilDB, ILIAS\LTI\ToolProvider\$key, assQuestion\getId(), and saveClozeGapItemsToDb().
Referenced by saveToDb().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Save all items belonging to one cloze gap to the db.
| $gap | |
| $key |
Definition at line 383 of file class.assClozeTest.php.
References $DIC, $ilDB, ILIAS\LTI\ToolProvider\$key, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, saveClozeNumericGapRecordToDb(), saveClozeSelectGapRecordToDb(), and saveClozeTextGapRecordToDb().
Referenced by saveAnswerSpecificDataToDb().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Saves a gap-item record.
| $next_id | int Next Id for the record. |
| $key | int Gap Id |
| $item | mixed Gap item data object. |
| $gap | mixed Gap data object. |
Definition at line 486 of file class.assClozeTest.php.
References $DIC, $ilDB, ILIAS\LTI\ToolProvider\$key, assQuestion\getId(), and ILIAS\Repository\int().
Referenced by saveClozeGapItemsToDb().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Saves a gap-item record.
| $next_id | int Next Id for the record. |
| $key | int Gap Id |
| $item | mixed Gap item data object. |
| $gap | mixed Gap data object. |
Definition at line 449 of file class.assClozeTest.php.
References $DIC, $ilDB, ILIAS\LTI\ToolProvider\$key, and assQuestion\getId().
Referenced by saveClozeGapItemsToDb().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Saves a gap-item record.
| $next_id | int Next Id for the record. |
| $key | int Gap Id |
| $item | mixed Gap item data object. |
| $gap | mixed Gap data object. |
Definition at line 412 of file class.assClozeTest.php.
References $DIC, $ilDB, ILIAS\LTI\ToolProvider\$key, assQuestion\getId(), and ILIAS\Repository\int().
Referenced by saveClozeGapItemsToDb().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::saveToDb | ( | $original_id = "" | ) |
Saves a assClozeTest object to a database.
| int | string | $original_id | ID of the original question |
public
Definition at line 319 of file class.assClozeTest.php.
References assQuestion\$original_id, saveAdditionalQuestionDataToDb(), saveAnswerSpecificDataToDb(), and assQuestion\saveQuestionDataToDb().
Here is the call graph for this function:| assClozeTest::saveWorkingData | ( | $active_id, | |
$pass = null, |
|||
$authorized = true |
|||
| ) |
Saves the learners input of the question to the database.
public
| integer | $active_id | Active id of the user |
| integer | $pass | Test pass |
Definition at line 1379 of file class.assClozeTest.php.
References ILIAS\LTI\ToolProvider\$key, ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), ilObjTest\_getPass(), CLOZE_SELECT, getGap(), assQuestion\getId(), assQuestion\getProcessLocker(), getSolutionSubmit(), ILIAS\Repository\lng(), assQuestion\logAction(), assQuestion\removeCurrentSolution(), assQuestion\saveCurrentSolution(), and ilUtil\stripSlashes().
Here is the call graph for this function:| assClozeTest::setClozeText | ( | $cloze_text = "" | ) |
Evaluates the text gap solutions from the cloze text.
A single or multiple text gap solutions could be entered using the following syntax in the cloze text: solution1 [, solution2, ..., solutionN] enclosed in the text gap selector gap[]
| string | $cloze_text | The cloze text with all gaps and gap gaps public |
Definition at line 558 of file class.assClozeTest.php.
References $cloze_text, cleanQuestiontext(), and createGapsFromQuestiontext().
Referenced by loadFromDb().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::setClozeTextValue | ( | $cloze_text = "" | ) |
| assClozeTest::setEndTag | ( | $end_tag = "[/gap]" | ) |
Sets the end tag of a cloze gap.
| string | $end_tag | The end tag for a cloze gap public |
Definition at line 653 of file class.assClozeTest.php.
References $end_tag.
| assClozeTest::setExportDetailsXLSX | ( | ilAssExcelFormatHelper | $worksheet, |
| int | $startrow, | ||
| int | $col, | ||
| int | $active_id, | ||
| int | $pass | ||
| ) |
{}
Definition at line 1589 of file class.assClozeTest.php.
References CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, ilExcel\getColumnCoord(), getGaps(), assQuestion\getSolutionValues(), ilAssExcelFormatHelper\getStringEscaping(), ILIAS\Repository\lng(), ilExcel\setBold(), ilAssExcelFormatHelper\setCell(), and ilAssExcelFormatHelper\setStringEscaping().
Here is the call graph for this function:| assClozeTest::setFeedbackMode | ( | $feedbackMode | ) |
| string | $feedbackMode |
Definition at line 669 of file class.assClozeTest.php.
References $feedbackMode.
Referenced by loadFromDb().
Here is the caller graph for this function:| assClozeTest::setFixedTextLength | ( | $a_text_len | ) |
Sets a fixed text length for all text fields in the cloze question.
| integer | $a_text_len | The text field length public |
Definition at line 1518 of file class.assClozeTest.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assClozeTest::setGapAnswerLowerBound | ( | $gap_index, | |
| $order, | |||
| $bound | |||
| ) |
Sets the lower bound of a gap with a given index and an answer with a given order.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $gap_index | A nonnegative index of the n-th gap |
| integer | $order | The order of the answer text |
| string | $answer | The lower bound of the answer public |
Definition at line 859 of file class.assClozeTest.php.
| assClozeTest::setGapAnswerPoints | ( | $gap_index, | |
| $order, | |||
| $points | |||
| ) |
Sets the points of a gap with a given index and an answer with a given order.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $gap_index | A nonnegative index of the n-th gap |
| integer | $order | The order of the answer text |
| string | $answer | The points of the answer public |
Definition at line 809 of file class.assClozeTest.php.
References assQuestion\$points.
| assClozeTest::setGapAnswerUpperBound | ( | $gap_index, | |
| $order, | |||
| $bound | |||
| ) |
Sets the upper bound of a gap with a given index and an answer with a given order.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $gap_index | A nonnegative index of the n-th gap |
| integer | $order | The order of the answer text |
| string | $answer | The upper bound of the answer public |
Definition at line 876 of file class.assClozeTest.php.
| assClozeTest::setGapCombinations | ( | $value | ) |
Definition at line 1581 of file class.assClozeTest.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assClozeTest::setGapCombinationsExists | ( | $value | ) |
Definition at line 1576 of file class.assClozeTest.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assClozeTest::setGapShuffle | ( | $gap_index = 0, |
|
$shuffle = 1 |
|||
| ) |
Sets the shuffle state of a gap with a given index.
The index of the first gap is 0, the index of the second gap is 1 and so on.
| integer | $index | A nonnegative index of the n-th gap |
| integer | $shuffle | Turn shuffle on (=1) or off (=0) public |
Definition at line 720 of file class.assClozeTest.php.
References assQuestion\$shuffle.
| assClozeTest::setGapSize | ( | $gap_index, | |
| $size | |||
| ) |
Definition at line 792 of file class.assClozeTest.php.
| assClozeTest::setGapType | ( | $gap_index, | |
| $gap_type | |||
| ) |
Set the type of a gap with a given index.
private
Definition at line 704 of file class.assClozeTest.php.
| assClozeTest::setIdenticalScoring | ( | $a_identical_scoring | ) |
Sets the identical scoring option for cloze questions.
| boolean | $a_identical_scoring | The identical scoring option for cloze questions |
Definition at line 1491 of file class.assClozeTest.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assClozeTest::setStartTag | ( | $start_tag = "[gap]" | ) |
Sets the start tag of a cloze gap.
| string | $start_tag | The start tag for a cloze gap public |
Definition at line 629 of file class.assClozeTest.php.
References $start_tag.
| assClozeTest::setTextgapRating | ( | $a_textgap_rating | ) |
Sets the rating option for text gaps.
| string | $a_textgap_rating | The rating option for text gaps |
Definition at line 1454 of file class.assClozeTest.php.
References TEXTGAP_RATING_CASEINSENSITIVE, TEXTGAP_RATING_CASESENSITIVE, TEXTGAP_RATING_LEVENSHTEIN1, TEXTGAP_RATING_LEVENSHTEIN2, TEXTGAP_RATING_LEVENSHTEIN3, TEXTGAP_RATING_LEVENSHTEIN4, and TEXTGAP_RATING_LEVENSHTEIN5.
Referenced by loadFromDb().
Here is the caller graph for this function:| assClozeTest::toJSON | ( | ) |
Returns a JSON representation of the question.
Implements ilAssQuestionLMExportable.
Definition at line 1639 of file class.assClozeTest.php.
References $gaps, ILIAS\LTI\ToolProvider\$key, ilObjMediaObject\_getMobsOfObject(), CLOZE_NUMERIC, CLOZE_TEXT, assQuestion\formatSAQuestion(), getClozeText(), getGaps(), assQuestion\getId(), assQuestion\getNrOfTries(), assQuestion\getQuestion(), getQuestionType(), assQuestion\getShuffle(), and assQuestion\getTitleForHTMLOutput().
Here is the call graph for this function:| assClozeTest::updateClozeTextFromGaps | ( | ) |
Updates the gap parameters in the cloze text from the form input.
private
Definition at line 1072 of file class.assClozeTest.php.
References getClozeText(), getGaps(), ilLegacyFormElementsUtil\prepareTextareaOutput(), and replaceFirstGap().
Referenced by deleteAnswerText().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::validateSolutionSubmit | ( | ) |
Implements assQuestionInterface.
Definition at line 1292 of file class.assClozeTest.php.
References CLOZE_NUMERIC, getGap(), getSolutionSubmitValidation(), isValidNumericSubmitValue(), and ILIAS\Repository\lng().
Here is the call graph for this function:| assClozeTest::$cloze_text |
Definition at line 102 of file class.assClozeTest.php.
Referenced by getClozeText(), setClozeText(), and setClozeTextValue().
| assClozeTest::$end_tag |
Definition at line 70 of file class.assClozeTest.php.
Referenced by getEndTag(), and setEndTag().
|
protected |
Definition at line 109 of file class.assClozeTest.php.
Referenced by getFeedbackMode(), and setFeedbackMode().
| ilAssQuestionFeedback assClozeTest::$feedbackOBJ |
Definition at line 107 of file class.assClozeTest.php.
| assClozeTest::$fixedTextLength |
Definition at line 100 of file class.assClozeTest.php.
Referenced by getFixedTextLength().
| assClozeTest::$gap_combinations |
Definition at line 49 of file class.assClozeTest.php.
Referenced by getGapCombinations().
| assClozeTest::$gap_combinations_exists |
Definition at line 52 of file class.assClozeTest.php.
Referenced by getGapCombinationsExists().
| array assClozeTest::$gaps = [] |
Definition at line 40 of file class.assClozeTest.php.
| assClozeTest::$identical_scoring |
Definition at line 93 of file class.assClozeTest.php.
|
private |
Definition at line 111 of file class.assClozeTest.php.
| assClozeTest::$start_tag |
Definition at line 61 of file class.assClozeTest.php.
Referenced by getStartTag(), and setStartTag().
| assClozeTest::$textgap_rating |
Definition at line 82 of file class.assClozeTest.php.
Referenced by getTextgapRating().