|
ILIAS
release_8 Revision v8.24
|
This file is part of ILIAS, a powerful learning management system published by ILIAS open source e-Learning e.V. More...
Inheritance diagram for 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="", string $owner="", $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) | |
| setExportDetailsXLS (ilAssExcelFormatHelper $worksheet, int $startrow, 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) | |
| savePartial () | |
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... | |
| questionTitleExists (int $questionpool_id, string $title) | |
| Returns TRUE if the question title exists in a question pool in the database. More... | |
| setTitle (string $title="") | |
| setId (int $id=-1) | |
| setTestId (int $id=-1) | |
| setComment (string $comment="") | |
| setOutputType (int $outputType=OUTPUT_HTML) | |
| 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 () | |
| getOutputType () | |
| supportsJavascriptOutput () | |
| supportsNonJsOutput () | |
| requiresJsSwitch () | |
| getAuthor () | |
| getAuthorForHTMLOutput () | |
| getOwner () | |
| getObjId () | |
| setObjId (int $obj_id=0) | |
| getLifecycle () | |
| setLifecycle (ilAssQuestionLifecycle $lifecycle) | |
| setExternalId (?string $external_id) | |
| getExternalId () | |
| getSuggestedSolutionOutput () | |
| _getSuggestedSolution (int $question_id, int $subquestion_index=0) | |
| loadSuggestedSolution (int $question_id, int $subquestion_index=0) | |
| Returns a suggested solution for a given subquestion index. More... | |
| 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... | |
| moveUploadedMediaFile (string $file, string $name) | |
| Move an uploaded media file to an public accessible temp dir to present it. More... | |
| getSuggestedSolutionPath () | |
| getImagePath ($question_id=null, $object_id=null) | |
| Returns the image path for web accessable images of a question. More... | |
| buildImagePath ($questionId, $parentObjectId) | |
| getFlashPath () | |
| Returns the image path for web accessable flash files 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... | |
| isInUse (int $question_id=0) | |
| Checks whether the question is in use or not in pools or tests. More... | |
| usageNumber (int $question_id=0) | |
| Returns the number of place the question is in use in pools or tests. More... | |
| isClone (int $question_id=0) | |
| Checks whether the question is a clone of another question or not. 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 () | |
| setNewOriginalId (int $newId) | |
| deleteSuggestedSolutions () | |
| getSuggestedSolution (int $subquestion_index=0) | |
| Returns a suggested solution for a given subquestion index. More... | |
| getSuggestedSolutionTitle (int $subquestion_index=0) | |
| Returns the title of a suggested solution at a given subquestion_index. More... | |
| setSuggestedSolution (string $solution_id="", int $subquestion_index=0, bool $is_import=false) | |
| Sets a suggested solution for the question. More... | |
| updateSuggestedSolutions (int $original_id=-1, int $original_obj_id=-1) | |
| _resolveInternalLink (string $internal_link) | |
| _resolveIntLinks (int $question_id) | |
| syncWithOriginal () | |
| _questionExists ($question_id) | |
| Returns true if the question already exists in the database. More... | |
| _questionExistsInPool (int $question_id) | |
| 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... | |
| isHTML ($a_text) | |
| Checks if a given string contains HTML or not. More... | |
| prepareTextareaOutput (string $txt_output, bool $prepare_for_latex_output=false, bool $omitNl2BrWhenTextArea=false) | |
| QTIMaterialToString (ilQTIMaterial $a_material) | |
| Reads an QTI material tag and creates a text or XHTML string. More... | |
| addQTIMaterial (ilXmlWriter $a_xml_writer, string $a_material, bool $close_material_tag=true, bool $add_mobs=true) | |
| 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 () | |
| setExportDetailsXLS (ilAssExcelFormatHelper $worksheet, int $startrow, int $active_id, int $pass) | |
| __get ($value) | |
| Object getter. More... | |
| __set ($key, $value) | |
| Object setter. More... | |
| __isset ($key) | |
| Object issetter. More... | |
| 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) | |
| isAutosaveable () | |
| 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="", string $owner="", $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 () | |
| savePartial () | |
| isInActiveTest () | |
| saveAdditionalQuestionDataToDb () | |
| Saves a record to the question types additional data table. More... | |
| saveAnswerSpecificDataToDb () | |
| Saves the answer specific records into a question types answer table. More... | |
Public Member Functions inherited from iQuestionCondition | |
| getOperators ($expression) | |
| Get all available operations for a specific question. More... | |
| getExpressionTypes () | |
| Get all available expression types for a specific question. More... | |
| getUserQuestionResult ($active_id, $pass) | |
| Get the user solution for a question by active_id and the test pass. 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... | |
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) | |
| ensureCurrentTestPass (int $active_id, int $pass) | |
| lookupCurrentTestPass (int $active_id, int $pass) | |
| lookupTestId (int $active_id) | |
| @refactor Move to ilObjTest or similar More... | |
| 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) | |
| 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) | |
| 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... | |
Private Attributes | |
| RandomGroup | $randomGroup |
Additional Inherited Members | |
Static Public Member Functions inherited from assQuestion | |
| static | setForcePassResultUpdateEnabled (bool $forcePassResultsUpdateEnabled) |
| static | isForcePassResultUpdateEnabled () |
| static | isAllowedImageMimeType ($mimeType) |
| static | fetchMimeTypeIdentifier (string $contentType) |
| static | getAllowedFileExtensionsForMimeType (string $mimeType) |
| static | isAllowedImageFileExtension (string $mimeType, string $fileExtension) |
| static | getAllowedImageMaterialFileExtensions () |
| static | _getMaximumPoints (int $question_id) |
| Returns the maximum points, a learner can reach answering the question. More... | |
| static | _getQuestionInfo (int $question_id) |
| static | _getSuggestedSolutionCount (int $question_id) |
| static | _getSuggestedSolutionOutput (int $question_id) |
| static | _getReachedPoints (int $active_id, int $question_id, int $pass) |
| static | _updateTestResultCache (int $active_id, ilAssQuestionProcessLocker $processLocker=null) |
| @TODO Move this to a proper place. More... | |
| static | logAction (string $logtext, int $active_id, int $question_id) |
| static | getQuestionTypeFromDb (int $question_id) |
| static | _getTotalRightAnswers (int $a_q_id) |
| static | _getTitle (int $a_q_id) |
| static | _getQuestionText (int $a_q_id) |
| static | isFileAvailable (string $file) |
| static | _getQuestionType (int $question_id) |
| static | _getQuestionTitle (int $question_id) |
| static | saveOriginalId (int $questionId, int $originalId) |
| static | resetOriginalId (int $questionId) |
| static | _getInternalLinkHref (string $target="") |
| static | _getOriginalId (int $question_id) |
| static | originalQuestionExists (int $questionId) |
| static | _instanciateQuestion (int $question_id) |
| static | _instantiateQuestion (int $question_id) |
| 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 | _isUsedInRandomTest (int $question_id) |
| static | _isWorkedThrough (int $active_id, int $question_id, int $pass) |
| Returns true if the question was worked through in the given pass Worked through means that the user entered at least one value. More... | |
| static | _areAnswered (int $a_user_id, array $a_question_ids) |
| Checks if an array of question ids is answered by a user or not. More... | |
| static | _setReachedPoints (int $active_id, int $question_id, float $points, float $maxpoints, int $pass, bool $manualscoring, bool $obligationsEnabled) |
| Sets the points, a learner has reached answering the question Additionally objective results are updated. More... | |
| static | _needsManualScoring (int $question_id) |
| static | _includeClass (string $question_type, int $gui=0) |
| static | getFeedbackClassNameByQuestionType (string $questionType) |
| static | isCoreQuestionType (string $questionType) |
| static | includeCoreClass ($questionType, $withGuiClass) |
| static | _getQuestionTypeName ($type_tag) |
| static | _instanciateQuestionGUI (int $question_id) |
| static | instantiateQuestionGUI (int $a_question_id) |
| static | _questionExistsInTest (int $question_id, int $test_id) |
| static | lookupParentObjId (int $questionId) |
| static | lookupOriginalParentObjId (int $originalQuestionId) |
| returns the parent object id for given original question id (should be a qpl id, but theoretically it can be a tst id, too) More... | |
| static | isObligationPossible (int $questionId) |
| static | implodeKeyValues (array $keyValues) |
| static | explodeKeyValues (string $keyValues) |
| static | convertISO8601FormatH_i_s_ExtendedToSeconds (string $time) |
| static | missingResultRecordExists (int $activeId, int $pass, array $questionIds) |
| static | getQuestionsMissingResultRecord (int $activeId, int $pass, array $questionIds) |
| static | lookupResultRecordExist (int $activeId, int $questionId, int $pass) |
| 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 | $allowedFileExtensionsByMimeType |
| static | $allowedCharsetsByMimeType |
| static | $allowedImageMaterialFileExtensionsByMimeType |
| 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\GlobalScreen\Provider\__construct(), and assQuestion\setQuestion().
Here is the call graph for this function:| assClozeTest::addAnswerOptionValue | ( | int | $qIndex, |
| string | $answerOptionValue, | ||
| float | $points | ||
| ) |
Reimplemented from assQuestion.
Definition at line 2031 of file class.assClozeTest.php.
References assQuestion\$points, and 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 @access public |
Definition at line 771 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 @access public |
Definition at line 850 of file class.assClozeTest.php.
References $index.
| 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 @access public |
Definition at line 829 of file class.assClozeTest.php.
| assClozeTest::calculateCombinationResult | ( | $user_result | ) |
Definition at line 1806 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.
@access public
| integer | $active_id | |
| integer | $pass | |
| boolean | $returndetails | (deprecated !!) |
Reimplemented from assQuestion.
Definition at line 1261 of file class.assClozeTest.php.
References $data, assQuestion\$db, $ilDB, calculateReachedPointsForSolution(), assQuestion\getCurrentSolutionResultSet(), and assQuestion\getSolutionMaxPass().
Here is the call graph for this function:
|
protected |
| array | $user_result | |
| array | $detailed |
Definition at line 1882 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 | ) |
Reimplemented from assQuestion.
Definition at line 1980 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 | ) |
| $value |
Definition at line 1248 of file class.assClozeTest.php.
| 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.
@access public
Definition at line 738 of file class.assClozeTest.php.
| assClozeTest::copyGapCombination | ( | $orgID, | |
| $newID | |||
| ) |
Definition at line 1070 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.
@access public
Definition at line 998 of file class.assClozeTest.php.
References assQuestion\$original_id, assQuestion\$title, assQuestion\_getOriginalId(), copyGapCombination(), assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:| assClozeTest::createGapsFromQuestiontext | ( | ) |
Create gap entries by parsing the question text.
@access public
Definition at line 683 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 1033 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 @access public |
Definition at line 1107 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 @access public |
Definition at line 1129 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 = "", |
||
| string | $owner = "", |
||
$testObjId = null |
|||
| ) |
Duplicates an assClozeTest.
@access public
Reimplemented from assQuestion.
Definition at line 942 of file class.assClozeTest.php.
References assQuestion\$author, assQuestion\$original_id, assQuestion\$owner, assQuestion\$title, assQuestion\_getOriginalId(), copyGapCombination(), assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:| assClozeTest::fetchAnswerValueForGap | ( | $userSolution, | |
| $gapIndex | |||
| ) |
Definition at line 2000 of file class.assClozeTest.php.
| assClozeTest::fetchSolutionSubmit | ( | $submit | ) |
Definition at line 1322 of file class.assClozeTest.php.
References $index, CLOZE_NUMERIC, CLOZE_SELECT, and getGaps().
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 547 of file class.assClozeTest.php.
| assClozeTest::getAdditionalTableName | ( | ) |
Returns the name of the additional question data table in the database.
Reimplemented from assQuestion.
Definition at line 1517 of file class.assClozeTest.php.
Referenced by loadFromDb(), and saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assClozeTest::getAnswerTableName | ( | ) |
Reimplemented from assQuestion.
Definition at line 1522 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 1797 of file class.assClozeTest.php.
References $index, getGap(), and getGaps().
Here is the call graph for this function:| assClozeTest::getClozeText | ( | ) |
Returns the cloze text.
Definition at line 580 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 593 of file class.assClozeTest.php.
References $gaps, getClozeText(), assQuestion\getHtmlQuestionContentPurifier(), assQuestion\isAdditionalContentEditingModePageObject(), and assQuestion\prepareTextareaOutput().
Here is the call graph for this function:| assClozeTest::getEndTag | ( | ) |
Returns the end tag of a cloze gap.
Definition at line 644 of file class.assClozeTest.php.
References $end_tag.
| assClozeTest::getExpressionTypes | ( | ) |
Get all available expression types for a specific question.
Implements iQuestionCondition.
Definition at line 1720 of file class.assClozeTest.php.
References iQuestionCondition\EmptyAnswerExpression, iQuestionCondition\NumberOfResultExpression, iQuestionCondition\NumericResultExpression, iQuestionCondition\PercentageResultExpression, and iQuestionCondition\StringResultExpression.
| assClozeTest::getFeedbackMode | ( | ) |
Definition at line 664 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 1544 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 788 of file class.assClozeTest.php.
Referenced by addAnswerOptionValue(), getAvailableAnswerOptions(), getSolutionSubmitValidation(), isAddableAnswerOptionValue(), saveWorkingData(), and validateSolutionSubmit().
Here is the caller graph for this function:| assClozeTest::getGapCombinations | ( | ) |
Definition at line 1586 of file class.assClozeTest.php.
References $gap_combinations.
| assClozeTest::getGapCombinationsExists | ( | ) |
Definition at line 1581 of file class.assClozeTest.php.
References $gap_combinations_exists.
| assClozeTest::getGapCount | ( | ) |
Returns the number of gaps.
Definition at line 752 of file class.assClozeTest.php.
| assClozeTest::getGaps | ( | ) |
Returns the array of gaps.
Definition at line 537 of file class.assClozeTest.php.
References $gaps.
Referenced by deleteGap(), fetchSolutionSubmit(), getAvailableAnswerOptions(), isComplete(), setExportDetailsXLS(), toJSON(), and updateClozeTextFromGaps().
Here is the caller graph for this function:| assClozeTest::getIdenticalScoring | ( | ) |
Returns the identical scoring status of the question.
Definition at line 1494 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 1557 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.
@access public
Reimplemented from assQuestion.
Definition at line 895 of file class.assClozeTest.php.
References assQuestion\$points, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, and assQuestion\getId().
Referenced by 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 @access public |
Definition at line 1217 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 1711 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.
Reimplemented from assQuestion.
Definition at line 1445 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.
Reimplemented from assQuestion.
Definition at line 1577 of file class.assClozeTest.php.
References getClozeText().
Here is the call graph for this function:| assClozeTest::getSolutionSubmit | ( | ) |
Definition at line 1378 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 1354 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 620 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 @access public |
Definition at line 1164 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 1457 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 | ||
| ) |
Reimplemented from assQuestion.
Definition at line 2014 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.
Reimplemented from assQuestion.
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 1291 of file class.assClozeTest.php.
Referenced by validateSolutionSubmit().
Here is the caller graph for this function:
|
protected |
| ilAssSelfAssessmentMigrator | $migrator |
Reimplemented from assQuestion.
Definition at line 1643 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 203 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 188 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 358 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 337 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 385 of file class.assClozeTest.php.
References $DIC, $ilDB, ILIAS\LTI\ToolProvider\$key, $query, 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 488 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 451 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 414 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:| assClozeTest::savePartial | ( | ) |
Reimplemented from assQuestion.
Definition at line 2041 of file class.assClozeTest.php.
| assClozeTest::saveToDb | ( | $original_id = "" | ) |
Saves a assClozeTest object to a database.
| int | string | $original_id | ID of the original question |
@access public
Definition at line 321 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.
@access public
| integer | $active_id | Active id of the user |
| integer | $pass | Test pass |
Definition at line 1391 of file class.assClozeTest.php.
References ILIAS\LTI\ToolProvider\$key, ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), ilObjTest\_getPass(), CLOZE_SELECT, getGap(), 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 @access public |
Definition at line 561 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 = "" | ) |
Definition at line 568 of file class.assClozeTest.php.
References $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 @access public |
Definition at line 656 of file class.assClozeTest.php.
References $end_tag.
| assClozeTest::setExportDetailsXLS | ( | ilAssExcelFormatHelper | $worksheet, |
| int | $startrow, | ||
| int | $active_id, | ||
| int | $pass | ||
| ) |
{}
Reimplemented from assQuestion.
Definition at line 1604 of file class.assClozeTest.php.
References $i, 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 672 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 @access public |
Definition at line 1533 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 @access public |
Definition at line 865 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 @access public |
Definition at line 814 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 @access public |
Definition at line 882 of file class.assClozeTest.php.
| assClozeTest::setGapCombinations | ( | $value | ) |
Definition at line 1596 of file class.assClozeTest.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assClozeTest::setGapCombinationsExists | ( | $value | ) |
Definition at line 1591 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) @access public |
Definition at line 725 of file class.assClozeTest.php.
References assQuestion\$shuffle.
| assClozeTest::setGapSize | ( | $gap_index, | |
| $size | |||
| ) |
Definition at line 797 of file class.assClozeTest.php.
| assClozeTest::setGapType | ( | $gap_index, | |
| $gap_type | |||
| ) |
Set the type of a gap with a given index.
@access private
Definition at line 709 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 1506 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 @access public |
Definition at line 632 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 1469 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.
Reimplemented from assQuestion.
Definition at line 1654 of file class.assClozeTest.php.
References $gaps, ILIAS\LTI\ToolProvider\$key, $mobs, 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.
@access private
Definition at line 1082 of file class.assClozeTest.php.
References getClozeText(), getGaps(), assQuestion\prepareTextareaOutput(), and replaceFirstGap().
Referenced by deleteAnswerText().
Here is the call graph for this function:
Here is the caller graph for this function:| assClozeTest::validateSolutionSubmit | ( | ) |
Reimplemented from assQuestion.
Definition at line 1304 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.
Referenced by getClozeTextForHTMLOutput(), getGaps(), and toJSON().
| 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().