|
ILIAS
trunk Revision v13.0_alpha-62-g3b72d83f2e5
|
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=self::MT_TERMS_DEFINITIONS) | |
| assMatchingQuestion constructor More... | |
| getShuffleMode () | |
| setShuffleMode (int $shuffle) | |
| isComplete () | |
| saveToDb (?int $original_id=null) | |
| saveAnswerSpecificDataToDb () | |
| Saves the answer specific records into a question types answer table. More... | |
| saveAdditionalQuestionDataToDb () | |
| loadFromDb ($question_id) | |
| Loads a assMatchingQuestion object from a database. More... | |
| 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 (int $active_id, ?int $pass=null, bool $authorized_solution=true) | |
| 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 (string $image_tempfilename, string $image_filename, string $previous_filename='') | |
| saveWorkingData (int $active_id, ?int $pass=null, bool $authorized=true) | |
| 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... | |
| 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 (string $matching_mode) | |
| getMatchingMode () | |
| getOperators (string $expression) | |
| Get all available operations for a specific question. More... | |
| getExpressionTypes () | |
| Get all available expression types for a specific question. More... | |
| getUserQuestionResult (int $active_id, int $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... | |
| toLog (AdditionalInformationGenerator $additional_info) | |
| MUST return an array of the question settings that can be stored in the log. More... | |
| solutionValuesToText (array $solution_values) | |
| MUST convert the given solution values into text. More... | |
| getCorrectSolutionForTextOutput (int $active_id, int $pass) | |
| toNormalized (Transformations $transformations, array $context=[]) | |
| fromNormalized (array $normalized, Transformations $transformations) | |
Public Member Functions inherited from assQuestion | |
| getQuestionType () | |
| isComplete () | |
| saveWorkingData (int $active_id, ?int $pass=null, bool $authorized=true) | |
| calculateReachedPoints (int $active_id, ?int $pass=null, bool $authorized_solution=true) | |
| getAdditionalTableName () | |
| getAnswerTableName () | |
| toLog (AdditionalInformationGenerator $additional_info) | |
| MUST return an array of the question settings that can be stored in the log. More... | |
| getCurrentUser () | |
| getShuffler () | |
| setShuffler (Transformation $shuffler) | |
| setProcessLocker (ilAssQuestionProcessLocker $processLocker) | |
| getProcessLocker () | |
| fromXML (string $importdirectory, int $user_id, ilQTIItem $item, int $questionpool_id, ?int $tst_id, ?ilObject &$tst_object, int &$question_counter, array $import_mapping) | |
| toXML (bool $a_include_header=true, bool $a_include_binary=true, bool $a_shuffle=false, bool $test_output=false, bool $force_image_references=false) | |
| setTitle (string $title="") | |
| setId (int $id=-1) | |
| setTestId (int $id=-1) | |
| setComment (string $comment="") | |
| setShuffle (?bool $shuffle=true) | |
| setAuthor (string $author="") | |
| setOwner (int $owner=-1) | |
| getTitle () | |
| getTitleForHTMLOutput () | |
| getTitleFilenameCompliant () | |
| getId () | |
| getShuffle () | |
| getTestId () | |
| getComment () | |
| getDescriptionForHTMLOutput () | |
| getThumbSize () | |
| setThumbSize (int $a_size) | |
| getMinimumThumbSize () | |
| getMaximumThumbSize () | |
| getAuthor () | |
| getAuthorForHTMLOutput () | |
| getOwner () | |
| getObjId () | |
| setObjId (int $obj_id=0) | |
| getLifecycle () | |
| setLifecycle (ilAssQuestionLifecycle $lifecycle) | |
| setExternalId (?string $external_id) | |
| getExternalId () | |
| getSuggestedSolutionOutput () | |
| getSuggestedSolutions () | |
| getReachedPoints (int $active_id, int $pass) | |
| getMaximumPoints () | |
| getAdjustedReachedPoints (int $active_id, int $pass, bool $authorized_solution=true) | |
| calculateResultsFromSolution (int $active_id, int $pass) | |
| Calculates the question results from a previously saved question solution. More... | |
| persistWorkingState (int $active_id, $pass, bool $authorized=true) | |
| persists the working state for current testactive and testpass More... | |
| persistPreviewState (ilAssQuestionPreviewSession $preview_session) | |
| persists the preview state for current user and question More... | |
| validateSolutionSubmit () | |
| getSuggestedSolutionPath () | |
| getImagePath ($question_id=null, $object_id=null) | |
| Returns the image path for web accessable images of a question. More... | |
| getSuggestedSolutionPathWeb () | |
| getImagePathWeb () | |
| Returns the web image path for web accessable images of a question. More... | |
| getTestOutputSolutions (int $activeId, int $pass) | |
| getUserSolutionPreferingIntermediate (int $active_id, ?int $pass=null) | |
| getSolutionValues (int $active_id, ?int $pass=null, bool $authorized=true) | |
| Loads solutions of a given user from the database an returns it. More... | |
| deleteAnswers (int $question_id) | |
| deleteAdditionalTableData (int $question_id) | |
| delete (int $question_id) | |
| getTotalAnswers () | |
| cloneXHTMLMediaObjectsOfQuestion (int $source_question_id) | |
| createPageObject () | |
| clonePageOfQuestion (int $a_q_id) | |
| getPageOfQuestion () | |
| setOriginalId (?int $original_id) | |
| getOriginalId () | |
| fixSvgToPng (string $imageFilenameContainingString) | |
| fixUnavailableSkinImageSources (string $html) | |
| loadFromDb (int $question_id) | |
| createNewQuestion (bool $a_create_page=true) | |
| Creates a new question without an owner when a new question is created This assures that an ID is given to the question if a file upload or something else occurs. More... | |
| saveQuestionDataToDb (?int $original_id=null) | |
| updateOriginalId (?int $original_id=null) | |
| duplicate (bool $set_original_id=true, string $title='', string $author='', int $owner=-1, $test_obj_id=null) | |
| copyObject (int $target_parent_id, string $title='') | |
| createNewOriginalFromThisDuplicate (int $target_parent_id, string $target_question_title='') | |
| saveToDb (?int $original_id=null) | |
| deleteSuggestedSolutions () | |
| getSuggestedSolution (int $subquestion_index=0) | |
| resolveInternalLink (string $internal_link) | |
| resolveSuggestedSolutionLinks () | |
| getInternalLinkHref (string $target) | |
| syncWithOriginal () | |
| getPoints () | |
| setPoints (float $points) | |
| getSolutionMaxPass (int $active_id) | |
| isWriteable () | |
| calculateReachedPointsFromPreviewSession (ilAssQuestionPreviewSession $preview_session) | |
| isPreviewSolutionCorrect (ilAssQuestionPreviewSession $preview_session) | |
| adjustReachedPointsByScoringOptions (float $points, int $active_id) | |
| Adjust the given reached points by checks for all special scoring options in the test container. More... | |
| buildHashedImageFilename (string $plain_image_filename, bool $unique=false) | |
| getQuestion () | |
| getQuestionForHTMLOutput () | |
| setQuestion (string $question="") | |
| getQuestionTypeID () | |
| cleanupMediaObjectUsage () | |
| getInstances () | |
| getActiveUserData (int $active_id) | |
| Returns the user id and the test id for a given active id. More... | |
| hasSpecificFeedback () | |
| getNrOfTries () | |
| setNrOfTries (int $a_nr_of_tries) | |
| setExportImagePath (string $path) | |
| formatSAQuestion ($a_q) | |
| setPreventRteUsage (bool $prevent_rte_usage) | |
| getPreventRteUsage () | |
| migrateContentForLearningModule (ilAssSelfAssessmentMigrator $migrator) | |
| setSelfAssessmentEditingMode (bool $selfassessmenteditingmode) | |
| getSelfAssessmentEditingMode () | |
| setDefaultNrOfTries (int $defaultnroftries) | |
| getDefaultNrOfTries () | |
| syncSkillAssignments (int $srcParentId, int $srcQuestionId, int $trgParentId, int $trgQuestionId) | |
| isAnswered (int $active_id, int $pass) | |
| getAdditionalContentEditingMode () | |
| setAdditionalContentEditingMode (?string $additionalContentEditingMode) | |
| isAdditionalContentEditingModePageObject () | |
| isValidAdditionalContentEditingMode (string $additionalContentEditingMode) | |
| getValidAdditionalContentEditingModes () | |
| getHtmlUserSolutionPurifier () | |
| getHtmlQuestionContentPurifier () | |
| setLastChange (int $lastChange) | |
| getLastChange () | |
| removeIntermediateSolution (int $active_id, int $pass) | |
| removeCurrentSolution (int $active_id, int $pass, bool $authorized=true) | |
| saveCurrentSolution (int $active_id, int $pass, $value1, $value2, bool $authorized=true, $tstamp=0) | |
| updateCurrentSolution (int $solutionId, $value1, $value2, bool $authorized=true) | |
| updateCurrentSolutionsAuthorization (int $activeId, int $pass, bool $authorized, bool $keepTime=false) | |
| setStep ($step) | |
| getStep () | |
| toJSON () | |
| intermediateSolutionExists (int $active_id, int $pass) | |
| authorizedSolutionExists (int $active_id, ?int $pass) | |
| authorizedOrIntermediateSolutionExists (int $active_id, int $pass) | |
| lookupForExistingSolutions (int $activeId, int $pass) | |
| Lookup if an authorized or intermediate solution exists. More... | |
| isAddableAnswerOptionValue (int $qIndex, string $answerOptionValue) | |
| addAnswerOptionValue (int $qIndex, string $answerOptionValue, float $points) | |
| removeAllExistingSolutions () | |
| removeExistingSolutions (int $activeId, int $pass) | |
| resetUsersAnswer (int $activeId, int $pass) | |
| removeResultRecord (int $activeId, int $pass) | |
| fetchValuePairsFromIndexedValues (array $indexedValues) | |
| fetchIndexedValuesFromValuePairs (array $value_pairs) | |
| updateTimestamp () | |
| getTestPresentationConfig () | |
| hasWritableOriginalInQuestionPool () | |
| answerToParticipantInteraction (AdditionalInformationGenerator $additional_info, int $test_ref_id, int $active_id, int $pass, string $source_ip, TestParticipantInteractionTypes $interaction_type) | |
| toQuestionAdministrationInteraction (AdditionalInformationGenerator $additional_info, int $test_ref_id, TestQuestionAdministrationInteractionTypes $interaction_type) | |
| getSolutionForTextOutput (int $active_id, int $pass) | |
| getCorrectSolutionForTextOutput (int $active_id, int $pass) | |
| getVariablesAsTextArray (int $active_id, int $pass) | |
| toNormalized (Transformations $transformations, array $context=[]) | |
| fromNormalized (array $normalized, Transformations $transformations) | |
| validateSolutionSubmit () | |
| toLog (AdditionalInformationGenerator $additional_info) | |
| answerToParticipantInteraction (AdditionalInformationGenerator $additional_info, int $test_id, int $active_id, int $pass, string $source_ip, TestParticipantInteractionTypes $interaction_type) | |
| toQuestionAdministrationInteraction (AdditionalInformationGenerator $additional_info, int $test_id, TestQuestionAdministrationInteractionTypes $interaction_type) | |
| saveAnswerSpecificDataToDb () | |
| Saves the answer specific records into a question types answer table. More... | |
Public Member Functions inherited from iQuestionCondition | |
| getOperators (string $expression) | |
| Get all available operations for a specific question. More... | |
| getExpressionTypes () | |
| Get all available expression types for a specific question. More... | |
| getUserQuestionResult (int $active_id, int $pass) | |
| Get the user solution for a question by active_id and the test pass. More... | |
| getAvailableAnswerOptions (?int $index=null) | |
| If index is null, the function returns an array with all anwser options else it returns the specific answer option. More... | |
| toJSON () | |
| toNormalized (Transformations $transformations, array $context=[]) | |
| Convert the internal state of the implementing object into a language-neutral array structure. More... | |
| fromNormalized (array $normalized, Transformations $transformations) | |
| Restore the object from its normalized representation. More... | |
Protected Member Functions | |
| cloneQuestionTypeSpecificProperties (\assQuestion $target) | |
| savePreviewData (ilAssQuestionPreviewSession $previewSession) | |
| generateThumbForFile ($path, $file) | |
| calculateReachedPointsForSolution (?array $found_values) | |
| afterSyncWithOriginal (int $original_question_id, int $clone_question_id, int $original_parent_id, int $clone_parent_id) | |
| {} 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) | |
| solutionValuesToLog (AdditionalInformationGenerator $additional_info, array $solution_values) | |
| MUST convert the given solution values into an array or a string that can be stored in the log. More... | |
Protected Member Functions inherited from assQuestion | |
| solutionValuesToLog (AdditionalInformationGenerator $additional_info, array $solution_values) | |
| MUST convert the given solution values into an array or a string that can be stored in the log. More... | |
| solutionValuesToText (array $solution_values) | |
| MUST convert the given solution values into text. More... | |
| getQuestionAction () | |
| isNonEmptyItemListPostSubmission (string $post_submission_field_name) | |
| savePreviewData (ilAssQuestionPreviewSession $preview_session) | |
| deletePageOfQuestion (int $question_id) | |
| cloneQuestionTypeSpecificProperties (self $target) | |
| removeAllImageFiles (string $image_target_path) | |
| onDuplicate (int $original_parent_id, int $original_question_id, int $duplicate_parent_id, int $duplicate_question_id) | |
| afterSyncWithOriginal (int $original_question_id, int $clone_question_id, int $original_parent_id, int $clone_parent_id) | |
| onCopy (int $sourceParentId, int $sourceQuestionId, int $targetParentId, int $targetQuestionId) | |
| duplicateComments (int $parent_source_id, int $source_id, int $parent_target_id, int $target_id) | |
| deleteComments () | |
| getNotesManager () | |
| getNotesDataService () | |
| getNotesRepo () | |
| cloneSuggestedSolutions (int $source_question_id, int $target_question_id) | |
| duplicateSuggestedSolutionFiles (int $parent_id, int $question_id) | |
| Duplicates the files of a suggested solution if the question is duplicated. More... | |
| cloneSuggestedSolutionFiles (int $source_question_id, int $target_question_id) | |
| copySuggestedSolutions (int $target_question_id) | |
| ensureNonNegativePoints (float $points) | |
| purifyAndPrepareTextAreaOutput (string $content) | |
| getRTETextWithMediaObjects () | |
| getSelfAssessmentFormatter () | |
| lmMigrateQuestionTypeGenericContent (ilAssSelfAssessmentMigrator $migrator) | |
| lmMigrateQuestionTypeSpecificContent (ilAssSelfAssessmentMigrator $migrator) | |
| duplicateSkillAssignments (int $srcParentId, int $srcQuestionId, int $trgParentId, int $trgQuestionId) | |
| buildQuestionDataQuery () | |
| getCurrentSolutionResultSet (int $active_id, int $pass, bool $authorized=true) | |
| removeSolutionRecordById (int $solutionId) | |
| getSolutionRecordById (int $solutionId) | |
| deleteDummySolutionRecord (int $activeId, int $passIndex) | |
| isDummySolutionRecord (array $solutionRecord) | |
| deleteSolutionRecordByValues (int $activeId, int $passIndex, bool $authorized, array $matchValues) | |
| duplicateIntermediateSolutionAuthorized (int $activeId, int $passIndex) | |
| forceExistingIntermediateSolution (int $activeId, int $passIndex, bool $considerDummyRecordCreation) | |
| lookupMaxStep (int $active_id, int $pass) | |
| buildTestPresentationConfig () | |
| getSuggestedSolutionsRepo () | |
| loadSuggestedSolutions () | |
| answerToLog (AdditionalInformationGenerator $additional_info, int $active_id, int $pass) | |
Private Member Functions | |
| cloneImages (int $source_question_id, int $source_parent_id, int $target_question_id, int $target_parent_id) | |
| getPositiveScoredMatchingPairs () | |
| getMostPositiveScoredUniqueTermMatchingPairs () | |
| checkSubmittedMatchings (array $submitted_matchings) | |
Private Attributes | |
| int | $shufflemode = 0 |
| RandomGroup | $randomGroup |
Additional Inherited Members | |
Static Public Member Functions inherited from assQuestion | |
| static | setForcePassResultUpdateEnabled (bool $force_pass_results_update_enabled) |
| static | isForcePassResultUpdateEnabled () |
| static | _getSuggestedSolutionOutput (int $question_id) |
| static | _getReachedPoints (int $active_id, int $question_id, int $pass) |
| static | isFileAvailable (string $file) |
| static | saveOriginalId (int $questionId, int $originalId) |
| static | resetOriginalId (int $questionId) |
| static | instantiateQuestion (int $question_id) |
| static | _getSolutionMaxPass (int $question_id, int $active_id) |
| Returns the maximum pass a users question solution. More... | |
| static | getFeedbackClassNameByQuestionType (string $questionType) |
| static | _questionExistsInTest (int $question_id, int $test_id) |
| static | lookupParentObjId (int $question_id) |
| static | implodeKeyValues (array $keyValues) |
| static | explodeKeyValues (string $keyValues) |
| static | convertISO8601FormatH_i_s_ExtendedToSeconds (string $time) |
| static | extendedTrim (string $value) |
| Trim non-printable characters from the beginning and end of a string. More... | |
Static Protected Member Functions inherited from assQuestion | |
| static | getNumExistingSolutionRecords (int $activeId, int $pass, int $questionId) |
Static Protected Attributes inherited from assQuestion | |
| static | $force_pass_results_update_enabled = false |
| static | $imageSourceFixReplaceMap |
Class for matching questions.
assMatchingQuestion is a class for matching questions.
Definition at line 43 of file class.assMatchingQuestion.php.
| assMatchingQuestion::__construct | ( | $title = "", |
|
$comment = "", |
|||
$author = "", |
|||
$owner = -1, |
|||
$question = "", |
|||
$matching_type = self::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 90 of file class.assMatchingQuestion.php.
References assQuestion\$author, assQuestion\$comment, $DIC, $matching_type, assQuestion\$owner, assQuestion\$question, assQuestion\$title, and ILIAS\GlobalScreen\Provider\__construct().
Here is the call graph for this function:| assMatchingQuestion::addDefinition | ( | $definition | ) |
Adds a definition.
| object | $definition | The definition |
Definition at line 587 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 425 of file class.assMatchingQuestion.php.
| assMatchingQuestion::addTerm | ( | assAnswerMatchingTerm | $term | ) |
Definition at line 576 of file class.assMatchingQuestion.php.
|
protected |
{}
Reimplemented from assQuestion.
Definition at line 1313 of file class.assMatchingQuestion.php.
| assMatchingQuestion::calculateReachedPoints | ( | int | $active_id, |
| ?int | $pass = null, |
||
| bool | $authorized_solution = true |
||
| ) |
Reimplemented from assQuestion.
Definition at line 686 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 1198 of file class.assMatchingQuestion.php.
|
private |
Definition at line 890 of file class.assMatchingQuestion.php.
References ILIAS\Repository\lng().
Here is the call graph for this function:
|
private |
Definition at line 333 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 326 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 1335 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:
|
protected |
Definition at line 1339 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:
|
protected |
Definition at line 1331 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::deleteDefinition | ( | $position | ) |
Deletes a definition.
| integer | $position | The position of the definition in the definition array |
Definition at line 668 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 835 of file class.assMatchingQuestion.php.
References Vendor\Package\$e, and $filename.
| 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 486 of file class.assMatchingQuestion.php.
| assMatchingQuestion::deleteTerm | ( | $position | ) |
Deletes a term.
| string | $term_id | The id of the term to delete |
Definition at line 656 of file class.assMatchingQuestion.php.
| assMatchingQuestion::fetchIndexedValuesFromValuePairs | ( | array | $valuePairs | ) |
| array | $valuePairs |
Reimplemented from assQuestion.
Definition at line 778 of file class.assMatchingQuestion.php.
| assMatchingQuestion::flushDefinitions | ( | ) |
Deletes all definitions.
Definition at line 645 of file class.assMatchingQuestion.php.
| assMatchingQuestion::flushMatchingPairs | ( | ) |
Deletes all matching pairs.
Definition at line 505 of file class.assMatchingQuestion.php.
| assMatchingQuestion::flushTerms | ( | ) |
Deletes all terms.
Definition at line 636 of file class.assMatchingQuestion.php.
| assMatchingQuestion::fromNormalized | ( | array | $normalized, |
| Transformations | $transformations | ||
| ) |
| array<array-key,mixed> | $normalized |
Reimplemented from assQuestion.
Definition at line 1448 of file class.assMatchingQuestion.php.
References ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\denormalize(), ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\float(), ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\int(), and ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\string().
Here is the call graph for this function:
|
protected |
Definition at line 1090 of file class.assMatchingQuestion.php.
References $filename, and ilShellUtil\convertImage().
Here is the call graph for this function:| assMatchingQuestion::getAdditionalTableName | ( | ) |
Reimplemented from assQuestion.
Definition at line 986 of file class.assMatchingQuestion.php.
Referenced by saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assMatchingQuestion::getAnswerTableName | ( | ) |
Reimplemented from assQuestion.
Definition at line 991 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 |
Definition at line 1301 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getCorrectSolutionForTextOutput | ( | int | $active_id, |
| int | $pass | ||
| ) |
Reimplemented from assQuestion.
Definition at line 1422 of file class.assMatchingQuestion.php.
References assAnswerMatchingPair\getDefinition(), and assAnswerMatchingPair\getTerm().
Here is the call graph for this function:| assMatchingQuestion::getDefinitionCount | ( | ) |
Returns the number of definitions.
Definition at line 571 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getDefinitions | ( | ) |
Returns the definitions of the matching question.
Definition at line 549 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getDefinitionWithIdentifier | ( | $a_identifier | ) |
Returns a definition with a given identifier.
Definition at line 447 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 801 of file class.assMatchingQuestion.php.
References $filename.
| assMatchingQuestion::getExpressionTypes | ( | ) |
Get all available expression types for a specific question.
Implements iQuestionCondition.
Definition at line 1225 of file class.assMatchingQuestion.php.
References iQuestionCondition\EmptyAnswerExpression, iQuestionCondition\MatchingResultExpression, iQuestionCondition\NumericResultExpression, and iQuestionCondition\PercentageResultExpression.
| assMatchingQuestion::getMatchingMode | ( | ) |
Definition at line 1193 of file class.assMatchingQuestion.php.
Referenced by saveAdditionalQuestionDataToDb().
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 465 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getMatchingPairCount | ( | ) |
Returns the number of matching pairs.
Definition at line 527 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getMatchingPairs | ( | ) |
Returns the matchingpairs array.
Definition at line 1008 of file class.assMatchingQuestion.php.
Referenced by saveAnswerSpecificDataToDb().
Here is the caller graph for this function:| assMatchingQuestion::getMaximumPoints | ( | ) |
Calculates and Returns the maximum points, a learner can reach answering the question.
Reimplemented from assQuestion.
Definition at line 716 of file class.assMatchingQuestion.php.
Referenced by isComplete().
Here is the caller graph for this function:| assMatchingQuestion::getMaximumScoringMatchingPairs | ( | ) |
Definition at line 727 of file class.assMatchingQuestion.php.
|
private |
Definition at line 753 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getOperators | ( | string | $expression | ) |
Get all available operations for a specific question.
| $expression |
Implements iQuestionCondition.
Definition at line 1220 of file class.assMatchingQuestion.php.
References ilOperatorsExpressionMapping\getOperatorsByExpression().
Here is the call graph for this function:
|
private |
Definition at line 738 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getQuestionType | ( | ) |
Returns the question type of the question.
Reimplemented from assQuestion.
Definition at line 981 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getRandomId | ( | ) |
Definition at line 954 of file class.assMatchingQuestion.php.
| assMatchingQuestion::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 1000 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getShuffleMode | ( | ) |
Definition at line 108 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 560 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getTerms | ( | ) |
Returns the terms of the matching question.
Definition at line 538 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getTermWithIdentifier | ( | $a_identifier | ) |
Returns a term with a given identifier.
Definition at line 434 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getThumbGeometry | ( | ) |
Get the thumbnail geometry.
Definition at line 1018 of file class.assMatchingQuestion.php.
Referenced by saveAdditionalQuestionDataToDb().
Here is the caller graph for this function:| assMatchingQuestion::getThumbPrefix | ( | ) |
Definition at line 1085 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getThumbSize | ( | ) |
Get the thumbnail geometry.
Reimplemented from assQuestion.
Definition at line 1028 of file class.assMatchingQuestion.php.
| assMatchingQuestion::getUserQuestionResult | ( | int | $active_id, |
| int | $pass | ||
| ) |
Get the user solution for a question by active_id and the test pass.
Implements iQuestionCondition.
Definition at line 1235 of file class.assMatchingQuestion.php.
References $data.
| assMatchingQuestion::insertDefinition | ( | $position, | |
| ?assAnswerMatchingDefinition | $definition = null |
||
| ) |
Inserts a definition.
| object | $definition | The definition |
Definition at line 618 of file class.assMatchingQuestion.php.
| 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 401 of file class.assMatchingQuestion.php.
| assMatchingQuestion::insertTerm | ( | $position, | |
| ?assAnswerMatchingTerm | $term = null |
||
| ) |
Inserts a term.
| string | $term | The text of the term |
Definition at line 598 of file class.assMatchingQuestion.php.
| assMatchingQuestion::isComplete | ( | ) |
Reimplemented from assQuestion.
Definition at line 118 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 230 of file class.assMatchingQuestion.php.
References $data, Vendor\Package\$e, ilRTE\_replaceMediaObjectImageSrc(), createMatchingDefinition(), createMatchingPair(), createMatchingTerm(), 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 1046 of file class.assMatchingQuestion.php.
Referenced by saveAnswerSpecificDataToDb().
Here is the caller graph for this function:| assMatchingQuestion::removeDefinitionImage | ( | $index | ) |
Definition at line 819 of file class.assMatchingQuestion.php.
| assMatchingQuestion::removeTermImage | ( | $index | ) |
Definition at line 810 of file class.assMatchingQuestion.php.
| assMatchingQuestion::saveAdditionalQuestionDataToDb | ( | ) |
Definition at line 207 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 140 of file class.assMatchingQuestion.php.
References $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 |
Reimplemented from assQuestion.
Definition at line 945 of file class.assMatchingQuestion.php.
References ilAssQuestionPreviewSession\setParticipantsSolution().
Here is the call graph for this function:| assMatchingQuestion::saveToDb | ( | ?int | $original_id = null | ) |
Reimplemented from assQuestion.
Definition at line 131 of file class.assMatchingQuestion.php.
References assQuestion\$original_id, saveAdditionalQuestionDataToDb(), saveAnswerSpecificDataToDb(), and assQuestion\saveQuestionDataToDb().
Here is the call graph for this function:| assMatchingQuestion::saveWorkingData | ( | int | $active_id, |
| ?int | $pass = null, |
||
| bool | $authorized = true |
||
| ) |
Reimplemented from assQuestion.
Definition at line 917 of file class.assMatchingQuestion.php.
References ilObjTest\_getPass().
Here is the call graph for this function:| assMatchingQuestion::setImageFile | ( | string | $image_tempfilename, |
| string | $image_filename, | ||
| string | $previous_filename = '' |
||
| ) |
Definition at line 847 of file class.assMatchingQuestion.php.
| assMatchingQuestion::setMatchingMode | ( | string | $matching_mode | ) |
Definition at line 1188 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::setShuffle | ( | $shuffle = true | ) |
Definition at line 971 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:| assMatchingQuestion::setShuffleMode | ( | int | $shuffle | ) |
Definition at line 113 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 681 of file class.assMatchingQuestion.php.
| assMatchingQuestion::setThumbGeometry | ( | int | $a_geometry | ) |
Set the thumbnail geometry.
| integer | $a_geometry | Geometry |
Definition at line 1038 of file class.assMatchingQuestion.php.
Referenced by loadFromDb().
Here is the caller graph for this function:
|
protected |
MUST convert the given solution values into an array or a string that can be stored in the log.
Language variables must be generated through the corresponding functions in the AdditionalInformationGenerator. If an array is returned it will be rendered into a line per array entry in the format "key: value". If the key exists as a language variable, it will be translated.
Reimplemented from assQuestion.
Definition at line 1387 of file class.assMatchingQuestion.php.
| assMatchingQuestion::solutionValuesToText | ( | array | $solution_values | ) |
MUST convert the given solution values into text.
If the text has multiple lines each line MUST be placed as an entry in an array.
Reimplemented from assQuestion.
Definition at line 1394 of file class.assMatchingQuestion.php.
References Vendor\Package\$c.
| assMatchingQuestion::toJSON | ( | ) |
Returns a JSON representation of the question.
Reimplemented from assQuestion.
Definition at line 1115 of file class.assMatchingQuestion.php.
References ilObjMediaObject\_getMobsOfObject(), ILIAS\Survey\Mode\getId(), ILIAS\Repository\int(), ILIAS\Repository\lng(), and ILIAS\Refinery\transform().
Here is the call graph for this function:| assMatchingQuestion::toLog | ( | AdditionalInformationGenerator | $additional_info | ) |
MUST return an array of the question settings that can be stored in the log.
Language variables must be generated through the corresponding functions in the AdditionalInformationGenerator. If an array is returned it will be rendered into a line per array entry in the format "key: value". If the key exists as a language variable, it will be translated.
Reimplemented from assQuestion.
Definition at line 1349 of file class.assMatchingQuestion.php.
References ILIAS\Test\Logging\AdditionalInformationGenerator\getTrueFalseTagForBool(), and ILIAS\Repository\int().
Here is the call graph for this function:| assMatchingQuestion::toNormalized | ( | Transformations | $transformations, |
| array | $context = [] |
||
| ) |
| array<string,mixed> | $context |
Reimplemented from assQuestion.
Definition at line 1432 of file class.assMatchingQuestion.php.
References ILIAS\Survey\Mode\getId(), and ILIAS\TestQuestionPool\ExportImport\Foundation\Normalize\Transformations\normalize().
Here is the call graph for this function:| assMatchingQuestion::withMatchingPairs | ( | array | $pairs | ) |
| assAnswerMatchingPair[] |
Definition at line 513 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 76 of file class.assMatchingQuestion.php.
| int assMatchingQuestion::$element_height |
Definition at line 53 of file class.assMatchingQuestion.php.
|
protected |
Definition at line 55 of file class.assMatchingQuestion.php.
| int assMatchingQuestion::$matching_type |
Definition at line 54 of file class.assMatchingQuestion.php.
Referenced by __construct().
| assMatchingQuestion::$matchingpairs |
Definition at line 66 of file class.assMatchingQuestion.php.
Referenced by saveAnswerSpecificDataToDb().
|
private |
Definition at line 57 of file class.assMatchingQuestion.php.
|
private |
Definition at line 52 of file class.assMatchingQuestion.php.
Referenced by getShuffleMode().
|
protected |
Definition at line 71 of file class.assMatchingQuestion.php.
| int assMatchingQuestion::$thumb_geometry = 100 |
Definition at line 51 of file class.assMatchingQuestion.php.
| const assMatchingQuestion::MATCHING_MODE_1_ON_1 = '1:1' |
Definition at line 48 of file class.assMatchingQuestion.php.
Referenced by assMatchingQuestionGUI\populateAssignedTerms(), and assMatchingQuestionGUI\populateQuestionSpecificFormPart().
| const assMatchingQuestion::MATCHING_MODE_N_ON_N = 'n:n' |
Definition at line 49 of file class.assMatchingQuestion.php.
Referenced by assMatchingQuestionGUI\isValidTermAndDefinitionAmount(), and assMatchingQuestionGUI\populateQuestionSpecificFormPart().
| const assMatchingQuestion::MT_TERMS_DEFINITIONS = 1 |
Definition at line 46 of file class.assMatchingQuestion.php.
| const assMatchingQuestion::MT_TERMS_PICTURES = 0 |
Definition at line 45 of file class.assMatchingQuestion.php.