|
ILIAS
release_9 Revision v9.13-25-g2c18ec4c24f
|
Class for matching questions. More...
Inheritance diagram for assMatchingQuestion:
Collaboration diagram for assMatchingQuestion:Public Member Functions | |
| __construct ( $title="", $comment="", $author="", $owner=-1, $question="", $matching_type=MT_TERMS_DEFINITIONS) | |
| assMatchingQuestion constructor More... | |
| getShuffleMode () | |
| setShuffleMode (int $shuffle) | |
| isComplete () | |
| Returns true, if a matching question is complete for use. More... | |
| saveToDb ($original_id="") | |
| Saves a assMatchingQuestion object to a database. More... | |
| saveAnswerSpecificDataToDb () | |
| Saves the answer specific records into a question types answer table. More... | |
| saveAdditionalQuestionDataToDb () | |
| Saves a record to the question types additional data table. More... | |
| loadFromDb ($question_id) | |
| Loads a assMatchingQuestion object from a database. More... | |
| duplicate (bool $for_test=true, string $title="", string $author="", int $owner=-1, $testObjId=null) | |
| Duplicates an assMatchingQuestion. More... | |
| copyObject ($target_questionpool_id, $title="") | |
| Copies an assMatchingQuestion. More... | |
| createNewOriginalFromThisDuplicate ($targetParentId, $targetQuestionTitle="") | |
| duplicateImages ($question_id, $objectId=null) | |
| copyImages ($question_id, $source_questionpool) | |
| insertMatchingPair ($position, $term=null, $definition=null, $points=0.0) | |
| Inserts a matching pair for an matching choice question. More... | |
| addMatchingPair (assAnswerMatchingTerm $term=null, assAnswerMatchingDefinition $definition=null, $points=0.0) | |
| Adds an matching pair for an matching choice question. More... | |
| getTermWithIdentifier ($a_identifier) | |
| Returns a term with a given identifier. More... | |
| getDefinitionWithIdentifier ($a_identifier) | |
| Returns a definition with a given identifier. More... | |
| getMatchingPair ($index=0) | |
| Returns a matching pair with a given index. More... | |
| deleteMatchingPair ($index=0) | |
| Deletes a matching pair with a given index. More... | |
| flushMatchingPairs () | |
| Deletes all matching pairs. More... | |
| withMatchingPairs (array $pairs) | |
| getMatchingPairCount () | |
| Returns the number of matching pairs. More... | |
| getTerms () | |
| Returns the terms of the matching question. More... | |
| getDefinitions () | |
| Returns the definitions of the matching question. More... | |
| getTermCount () | |
| Returns the number of terms. More... | |
| getDefinitionCount () | |
| Returns the number of definitions. More... | |
| addTerm (assAnswerMatchingTerm $term) | |
| addDefinition ($definition) | |
| Adds a definition. More... | |
| insertTerm ($position, assAnswerMatchingTerm $term=null) | |
| Inserts a term. More... | |
| insertDefinition ($position, assAnswerMatchingDefinition $definition=null) | |
| Inserts a definition. More... | |
| flushTerms () | |
| Deletes all terms. More... | |
| flushDefinitions () | |
| Deletes all definitions. More... | |
| deleteTerm ($position) | |
| Deletes a term. More... | |
| deleteDefinition ($position) | |
| Deletes a definition. More... | |
| setTerm ($term, $index) | |
| Sets a specific term. More... | |
| calculateReachedPoints ($active_id, $pass=null, $authorizedSolution=true, $returndetails=false) | |
| Returns the points, a learner has reached answering the question. More... | |
| getMaximumPoints () | |
| Calculates and Returns the maximum points, a learner can reach answering the question. More... | |
| getMaximumScoringMatchingPairs () | |
| fetchIndexedValuesFromValuePairs (array $valuePairs) | |
| getEncryptedFilename ($filename) | |
| Returns the encrypted save filename of a matching picture Images are saved with an encrypted filename to prevent users from cheating by guessing the solution from the image filename. More... | |
| removeTermImage ($index) | |
| removeDefinitionImage ($index) | |
| deleteImagefile (string $filename) | |
| Deletes an imagefile from the system if the file is deleted manually. More... | |
| setImageFile ($image_tempfilename, $image_filename, $previous_filename='') | |
| Sets the image file and uploads the image to the object's image directory. More... | |
| saveWorkingData ($active_id, $pass=null, $authorized=true) | |
| Saves the learners input of the question to the database. More... | |
| getRandomId () | |
| setShuffle ($shuffle=true) | |
| getQuestionType () | |
| Returns the question type of the question. More... | |
| getAdditionalTableName () | |
| getAnswerTableName () | |
| getRTETextWithMediaObjects () | |
| Collects all text in the question which could contain media objects which were created with the Rich Text Editor. More... | |
| & | getMatchingPairs () |
| Returns the matchingpairs array. More... | |
| setExportDetailsXLSX (ilAssExcelFormatHelper $worksheet, int $startrow, int $col, int $active_id, int $pass) | |
| {} More... | |
| getThumbGeometry () | |
| Get the thumbnail geometry. More... | |
| getThumbSize () | |
| Get the thumbnail geometry. More... | |
| setThumbGeometry (int $a_geometry) | |
| Set the thumbnail geometry. More... | |
| rebuildThumbnails () | |
| Rebuild the thumbnail images with a new thumbnail size. More... | |
| getThumbPrefix () | |
| toJSON () | |
| Returns a JSON representation of the question. More... | |
| setMatchingMode ($matchingMode) | |
| getMatchingMode () | |
| 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... | |
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 assQuestionInterface | |
| validateSolutionSubmit () | |
Data Fields | |
| $matchingpairs | |
| $matching_type | |
| $thumb_geometry = 100 | |
| $element_height | |
| const | MATCHING_MODE_1_ON_1 = '1:1' |
| const | MATCHING_MODE_N_ON_N = 'n:n' |
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 | |
| savePreviewData (ilAssQuestionPreviewSession $previewSession) | |
| generateThumbForFile ($path, $file) | |
| calculateReachedPointsForSolution ($found_values) | |
| afterSyncWithOriginal ($origQuestionId, $dupQuestionId, $origParentObjId, $dupParentObjId) | |
| {} More... | |
| createMatchingTerm (string $term='', string $picture='', int $identifier=0) | |
| createMatchingDefinition (string $term='', string $picture='', int $identifier=0) | |
| createMatchingPair (assAnswerMatchingTerm $term=null, assAnswerMatchingDefinition $definition=null, float $points=0.0) | |
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 Member Functions | |
| getPositiveScoredMatchingPairs () | |
| getMostPositiveScoredUniqueTermMatchingPairs () | |
| fetchSubmittedMatchingsFromPost () | |
| checkSubmittedMatchings ($submittedMatchings) | |
Private Attributes | |
| int | $shufflemode = 0 |
| 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 |
Class for matching questions.
assMatchingQuestion is a class for matching questions.
Definition at line 39 of file class.assMatchingQuestion.php.
| assMatchingQuestion::__construct | ( | $title = "", |
|
$comment = "", |
|||
$author = "", |
|||
$owner = -1, |
|||
$question = "", |
|||
$matching_type = MT_TERMS_DEFINITIONS |
|||
| ) |
assMatchingQuestion constructor
The constructor takes possible arguments an creates an instance of the assMatchingQuestion object.
| string | $title | A title string to describe the question |
| string | $comment | A comment string to describe the question |
| string | $author | A string containing the name of the questions author |
| integer | $owner | A numerical ID to identify the owner/creator |
| string | $question | The question string of the matching question |
| int | $matching_type |
Definition at line 102 of file class.assMatchingQuestion.php.
References assQuestion\$author, assQuestion\$comment, $DIC, $matching_type, assQuestion\$owner, assQuestion\$question, assQuestion\$title, and ILIAS\MetaData\Repository\Validation\Data\__construct().
Here is the call graph for this function:| assMatchingQuestion::addDefinition | ( | $definition | ) |
Adds a definition.
| object | $definition | The definition |
Definition at line 752 of file class.assMatchingQuestion.php.
| assMatchingQuestion::addMatchingPair | ( | assAnswerMatchingTerm | $term = null, |
| assAnswerMatchingDefinition | $definition = null, |
||
$points = 0.0 |
|||
| ) |
Adds an matching pair for an matching choice question.
The students have to fill in an order for the matching pair. The matching pair is an ASS_AnswerMatching object that will be created and assigned to the array $this->matchingpairs.
| assAnswerMatchingTerm | null | $term | A matching term |
| assAnswerMatchingDefinition | null | $definition | A matching definition |
| float | $points | The points for selecting the matching pair, incl. negative. |
Definition at line 590 of file class.assMatchingQuestion.php.
References assQuestion\$points, and createMatchingPair().
Here is the call graph for this function:| assMatchingQuestion::addTerm | ( | assAnswerMatchingTerm | $term | ) |
Definition at line 741 of file class.assMatchingQuestion.php.
|
protected |
{}
Definition at line 1586 of file class.assMatchingQuestion.php.
References ilFileUtils\delDir(), ilFileUtils\makeDirParents(), and ilFileUtils\rCopy().
Here is the call graph for this function:| assMatchingQuestion::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 861 of file class.assMatchingQuestion.php.
References $data, assQuestion\$points, calculateReachedPointsForSolution(), assQuestion\getCurrentSolutionResultSet(), and assQuestion\getSolutionMaxPass().
Referenced by getUserQuestionResult().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
| $found_values |
Definition at line 1455 of file class.assMatchingQuestion.php.
References assQuestion\$points.
Referenced by calculateReachedPoints().
Here is the caller graph for this function:
|
private |
Definition at line 1078 of file class.assMatchingQuestion.php.
References getMatchingMode(), and ILIAS\Repository\lng().
Referenced by savePreviewData(), and saveWorkingData().
Here is the call graph for this function:
Here is the caller graph for this function:| assMatchingQuestion::copyImages | ( | $question_id, | |
| $source_questionpool | |||
| ) |
Definition at line 512 of file class.assMatchingQuestion.php.
References $DIC, $filename, assQuestion\$ilLog, assQuestion\getImagePath(), getThumbPrefix(), assQuestion\isFileAvailable(), and ilFileUtils\makeDirParents().
Here is the call graph for this function:| assMatchingQuestion::copyObject | ( | $target_questionpool_id, | |
$title = "" |
|||
| ) |
Copies an assMatchingQuestion.
Definition at line 407 of file class.assMatchingQuestion.php.
References assQuestion\$original_id, assQuestion\$title, assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:
|
protected |
Definition at line 1604 of file class.assMatchingQuestion.php.
Referenced by createMatchingPair(), insertDefinition(), and loadFromDb().
Here is the caller graph for this function:
|
protected |
Definition at line 1608 of file class.assMatchingQuestion.php.
References assQuestion\$points, createMatchingDefinition(), and createMatchingTerm().
Referenced by addMatchingPair(), insertMatchingPair(), and loadFromDb().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 1600 of file class.assMatchingQuestion.php.
Referenced by createMatchingPair(), insertTerm(), and loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::createNewOriginalFromThisDuplicate | ( | $targetParentId, | |
$targetQuestionTitle = "" |
|||
| ) |
Definition at line 435 of file class.assMatchingQuestion.php.
References assQuestion\$id, assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:| assMatchingQuestion::deleteDefinition | ( | $position | ) |
Deletes a definition.
| integer | $position | The position of the definition in the definition array |
Definition at line 833 of file class.assMatchingQuestion.php.
| assMatchingQuestion::deleteImagefile | ( | string | $filename | ) |
Deletes an imagefile from the system if the file is deleted manually.
| string | $filename | Image file filename |
Definition at line 1009 of file class.assMatchingQuestion.php.
References Vendor\Package\$e, $filename, assQuestion\getImagePath(), and getThumbPrefix().
Referenced by removeDefinitionImage(), removeTermImage(), and setImageFile().
Here is the call graph for this function:
Here is the caller graph for this function:| assMatchingQuestion::deleteMatchingPair | ( | $index = 0 | ) |
Deletes a matching pair with a given index.
The index of the first matching pair is 0, the index of the second matching pair is 1 and so on.
| integer | $index | A nonnegative index of the n-th matching pair |
Definition at line 651 of file class.assMatchingQuestion.php.
| assMatchingQuestion::deleteTerm | ( | $position | ) |
Deletes a term.
| string | $term_id | The id of the term to delete |
Definition at line 821 of file class.assMatchingQuestion.php.
| assMatchingQuestion::duplicate | ( | bool | $for_test = true, |
| string | $title = "", |
||
| string | $author = "", |
||
| int | $owner = -1, |
||
$testObjId = null |
|||
| ) |
Duplicates an assMatchingQuestion.
Definition at line 358 of file class.assMatchingQuestion.php.
References assQuestion\$author, assQuestion\$original_id, assQuestion\$owner, assQuestion\$title, assQuestion\getId(), and assQuestion\getObjId().
Here is the call graph for this function:| assMatchingQuestion::duplicateImages | ( | $question_id, | |
$objectId = null |
|||
| ) |
Definition at line 467 of file class.assMatchingQuestion.php.
References $DIC, $filename, assQuestion\$ilLog, assQuestion\getImagePath(), getThumbPrefix(), and ilFileUtils\makeDirParents().
Here is the call graph for this function:| assMatchingQuestion::fetchIndexedValuesFromValuePairs | ( | array | $valuePairs | ) |
| array | $valuePairs |
Definition at line 952 of file class.assMatchingQuestion.php.
|
private |
Definition at line 1053 of file class.assMatchingQuestion.php.
References $post, getDefinitions(), assQuestion\getId(), and getTerms().
Referenced by savePreviewData(), and saveWorkingData().
Here is the call graph for this function:
Here is the caller graph for this function:| assMatchingQuestion::flushDefinitions | ( | ) |
Deletes all definitions.
Definition at line 810 of file class.assMatchingQuestion.php.
| assMatchingQuestion::flushMatchingPairs | ( | ) |
Deletes all matching pairs.
Definition at line 670 of file class.assMatchingQuestion.php.
| assMatchingQuestion::flushTerms | ( | ) |
|
protected |
Definition at line 1344 of file class.assMatchingQuestion.php.
References $filename, $path, ilShellUtil\convertImage(), getThumbGeometry(), and getThumbPrefix().
Referenced by rebuildThumbnails().
Here is the call graph for this function:
Here is the caller graph for this function:| assMatchingQuestion::getAdditionalTableName | ( | ) |
Definition at line 1201 of file class.assMatchingQuestion.php.
Referenced by saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assMatchingQuestion::getAnswerTableName | ( | ) |
Definition at line 1206 of file class.assMatchingQuestion.php.
| assMatchingQuestion::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 1574 of file class.assMatchingQuestion.php.
References getMatchingPair(), and getMatchingPairs().
Here is the call graph for this function:| assMatchingQuestion::getDefinitionCount | ( | ) |
Returns the number of definitions.
Definition at line 736 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getDefinitions | ( | ) |
Returns the definitions of the matching question.
Definition at line 714 of file class.assMatchingQuestion.php.
References $definitions.
Referenced by fetchSubmittedMatchingsFromPost(), and toJSON().
Here is the caller graph for this function:| assMatchingQuestion::getDefinitionWithIdentifier | ( | $a_identifier | ) |
Returns a definition with a given identifier.
Definition at line 612 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getEncryptedFilename | ( | $filename | ) |
Returns the encrypted save filename of a matching picture Images are saved with an encrypted filename to prevent users from cheating by guessing the solution from the image filename.
| string | $filename | Original filename |
Definition at line 975 of file class.assMatchingQuestion.php.
References $filename.
| assMatchingQuestion::getExpressionTypes | ( | ) |
Get all available expression types for a specific question.
Implements iQuestionCondition.
Definition at line 1493 of file class.assMatchingQuestion.php.
References iQuestionCondition\EmptyAnswerExpression, iQuestionCondition\MatchingResultExpression, iQuestionCondition\NumericResultExpression, and iQuestionCondition\PercentageResultExpression.
| assMatchingQuestion::getMatchingMode | ( | ) |
Definition at line 1446 of file class.assMatchingQuestion.php.
References $matchingMode.
Referenced by checkSubmittedMatchings(), getMaximumScoringMatchingPairs(), saveAdditionalQuestionDataToDb(), and toJSON().
Here is the caller graph for this function:| assMatchingQuestion::getMatchingPair | ( | $index = 0 | ) |
Returns a matching pair with a given index.
The index of the first matching pair is 0, the index of the second matching pair is 1 and so on.
| integer | $index | A nonnegative index of the n-th matching pair |
Definition at line 630 of file class.assMatchingQuestion.php.
Referenced by getAvailableAnswerOptions().
Here is the caller graph for this function:| assMatchingQuestion::getMatchingPairCount | ( | ) |
Returns the number of matching pairs.
Definition at line 692 of file class.assMatchingQuestion.php.
| & assMatchingQuestion::getMatchingPairs | ( | ) |
Returns the matchingpairs array.
Definition at line 1223 of file class.assMatchingQuestion.php.
References $matchingpairs.
Referenced by getAvailableAnswerOptions(), saveAnswerSpecificDataToDb(), setExportDetailsXLSX(), and toJSON().
Here is the caller graph for this function:| assMatchingQuestion::getMaximumPoints | ( | ) |
Calculates and Returns the maximum points, a learner can reach answering the question.
Definition at line 890 of file class.assMatchingQuestion.php.
References assQuestion\$points, and getMaximumScoringMatchingPairs().
Referenced by getUserQuestionResult(), and isComplete().
Here is the call graph for this function:
Here is the caller graph for this function:| assMatchingQuestion::getMaximumScoringMatchingPairs | ( | ) |
Definition at line 901 of file class.assMatchingQuestion.php.
References getMatchingMode(), getMostPositiveScoredUniqueTermMatchingPairs(), and getPositiveScoredMatchingPairs().
Referenced by getMaximumPoints().
Here is the call graph for this function:
Here is the caller graph for this function:
|
private |
Definition at line 927 of file class.assMatchingQuestion.php.
Referenced by getMaximumScoringMatchingPairs().
Here is the caller graph for this function:| assMatchingQuestion::getOperators | ( | $expression | ) |
Get all available operations for a specific question.
| $expression |
Implements iQuestionCondition.
Definition at line 1484 of file class.assMatchingQuestion.php.
References ilOperatorsExpressionMapping\getOperatorsByExpression().
Here is the call graph for this function:
|
private |
Definition at line 912 of file class.assMatchingQuestion.php.
Referenced by getMaximumScoringMatchingPairs().
Here is the caller graph for this function:| assMatchingQuestion::getQuestionType | ( | ) |
Returns the question type of the question.
Definition at line 1196 of file class.assMatchingQuestion.php.
Referenced by toJSON().
Here is the caller graph for this function:| assMatchingQuestion::getRandomId | ( | ) |
Definition at line 1169 of file class.assMatchingQuestion.php.
References ILIAS\LTI\ToolProvider\$key.
| assMatchingQuestion::getRTETextWithMediaObjects | ( | ) |
Collects all text in the question which could contain media objects which were created with the Rich Text Editor.
Definition at line 1215 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getShuffleMode | ( | ) |
Definition at line 120 of file class.assMatchingQuestion.php.
References $shufflemode.
Referenced by saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assMatchingQuestion::getTermCount | ( | ) |
Returns the number of terms.
Definition at line 725 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getTerms | ( | ) |
Returns the terms of the matching question.
Definition at line 703 of file class.assMatchingQuestion.php.
References $terms.
Referenced by fetchSubmittedMatchingsFromPost(), and toJSON().
Here is the caller graph for this function:| assMatchingQuestion::getTermWithIdentifier | ( | $a_identifier | ) |
Returns a term with a given identifier.
Definition at line 599 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getThumbGeometry | ( | ) |
Get the thumbnail geometry.
Definition at line 1272 of file class.assMatchingQuestion.php.
References $thumb_geometry.
Referenced by generateThumbForFile(), getThumbSize(), saveAdditionalQuestionDataToDb(), and setImageFile().
Here is the caller graph for this function:| assMatchingQuestion::getThumbPrefix | ( | ) |
Definition at line 1339 of file class.assMatchingQuestion.php.
Referenced by copyImages(), deleteImagefile(), duplicateImages(), generateThumbForFile(), and setImageFile().
Here is the caller graph for this function:| assMatchingQuestion::getThumbSize | ( | ) |
Get the thumbnail geometry.
Definition at line 1282 of file class.assMatchingQuestion.php.
References getThumbGeometry().
Here is the call graph for this function:| assMatchingQuestion::getUserQuestionResult | ( | $active_id, | |
| $pass | |||
| ) |
Get the user solution for a question by active_id and the test pass.
| int | $active_id | |
| int | $pass |
Implements iQuestionCondition.
Definition at line 1510 of file class.assMatchingQuestion.php.
References $data, $definitions, assQuestion\$points, calculateReachedPoints(), assQuestion\getId(), getMaximumPoints(), and assQuestion\lookupMaxStep().
Here is the call graph for this function:| assMatchingQuestion::insertDefinition | ( | $position, | |
| assAnswerMatchingDefinition | $definition = null |
||
| ) |
Inserts a definition.
| object | $definition | The definition |
Definition at line 783 of file class.assMatchingQuestion.php.
References createMatchingDefinition().
Here is the call graph for this function:| assMatchingQuestion::insertMatchingPair | ( | $position, | |
$term = null, |
|||
$definition = null, |
|||
$points = 0.0 |
|||
| ) |
Inserts a matching pair for an matching choice question.
The students have to fill in an order for the matching pair. The matching pair is an ASS_AnswerMatching object that will be created and assigned to the array $this->matchingpairs.
| integer | $position | The insert position in the matching pairs array |
| object | $term | A matching term |
| object | $definition | A matching definition |
| double | $points | The points for selecting the matching pair (even negative points can be used) |
Definition at line 566 of file class.assMatchingQuestion.php.
References assQuestion\$points, and createMatchingPair().
Here is the call graph for this function:| assMatchingQuestion::insertTerm | ( | $position, | |
| assAnswerMatchingTerm | $term = null |
||
| ) |
Inserts a term.
| string | $term | The text of the term |
Definition at line 763 of file class.assMatchingQuestion.php.
References createMatchingTerm().
Here is the call graph for this function:| assMatchingQuestion::isComplete | ( | ) |
Returns true, if a matching question is complete for use.
Definition at line 135 of file class.assMatchingQuestion.php.
References getMaximumPoints().
Here is the call graph for this function:| assMatchingQuestion::loadFromDb | ( | $question_id | ) |
Loads a assMatchingQuestion object from a database.
| object | $db | A pear DB object |
| integer | $question_id | A unique key which defines the multiple choice test in the database |
Definition at line 258 of file class.assMatchingQuestion.php.
References $data, Vendor\Package\$e, ilRTE\_replaceMediaObjectImageSrc(), createMatchingDefinition(), createMatchingPair(), createMatchingTerm(), ilAssQuestionLifecycle\getDraftInstance(), ilAssQuestionLifecycle\getInstance(), assQuestion\setAdditionalContentEditingMode(), assQuestion\setAuthor(), assQuestion\setComment(), assQuestion\setId(), assQuestion\setLifecycle(), setMatchingMode(), assQuestion\setNrOfTries(), assQuestion\setObjId(), assQuestion\setOriginalId(), assQuestion\setOwner(), assQuestion\setPoints(), assQuestion\setQuestion(), setShuffle(), setShuffleMode(), setThumbGeometry(), and assQuestion\setTitle().
Here is the call graph for this function:| assMatchingQuestion::rebuildThumbnails | ( | ) |
Rebuild the thumbnail images with a new thumbnail size.
Definition at line 1300 of file class.assMatchingQuestion.php.
References assQuestion\buildHashedImageFilename(), generateThumbForFile(), and assQuestion\getImagePath().
Referenced by saveAnswerSpecificDataToDb().
Here is the call graph for this function:
Here is the caller graph for this function:| assMatchingQuestion::removeDefinitionImage | ( | $index | ) |
Definition at line 993 of file class.assMatchingQuestion.php.
References deleteImagefile().
Here is the call graph for this function:| assMatchingQuestion::removeTermImage | ( | $index | ) |
Definition at line 984 of file class.assMatchingQuestion.php.
References deleteImagefile().
Here is the call graph for this function:| assMatchingQuestion::saveAdditionalQuestionDataToDb | ( | ) |
Saves a record to the question types additional data table.
Implements ilObjQuestionScoringAdjustable.
Definition at line 235 of file class.assMatchingQuestion.php.
References getAdditionalTableName(), assQuestion\getId(), getMatchingMode(), getShuffleMode(), and getThumbGeometry().
Referenced by saveToDb().
Here is the call graph for this function:
Here is the caller graph for this function:| assMatchingQuestion::saveAnswerSpecificDataToDb | ( | ) |
Saves the answer specific records into a question types answer table.
Implements ilObjAnswerScoringAdjustable.
Definition at line 168 of file class.assMatchingQuestion.php.
References ILIAS\LTI\ToolProvider\$key, $matchingpairs, assQuestion\getId(), getMatchingPairs(), and rebuildThumbnails().
Referenced by saveToDb().
Here is the call graph for this function:
Here is the caller graph for this function:
|
protected |
Definition at line 1160 of file class.assMatchingQuestion.php.
References checkSubmittedMatchings(), fetchSubmittedMatchingsFromPost(), and ilAssQuestionPreviewSession\setParticipantsSolution().
Here is the call graph for this function:| assMatchingQuestion::saveToDb | ( | $original_id = "" | ) |
Saves a assMatchingQuestion object to a database.
| string | $original_id |
Definition at line 154 of file class.assMatchingQuestion.php.
References assQuestion\$original_id, saveAdditionalQuestionDataToDb(), saveAnswerSpecificDataToDb(), and assQuestion\saveQuestionDataToDb().
Here is the call graph for this function:| assMatchingQuestion::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 1113 of file class.assMatchingQuestion.php.
References ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), ilObjTest\_getPass(), checkSubmittedMatchings(), fetchSubmittedMatchingsFromPost(), assQuestion\getId(), assQuestion\getProcessLocker(), ILIAS\Repository\lng(), assQuestion\logAction(), assQuestion\removeCurrentSolution(), and assQuestion\saveCurrentSolution().
Here is the call graph for this function:| assMatchingQuestion::setExportDetailsXLSX | ( | ilAssExcelFormatHelper | $worksheet, |
| int | $startrow, | ||
| int | $col, | ||
| int | $active_id, | ||
| int | $pass | ||
| ) |
{}
Definition at line 1231 of file class.assMatchingQuestion.php.
References assQuestion\getImagePath(), getMatchingPairs(), assQuestion\getSolutionValues(), ILIAS\Repository\lng(), and ilAssExcelFormatHelper\setCell().
Here is the call graph for this function:| assMatchingQuestion::setImageFile | ( | $image_tempfilename, | |
| $image_filename, | |||
$previous_filename = '' |
|||
| ) |
Sets the image file and uploads the image to the object's image directory.
| string | $image_filename | Name of the original image file |
| string | $image_tempfilename | Name of the temporary uploaded image file |
Definition at line 1029 of file class.assMatchingQuestion.php.
References ilShellUtil\convertImage(), deleteImagefile(), assQuestion\getImagePath(), getThumbGeometry(), getThumbPrefix(), ilFileUtils\makeDirParents(), and ilFileUtils\moveUploadedFile().
Here is the call graph for this function:| assMatchingQuestion::setMatchingMode | ( | $matchingMode | ) |
Definition at line 1441 of file class.assMatchingQuestion.php.
References $matchingMode.
Referenced by loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::setShuffle | ( | $shuffle = true | ) |
Definition at line 1186 of file class.assMatchingQuestion.php.
References assQuestion\$shuffle.
Referenced by loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::setShuffleMode | ( | int | $shuffle | ) |
Definition at line 125 of file class.assMatchingQuestion.php.
References assQuestion\$shuffle.
Referenced by loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::setTerm | ( | $term, | |
| $index | |||
| ) |
Sets a specific term.
| string | $term | The text of the term |
| string | $index | The index of the term |
Definition at line 846 of file class.assMatchingQuestion.php.
| assMatchingQuestion::setThumbGeometry | ( | int | $a_geometry | ) |
Set the thumbnail geometry.
| integer | $a_geometry | Geometry |
Definition at line 1292 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::toJSON | ( | ) |
Returns a JSON representation of the question.
Implements ilAssQuestionLMExportable.
Definition at line 1369 of file class.assMatchingQuestion.php.
References $definitions, $terms, ilObjMediaObject\_getMobsOfObject(), assQuestion\formatSAQuestion(), getDefinitions(), assQuestion\getId(), getMatchingMode(), getMatchingPairs(), assQuestion\getNrOfTries(), assQuestion\getQuestion(), getQuestionType(), assQuestion\getShuffler(), getTerms(), assQuestion\getTitleForHTMLOutput(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and assQuestion\setShuffler().
Here is the call graph for this function:| assMatchingQuestion::withMatchingPairs | ( | array | $pairs | ) |
| assAnswerMatchingPair[] |
Definition at line 678 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 68 of file class.assMatchingQuestion.php.
Referenced by getDefinitions(), getUserQuestionResult(), and toJSON().
| assMatchingQuestion::$element_height |
Definition at line 81 of file class.assMatchingQuestion.php.
| assMatchingQuestion::$matching_type |
Definition at line 59 of file class.assMatchingQuestion.php.
Referenced by __construct().
|
protected |
Definition at line 86 of file class.assMatchingQuestion.php.
Referenced by getMatchingMode(), and setMatchingMode().
| assMatchingQuestion::$matchingpairs |
Definition at line 50 of file class.assMatchingQuestion.php.
Referenced by getMatchingPairs(), and saveAnswerSpecificDataToDb().
|
private |
Definition at line 88 of file class.assMatchingQuestion.php.
|
private |
Definition at line 41 of file class.assMatchingQuestion.php.
Referenced by getShuffleMode().
|
protected |
Definition at line 66 of file class.assMatchingQuestion.php.
Referenced by getTerms(), and toJSON().
| assMatchingQuestion::$thumb_geometry = 100 |
Definition at line 74 of file class.assMatchingQuestion.php.
Referenced by getThumbGeometry().
| const assMatchingQuestion::MATCHING_MODE_1_ON_1 = '1:1' |
Definition at line 83 of file class.assMatchingQuestion.php.
Referenced by assMatchingQuestionImport\fromXML(), and assMatchingQuestionGUI\populateQuestionSpecificFormPart().
| const assMatchingQuestion::MATCHING_MODE_N_ON_N = 'n:n' |
Definition at line 84 of file class.assMatchingQuestion.php.
Referenced by assMatchingQuestionGUI\isValidTermAndDefinitionAmount(), and assMatchingQuestionGUI\populateQuestionSpecificFormPart().