ILIAS
Release_4_1_x_branch Revision 61804
|
Basic class for all assessment question types. More...
Public Member Functions | |
__construct ($title="", $comment="", $author="", $owner=-1, $question="") | |
assQuestion constructor | |
fromXML (&$item, &$questionpool_id, &$tst_id, &$tst_object, &$question_counter, &$import_mapping) | |
Receives parameters from a QTI parser and creates a valid ILIAS question object. | |
toXML ($a_include_header=true, $a_include_binary=true, $a_shuffle=false, $test_output=false, $force_image_references=false) | |
Returns a QTI xml representation of the question. | |
isComplete () | |
Returns true, if a question is complete for use. | |
questionTitleExists ($questionpool_id, $title) | |
Returns TRUE if the question title exists in the database. | |
setTitle ($title="") | |
Sets the title string of the assQuestion object. | |
setId ($id=-1) | |
Sets the id of the assQuestion object. | |
setTestId ($id=-1) | |
Sets the test id of the assQuestion object. | |
setComment ($comment="") | |
Sets the comment string of the assQuestion object. | |
setOutputType ($outputType=OUTPUT_HTML) | |
Sets the output type. | |
setShuffle ($shuffle=true) | |
Sets the shuffle flag. | |
setEstimatedWorkingTime ($hour=0, $min=0, $sec=0) | |
Sets the estimated working time of a question. | |
keyInArray ($searchkey, $array) | |
returns TRUE if the key occurs in an array | |
setAuthor ($author="") | |
Sets the authors name of the assQuestion object. | |
setOwner ($owner="") | |
Sets the creator/owner ID of the assQuestion object. | |
getTitle () | |
Gets the title string of the assQuestion object. | |
getId () | |
Gets the id of the assQuestion object. | |
getShuffle () | |
Gets the shuffle flag. | |
getTestId () | |
Gets the test id of the assQuestion object. | |
getComment () | |
Gets the comment string of the assQuestion object. | |
getOutputType () | |
Gets the output type. | |
supportsJavascriptOutput () | |
Returns true if the question type supports JavaScript output. | |
getEstimatedWorkingTime () | |
Gets the estimated working time of a question. | |
getAuthor () | |
Gets the authors name of the assQuestion object. | |
getOwner () | |
Gets the creator/owner ID of the assQuestion object. | |
getObjId () | |
Get the object id of the container object. | |
setObjId ($obj_id=0) | |
Set the object id of the container object. | |
_getMaximumPoints ($question_id) | |
Returns the maximum points, a learner can reach answering the question. | |
& | _getQuestionInfo ($question_id) |
Returns question information from the database. | |
getSuggestedSolutionOutput () | |
& | _getSuggestedSolution ($question_id, $subquestion_index=0) |
Returns a suggested solution for a given subquestion index. | |
getSuggestedSolutions () | |
Return the suggested solutions. | |
_getReachedPoints ($active_id, $question_id, $pass=NULL) | |
Returns the points, a learner has reached answering the question. | |
getReachedPoints ($active_id, $pass=NULL) | |
Returns the points, a learner has reached answering the question This is the fast way to get the points directly from the database. | |
getMaximumPoints () | |
Returns the maximum points, a learner can reach answering the question. | |
calculateResultsFromSolution ($active_id, $pass=NULL) | |
Calculates the question results from a previously saved question solution. | |
saveWorkingData ($active_id, $pass=NULL) | |
Saves the learners input of the question to the database. | |
_updateTestResultCache ($active_id) | |
_updateTestPassResults ($active_id, $pass) | |
logAction ($logtext="", $active_id="", $question_id="") | |
Logs an action into the Test&Assessment log. | |
_logAction ($logtext="", $active_id="", $question_id="") | |
Logs an action into the Test&Assessment log. | |
moveUploadedMediaFile ($file, $name) | |
Move an uploaded media file to an public accessible temp dir to present it. | |
getSuggestedSolutionPath () | |
Returns the path for a suggested solution. | |
getJavaPath () | |
Returns the image path for web accessable images of a question. | |
getImagePath () | |
Returns the image path for web accessable images of a question. | |
getFlashPath () | |
Returns the image path for web accessable flash files of a question. | |
getJavaPathWeb () | |
Returns the web image path for web accessable java applets of a question. | |
getSuggestedSolutionPathWeb () | |
Returns the web path for a suggested solution. | |
getImagePathWeb () | |
Returns the web image path for web accessable images of a question. | |
getFlashPathWeb () | |
Returns the web image path for web accessable flash applications of a question. | |
& | getSolutionValues ($active_id, $pass=NULL) |
Loads solutions of a given user from the database an returns it. | |
isInUse ($question_id="") | |
Checks whether the question is in use or not. | |
isClone ($question_id="") | |
Checks whether the question is a clone of another question or not. | |
pcArrayShuffle ($array) | |
Shuffles the values of a given array. | |
getQuestionTypeFromDb ($question_id) | |
get question type for question id | |
getAdditionalTableName () | |
Returns the name of the additional question data table in the database. | |
getAnswerTableName () | |
Returns the name of the answer table in the database. | |
deleteAnswers ($question_id) | |
Deletes datasets from answers tables. | |
deleteAdditionalTableData ($question_id) | |
Deletes datasets from the additional question table in the database. | |
delete ($question_id) | |
Deletes a question and all materials from the database. | |
getTotalAnswers () | |
get total number of answers | |
_getTotalAnswers ($a_q_id) | |
get number of answers for question id (static) note: do not use $this inside this method | |
_getTotalRightAnswers ($a_q_id) | |
get number of answers for question id (static) note: do not use $this inside this method | |
_getTitle ($a_q_id) | |
Returns the title of a question. | |
_getQuestionText ($a_q_id) | |
Returns question text. | |
copyXHTMLMediaObjectsOfQuestion ($a_q_id) | |
syncXHTMLMediaObjectsOfQuestion () | |
createPageObject () | |
create page object of question | |
copyPageOfQuestion ($a_q_id) | |
getPageOfQuestion () | |
_getQuestionType ($question_id) | |
Returns the question type of a question with a given id. | |
_getQuestionTitle ($question_id) | |
Returns the question title of a question with a given id. | |
setOriginalId ($original_id) | |
getOriginalId () | |
loadFromDb ($question_id) | |
Loads the question from the database. | |
createNewQuestion () | |
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. | |
saveQuestionDataToDb ($original_id="") | |
saveToDb ($original_id="") | |
Saves the question to the database. | |
deleteSuggestedSolutions () | |
Deletes all suggestes solutions in the database. | |
getSuggestedSolution ($subquestion_index=0) | |
Returns a suggested solution for a given subquestion index. | |
getSuggestedSolutionTitle ($subquestion_index=0) | |
Returns the title of a suggested solution at a given subquestion_index. | |
setSuggestedSolution ($solution_id="", $subquestion_index=0, $is_import=false) | |
Sets a suggested solution for the question. | |
updateSuggestedSolutions ($original_id="") | |
Update the suggested solutions of a question based on the suggested solution array attribute. | |
saveSuggestedSolution ($type, $solution_id="", $subquestion_index=0, $value="") | |
Saves a suggested solution for the question. | |
_resolveInternalLink ($internal_link) | |
_resolveIntLinks ($question_id) | |
_getInternalLinkHref ($target="") | |
_getOriginalId ($question_id) | |
Returns the original id of a question. | |
syncWithOriginal () | |
createRandomSolution ($test_id, $user_id) | |
_questionExists ($question_id) | |
Returns true if the question already exists in the database. | |
& | _instanciateQuestion ($question_id) |
Creates an instance of a question with a given question id. | |
getPoints () | |
Returns the maximum available points for the question. | |
setPoints ($a_points) | |
Sets the maximum available points for the question. | |
getSolutionMaxPass ($active_id) | |
Returns the maximum pass a users question solution. | |
_getSolutionMaxPass ($question_id, $active_id) | |
Returns the maximum pass a users question solution. | |
_isWriteable ($question_id, $user_id) | |
Returns true if the question is writeable by a certain user. | |
_isUsedInRandomTest ($question_id="") | |
Checks whether the question is used in a random test or not. | |
calculateReachedPoints ($active_id, $pass=NULL, $points=0) | |
Returns the points, a learner has reached answering the question The points are calculated from the given answers including checks for all special scoring options in the test container. | |
isHTML ($a_text) | |
Checks if a given string contains HTML or not. | |
prepareTextareaOutput ($txt_output, $prepare_for_latex_output=FALSE) | |
Prepares a string for a text area output in tests. | |
QTIMaterialToString ($a_material) | |
Reads an QTI material tag an creates a text string. | |
addQTIMaterial (&$a_xml_writer, $a_material, $close_material_tag=TRUE, $add_mobs=TRUE) | |
Creates a QTI material tag from a plain text or xhtml text. | |
createNewImageFileName ($image_filename) | |
_setReachedPoints ($active_id, $question_id, $points, $maxpoints, $pass=NULL, $manualscoring=FALSE) | |
Sets the points, a learner has reached answering the question Additionally objective results are updated. | |
getQuestion () | |
Gets the question string of the question object. | |
setQuestion ($question="") | |
Sets the question string of the question object. | |
getQuestionType () | |
Returns the question type of the question. | |
getQuestionTypeID () | |
Returns the question type of the question. | |
saveFeedbackGeneric ($correctness, $feedback) | |
Saves generic feedback to the database. | |
getFeedbackGeneric ($correctness) | |
Returns the generic feedback for a given question state. | |
duplicateFeedbackGeneric ($original_id) | |
Duplicates the generic feedback of a question. | |
syncFeedbackGeneric () | |
getRTETextWithMediaObjects () | |
Collects all text in the question which could contain media objects which were created with the Rich Text Editor. | |
cleanupMediaObjectUsage () | |
synchronises appearances of media objects in the question with media object usage table | |
& | getInstances () |
Gets all instances of the question. | |
_needsManualScoring ($question_id) | |
getActiveUserData ($active_id) | |
Returns the user id and the test id for a given active id. | |
& | _instanciateQuestionGUI ($question_id) |
Creates an instance of a question gui with a given question id. | |
setExportDetailsXLS (&$worksheet, $startrow, $active_id, $pass, &$format_title, &$format_bold) | |
Creates an Excel worksheet for the detailed cumulated results of this question. | |
__get ($value) | |
Object getter. | |
__set ($key, $value) | |
Object setter. | |
getNrOfTries () | |
setNrOfTries ($a_nr_of_tries) |
Static Public Member Functions | |
static | _getSuggestedSolutionCount ($question_id) |
Returns the number of suggested solutions associated with a question. | |
static | _getSuggestedSolutionOutput ($question_id) |
Returns the output of the suggested solution. | |
static | _isWorkedThrough ($active_id, $question_id, $pass=NULL) |
Returns true if the question was worked through in the given pass Worked through means that the user entered at least one value. | |
static | _areAnswered ($a_user_id, $a_question_ids) |
Checks if an array of question ids is answered by an user or not. | |
static | _includeClass ($question_type, $gui=0) |
Include the php class file for a given question type. | |
static | _getQuestionTypeName ($type_tag) |
Return the translation for a given question type tag. |
Protected Member Functions | |
deletePageOfQuestion ($question_id) | |
Deletes the page object of a question with a given ID. | |
onDuplicate ($source_question_id) | |
Will be called when a question is duplicated (inside a question pool or for insertion in a test) | |
onCopy ($source_questionpool_id, $source_question_id) | |
Will be called when a question is copied (into another question pool) | |
duplicateSuggestedSolutionFiles ($question_id) | |
Duplicates the files of a suggested solution if the question is duplicated. | |
syncSuggestedSolutionFiles ($original_id) | |
Syncs the files of a suggested solution if the question is synced. | |
copySuggestedSolutionFiles ($source_questionpool_id, $source_question_id) |
Protected Attributes | |
$id | |
$title | |
$comment | |
$owner | |
$author | |
$question | |
$points | |
$est_working_time | |
$shuffle | |
$test_id | |
$obj_id | |
$ilias | |
$tpl | |
$lng | |
$outputType | |
$suggested_solutions | |
$original_id | |
$page |
Private Attributes | |
$nr_of_tries | |
Number of tries. | |
$arrData | |
Associative array to store properties. |
Basic class for all assessment question types.
The assQuestion class defines and encapsulates basic methods and attributes for assessment question types to be used for all parent classes.
Definition at line 36 of file class.assQuestion.php.
assQuestion::__construct | ( | $title = "" , |
|
$comment = "" , |
|||
$author = "" , |
|||
$owner = -1 , |
|||
$question = "" |
|||
) |
assQuestion constructor
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 | Question text public |
Reimplemented in assClozeTest, assTextQuestion, assTextSubset, assNumeric, assFlashQuestion, assErrorText, assOrderingHorizontal, and assFileUpload.
Definition at line 184 of file class.assQuestion.php.
References $author, $comment, $ilias, $lng, $owner, $question, $title, $tpl, OUTPUT_HTML, setEstimatedWorkingTime(), and setQuestion().
assQuestion::__get | ( | $value | ) |
Object getter.
Reimplemented in assErrorText, assFileUpload, and assOrderingHorizontal.
Definition at line 3165 of file class.assQuestion.php.
References $ilias, $page, $tpl, getAuthor(), getComment(), getEstimatedWorkingTime(), getId(), getObjId(), getOriginalId(), getOutputType(), getOwner(), getPoints(), getQuestion(), getShuffle(), getSuggestedSolutions(), getTestId(), and getTitle().
assQuestion::__set | ( | $key, | |
$value | |||
) |
Object setter.
Reimplemented in assErrorText, assFileUpload, and assOrderingHorizontal.
Definition at line 3236 of file class.assQuestion.php.
References setAuthor(), setComment(), setEstimatedWorkingTime(), setId(), setObjId(), setOriginalId(), setOutputType(), setOwner(), setPoints(), setQuestion(), setShuffle(), setTestId(), and setTitle().
|
static |
Checks if an array of question ids is answered by an user or not.
int | user_id | |
array | $question_ids | user id array |
Definition at line 2564 of file class.assQuestion.php.
Referenced by ilCourseObjectiveResult\getStatus().
assQuestion::_getInternalLinkHref | ( | $target = "" | ) |
Definition at line 2223 of file class.assQuestion.php.
References $ilDB, and $target_id.
Referenced by getSuggestedSolutionOutput(), and assQuestionGUI\suggestedsolution().
assQuestion::_getMaximumPoints | ( | $question_id | ) |
Returns the maximum points, a learner can reach answering the question.
integer | $question_id | The database Id of the question |
Definition at line 584 of file class.assQuestion.php.
References $ilDB, $points, $result, and $row.
Referenced by _getTotalRightAnswers(), ilCourseObjectiveQuestion\_lookupMaximumPointsOfQuestion(), and ilTestScoringGUI\setPointsManual().
assQuestion::_getOriginalId | ( | $question_id | ) |
Returns the original id of a question.
integer | $question_id | The database id of the question |
Definition at line 2266 of file class.assQuestion.php.
References $ilDB, $result, and $row.
Referenced by _logAction(), ilObjTest\cloneObject(), assFileUpload\copyObject(), assOrderingHorizontal\copyObject(), assImagemapQuestion\copyObject(), assFlashQuestion\copyObject(), assErrorText\copyObject(), assTextQuestion\copyObject(), assNumeric\copyObject(), assOrderingQuestion\copyObject(), assTextSubset\copyObject(), assMatchingQuestion\copyObject(), assMultipleChoice\copyObject(), assSingleChoice\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), assFileUpload\duplicate(), assOrderingHorizontal\duplicate(), assImagemapQuestion\duplicate(), assFlashQuestion\duplicate(), assErrorText\duplicate(), assTextQuestion\duplicate(), assNumeric\duplicate(), assOrderingQuestion\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assMatchingQuestion\duplicate(), assSingleChoice\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), logAction(), and ilObjTest\logAction().
& assQuestion::_getQuestionInfo | ( | $question_id | ) |
Returns question information from the database.
integer | $question_id | The database Id of the question |
Definition at line 607 of file class.assQuestion.php.
References $ilDB, and $result.
Referenced by ilObjMediaObject\getParentObjectIdForUsage().
assQuestion::_getQuestionText | ( | $a_q_id | ) |
Returns question text.
int | $a_q_id | question id |
Definition at line 1560 of file class.assQuestion.php.
References $ilDB, $result, and $row.
Referenced by ilObjectivesAlignmentTableGUI\fillRow(), and ilLMQuestionListTableGUI\fillRow().
assQuestion::_getQuestionTitle | ( | $question_id | ) |
Returns the question title of a question with a given id.
integer | $question_id | The database id of the question |
Definition at line 1671 of file class.assQuestion.php.
References $data, $ilDB, and $result.
Referenced by ilObjAssessmentFolderGUI\exportLogObject(), ilAssessmentFolderLogTableGUI\fillRow(), and ilObjTest\saveManualFeedback().
assQuestion::_getQuestionType | ( | $question_id | ) |
Returns the question type of a question with a given id.
integer | $question_id | The database id of the question |
Definition at line 1644 of file class.assQuestion.php.
References $data, $ilDB, and $result.
Referenced by _instanciateQuestion(), _instanciateQuestionGUI(), _needsManualScoring(), and ilObjectivesAlignmentTableGUI\fillRow().
|
static |
Return the translation for a given question type tag.
string | $type_tag | The type tag of the question type public |
Definition at line 3102 of file class.assQuestion.php.
References $lng, ilPlugin\getPluginObject(), and IL_COMP_MODULE.
Referenced by ilObjTestGUI\createRandomSelectionObject(), ilTestQuestionsTableGUI\fillRow(), ilTestQuestionBrowserTableGUI\fillRow(), ilQuestionBrowserTableGUI\fillRow(), assQuestionGUI\outQuestionType(), ilObjQuestionPoolGUI\printObject(), and ilObjTestGUI\removeQuestionsForm().
assQuestion::_getReachedPoints | ( | $active_id, | |
$question_id, | |||
$pass = NULL |
|||
) |
Returns the points, a learner has reached answering the question.
integer | $user_id | The database ID of the learner |
integer | $test_id | The database Id of the test containing the question |
integer | $question_id | The database Id of the question |
Definition at line 723 of file class.assQuestion.php.
References $ilDB, $pass, $points, $result, $row, and _getSolutionMaxPass().
Referenced by ilTestServiceGUI\getPassListOfAnswersWithScoring(), and getReachedPoints().
assQuestion::_getSolutionMaxPass | ( | $question_id, | |
$active_id | |||
) |
Returns the maximum pass a users question solution.
return | integer The maximum pass of the users solution public |
Definition at line 2416 of file class.assQuestion.php.
References $ilDB, $result, and $row.
Referenced by _getReachedPoints(), _isWorkedThrough(), _setReachedPoints(), getSolutionMaxPass(), and ilObjTest\getTextAnswer().
& assQuestion::_getSuggestedSolution | ( | $question_id, | |
$subquestion_index = 0 |
|||
) |
Returns a suggested solution for a given subquestion index.
integer | $question_id | The database Id of the question |
integer | $subquestion_index | The index of a subquestion (i.e. a close test gap). Usually 0 |
Definition at line 684 of file class.assQuestion.php.
|
static |
Returns the number of suggested solutions associated with a question.
integer | $question_id | The database Id of the question |
Definition at line 628 of file class.assQuestion.php.
|
static |
Returns the output of the suggested solution.
integer | $question_id | The database Id of the question |
Definition at line 645 of file class.assQuestion.php.
References $question, and _instanciateQuestion().
Referenced by ilObjTest\getTestResult().
assQuestion::_getTitle | ( | $a_q_id | ) |
Returns the title of a question.
int | $a_q_id | question id |
Definition at line 1537 of file class.assQuestion.php.
References $ilDB, $result, and $row.
Referenced by ilObjQuestionPoolGUI\assessmentObject(), and ilSCORM2004ScoGUI\sahs_questions().
assQuestion::_getTotalAnswers | ( | $a_q_id | ) |
get number of answers for question id (static) note: do not use $this inside this method
int | $a_q_id | question id |
Definition at line 1459 of file class.assQuestion.php.
References $ilDB, $result, and $row.
Referenced by ilObjQuestionPoolGUI\assessmentObject(), and getTotalAnswers().
assQuestion::_getTotalRightAnswers | ( | $a_q_id | ) |
get number of answers for question id (static) note: do not use $this inside this method
int | $a_q_id | question id |
Definition at line 1490 of file class.assQuestion.php.
References $ilDB, $result, $row, and _getMaximumPoints().
Referenced by ilObjQuestionPoolGUI\assessmentObject().
|
static |
Include the php class file for a given question type.
string | $question_type | The type tag of the question type |
Definition at line 3073 of file class.assQuestion.php.
References ilPlugin\getPluginObject(), and IL_COMP_MODULE.
Referenced by assQuestionGUI\_getQuestionGUI(), _instanciateQuestion(), _instanciateQuestionGUI(), ilObjQuestionPool\createQuestion(), ilObjTest\createQuestionGUI(), and ilQTIParser\handlerParseEndTag().
& assQuestion::_instanciateQuestion | ( | $question_id | ) |
Creates an instance of a question with a given question id.
integer | $question_id | The question id |
Definition at line 2356 of file class.assQuestion.php.
References $question, _getQuestionType(), and _includeClass().
Referenced by _getSuggestedSolutionOutput(), ilSCORM2004Sco\exportPDFPrepareXmlNFiles(), ilSCORM2004Sco\exportXMLPageObjects(), ilPageObject\newQuestionCopies(), ilSoapTestAdministration\saveQuestion(), and ilSoapTestAdministration\saveQuestionSolution().
& assQuestion::_instanciateQuestionGUI | ( | $question_id | ) |
Creates an instance of a question gui with a given question id.
integer | $question_id | The question id |
Definition at line 3132 of file class.assQuestion.php.
References _getQuestionType(), and _includeClass().
Referenced by ilObjQuestionPool\createQuestion(), ilQuestionPoolPrintViewTableGUI\fillRow(), and ilObjQuestionPoolGUI\printObject().
assQuestion::_isUsedInRandomTest | ( | $question_id = "" | ) |
Checks whether the question is used in a random test or not.
Definition at line 2482 of file class.assQuestion.php.
References $ilDB, and $result.
Referenced by ilObjQuestionPool\getDeleteableQuestionDetails().
|
static |
Returns true if the question was worked through in the given pass Worked through means that the user entered at least one value.
integer | $user_id | The database ID of the learner |
integer | $test_id | The database Id of the test containing the question |
integer | $question_id | The database Id of the question |
Definition at line 2533 of file class.assQuestion.php.
References $ilDB, $pass, $points, $result, and _getSolutionMaxPass().
Referenced by ilObjTest\getAnsweredQuestionCount().
assQuestion::_isWriteable | ( | $question_id, | |
$user_id | |||
) |
Returns true if the question is writeable by a certain user.
integer | $question_id | The database id of the question |
integer | $user_id | The database id of the user |
Definition at line 2450 of file class.assQuestion.php.
References $ilDB, $result, and $row.
Referenced by assQuestionGUI\save(), assQuestionGUI\saveEdit(), assQuestionGUI\saveFeedback(), and assQuestionGUI\suggestedsolution().
assQuestion::_logAction | ( | $logtext = "" , |
|
$active_id = "" , |
|||
$question_id = "" |
|||
) |
Logs an action into the Test&Assessment log.
string | $logtext | The log text |
integer | $question_id | If given, saves the question id to the database public |
Definition at line 964 of file class.assQuestion.php.
References $original_id, ilObjAssessmentFolder\_addLog(), ilObjTest\_getObjectIDFromActiveID(), and _getOriginalId().
Referenced by _setReachedPoints().
assQuestion::_needsManualScoring | ( | $question_id | ) |
Definition at line 3026 of file class.assQuestion.php.
References ilObjAssessmentFolder\_getManualScoringTypes(), and _getQuestionType().
Referenced by ilObjTestGUI\insertQuestionsObject().
assQuestion::_questionExists | ( | $question_id | ) |
Returns true if the question already exists in the database.
integer | $question_id | The database id of the question |
Definition at line 2326 of file class.assQuestion.php.
assQuestion::_resolveInternalLink | ( | $internal_link | ) |
Definition at line 2135 of file class.assQuestion.php.
References ilInternalLink\_getIdForImportId(), and ilLMObject\_getIdForImportId().
Referenced by _resolveIntLinks(), and setSuggestedSolution().
assQuestion::_resolveIntLinks | ( | $question_id | ) |
Definition at line 2172 of file class.assQuestion.php.
References $ilDB, $result, $row, ilInternalLink\_deleteAllLinksOfSource(), _resolveInternalLink(), and ilInternalLink\_saveLink().
Referenced by ilContObjParser\processPagesToParse().
assQuestion::_setReachedPoints | ( | $active_id, | |
$question_id, | |||
$points, | |||
$maxpoints, | |||
$pass = NULL , |
|||
$manualscoring = FALSE |
|||
) |
Sets the points, a learner has reached answering the question Additionally objective results are updated.
integer | $user_id | The database ID of the learner |
integer | $test_id | The database Id of the test containing the question |
integer | $points | The points the user has reached answering the question |
Definition at line 2706 of file class.assQuestion.php.
References $ilDB, $lng, $pass, $points, $result, $row, ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), ilObjTestAccess\_getParticipantData(), _getSolutionMaxPass(), ilObjTest\_getUserIdFromActiveId(), _logAction(), ilCourseObjectiveResult\_updateObjectiveResult(), and _updateTestPassResults().
Referenced by ilTestScoringGUI\setPointsManual().
assQuestion::_updateTestPassResults | ( | $active_id, | |
$pass | |||
) |
Definition at line 881 of file class.assQuestion.php.
References $data, $ilDB, $pass, $result, $row, ilObjTest\_getQuestionCountAndPointsForPassOfParticipant(), ilObjTest\_getWorkingTimeOfParticipantForPass(), and _updateTestResultCache().
Referenced by ilObjTestAccess\_isPassed(), _setReachedPoints(), calculateResultsFromSolution(), and assTextQuestion\setReachedPoints().
assQuestion::_updateTestResultCache | ( | $active_id | ) |
Definition at line 834 of file class.assQuestion.php.
References $ilDB, $pass, $result, $row, ASS_MarkSchema\_getMatchingMarkFromActiveId(), and ilObjTest\_getResultPass().
Referenced by ilObjTestAccess\_getPassedUsers(), ilObjTestAccess\_isPassed(), _updateTestPassResults(), and ilObjTest\getResultsForActiveId().
assQuestion::addQTIMaterial | ( | & | $a_xml_writer, |
$a_material, | |||
$close_material_tag = TRUE , |
|||
$add_mobs = TRUE |
|||
) |
Creates a QTI material tag from a plain text or xhtml text.
object | $a_xml_writer | Reference to the ILIAS XML writer |
string | $a_material | plain text or html text containing the material |
Definition at line 2648 of file class.assQuestion.php.
References $mobs, ilObjMediaObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilRTE\_replaceMediaObjectImageSrc(), getId(), and isHTML().
assQuestion::calculateReachedPoints | ( | $active_id, | |
$pass = NULL , |
|||
$points = 0 |
|||
) |
Returns the points, a learner has reached answering the question The points are calculated from the given answers including checks for all special scoring options in the test container.
integer | $user_id | The database ID of the learner |
integer | $test_id | The database Id of the test containing the question public |
Reimplemented in assClozeTest.
Definition at line 2503 of file class.assQuestion.php.
References $points, ilObjTest\_getCountSystem(), ilObjTest\_getScoreCutting(), and getMaximumPoints().
Referenced by calculateResultsFromSolution().
assQuestion::calculateResultsFromSolution | ( | $active_id, | |
$pass = NULL |
|||
) |
Calculates the question results from a previously saved question solution.
integer | $active_id | Active id of the user |
integer | $pass | Test pass |
Definition at line 775 of file class.assQuestion.php.
References $ilDB, $pass, ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), ilObjTest\_getPass(), ilCourseObjectiveResult\_updateObjectiveResult(), _updateTestPassResults(), calculateReachedPoints(), getId(), and logAction().
Referenced by saveWorkingData().
assQuestion::cleanupMediaObjectUsage | ( | ) |
synchronises appearances of media objects in the question with media object usage table
Definition at line 2971 of file class.assQuestion.php.
References ilRTE\_cleanupMediaObjectUsage(), getId(), and getRTETextWithMediaObjects().
Referenced by saveSuggestedSolution(), saveToDb(), and updateSuggestedSolutions().
assQuestion::copyPageOfQuestion | ( | $a_q_id | ) |
Definition at line 1616 of file class.assQuestion.php.
References $page.
Referenced by syncWithOriginal().
|
protected |
Definition at line 2020 of file class.assQuestion.php.
References $filename, $ilLog, getSuggestedSolutionPath(), and ilUtil\makeDirParents().
Referenced by onCopy().
assQuestion::copyXHTMLMediaObjectsOfQuestion | ( | $a_q_id | ) |
Definition at line 1579 of file class.assQuestion.php.
References $mobs, ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_saveUsage(), and getId().
assQuestion::createNewImageFileName | ( | $image_filename | ) |
Definition at line 2685 of file class.assQuestion.php.
assQuestion::createNewQuestion | ( | ) |
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.
Definition at line 1739 of file class.assQuestion.php.
References $_GET, $_POST, $ilDB, $obj_id, ilObject\_lookupObjId(), createPageObject(), getAuthor(), getEstimatedWorkingTime(), getId(), getObjId(), getQuestionTypeID(), and setId().
assQuestion::createPageObject | ( | ) |
create page object of question
Definition at line 1602 of file class.assQuestion.php.
References getId(), and getObjId().
Referenced by createNewQuestion(), saveQuestionDataToDb(), and syncWithOriginal().
assQuestion::createRandomSolution | ( | $test_id, | |
$user_id | |||
) |
Reimplemented in assSingleChoice, and assTextQuestion.
Definition at line 2315 of file class.assQuestion.php.
assQuestion::delete | ( | $question_id | ) |
Deletes a question and all materials from the database.
integer | $question_id | The database id of the question private |
Definition at line 1318 of file class.assQuestion.php.
References $ilDB, $ilLog, $mobs, $obj_id, $result, $row, ilObjMediaObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), ilObjQuestionPool\_updateQuestionCount(), ilUtil\delDir(), deleteAdditionalTableData(), deleteAnswers(), deletePageOfQuestion(), and getObjId().
assQuestion::deleteAdditionalTableData | ( | $question_id | ) |
Deletes datasets from the additional question table in the database.
integer | $question_id | The question id which should be deleted in the additional question table public |
Definition at line 1269 of file class.assQuestion.php.
References $ilDB, and getAdditionalTableName().
Referenced by delete().
assQuestion::deleteAnswers | ( | $question_id | ) |
Deletes datasets from answers tables.
integer | $question_id | The question id which should be deleted in the answers table public |
Reimplemented in assFileUpload, assFlashQuestion, assOrderingHorizontal, and assErrorText.
Definition at line 1234 of file class.assQuestion.php.
References $ilDB, and getAnswerTableName().
Referenced by delete().
|
protected |
Deletes the page object of a question with a given ID.
integer | $question_id | The database id of the question protected |
Definition at line 1304 of file class.assQuestion.php.
References $page.
Referenced by delete(), and syncWithOriginal().
assQuestion::deleteSuggestedSolutions | ( | ) |
Deletes all suggestes solutions in the database.
Definition at line 1877 of file class.assQuestion.php.
References $ilDB, ilInternalLink\_deleteAllLinksOfSource(), ilUtil\delDir(), getId(), and getSuggestedSolutionPath().
assQuestion::duplicateFeedbackGeneric | ( | $original_id | ) |
Duplicates the generic feedback of a question.
integer | $original_id | The database ID of the original question public |
Definition at line 2895 of file class.assQuestion.php.
References $ilDB, $original_id, $result, $row, and getId().
|
protected |
Duplicates the files of a suggested solution if the question is duplicated.
Definition at line 1962 of file class.assQuestion.php.
References $filename, $ilLog, getSuggestedSolutionPath(), and ilUtil\makeDirParents().
Referenced by onDuplicate().
assQuestion::fromXML | ( | & | $item, |
& | $questionpool_id, | ||
& | $tst_id, | ||
& | $tst_object, | ||
& | $question_counter, | ||
& | $import_mapping | ||
) |
Receives parameters from a QTI parser and creates a valid ILIAS question object.
object | $item | The QTI item object |
integer | $questionpool_id | The id of the parent questionpool |
integer | $tst_id | The id of the parent test if the question is part of a test |
object | $tst_object | A reference to the parent test object |
integer | $question_counter | A reference to a question counter to count the questions of an imported question pool |
array | $import_mapping | An array containing references to included ILIAS objects public |
Reimplemented in assFileUpload, assOrderingHorizontal, assFlashQuestion, and assErrorText.
Definition at line 236 of file class.assQuestion.php.
References getQuestionType().
assQuestion::getActiveUserData | ( | $active_id | ) |
Returns the user id and the test id for a given active id.
integer | $active_id | Active id for a test/user |
Definition at line 3048 of file class.assQuestion.php.
assQuestion::getAdditionalTableName | ( | ) |
Returns the name of the additional question data table in the database.
Reimplemented in assClozeTest, assMatchingQuestion, assOrderingQuestion, assJavaApplet, assSingleChoice, assMultipleChoice, assTextSubset, assImagemapQuestion, assTextQuestion, assFileUpload, assNumeric, assOrderingHorizontal, assFlashQuestion, and assErrorText.
Definition at line 1212 of file class.assQuestion.php.
Referenced by deleteAdditionalTableData().
assQuestion::getAnswerTableName | ( | ) |
Returns the name of the answer table in the database.
Reimplemented in assClozeTest, assMatchingQuestion, assOrderingQuestion, assSingleChoice, assMultipleChoice, assTextSubset, assImagemapQuestion, assFileUpload, assFlashQuestion, assOrderingHorizontal, and assErrorText.
Definition at line 1223 of file class.assQuestion.php.
Referenced by deleteAnswers().
assQuestion::getAuthor | ( | ) |
Gets the authors name of the assQuestion object.
Definition at line 537 of file class.assQuestion.php.
References $author.
Referenced by __get(), createNewQuestion(), assClozeTest\isComplete(), and saveQuestionDataToDb().
assQuestion::getComment | ( | ) |
Gets the comment string of the assQuestion object.
Definition at line 486 of file class.assQuestion.php.
References $comment.
Referenced by __get(), and saveQuestionDataToDb().
assQuestion::getEstimatedWorkingTime | ( | ) |
Gets the estimated working time of a question.
Definition at line 521 of file class.assQuestion.php.
References $est_working_time.
Referenced by __get(), createNewQuestion(), and saveQuestionDataToDb().
assQuestion::getFeedbackGeneric | ( | $correctness | ) |
Returns the generic feedback for a given question state.
The state is either the complete solution of the question or at least one incorrect answer
integer | $correctness | 0 for at least one incorrect answer, 1 for the correct solution |
Definition at line 2871 of file class.assQuestion.php.
References $ilDB, $result, $row, ilRTE\_replaceMediaObjectImageSrc(), and getId().
Referenced by getRTETextWithMediaObjects(), assImagemapQuestion\toJSON(), assOrderingQuestion\toJSON(), assMultipleChoice\toJSON(), assSingleChoice\toJSON(), assMatchingQuestion\toJSON(), and assClozeTest\toJSON().
assQuestion::getFlashPath | ( | ) |
Returns the image path for web accessable flash files of a question.
The image path is under the CLIENT_WEB_DIR in assessment/REFERENCE_ID_OF_QUESTION_POOL/ID_OF_QUESTION/flash
public
Definition at line 1039 of file class.assQuestion.php.
Referenced by assFlashQuestion\copyApplet(), assFlashQuestion\deleteApplet(), assFlashQuestion\duplicateApplet(), assFlashQuestion\moveUploadedFile(), and assFlashQuestion\saveToDb().
assQuestion::getFlashPathWeb | ( | ) |
Returns the web image path for web accessable flash applications of a question.
The image path is under the web accessable data dir in assessment/REFERENCE_ID_OF_QUESTION_POOL/ID_OF_QUESTION/flash
public
Definition at line 1088 of file class.assQuestion.php.
References ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
assQuestion::getId | ( | ) |
Gets the id of the assQuestion object.
Definition at line 450 of file class.assQuestion.php.
References $id.
Referenced by __get(), addQTIMaterial(), assOrderingHorizontal\calculateReachedPoints(), assErrorText\calculateReachedPoints(), assNumeric\calculateReachedPoints(), assFlashQuestion\calculateReachedPoints(), assTextQuestion\calculateReachedPoints(), assTextSubset\calculateReachedPoints(), assSingleChoice\calculateReachedPoints(), assMultipleChoice\calculateReachedPoints(), assImagemapQuestion\calculateReachedPoints(), assOrderingQuestion\calculateReachedPoints(), assJavaApplet\calculateReachedPoints(), assMatchingQuestion\calculateReachedPoints(), assClozeTest\calculateReachedPoints(), calculateResultsFromSolution(), assMatchingQuestion\checkSaveData(), cleanupMediaObjectUsage(), assFileUpload\copyObject(), assOrderingHorizontal\copyObject(), assImagemapQuestion\copyObject(), assErrorText\copyObject(), assFlashQuestion\copyObject(), assTextQuestion\copyObject(), assNumeric\copyObject(), assOrderingQuestion\copyObject(), assTextSubset\copyObject(), assMatchingQuestion\copyObject(), assMultipleChoice\copyObject(), assSingleChoice\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), copyXHTMLMediaObjectsOfQuestion(), createNewQuestion(), createPageObject(), deleteSuggestedSolutions(), assFileUpload\duplicate(), assOrderingHorizontal\duplicate(), assImagemapQuestion\duplicate(), assFlashQuestion\duplicate(), assErrorText\duplicate(), assTextQuestion\duplicate(), assNumeric\duplicate(), assOrderingQuestion\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assMatchingQuestion\duplicate(), assSingleChoice\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), assImagemapQuestion\duplicateFeedbackAnswer(), assMultipleChoice\duplicateFeedbackAnswer(), assSingleChoice\duplicateFeedbackAnswer(), duplicateFeedbackGeneric(), getFeedbackGeneric(), assImagemapQuestion\getFeedbackSingleAnswer(), assMultipleChoice\getFeedbackSingleAnswer(), assSingleChoice\getFeedbackSingleAnswer(), assFileUpload\getFileUploadPath(), assFileUpload\getFileUploadPathWeb(), assFileUpload\getFileUploadZIPFile(), getInstances(), assJavaApplet\getReachedInformation(), getReachedPoints(), getSolutionMaxPass(), getSolutionValues(), assFileUpload\getUploadedFiles(), assFileUpload\hasFileUploads(), isInUse(), loadFromDb(), assOrderingHorizontal\moveRight(), saveFeedbackGeneric(), assImagemapQuestion\saveFeedbackSingleAnswer(), assMultipleChoice\saveFeedbackSingleAnswer(), assSingleChoice\saveFeedbackSingleAnswer(), saveQuestionDataToDb(), saveSuggestedSolution(), assFileUpload\saveToDb(), assOrderingHorizontal\saveToDb(), assErrorText\saveToDb(), assFlashQuestion\saveToDb(), assNumeric\saveToDb(), assTextSubset\saveToDb(), assMultipleChoice\saveToDb(), assTextQuestion\saveToDb(), assImagemapQuestion\saveToDb(), assSingleChoice\saveToDb(), assOrderingQuestion\saveToDb(), assMatchingQuestion\saveToDb(), assClozeTest\saveToDb(), assJavaApplet\saveToDb(), saveToDb(), assOrderingHorizontal\saveWorkingData(), assErrorText\saveWorkingData(), assNumeric\saveWorkingData(), assTextQuestion\saveWorkingData(), assFileUpload\saveWorkingData(), assTextSubset\saveWorkingData(), assSingleChoice\saveWorkingData(), assMultipleChoice\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assOrderingQuestion\saveWorkingData(), assMatchingQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), assTextQuestion\setReachedPoints(), syncFeedbackGeneric(), assMultipleChoice\syncFeedbackSingleAnswers(), assSingleChoice\syncFeedbackSingleAnswers(), assImagemapQuestion\syncFeedbackSingleAnswers(), syncWithOriginal(), syncXHTMLMediaObjectsOfQuestion(), assErrorText\toggleSelection(), assTextQuestion\toJSON(), assImagemapQuestion\toJSON(), assOrderingQuestion\toJSON(), assMultipleChoice\toJSON(), assSingleChoice\toJSON(), assMatchingQuestion\toJSON(), assClozeTest\toJSON(), and updateSuggestedSolutions().
assQuestion::getImagePath | ( | ) |
Returns the image path for web accessable images of a question.
The image path is under the CLIENT_WEB_DIR in assessment/REFERENCE_ID_OF_QUESTION_POOL/ID_OF_QUESTION/images
public
Definition at line 1028 of file class.assQuestion.php.
Referenced by assOrderingQuestion\cleanImagefiles(), assImagemapQuestion\copyImage(), assOrderingQuestion\copyImages(), assMatchingQuestion\copyImages(), assMultipleChoice\copyImages(), assSingleChoice\copyImages(), assErrorText\createErrorTextOutput(), assMultipleChoice\deleteImage(), assSingleChoice\deleteImage(), assImagemapQuestion\deleteImage(), assOrderingQuestion\deleteImagefile(), assMatchingQuestion\deleteImagefile(), assImagemapQuestion\duplicateImage(), assOrderingQuestion\duplicateImages(), assMatchingQuestion\duplicateImages(), assMultipleChoice\duplicateImages(), assSingleChoice\duplicateImages(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assMultipleChoice\rebuildThumbnails(), assSingleChoice\rebuildThumbnails(), assOrderingQuestion\rebuildThumbnails(), assMatchingQuestion\rebuildThumbnails(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\setExportDetailsXLS(), assOrderingQuestion\setImageFile(), assMultipleChoice\setImageFile(), assSingleChoice\setImageFile(), assMatchingQuestion\setImageFile(), assImagemapQuestion\setImageFilename(), assMultipleChoice\syncImages(), and assSingleChoice\syncImages().
assQuestion::getImagePathWeb | ( | ) |
Returns the web image path for web accessable images of a question.
The image path is under the web accessable data dir in assessment/REFERENCE_ID_OF_QUESTION_POOL/ID_OF_QUESTION/images
public
Definition at line 1075 of file class.assQuestion.php.
References ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
Referenced by assImagemapQuestion\toJSON().
& assQuestion::getInstances | ( | ) |
Gets all instances of the question.
Definition at line 2983 of file class.assQuestion.php.
References $ilDB, $result, $row, ilObject\_getAllReferences(), ilObjTest\_lookupAuthor(), ilObject\_lookupTitle(), and getId().
assQuestion::getJavaPath | ( | ) |
Returns the image path for web accessable images of a question.
The image path is under the CLIENT_WEB_DIR in assessment/REFERENCE_ID_OF_QUESTION_POOL/ID_OF_QUESTION/images
public
Definition at line 1018 of file class.assQuestion.php.
Referenced by assJavaApplet\copyApplet(), assJavaApplet\deleteJavaAppletFilename(), assJavaApplet\duplicateApplet(), and assJavaApplet\setJavaAppletFilename().
assQuestion::getJavaPathWeb | ( | ) |
Returns the web image path for web accessable java applets of a question.
The image path is under the web accessable data dir in assessment/REFERENCE_ID_OF_QUESTION_POOL/ID_OF_QUESTION/java
public
Definition at line 1050 of file class.assQuestion.php.
References ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
assQuestion::getMaximumPoints | ( | ) |
Returns the maximum points, a learner can reach answering the question.
public
Reimplemented in assMatchingQuestion, assClozeTest, assOrderingQuestion, assImagemapQuestion, assMultipleChoice, assSingleChoice, assTextSubset, assFlashQuestion, assTextQuestion, assNumeric, assErrorText, assOrderingHorizontal, and assFileUpload.
Definition at line 764 of file class.assQuestion.php.
References $points.
Referenced by calculateReachedPoints(), and saveQuestionDataToDb().
assQuestion::getNrOfTries | ( | ) |
Definition at line 3291 of file class.assQuestion.php.
References $nr_of_tries.
Referenced by saveQuestionDataToDb(), assTextQuestion\toJSON(), assImagemapQuestion\toJSON(), assOrderingQuestion\toJSON(), assMultipleChoice\toJSON(), assSingleChoice\toJSON(), assMatchingQuestion\toJSON(), and assClozeTest\toJSON().
assQuestion::getObjId | ( | ) |
Get the object id of the container object.
Definition at line 561 of file class.assQuestion.php.
References $obj_id.
Referenced by __get(), assFileUpload\copyObject(), assOrderingHorizontal\copyObject(), assImagemapQuestion\copyObject(), assFlashQuestion\copyObject(), assErrorText\copyObject(), assTextQuestion\copyObject(), assNumeric\copyObject(), assOrderingQuestion\copyObject(), assTextSubset\copyObject(), assMatchingQuestion\copyObject(), assMultipleChoice\copyObject(), assSingleChoice\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), createNewQuestion(), createPageObject(), delete(), and saveQuestionDataToDb().
assQuestion::getOriginalId | ( | ) |
Definition at line 1697 of file class.assQuestion.php.
References $original_id.
Referenced by __get(), assMultipleChoice\syncImages(), assSingleChoice\syncImages(), assImagemapQuestion\syncWithOriginal(), assMultipleChoice\syncWithOriginal(), assSingleChoice\syncWithOriginal(), and syncWithOriginal().
assQuestion::getOutputType | ( | ) |
Gets the output type.
Reimplemented in assMultipleChoice, and assSingleChoice.
Definition at line 498 of file class.assQuestion.php.
References $outputType.
Referenced by __get(), and assOrderingQuestion\checkSaveData().
assQuestion::getOwner | ( | ) |
Gets the creator/owner ID of the assQuestion object.
Definition at line 549 of file class.assQuestion.php.
References $owner.
Referenced by __get(), saveQuestionDataToDb(), and saveToDb().
assQuestion::getPageOfQuestion | ( | ) |
Definition at line 1630 of file class.assQuestion.php.
References $page.
assQuestion::getPoints | ( | ) |
Returns the maximum available points for the question.
Definition at line 2375 of file class.assQuestion.php.
References $points.
Referenced by __get(), assOrderingHorizontal\calculateReachedPoints(), assNumeric\calculateReachedPoints(), assOrderingQuestion\calculateReachedPoints(), assFileUpload\getMaximumPoints(), assOrderingHorizontal\getMaximumPoints(), assNumeric\getMaximumPoints(), assOrderingQuestion\getMaximumPoints(), assTextSubset\isAnswerCorrect(), assJavaApplet\isComplete(), assNumeric\saveToDb(), assTextQuestion\setReachedPoints(), and assOrderingQuestion\toJSON().
assQuestion::getQuestion | ( | ) |
Gets the question string of the question object.
Definition at line 2771 of file class.assQuestion.php.
References $question.
Referenced by __get(), getRTETextWithMediaObjects(), saveQuestionDataToDb(), assTextQuestion\toJSON(), assImagemapQuestion\toJSON(), assOrderingQuestion\toJSON(), assMultipleChoice\toJSON(), assSingleChoice\toJSON(), assMatchingQuestion\toJSON(), and assClozeTest\toJSON().
assQuestion::getQuestionType | ( | ) |
Returns the question type of the question.
Reimplemented in assClozeTest, assMatchingQuestion, assOrderingQuestion, assJavaApplet, assSingleChoice, assMultipleChoice, assImagemapQuestion, assTextSubset, assFileUpload, assTextQuestion, assNumeric, assOrderingHorizontal, assFlashQuestion, and assErrorText.
Definition at line 2794 of file class.assQuestion.php.
Referenced by fromXML(), getQuestionTypeID(), and toXML().
assQuestion::getQuestionTypeFromDb | ( | $question_id | ) |
get question type for question id
note: please don't use $this in this class to allow static calls
Definition at line 1194 of file class.assQuestion.php.
References $data, $ilDB, and $result.
Referenced by assQuestionGUI\_getGUIClassNameForId(), and assQuestionGUI\_getQuestionGUI().
assQuestion::getQuestionTypeID | ( | ) |
Returns the question type of the question.
Returns the question type of the question
Definition at line 2808 of file class.assQuestion.php.
References $ilDB, $result, $row, and getQuestionType().
Referenced by createNewQuestion(), and saveQuestionDataToDb().
assQuestion::getReachedPoints | ( | $active_id, | |
$pass = NULL |
|||
) |
Returns the points, a learner has reached answering the question This is the fast way to get the points directly from the database.
integer | $user_id | The database ID of the learner |
integer | $test_id | The database Id of the test containing the question public |
Definition at line 753 of file class.assQuestion.php.
References $pass, _getReachedPoints(), and getId().
assQuestion::getRTETextWithMediaObjects | ( | ) |
Collects all text in the question which could contain media objects which were created with the Rich Text Editor.
Reimplemented in assClozeTest, assMatchingQuestion, assSingleChoice, assMultipleChoice, assOrderingQuestion, assJavaApplet, assImagemapQuestion, assTextSubset, assTextQuestion, assFileUpload, assNumeric, assFlashQuestion, assOrderingHorizontal, and assErrorText.
Definition at line 2953 of file class.assQuestion.php.
References getFeedbackGeneric(), and getQuestion().
Referenced by cleanupMediaObjectUsage().
assQuestion::getShuffle | ( | ) |
Gets the shuffle flag.
Definition at line 462 of file class.assQuestion.php.
References $shuffle.
Referenced by __get(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assTextQuestion\toJSON(), assImagemapQuestion\toJSON(), assMultipleChoice\toJSON(), assSingleChoice\toJSON(), and assClozeTest\toJSON().
assQuestion::getSolutionMaxPass | ( | $active_id | ) |
Returns the maximum pass a users question solution.
return | integer The maximum pass of the users solution public |
Definition at line 2405 of file class.assQuestion.php.
References _getSolutionMaxPass(), and getId().
Referenced by assFileUpload\calculateReachedPoints(), assOrderingHorizontal\calculateReachedPoints(), assErrorText\calculateReachedPoints(), assNumeric\calculateReachedPoints(), assFlashQuestion\calculateReachedPoints(), assTextQuestion\calculateReachedPoints(), assTextSubset\calculateReachedPoints(), assSingleChoice\calculateReachedPoints(), assMultipleChoice\calculateReachedPoints(), assImagemapQuestion\calculateReachedPoints(), assOrderingQuestion\calculateReachedPoints(), assJavaApplet\calculateReachedPoints(), assMatchingQuestion\calculateReachedPoints(), assClozeTest\calculateReachedPoints(), assJavaApplet\getReachedInformation(), getSolutionValues(), assFileUpload\getUploadedFiles(), and assTextQuestion\setReachedPoints().
& assQuestion::getSolutionValues | ( | $active_id, | |
$pass = NULL |
|||
) |
Loads solutions of a given user from the database an returns it.
integer | $test_id | The database id of the test containing this question public |
Definition at line 1102 of file class.assQuestion.php.
References $ilDB, $pass, $result, $row, getId(), and getSolutionMaxPass().
Referenced by assOrderingHorizontal\moveRight(), assErrorText\setExportDetailsXLS(), assOrderingHorizontal\setExportDetailsXLS(), assNumeric\setExportDetailsXLS(), assFileUpload\setExportDetailsXLS(), assTextQuestion\setExportDetailsXLS(), assTextSubset\setExportDetailsXLS(), assImagemapQuestion\setExportDetailsXLS(), assJavaApplet\setExportDetailsXLS(), assOrderingQuestion\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), assMatchingQuestion\setExportDetailsXLS(), and assClozeTest\setExportDetailsXLS().
assQuestion::getSuggestedSolution | ( | $subquestion_index = 0 | ) |
Returns a suggested solution for a given subquestion index.
integer | $subquestion_index | The index of a subquestion (i.e. a close test gap). Usually 0 |
Definition at line 1899 of file class.assQuestion.php.
assQuestion::getSuggestedSolutionOutput | ( | ) |
Definition at line 652 of file class.assQuestion.php.
References _getInternalLinkHref(), getSuggestedSolutionPathWeb(), ilUtil\prepareFormOutput(), and prepareTextareaOutput().
assQuestion::getSuggestedSolutionPath | ( | ) |
Returns the path for a suggested solution.
public
Definition at line 1008 of file class.assQuestion.php.
Referenced by copySuggestedSolutionFiles(), deleteSuggestedSolutions(), duplicateSuggestedSolutionFiles(), and syncSuggestedSolutionFiles().
assQuestion::getSuggestedSolutionPathWeb | ( | ) |
Returns the web path for a suggested solution.
public
Definition at line 1062 of file class.assQuestion.php.
References ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
Referenced by getSuggestedSolutionOutput().
assQuestion::getSuggestedSolutions | ( | ) |
Return the suggested solutions.
Definition at line 711 of file class.assQuestion.php.
References $suggested_solutions.
Referenced by __get().
assQuestion::getSuggestedSolutionTitle | ( | $subquestion_index = 0 | ) |
Returns the title of a suggested solution at a given subquestion_index.
This can be usable for displaying suggested solutions
integer | $subquestion_index | The index of a subquestion (i.e. a close test gap). Usually 0 |
Definition at line 1919 of file class.assQuestion.php.
References $title.
assQuestion::getTestId | ( | ) |
Gets the test id of the assQuestion object.
Definition at line 474 of file class.assQuestion.php.
References $test_id.
Referenced by __get().
assQuestion::getTitle | ( | ) |
Gets the title string of the assQuestion object.
Definition at line 438 of file class.assQuestion.php.
References $title.
Referenced by __get(), assFileUpload\getFileUploadZIPFile(), assClozeTest\isComplete(), saveQuestionDataToDb(), assErrorText\setExportDetailsXLS(), assOrderingHorizontal\setExportDetailsXLS(), assFlashQuestion\setExportDetailsXLS(), assNumeric\setExportDetailsXLS(), assFileUpload\setExportDetailsXLS(), assTextQuestion\setExportDetailsXLS(), assTextSubset\setExportDetailsXLS(), assImagemapQuestion\setExportDetailsXLS(), assJavaApplet\setExportDetailsXLS(), assOrderingQuestion\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), assMatchingQuestion\setExportDetailsXLS(), assClozeTest\setExportDetailsXLS(), assTextQuestion\toJSON(), assImagemapQuestion\toJSON(), assOrderingQuestion\toJSON(), assMultipleChoice\toJSON(), assSingleChoice\toJSON(), assMatchingQuestion\toJSON(), and assClozeTest\toJSON().
assQuestion::getTotalAnswers | ( | ) |
get total number of answers
Definition at line 1448 of file class.assQuestion.php.
References _getTotalAnswers().
assQuestion::isClone | ( | $question_id = "" | ) |
Checks whether the question is a clone of another question or not.
Definition at line 1158 of file class.assQuestion.php.
assQuestion::isComplete | ( | ) |
Returns true, if a question is complete for use.
Reimplemented in assJavaApplet, assClozeTest, assMatchingQuestion, assOrderingQuestion, assImagemapQuestion, assTextQuestion, assMultipleChoice, assSingleChoice, assTextSubset, assNumeric, assFlashQuestion, assErrorText, assOrderingHorizontal, and assFileUpload.
Definition at line 264 of file class.assQuestion.php.
Referenced by saveToDb().
assQuestion::isHTML | ( | $a_text | ) |
Checks if a given string contains HTML or not.
string | $a_text | Text which should be checked |
Definition at line 2585 of file class.assQuestion.php.
Referenced by addQTIMaterial(), and assTextQuestion\saveWorkingData().
assQuestion::isInUse | ( | $question_id = "" | ) |
Checks whether the question is in use or not.
Definition at line 1131 of file class.assQuestion.php.
References $ilDB, $result, $row, and getId().
assQuestion::keyInArray | ( | $searchkey, | |
$array | |||
) |
returns TRUE if the key occurs in an array
string | $arraykey | A key to an element in array |
array | $array | An array to be searched public |
Definition at line 388 of file class.assQuestion.php.
assQuestion::loadFromDb | ( | $question_id | ) |
Loads the question from the database.
integer | $question_id | A unique key which defines the question in the database public |
Reimplemented in assJavaApplet, assImagemapQuestion, assSingleChoice, assMultipleChoice, assMatchingQuestion, assOrderingQuestion, assTextSubset, assClozeTest, assTextQuestion, assNumeric, assErrorText, assFlashQuestion, assOrderingHorizontal, and assFileUpload.
Definition at line 1708 of file class.assQuestion.php.
References $ilDB, $result, $row, ilRTE\_replaceMediaObjectImageSrc(), and getId().
assQuestion::logAction | ( | $logtext = "" , |
|
$active_id = "" , |
|||
$question_id = "" |
|||
) |
Logs an action into the Test&Assessment log.
string | $logtext | The log text |
integer | $question_id | If given, saves the question id to the database public |
Definition at line 942 of file class.assQuestion.php.
References $original_id, ilObjAssessmentFolder\_addLog(), ilObjTest\_getObjectIDFromActiveID(), and _getOriginalId().
Referenced by calculateResultsFromSolution(), assOrderingHorizontal\moveRight(), assOrderingHorizontal\saveWorkingData(), assErrorText\saveWorkingData(), assNumeric\saveWorkingData(), assTextQuestion\saveWorkingData(), assFileUpload\saveWorkingData(), assTextSubset\saveWorkingData(), assSingleChoice\saveWorkingData(), assMultipleChoice\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assOrderingQuestion\saveWorkingData(), assMatchingQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), and assErrorText\toggleSelection().
assQuestion::moveUploadedMediaFile | ( | $file, | |
$name | |||
) |
Move an uploaded media file to an public accessible temp dir to present it.
string | $file | File path |
string | $name | Name of the file public |
Definition at line 986 of file class.assQuestion.php.
References $file, ilUtil\createDirectory(), and ilUtil\moveUploadedFile().
|
protected |
Will be called when a question is copied (into another question pool)
Definition at line 1869 of file class.assQuestion.php.
References copySuggestedSolutionFiles().
|
protected |
Will be called when a question is duplicated (inside a question pool or for insertion in a test)
Definition at line 1861 of file class.assQuestion.php.
References duplicateSuggestedSolutionFiles().
assQuestion::pcArrayShuffle | ( | $array | ) |
Shuffles the values of a given array.
array | $array | An array which should be shuffled public |
Definition at line 1177 of file class.assQuestion.php.
References $result.
Referenced by assOrderingQuestion\toJSON(), and assMatchingQuestion\toJSON().
assQuestion::prepareTextareaOutput | ( | $txt_output, | |
$prepare_for_latex_output = FALSE |
|||
) |
Prepares a string for a text area output in tests.
string | $txt_output | String which should be prepared for output public |
Definition at line 2603 of file class.assQuestion.php.
Referenced by getSuggestedSolutionOutput(), and assClozeTest\updateClozeTextFromGaps().
assQuestion::QTIMaterialToString | ( | $a_material | ) |
Reads an QTI material tag an creates a text string.
string | $a_material | QTI material tag |
Definition at line 2616 of file class.assQuestion.php.
References $_SESSION, and $result.
assQuestion::questionTitleExists | ( | $questionpool_id, | |
$title | |||
) |
Returns TRUE if the question title exists in the database.
string | $title | The title of the question |
Definition at line 276 of file class.assQuestion.php.
assQuestion::saveFeedbackGeneric | ( | $correctness, | |
$feedback | |||
) |
Saves generic feedback to the database.
Generic feedback is either feedback for either the complete solution of the question or at least one incorrect answer.
integer | $correctness | 0 for at least one incorrect answer, 1 for the correct solution |
string | $feedback | Feedback text public |
Definition at line 2833 of file class.assQuestion.php.
References $ilDB, ilRTE\_replaceMediaObjectImageSrc(), and getId().
assQuestion::saveQuestionDataToDb | ( | $original_id = "" | ) |
Definition at line 1774 of file class.assQuestion.php.
References $ilDB, $original_id, ilRTE\_replaceMediaObjectImageSrc(), createPageObject(), getAuthor(), getComment(), getEstimatedWorkingTime(), getId(), getMaximumPoints(), getNrOfTries(), getObjId(), getOwner(), getQuestion(), getQuestionTypeID(), getTitle(), and setId().
Referenced by assFileUpload\saveToDb(), assOrderingHorizontal\saveToDb(), assErrorText\saveToDb(), assFlashQuestion\saveToDb(), assNumeric\saveToDb(), assTextSubset\saveToDb(), assMultipleChoice\saveToDb(), assTextQuestion\saveToDb(), assOrderingQuestion\saveToDb(), assImagemapQuestion\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assClozeTest\saveToDb(), and assJavaApplet\saveToDb().
assQuestion::saveSuggestedSolution | ( | $type, | |
$solution_id = "" , |
|||
$subquestion_index = 0 , |
|||
$value = "" |
|||
) |
Saves a suggested solution for the question.
If there is more than one subquestion (i.e. close questions) may enter a subquestion index.
string | $solution_id | An internal link pointing to the suggested solution |
integer | $subquestion_index | The index of a subquestion (i.e. a close test gap). Usually 0 |
boolean | $is_import | A boolean indication that the internal link was imported from another ILIAS installation public |
Definition at line 2096 of file class.assQuestion.php.
References $ilDB, ilRTE\_replaceMediaObjectImageSrc(), cleanupMediaObjectUsage(), and getId().
assQuestion::saveToDb | ( | $original_id = "" | ) |
Saves the question to the database.
integer | $original_id | public |
Reimplemented in assJavaApplet, assClozeTest, assMatchingQuestion, assImagemapQuestion, assOrderingQuestion, assSingleChoice, assTextQuestion, assMultipleChoice, assTextSubset, assNumeric, assFlashQuestion, assErrorText, assOrderingHorizontal, and assFileUpload.
Definition at line 1832 of file class.assQuestion.php.
References $ilDB, ilObjQuestionPool\_updateQuestionCount(), cleanupMediaObjectUsage(), getId(), getOwner(), isComplete(), and updateSuggestedSolutions().
Referenced by syncWithOriginal().
assQuestion::saveWorkingData | ( | $active_id, | |
$pass = NULL |
|||
) |
Saves the learners input of the question to the database.
integer | $active_id | Active id of the user |
integer | $pass | Test pass |
Reimplemented in assClozeTest, assMatchingQuestion, assJavaApplet, assOrderingQuestion, assImagemapQuestion, assMultipleChoice, assSingleChoice, assTextSubset, assFileUpload, assTextQuestion, assFlashQuestion, assNumeric, assErrorText, and assOrderingHorizontal.
Definition at line 829 of file class.assQuestion.php.
References $pass, and calculateResultsFromSolution().
assQuestion::setAuthor | ( | $author = "" | ) |
Sets the authors name of the assQuestion object.
string | $author | A string containing the name of the questions author public |
Definition at line 410 of file class.assQuestion.php.
References $author.
Referenced by __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setComment | ( | $comment = "" | ) |
Sets the comment string of the assQuestion object.
string | $comment | A comment string to describe the question public |
Definition at line 330 of file class.assQuestion.php.
References $comment.
Referenced by __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setEstimatedWorkingTime | ( | $hour = 0 , |
|
$min = 0 , |
|||
$sec = 0 |
|||
) |
Sets the estimated working time of a question.
integer | $hour | Hour |
integer | $min | Minutes |
integer | $sec | Seconds public |
Definition at line 376 of file class.assQuestion.php.
Referenced by __construct(), __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setExportDetailsXLS | ( | & | $worksheet, |
$startrow, | |||
$active_id, | |||
$pass, | |||
& | $format_title, | ||
& | $format_bold | ||
) |
Creates an Excel worksheet for the detailed cumulated results of this question.
object | $worksheet | Reference to the parent excel worksheet |
object | $startrow | Startrow of the output in the excel worksheet |
object | $active_id | Active id of the participant |
object | $pass | Test pass |
object | $format_title | Excel title format |
object | $format_bold | Excel bold format |
array | $eval_data | Cumulated evaluation data public |
Reimplemented in assClozeTest, assMatchingQuestion, assSingleChoice, assMultipleChoice, assOrderingQuestion, assJavaApplet, assImagemapQuestion, assTextSubset, assTextQuestion, assFileUpload, assNumeric, assFlashQuestion, assOrderingHorizontal, and assErrorText.
Definition at line 3157 of file class.assQuestion.php.
assQuestion::setId | ( | $id = -1 | ) |
Sets the id of the assQuestion object.
integer | $id | A unique integer value public |
Definition at line 306 of file class.assQuestion.php.
References $id.
Referenced by __set(), createNewQuestion(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), assJavaApplet\loadFromDb(), saveQuestionDataToDb(), and syncWithOriginal().
assQuestion::setNrOfTries | ( | $a_nr_of_tries | ) |
Definition at line 3296 of file class.assQuestion.php.
Referenced by assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setObjId | ( | $obj_id = 0 | ) |
Set the object id of the container object.
integer | $obj_id | The object id of the container object public |
Definition at line 573 of file class.assQuestion.php.
References $obj_id.
Referenced by __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setOriginalId | ( | $original_id | ) |
Definition at line 1692 of file class.assQuestion.php.
References $original_id.
Referenced by __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), assJavaApplet\loadFromDb(), and syncWithOriginal().
assQuestion::setOutputType | ( | $outputType = OUTPUT_HTML | ) |
Sets the output type.
integer | $outputType | The output type of the question public |
Reimplemented in assMultipleChoice, and assSingleChoice.
Definition at line 342 of file class.assQuestion.php.
References $outputType.
Referenced by __set().
assQuestion::setOwner | ( | $owner = "" | ) |
Sets the creator/owner ID of the assQuestion object.
integer | $owner | A numerical ID to identify the owner/creator public |
Definition at line 426 of file class.assQuestion.php.
References $owner.
Referenced by __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setPoints | ( | $a_points | ) |
Sets the maximum available points for the question.
integer | $a_points | The points public |
Definition at line 2394 of file class.assQuestion.php.
Referenced by __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setQuestion | ( | $question = "" | ) |
Sets the question string of the question object.
string | $question | A string containing the question text public |
Definition at line 2783 of file class.assQuestion.php.
References $question.
Referenced by __construct(), __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::setShuffle | ( | $shuffle = true | ) |
Sets the shuffle flag.
boolean | $shuffle | A flag indicating whether the answers are shuffled or not public |
Reimplemented in assMatchingQuestion.
Definition at line 355 of file class.assQuestion.php.
References $shuffle.
Referenced by __set(), assTextQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), and assSingleChoice\loadFromDb().
assQuestion::setSuggestedSolution | ( | $solution_id = "" , |
|
$subquestion_index = 0 , |
|||
$is_import = false |
|||
) |
Sets a suggested solution for the question.
If there is more than one subquestion (i.e. close questions) may enter a subquestion index.
string | $solution_id | An internal link pointing to the suggested solution |
integer | $subquestion_index | The index of a subquestion (i.e. a close test gap). Usually 0 |
boolean | $is_import | A boolean indication that the internal link was imported from another ILIAS installation public |
Definition at line 1942 of file class.assQuestion.php.
References _resolveInternalLink().
Referenced by assFileUpload\loadFromDb(), and assFlashQuestion\loadFromDb().
assQuestion::setTestId | ( | $id = -1 | ) |
Sets the test id of the assQuestion object.
integer | $id | A unique integer value public |
Definition at line 318 of file class.assQuestion.php.
References $id.
Referenced by __set().
assQuestion::setTitle | ( | $title = "" | ) |
Sets the title string of the assQuestion object.
string | $title | A title string to describe the question public |
Definition at line 294 of file class.assQuestion.php.
References $title.
Referenced by __set(), assFileUpload\loadFromDb(), assOrderingHorizontal\loadFromDb(), assFlashQuestion\loadFromDb(), assErrorText\loadFromDb(), assNumeric\loadFromDb(), assTextQuestion\loadFromDb(), assClozeTest\loadFromDb(), assTextSubset\loadFromDb(), assOrderingQuestion\loadFromDb(), assMatchingQuestion\loadFromDb(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assImagemapQuestion\loadFromDb(), and assJavaApplet\loadFromDb().
assQuestion::supportsJavascriptOutput | ( | ) |
Returns true if the question type supports JavaScript output.
Reimplemented in assMatchingQuestion, and assOrderingQuestion.
Definition at line 509 of file class.assQuestion.php.
assQuestion::syncFeedbackGeneric | ( | ) |
Definition at line 2917 of file class.assQuestion.php.
References $ilDB, $result, $row, and getId().
Referenced by syncWithOriginal().
|
protected |
Syncs the files of a suggested solution if the question is synced.
Definition at line 1992 of file class.assQuestion.php.
References $filename, $ilLog, ilUtil\delDir(), getSuggestedSolutionPath(), and ilUtil\makeDirParents().
Referenced by updateSuggestedSolutions().
assQuestion::syncWithOriginal | ( | ) |
Reimplemented in assSingleChoice, assMultipleChoice, and assImagemapQuestion.
Definition at line 2291 of file class.assQuestion.php.
References $id, $ilDB, copyPageOfQuestion(), createPageObject(), deletePageOfQuestion(), getId(), getOriginalId(), saveToDb(), setId(), setOriginalId(), syncFeedbackGeneric(), syncXHTMLMediaObjectsOfQuestion(), and updateSuggestedSolutions().
assQuestion::syncXHTMLMediaObjectsOfQuestion | ( | ) |
Definition at line 1589 of file class.assQuestion.php.
References $mobs, ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_saveUsage(), and getId().
Referenced by syncWithOriginal().
assQuestion::toXML | ( | $a_include_header = true , |
|
$a_include_binary = true , |
|||
$a_shuffle = false , |
|||
$test_output = false , |
|||
$force_image_references = false |
|||
) |
Returns a QTI xml representation of the question.
Reimplemented in assFileUpload, assOrderingHorizontal, assFlashQuestion, and assErrorText.
Definition at line 250 of file class.assQuestion.php.
References getQuestionType().
assQuestion::updateSuggestedSolutions | ( | $original_id = "" | ) |
Update the suggested solutions of a question based on the suggested solution array attribute.
Definition at line 2050 of file class.assQuestion.php.
References $id, $ilDB, $original_id, ilInternalLink\_deleteAllLinksOfSource(), ilRTE\_replaceMediaObjectImageSrc(), ilInternalLink\_saveLink(), cleanupMediaObjectUsage(), getId(), and syncSuggestedSolutionFiles().
Referenced by saveToDb(), and syncWithOriginal().
|
private |
Associative array to store properties.
Definition at line 172 of file class.assQuestion.php.
|
protected |
Definition at line 71 of file class.assQuestion.php.
Referenced by assFileUpload\__construct(), assErrorText\__construct(), assOrderingHorizontal\__construct(), assFlashQuestion\__construct(), assNumeric\__construct(), assSingleChoice\__construct(), assMultipleChoice\__construct(), assTextQuestion\__construct(), assTextSubset\__construct(), assImagemapQuestion\__construct(), assOrderingQuestion\__construct(), assMatchingQuestion\__construct(), assClozeTest\__construct(), assJavaApplet\__construct(), __construct(), assFileUpload\duplicate(), assOrderingHorizontal\duplicate(), assImagemapQuestion\duplicate(), assFlashQuestion\duplicate(), assErrorText\duplicate(), assTextQuestion\duplicate(), assNumeric\duplicate(), assOrderingQuestion\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assMatchingQuestion\duplicate(), assSingleChoice\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), getAuthor(), and setAuthor().
|
protected |
Definition at line 57 of file class.assQuestion.php.
Referenced by assFileUpload\__construct(), assOrderingHorizontal\__construct(), assErrorText\__construct(), assFlashQuestion\__construct(), assNumeric\__construct(), assMultipleChoice\__construct(), assSingleChoice\__construct(), assTextQuestion\__construct(), assTextSubset\__construct(), assImagemapQuestion\__construct(), assOrderingQuestion\__construct(), assMatchingQuestion\__construct(), assClozeTest\__construct(), assJavaApplet\__construct(), __construct(), getComment(), and setComment().
|
protected |
Definition at line 92 of file class.assQuestion.php.
Referenced by getEstimatedWorkingTime().
|
protected |
Definition at line 43 of file class.assQuestion.php.
Referenced by getId(), isClone(), assImagemapQuestion\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), setId(), setTestId(), syncWithOriginal(), and updateSuggestedSolutions().
|
protected |
Definition at line 120 of file class.assQuestion.php.
Referenced by __construct(), and __get().
|
protected |
Definition at line 134 of file class.assQuestion.php.
Referenced by __construct(), _getQuestionTypeName(), and _setReachedPoints().
|
private |
Number of tries.
Definition at line 167 of file class.assQuestion.php.
Referenced by getNrOfTries().
|
protected |
Definition at line 113 of file class.assQuestion.php.
Referenced by createNewQuestion(), delete(), getObjId(), and setObjId().
|
protected |
Definition at line 155 of file class.assQuestion.php.
Referenced by _logAction(), assFileUpload\copyObject(), assOrderingHorizontal\copyObject(), assImagemapQuestion\copyObject(), assErrorText\copyObject(), assFlashQuestion\copyObject(), assTextQuestion\copyObject(), assNumeric\copyObject(), assOrderingQuestion\copyObject(), assTextSubset\copyObject(), assMatchingQuestion\copyObject(), assMultipleChoice\copyObject(), assSingleChoice\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), assFileUpload\duplicate(), assOrderingHorizontal\duplicate(), assImagemapQuestion\duplicate(), assFlashQuestion\duplicate(), assErrorText\duplicate(), assTextQuestion\duplicate(), assNumeric\duplicate(), assOrderingQuestion\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assMatchingQuestion\duplicate(), assSingleChoice\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), assImagemapQuestion\duplicateFeedbackAnswer(), assMultipleChoice\duplicateFeedbackAnswer(), assSingleChoice\duplicateFeedbackAnswer(), duplicateFeedbackGeneric(), getOriginalId(), logAction(), saveQuestionDataToDb(), assFileUpload\saveToDb(), assOrderingHorizontal\saveToDb(), assErrorText\saveToDb(), assFlashQuestion\saveToDb(), assNumeric\saveToDb(), assTextSubset\saveToDb(), assMultipleChoice\saveToDb(), assTextQuestion\saveToDb(), assOrderingQuestion\saveToDb(), assSingleChoice\saveToDb(), assImagemapQuestion\saveToDb(), assMatchingQuestion\saveToDb(), assClozeTest\saveToDb(), assJavaApplet\saveToDb(), setOriginalId(), and updateSuggestedSolutions().
|
protected |
Definition at line 141 of file class.assQuestion.php.
Referenced by getOutputType(), and setOutputType().
|
protected |
Definition at line 64 of file class.assQuestion.php.
Referenced by assFileUpload\__construct(), assErrorText\__construct(), assOrderingHorizontal\__construct(), assFlashQuestion\__construct(), assNumeric\__construct(), assSingleChoice\__construct(), assMultipleChoice\__construct(), assTextQuestion\__construct(), assTextSubset\__construct(), assImagemapQuestion\__construct(), assOrderingQuestion\__construct(), assMatchingQuestion\__construct(), assClozeTest\__construct(), assJavaApplet\__construct(), __construct(), assFileUpload\duplicate(), assOrderingHorizontal\duplicate(), assImagemapQuestion\duplicate(), assFlashQuestion\duplicate(), assErrorText\duplicate(), assTextQuestion\duplicate(), assNumeric\duplicate(), assOrderingQuestion\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assMatchingQuestion\duplicate(), assSingleChoice\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), getOwner(), and setOwner().
|
protected |
Definition at line 162 of file class.assQuestion.php.
Referenced by __get(), copyPageOfQuestion(), deletePageOfQuestion(), and getPageOfQuestion().
|
protected |
Definition at line 85 of file class.assQuestion.php.
Referenced by _getMaximumPoints(), _getReachedPoints(), _isWorkedThrough(), _setReachedPoints(), assTextSubset\addAnswer(), assSingleChoice\addAnswer(), assMultipleChoice\addAnswer(), assImagemapQuestion\addAnswer(), assErrorText\addErrorData(), assMatchingQuestion\addMatchingPair(), assFileUpload\calculateReachedPoints(), assOrderingHorizontal\calculateReachedPoints(), assErrorText\calculateReachedPoints(), assNumeric\calculateReachedPoints(), assFlashQuestion\calculateReachedPoints(), assTextQuestion\calculateReachedPoints(), assTextSubset\calculateReachedPoints(), assSingleChoice\calculateReachedPoints(), assMultipleChoice\calculateReachedPoints(), assImagemapQuestion\calculateReachedPoints(), assOrderingQuestion\calculateReachedPoints(), assJavaApplet\calculateReachedPoints(), assMatchingQuestion\calculateReachedPoints(), assClozeTest\calculateReachedPoints(), calculateReachedPoints(), assErrorText\getBestSelection(), assClozeTest\getMaximumGapPoints(), assTextQuestion\getMaximumPoints(), assFlashQuestion\getMaximumPoints(), assTextSubset\getMaximumPoints(), assSingleChoice\getMaximumPoints(), assMultipleChoice\getMaximumPoints(), assImagemapQuestion\getMaximumPoints(), assClozeTest\getMaximumPoints(), getMaximumPoints(), assMatchingQuestion\getMaximumPoints(), getPoints(), assErrorText\getPointsForSelectedPositions(), assMatchingQuestion\insertMatchingPair(), assErrorText\setErrorData(), assClozeTest\setGapAnswerPoints(), and assTextQuestion\setReachedPoints().
|
protected |
Definition at line 78 of file class.assQuestion.php.
Referenced by assFileUpload\__construct(), assErrorText\__construct(), assOrderingHorizontal\__construct(), assFlashQuestion\__construct(), assNumeric\__construct(), assMultipleChoice\__construct(), assSingleChoice\__construct(), assTextQuestion\__construct(), assTextSubset\__construct(), assImagemapQuestion\__construct(), assOrderingQuestion\__construct(), assMatchingQuestion\__construct(), assClozeTest\__construct(), assJavaApplet\__construct(), __construct(), _getSuggestedSolutionOutput(), _instanciateQuestion(), assClozeTest\getClozeText(), getQuestion(), and setQuestion().
|
protected |
Definition at line 99 of file class.assQuestion.php.
Referenced by getShuffle(), assMultipleChoice\loadFromDb(), assSingleChoice\loadFromDb(), assClozeTest\setGapShuffle(), setShuffle(), and assMatchingQuestion\setShuffle().
|
protected |
Definition at line 148 of file class.assQuestion.php.
Referenced by getSuggestedSolutions().
|
protected |
Definition at line 106 of file class.assQuestion.php.
Referenced by assFileUpload\deleteUploadedFiles(), assFileUpload\getFileUploadZIPFile(), getTestId(), assFileUpload\getUploadedFilesForWeb(), assFileUpload\hasFileUploads(), and assFileUpload\saveWorkingData().
|
protected |
Definition at line 50 of file class.assQuestion.php.
Referenced by assFileUpload\__construct(), assErrorText\__construct(), assOrderingHorizontal\__construct(), assFlashQuestion\__construct(), assNumeric\__construct(), assSingleChoice\__construct(), assMultipleChoice\__construct(), assTextQuestion\__construct(), assTextSubset\__construct(), assImagemapQuestion\__construct(), assOrderingQuestion\__construct(), assMatchingQuestion\__construct(), assClozeTest\__construct(), assJavaApplet\__construct(), __construct(), assFileUpload\copyObject(), assOrderingHorizontal\copyObject(), assImagemapQuestion\copyObject(), assFlashQuestion\copyObject(), assErrorText\copyObject(), assTextQuestion\copyObject(), assNumeric\copyObject(), assOrderingQuestion\copyObject(), assTextSubset\copyObject(), assMatchingQuestion\copyObject(), assMultipleChoice\copyObject(), assSingleChoice\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), assFileUpload\duplicate(), assOrderingHorizontal\duplicate(), assImagemapQuestion\duplicate(), assFlashQuestion\duplicate(), assErrorText\duplicate(), assTextQuestion\duplicate(), assNumeric\duplicate(), assOrderingQuestion\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assMatchingQuestion\duplicate(), assSingleChoice\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), getSuggestedSolutionTitle(), getTitle(), questionTitleExists(), and setTitle().
|
protected |
Definition at line 127 of file class.assQuestion.php.
Referenced by __construct(), and __get().