ILIAS
Release_3_10_x_branch Revision 61812
|
Basic class for all assessment question types. More...
Public Member Functions | |
assQuestion ($title="", $comment="", $author="", $owner=-1, $question="") | |
assQuestion constructor | |
_assQuestion () | |
fromXML (&$item, &$questionpool_id, &$tst_id, &$tst_object, &$question_counter, &$import_mapping) | |
Creates a question from a QTI file. | |
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. | |
setId ($id=-1) | |
Sets the id. | |
setTestId ($id=-1) | |
Sets the test id. | |
setComment ($comment="") | |
Sets the comment. | |
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. | |
setOwner ($owner="") | |
Sets the creator/owner. | |
getTitle () | |
Gets the title string. | |
getId () | |
Gets the id. | |
getShuffle () | |
Gets the shuffle flag. | |
getTestId () | |
Gets the test id. | |
getComment () | |
Gets the comment. | |
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. | |
getOwner () | |
Gets the creator/owner. | |
getObjId () | |
Get the object id of the container object. | |
setObjId ($obj_id=0) | |
Set the object id of the container object. | |
createPageObject () | |
create page object of question | |
insertIntoTest ($test_id) | |
Insert the question into a test. | |
_getMaximumPoints ($question_id) | |
Returns the maximum points, a learner can reach answering the question. | |
& | _getQuestionInfo ($question_id) |
Returns question information from the database. | |
_getSuggestedSolutionCount ($question_id) | |
Returns the number of suggested solutions associated with a question. | |
& | _getSuggestedSolution ($question_id, $subquestion_index=0) |
Returns a suggested solution for a given subquestion index. | |
_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. | |
getMaximumPoints () | |
Returns the maximum points, a learner can reach answering the question. | |
saveWorkingData ($active_id, $pass=NULL) | |
Saves the learners input of the question to the database. | |
_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. | |
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. | |
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. | |
copyXHTMLMediaObjectsOfQuestion ($a_q_id) | |
syncXHTMLMediaObjectsOfQuestion () | |
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. | |
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. | |
saveSuggestedSolution ($solution_id="", $subquestion_index=0) | |
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. | |
_isWorkedThrough ($active_id, $question_id, $pass=NULL) | |
Returns true if the question was worked through in the given pass. | |
getMultilineAnswerSetting () | |
setMultilineAnswerSetting ($a_setting=0) | |
_areAnswered ($a_user_id, $a_question_ids) | |
Checks if an array of question ids is answered by an user or not. | |
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) | |
Sets the points, a learner has reached answering the question Additionally objective results are updated. | |
getQuestion () | |
Gets the question text. | |
setQuestion ($question="") | |
Sets the question text. | |
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. |
Static Public Member Functions | |
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. |
Data Fields | |
$id | |
$title | |
$comment | |
$owner | |
$author | |
$question | |
$points | |
$est_working_time | |
$shuffle | |
$test_id | |
$obj_id | |
$ilias | |
$tpl | |
$lng | |
$domxml | |
$outputType | |
$suggested_solutions | |
$original_id |
Protected Member Functions | |
deletePageOfQuestion ($question_id) | |
Deletes the page object of a question with a given ID. |
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::_areAnswered | ( | $a_user_id, | |
$a_question_ids | |||
) |
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 2356 of file class.assQuestion.php.
References $res.
Referenced by ilCourseObjectiveResult\getStatus().
assQuestion::_assQuestion | ( | ) |
Definition at line 238 of file class.assQuestion.php.
assQuestion::_getInternalLinkHref | ( | $target = "" | ) |
Definition at line 1951 of file class.assQuestion.php.
References $target_id.
Referenced by assTextQuestionGUI\editQuestion(), assTextSubsetGUI\editQuestion(), assJavaAppletGUI\editQuestion(), assMatchingQuestionGUI\editQuestion(), assNumericGUI\editQuestion(), assSingleChoiceGUI\editQuestion(), assMultipleChoiceGUI\editQuestion(), assOrderingQuestionGUI\editQuestion(), assImagemapQuestionGUI\editQuestion(), assClozeTestGUI\editQuestion(), and ilObjTest\getTestResult().
assQuestion::_getMaximumPoints | ( | $question_id | ) |
Returns the maximum points, a learner can reach answering the question.
Returns the maximum points, a learner can reach answering the question
integer | $question_id | The database Id of the question public |
Definition at line 719 of file class.assQuestion.php.
References $points, and $result.
Referenced by _getTotalRightAnswers(), ilCourseObjectiveQuestion\_lookupMaximumPointsOfQuestion(), ilObjTest\getTestResult(), ilObjQuestionPoolGUI\questionsObject(), and ilTestScoringGUI\setPointsManual().
assQuestion::_getOriginalId | ( | $question_id | ) |
Returns the original id of a question.
Returns the original id of a question
integer | $question_id | The database id of the question |
Definition at line 1996 of file class.assQuestion.php.
References $result.
Referenced by _logAction(), ilObjTest\cloneObject(), assQuestionTypeTemplate\copyObject(), assTextQuestion\copyObject(), assImagemapQuestion\copyObject(), assOrderingQuestion\copyObject(), assSingleChoice\copyObject(), assTextSubset\copyObject(), assMultipleChoice\copyObject(), assNumeric\copyObject(), assMatchingQuestion\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), assQuestionTypeTemplate\duplicate(), assImagemapQuestion\duplicate(), assTextQuestion\duplicate(), assOrderingQuestion\duplicate(), assSingleChoice\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assNumeric\duplicate(), assMatchingQuestion\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), logAction(), and ilObjTest\logAction().
& assQuestion::_getQuestionInfo | ( | $question_id | ) |
Returns question information from the database.
Returns question information from the database
integer | $question_id | The database Id of the question |
Definition at line 745 of file class.assQuestion.php.
References $result.
Referenced by ilObjMediaObject\getParentObjectIdForUsage(), and ilObjTest\getTestResult().
assQuestion::_getQuestionTitle | ( | $question_id | ) |
Returns the question title of a question with a given id.
Returns the question title of a question with a given id
integer | $question_id | The database id of the question |
Definition at line 1632 of file class.assQuestion.php.
References $data, and $result.
Referenced by ilObjAssessmentFolderGUI\logsObject().
assQuestion::_getQuestionType | ( | $question_id | ) |
Returns the question type of a question with a given id.
Returns the question type of a question with a given id
integer | $question_id | The database id of the question |
Definition at line 1605 of file class.assQuestion.php.
References $data, and $result.
Referenced by _instanciateQuestion(), _instanciateQuestionGUI(), and _needsManualScoring().
|
static |
Return the translation for a given question type tag.
string | $type_tag | The type tag of the question type public |
Definition at line 2923 of file class.assQuestion.php.
References $lng, ilPlugin\getPluginObject(), and IL_COMP_MODULE.
Referenced by ilObjTestGUI\createRandomSelectionObject(), ilObjQuestionPoolGUI\deleteQuestionsObject(), assQuestionGUI\outQuestionType(), ilObjQuestionPoolGUI\printObject(), ilObjTestGUI\questionBrowser(), ilObjQuestionPoolGUI\questionsObject(), ilObjTestGUI\questionsObject(), and ilObjTestGUI\removeQuestionsForm().
assQuestion::_getReachedPoints | ( | $active_id, | |
$question_id, | |||
$pass = NULL |
|||
) |
Returns the points, a learner has reached answering the question.
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 public static |
Definition at line 823 of file class.assQuestion.php.
References $pass, $points, $result, and _getSolutionMaxPass().
Referenced by ilTestServiceGUI\getPassListOfAnswersWithScoring(), getReachedPoints(), and ilObjTest\getTestResult().
assQuestion::_getSolutionMaxPass | ( | $question_id, | |
$active_id | |||
) |
Returns the maximum pass a users question solution.
Returns the maximum pass a users question solution
return | integer The maximum pass of the users solution public |
Definition at line 2177 of file class.assQuestion.php.
References $result.
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.
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 790 of file class.assQuestion.php.
References $result.
Referenced by ilObjTest\getTestResult().
assQuestion::_getSuggestedSolutionCount | ( | $question_id | ) |
Returns the number of suggested solutions associated with a question.
Returns the number of suggested solutions associated with a question
integer | $question_id | The database Id of the question |
Definition at line 769 of file class.assQuestion.php.
References $result.
Referenced by ilObjTest\getTestResult().
assQuestion::_getTitle | ( | $a_q_id | ) |
Returns the title of a question.
int | $a_q_id | question id |
Definition at line 1536 of file class.assQuestion.php.
References $result.
Referenced by ilObjQuestionPoolGUI\assessmentObject().
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 1450 of file class.assQuestion.php.
References $result.
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 1486 of file class.assQuestion.php.
References $result, 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 2894 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.
Creates an instance of a question with a given question id
integer | $question_id | The question id |
Definition at line 2110 of file class.assQuestion.php.
References $question, _getQuestionType(), and _includeClass().
& assQuestion::_instanciateQuestionGUI | ( | $question_id | ) |
Creates an instance of a question gui with a given question id.
Creates an instance of a question gui with a given question id
integer | $question_id | The question id |
Definition at line 2955 of file class.assQuestion.php.
References _getQuestionType(), and _includeClass().
Referenced by ilObjQuestionPool\createQuestion(), and ilObjQuestionPoolGUI\printObject().
assQuestion::_isUsedInRandomTest | ( | $question_id = "" | ) |
Checks whether the question is used in a random test or not.
Checks whether the question is used in a random test or not
Definition at line 2248 of file class.assQuestion.php.
References $result.
Referenced by ilObjQuestionPool\getDeleteableQuestionDetails(), and ilObjQuestionPool\getUsedQuestionDetails().
assQuestion::_isWorkedThrough | ( | $active_id, | |
$question_id, | |||
$pass = NULL |
|||
) |
Returns true if the question was worked through in the given pass.
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 public static |
Definition at line 2304 of file class.assQuestion.php.
References $pass, $points, $result, and _getSolutionMaxPass().
Referenced by ilObjTest\getAnsweredQuestionCount(), and ilObjTest\getTestResult().
assQuestion::_isWriteable | ( | $question_id, | |
$user_id | |||
) |
Returns true if the question is writeable by a certain user.
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 2214 of file class.assQuestion.php.
References $result.
Referenced by assQuestionGUI\save(), assQuestionGUI\saveEdit(), and assQuestionGUI\saveFeedback().
assQuestion::_logAction | ( | $logtext = "" , |
|
$active_id = "" , |
|||
$question_id = "" |
|||
) |
Logs an action into the Test&Assessment log.
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 976 of file class.assQuestion.php.
References $original_id, ilObjAssessmentFolder\_addLog(), ilObjTest\_getObjectIDFromActiveID(), and _getOriginalId().
Referenced by _setReachedPoints().
assQuestion::_needsManualScoring | ( | $question_id | ) |
Definition at line 2847 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.
Returns true if the question already exists in the database
integer | $question_id | The database id of the question |
Definition at line 2078 of file class.assQuestion.php.
References $result.
assQuestion::_resolveInternalLink | ( | $internal_link | ) |
Definition at line 1862 of file class.assQuestion.php.
References ilInternalLink\_getIdForImportId(), and ilLMObject\_getIdForImportId().
Referenced by _resolveIntLinks(), and setSuggestedSolution().
assQuestion::_resolveIntLinks | ( | $question_id | ) |
Definition at line 1899 of file class.assQuestion.php.
References $result, ilInternalLink\_deleteAllLinksOfSource(), _resolveInternalLink(), and ilInternalLink\_saveLink().
Referenced by ilContObjParser\processPagesToParse().
assQuestion::_setReachedPoints | ( | $active_id, | |
$question_id, | |||
$points, | |||
$maxpoints, | |||
$pass = NULL |
|||
) |
Sets the points, a learner has reached answering the question Additionally objective results are updated.
Sets 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 | $points | The points the user has reached answering the question |
Definition at line 2498 of file class.assQuestion.php.
References $ilias, $lng, $pass, $points, $result, 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 916 of file class.assQuestion.php.
References $data, $pass, $result, ilObjTest\_getQuestionCountAndPointsForPassOfParticipant(), and ilObjTest\_getWorkingTimeOfParticipantForPass().
Referenced by _setReachedPoints(), saveWorkingData(), and assTextQuestion\setReachedPoints().
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 2438 of file class.assQuestion.php.
References $mobs, ilObjMediaObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilRTE\_replaceMediaObjectImageSrc(), getId(), and isHTML().
assQuestion::assQuestion | ( | $title = "" , |
|
$comment = "" , |
|||
$author = "" , |
|||
$owner = -1 , |
|||
$question = "" |
|||
) |
assQuestion constructor
The constructor takes possible arguments an creates an instance of the assQuestion 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 public |
Definition at line 199 of file class.assQuestion.php.
References $author, $comment, $ilias, $lng, $owner, $question, $title, $tpl, OUTPUT_HTML, setEstimatedWorkingTime(), and setQuestion().
Referenced by assClozeTest\assClozeTest(), assImagemapQuestion\assImagemapQuestion(), assJavaApplet\assJavaApplet(), assMatchingQuestion\assMatchingQuestion(), assMultipleChoice\assMultipleChoice(), assNumeric\assNumeric(), assOrderingQuestion\assOrderingQuestion(), assQuestionTypeTemplate\assQuestionTypeTemplate(), assSingleChoice\assSingleChoice(), assTextQuestion\assTextQuestion(), and assTextSubset\assTextSubset().
assQuestion::calculateReachedPoints | ( | $active_id, | |
$pass = NULL , |
|||
$points = 0 |
|||
) |
Returns the points, a learner has reached answering the question.
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 2271 of file class.assQuestion.php.
References $points, ilObjTest\_getCountSystem(), ilObjTest\_getScoreCutting(), and getMaximumPoints().
Referenced by saveWorkingData().
assQuestion::cleanupMediaObjectUsage | ( | ) |
synchronises appearances of media objects in the question with media object usage table
Definition at line 2786 of file class.assQuestion.php.
References ilRTE\_cleanupMediaObjectUsage(), getId(), and getRTETextWithMediaObjects().
Referenced by saveToDb().
assQuestion::copyPageOfQuestion | ( | $a_q_id | ) |
Definition at line 1574 of file class.assQuestion.php.
Referenced by syncWithOriginal().
assQuestion::copyXHTMLMediaObjectsOfQuestion | ( | $a_q_id | ) |
Definition at line 1554 of file class.assQuestion.php.
References $mobs, ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_saveUsage(), and getId().
assQuestion::createNewImageFileName | ( | $image_filename | ) |
Definition at line 2475 of file class.assQuestion.php.
assQuestion::createPageObject | ( | ) |
create page object of question
Definition at line 660 of file class.assQuestion.php.
References getId(), and getObjId().
Referenced by assQuestionTypeTemplate\saveToDb(), assNumeric\saveToDb(), assOrderingQuestion\saveToDb(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assTextQuestion\saveToDb(), assTextSubset\saveToDb(), assImagemapQuestion\saveToDb(), assClozeTest\saveToDb(), assJavaApplet\saveToDb(), and syncWithOriginal().
assQuestion::createRandomSolution | ( | $test_id, | |
$user_id | |||
) |
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 1371 of file class.assQuestion.php.
References $mobs, $obj_id, $result, ilObjMediaObject\_exists(), ilObjMediaObject\_getMobsOfObject(), ilObjMediaObject\_removeUsage(), ilObjQuestionPool\_updateQuestionCount(), ilUtil\delDir(), deleteAdditionalTableData(), deleteAnswers(), and deletePageOfQuestion().
assQuestion::deleteAdditionalTableData | ( | $question_id | ) |
Deletes datasets from the additional question table in the database.
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 1323 of file class.assQuestion.php.
References $result, and getAdditionalTableName().
Referenced by delete().
assQuestion::deleteAnswers | ( | $question_id | ) |
Deletes datasets from answers tables.
Deletes datasets from answers tables
integer | $question_id | The question id which should be deleted in the answers table public |
Definition at line 1286 of file class.assQuestion.php.
References $result, 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 1358 of file class.assQuestion.php.
Referenced by delete(), and syncWithOriginal().
assQuestion::deleteSuggestedSolutions | ( | ) |
Deletes all suggestes solutions in the database.
Deletes all suggestes solutions in the database
public
Definition at line 1741 of file class.assQuestion.php.
References $result, ilInternalLink\_deleteAllLinksOfSource(), and getId().
assQuestion::duplicateFeedbackGeneric | ( | $original_id | ) |
Duplicates the generic feedback of a question.
Duplicates the generic feedback of a question
integer | $original_id | The database ID of the original question public |
Definition at line 2712 of file class.assQuestion.php.
References $original_id, and $result.
assQuestion::fromXML | ( | & | $item, |
& | $questionpool_id, | ||
& | $tst_id, | ||
& | $tst_object, | ||
& | $question_counter, | ||
& | $import_mapping | ||
) |
Creates a question from a QTI file.
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 |
Definition at line 259 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 2869 of file class.assQuestion.php.
References $result.
assQuestion::getAdditionalTableName | ( | ) |
Returns the name of the additional question data table in the database.
Returns the name of the additional question data table in the database
Reimplemented in assClozeTest, assMatchingQuestion, assJavaApplet, assOrderingQuestion, assImagemapQuestion, assTextSubset, assMultipleChoice, assSingleChoice, assTextQuestion, assNumeric, and assQuestionTypeTemplate.
Definition at line 1260 of file class.assQuestion.php.
Referenced by deleteAdditionalTableData().
assQuestion::getAnswerTableName | ( | ) |
Returns the name of the answer table in the database.
Returns the name of the answer table in the database
Reimplemented in assClozeTest, assMatchingQuestion, assOrderingQuestion, assImagemapQuestion, assTextSubset, assMultipleChoice, assSingleChoice, and assQuestionTypeTemplate.
Definition at line 1273 of file class.assQuestion.php.
Referenced by deleteAnswers().
assQuestion::getAuthor | ( | ) |
Gets the authors name.
Gets the authors name of the assQuestion object
Definition at line 610 of file class.assQuestion.php.
References $author.
Referenced by assQuestionTypeTemplate\isComplete(), assClozeTest\isComplete(), and assClozeTest\saveToDb().
assQuestion::getComment | ( | ) |
Gets the comment.
Gets the comment string of the assQuestion object
Definition at line 551 of file class.assQuestion.php.
References $comment.
Referenced by assClozeTest\saveToDb().
assQuestion::getEstimatedWorkingTime | ( | ) |
Gets the estimated working time of a question.
Gets the estimated working time of a question
Definition at line 592 of file class.assQuestion.php.
References $est_working_time.
Referenced by assQuestionTypeTemplate\saveToDb(), assNumeric\saveToDb(), assOrderingQuestion\saveToDb(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assTextQuestion\saveToDb(), assTextSubset\saveToDb(), assImagemapQuestion\saveToDb(), assClozeTest\saveToDb(), and assJavaApplet\saveToDb().
assQuestion::getFeedbackGeneric | ( | $correctness | ) |
Returns the generic feedback for a given question state.
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 2685 of file class.assQuestion.php.
References $result, and ilRTE\_replaceMediaObjectImageSrc().
Referenced by getRTETextWithMediaObjects().
assQuestion::getFlashPath | ( | ) |
Returns the image path for web accessable flash files of a question.
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 1048 of file class.assQuestion.php.
assQuestion::getFlashPathWeb | ( | ) |
Returns the web image path for web accessable flash applications of a question.
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 1091 of file class.assQuestion.php.
References ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
assQuestion::getId | ( | ) |
Gets the id.
Gets the id of the assQuestion object
Definition at line 509 of file class.assQuestion.php.
References $id.
Referenced by addQTIMaterial(), assQuestionTypeTemplate\calculateReachedPoints(), assTextQuestion\calculateReachedPoints(), assNumeric\calculateReachedPoints(), assSingleChoice\calculateReachedPoints(), assMultipleChoice\calculateReachedPoints(), assTextSubset\calculateReachedPoints(), assOrderingQuestion\calculateReachedPoints(), assJavaApplet\calculateReachedPoints(), assImagemapQuestion\calculateReachedPoints(), assMatchingQuestion\calculateReachedPoints(), assClozeTest\calculateReachedPoints(), cleanupMediaObjectUsage(), assQuestionTypeTemplate\copyObject(), assClozeTest\copyObject(), copyXHTMLMediaObjectsOfQuestion(), createPageObject(), deleteSuggestedSolutions(), assTextQuestion\duplicate(), assImagemapQuestion\duplicate(), assOrderingQuestion\duplicate(), assSingleChoice\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assNumeric\duplicate(), assMatchingQuestion\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), assJavaApplet\getReachedInformation(), getReachedPoints(), getSolutionMaxPass(), getSolutionValues(), insertIntoTest(), saveSuggestedSolution(), assQuestionTypeTemplate\saveToDb(), assClozeTest\saveToDb(), saveToDb(), assQuestionTypeTemplate\saveWorkingData(), assTextQuestion\saveWorkingData(), assNumeric\saveWorkingData(), assSingleChoice\saveWorkingData(), assMultipleChoice\saveWorkingData(), assTextSubset\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assOrderingQuestion\saveWorkingData(), saveWorkingData(), assMatchingQuestion\saveWorkingData(), assClozeTest\saveWorkingData(), assTextQuestion\setReachedPoints(), syncWithOriginal(), and syncXHTMLMediaObjectsOfQuestion().
assQuestion::getImagePath | ( | ) |
Returns the image path for web accessable images of a question.
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 1035 of file class.assQuestion.php.
Referenced by assImagemapQuestion\copyImage(), assOrderingQuestion\copyImages(), assMatchingQuestion\copyImages(), assSingleChoice\copyImages(), assMultipleChoice\copyImages(), assSingleChoice\deleteImage(), assMultipleChoice\deleteImage(), assImagemapQuestion\duplicateImage(), assOrderingQuestion\duplicateImages(), assMatchingQuestion\duplicateImages(), assSingleChoice\duplicateImages(), assMultipleChoice\duplicateImages(), assSingleChoice\loadFromDb(), assMultipleChoice\loadFromDb(), assMatchingQuestion\setExportDetailsXLS(), assOrderingQuestion\setImageFile(), assSingleChoice\setImageFile(), assMultipleChoice\setImageFile(), assMatchingQuestion\setImageFile(), assImagemapQuestion\setImageFilename(), assSingleChoice\syncImages(), and assMultipleChoice\syncImages().
assQuestion::getImagePathWeb | ( | ) |
Returns the web image path for web accessable images of a question.
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 1076 of file class.assQuestion.php.
References ILIAS_ABSOLUTE_PATH, and ilUtil\removeTrailingPathSeparators().
& assQuestion::getInstances | ( | ) |
Gets all instances of the question.
Definition at line 2798 of file class.assQuestion.php.
References $result, and ilObjTest\_lookupAuthor().
assQuestion::getJavaPath | ( | ) |
Returns the image path for web accessable images of a question.
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 1023 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.
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 1061 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.
Returns the maximum points, a learner can reach answering the question
public
Reimplemented in assMatchingQuestion, assClozeTest, assOrderingQuestion, assImagemapQuestion, assMultipleChoice, assSingleChoice, assJavaApplet, assNumeric, assTextSubset, assTextQuestion, and assQuestionTypeTemplate.
Definition at line 870 of file class.assQuestion.php.
Referenced by calculateReachedPoints().
assQuestion::getMultilineAnswerSetting | ( | ) |
Definition at line 2330 of file class.assQuestion.php.
assQuestion::getObjId | ( | ) |
Get the object id of the container object.
Get the object id of the container object
Definition at line 638 of file class.assQuestion.php.
References $obj_id.
Referenced by assQuestionTypeTemplate\copyObject(), assTextQuestion\copyObject(), assImagemapQuestion\copyObject(), assOrderingQuestion\copyObject(), assSingleChoice\copyObject(), assTextSubset\copyObject(), assMultipleChoice\copyObject(), assNumeric\copyObject(), assMatchingQuestion\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), createPageObject(), and assClozeTest\saveToDb().
assQuestion::getOriginalId | ( | ) |
Definition at line 1655 of file class.assQuestion.php.
References $original_id.
Referenced by assSingleChoice\syncImages(), assMultipleChoice\syncImages(), assSingleChoice\syncWithOriginal(), assMultipleChoice\syncWithOriginal(), assImagemapQuestion\syncWithOriginal(), and syncWithOriginal().
assQuestion::getOutputType | ( | ) |
Gets the output type.
Gets the output type
Reimplemented in assMultipleChoice, and assSingleChoice.
Definition at line 565 of file class.assQuestion.php.
References $outputType.
Referenced by assOrderingQuestion\checkSaveData().
assQuestion::getOwner | ( | ) |
Gets the creator/owner.
Gets the creator/owner ID of the assQuestion object
Definition at line 624 of file class.assQuestion.php.
References $owner.
Referenced by assClozeTest\saveToDb().
assQuestion::getPageOfQuestion | ( | ) |
Definition at line 1589 of file class.assQuestion.php.
assQuestion::getPoints | ( | ) |
Returns the maximum available points for the question.
Returns the maximum available points for the question
Definition at line 2130 of file class.assQuestion.php.
References $points.
Referenced by assTextQuestion\saveToDb(), and assTextQuestion\setReachedPoints().
assQuestion::getQuestion | ( | ) |
Gets the question text.
Gets the question string of the question object
Definition at line 2575 of file class.assQuestion.php.
References $question.
Referenced by getRTETextWithMediaObjects(), and assQuestionTypeTemplate\isComplete().
assQuestion::getQuestionType | ( | ) |
Returns the question type of the question.
Returns the question type of the question
Reimplemented in assClozeTest, assMatchingQuestion, assJavaApplet, assOrderingQuestion, assImagemapQuestion, assMultipleChoice, assSingleChoice, assTextSubset, assNumeric, assTextQuestion, and assQuestionTypeTemplate.
Definition at line 2602 of file class.assQuestion.php.
Referenced by fromXML(), 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 1239 of file class.assQuestion.php.
References $data, and $result.
Referenced by assQuestionGUI\_getGUIClassNameForId(), assQuestionGUI\_getQuestionGUI(), and ilObjQuestionPoolGUI\getEmbeddedTabs().
assQuestion::getQuestionTypeID | ( | ) |
Returns the question type of the question.
Returns the question type of the question
Definition at line 2616 of file class.assQuestion.php.
References $result.
Referenced by assNumeric\saveToDb(), assOrderingQuestion\saveToDb(), assMultipleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assTextQuestion\saveToDb(), assTextSubset\saveToDb(), assImagemapQuestion\saveToDb(), assClozeTest\saveToDb(), and assJavaApplet\saveToDb().
assQuestion::getReachedPoints | ( | $active_id, | |
$pass = NULL |
|||
) |
Returns the points, a learner has reached answering the question.
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 857 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, assMultipleChoice, assSingleChoice, assJavaApplet, assImagemapQuestion, assOrderingQuestion, assTextSubset, assTextQuestion, assNumeric, and assQuestionTypeTemplate.
Definition at line 2772 of file class.assQuestion.php.
References getFeedbackGeneric(), and getQuestion().
Referenced by cleanupMediaObjectUsage().
assQuestion::getShuffle | ( | ) |
Gets the shuffle flag.
Gets the shuffle flag
Definition at line 523 of file class.assQuestion.php.
References $shuffle.
assQuestion::getSolutionMaxPass | ( | $active_id | ) |
Returns the maximum pass a users question solution.
Returns the maximum pass a users question solution
return | integer The maximum pass of the users solution public |
Definition at line 2164 of file class.assQuestion.php.
References _getSolutionMaxPass(), and getId().
Referenced by assQuestionTypeTemplate\calculateReachedPoints(), assTextQuestion\calculateReachedPoints(), assNumeric\calculateReachedPoints(), assSingleChoice\calculateReachedPoints(), assMultipleChoice\calculateReachedPoints(), assTextSubset\calculateReachedPoints(), assOrderingQuestion\calculateReachedPoints(), assJavaApplet\calculateReachedPoints(), assImagemapQuestion\calculateReachedPoints(), assMatchingQuestion\calculateReachedPoints(), assClozeTest\calculateReachedPoints(), assJavaApplet\getReachedInformation(), getSolutionValues(), and assTextQuestion\setReachedPoints().
& assQuestion::getSolutionValues | ( | $active_id, | |
$pass = NULL |
|||
) |
Loads solutions of a given user from the database an returns it.
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 1107 of file class.assQuestion.php.
References $pass, $result, getId(), and getSolutionMaxPass().
Referenced by assNumeric\setExportDetailsXLS(), assTextQuestion\setExportDetailsXLS(), assTextSubset\setExportDetailsXLS(), assOrderingQuestion\setExportDetailsXLS(), assImagemapQuestion\setExportDetailsXLS(), assJavaApplet\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assMatchingQuestion\setExportDetailsXLS(), and assClozeTest\setExportDetailsXLS().
assQuestion::getSuggestedSolution | ( | $subquestion_index = 0 | ) |
Returns a suggested solution for a given subquestion index.
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 1764 of file class.assQuestion.php.
assQuestion::getSuggestedSolutionTitle | ( | $subquestion_index = 0 | ) |
Returns the title of a suggested solution at a given subquestion_index.
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 1786 of file class.assQuestion.php.
References $title.
assQuestion::getTestId | ( | ) |
Gets the test id.
Gets the test id of the assQuestion object
Definition at line 537 of file class.assQuestion.php.
References $test_id.
Referenced by assQuestionTypeTemplate\saveToDb(), assNumeric\saveToDb(), assOrderingQuestion\saveToDb(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assTextQuestion\saveToDb(), assTextSubset\saveToDb(), assImagemapQuestion\saveToDb(), assClozeTest\saveToDb(), and assJavaApplet\saveToDb().
assQuestion::getTitle | ( | ) |
Gets the title string.
Gets the title string of the assQuestion object
Definition at line 495 of file class.assQuestion.php.
References $title.
Referenced by assQuestionTypeTemplate\isComplete(), assClozeTest\isComplete(), assClozeTest\saveToDb(), assNumeric\setExportDetailsXLS(), assTextQuestion\setExportDetailsXLS(), assTextSubset\setExportDetailsXLS(), assOrderingQuestion\setExportDetailsXLS(), assImagemapQuestion\setExportDetailsXLS(), assJavaApplet\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), assMatchingQuestion\setExportDetailsXLS(), and assClozeTest\setExportDetailsXLS().
assQuestion::getTotalAnswers | ( | ) |
get total number of answers
Definition at line 1439 of file class.assQuestion.php.
References _getTotalAnswers().
assQuestion::insertIntoTest | ( | $test_id | ) |
Insert the question into a test.
Insert the question into a test
integer | $test_id | The database id of the test private |
Definition at line 682 of file class.assQuestion.php.
References $data, $ilias, $result, $test_id, and getId().
Referenced by assQuestionTypeTemplate\saveToDb(), assNumeric\saveToDb(), assOrderingQuestion\saveToDb(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assTextQuestion\saveToDb(), assTextSubset\saveToDb(), assImagemapQuestion\saveToDb(), assClozeTest\saveToDb(), and assJavaApplet\saveToDb().
assQuestion::isClone | ( | $question_id = "" | ) |
Checks whether the question is a clone of another question or not.
Checks whether the question is a clone of another question or not
Definition at line 1185 of file class.assQuestion.php.
assQuestion::isComplete | ( | ) |
Returns true, if a question is complete for use.
Returns true, if a question is complete for use
Reimplemented in assJavaApplet, assClozeTest, assImagemapQuestion, assTextQuestion, assTextSubset, assMatchingQuestion, assMultipleChoice, assSingleChoice, assNumeric, assOrderingQuestion, and assQuestionTypeTemplate.
Definition at line 292 of file class.assQuestion.php.
assQuestion::isHTML | ( | $a_text | ) |
Checks if a given string contains HTML or not.
string | $a_text | Text which should be checked |
Definition at line 2375 of file class.assQuestion.php.
Referenced by addQTIMaterial(), and assTextQuestion\saveWorkingData().
assQuestion::isInUse | ( | $question_id = "" | ) |
Checks whether the question is in use or not.
Checks whether the question is in use or not
Definition at line 1156 of file class.assQuestion.php.
assQuestion::keyInArray | ( | $searchkey, | |
$array | |||
) |
returns TRUE if the key occurs in an 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 439 of file class.assQuestion.php.
assQuestion::loadFromDb | ( | $question_id | ) |
Loads the question from the database.
Loads the question from the database
integer | $question_id | A unique key which defines the question in the database public |
Reimplemented in assImagemapQuestion, assJavaApplet, assMatchingQuestion, assTextSubset, assMultipleChoice, assSingleChoice, assNumeric, assOrderingQuestion, assTextQuestion, assQuestionTypeTemplate, and assClozeTest.
Definition at line 1668 of file class.assQuestion.php.
References $result.
assQuestion::logAction | ( | $logtext = "" , |
|
$active_id = "" , |
|||
$question_id = "" |
|||
) |
Logs an action into the Test&Assessment log.
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 952 of file class.assQuestion.php.
References $original_id, ilObjAssessmentFolder\_addLog(), ilObjTest\_getObjectIDFromActiveID(), and _getOriginalId().
Referenced by assTextQuestion\saveWorkingData(), assNumeric\saveWorkingData(), assSingleChoice\saveWorkingData(), assMultipleChoice\saveWorkingData(), assTextSubset\saveWorkingData(), assImagemapQuestion\saveWorkingData(), assOrderingQuestion\saveWorkingData(), saveWorkingData(), assMatchingQuestion\saveWorkingData(), and assClozeTest\saveWorkingData().
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 998 of file class.assQuestion.php.
References $file, ilUtil\createDirectory(), and ilUtil\moveUploadedFile().
assQuestion::pcArrayShuffle | ( | $array | ) |
Shuffles the values of a given array.
Shuffles the values of a given array
array | $array | An array which should be shuffled public |
Definition at line 1213 of file class.assQuestion.php.
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 2393 of file class.assQuestion.php.
assQuestion::QTIMaterialToString | ( | $a_material | ) |
Reads an QTI material tag an creates a text string.
string | $a_material | QTI material tag |
Definition at line 2406 of file class.assQuestion.php.
References $_SESSION, and $result.
assQuestion::questionTitleExists | ( | $questionpool_id, | |
$title | |||
) |
Returns TRUE if the question title exists in the database.
Returns TRUE if the question title exists in the database
string | $title | The title of the question |
Definition at line 306 of file class.assQuestion.php.
assQuestion::saveFeedbackGeneric | ( | $correctness, | |
$feedback | |||
) |
Saves generic feedback to the database.
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 2643 of file class.assQuestion.php.
References $result, and ilRTE\_replaceMediaObjectImageSrc().
assQuestion::saveSuggestedSolution | ( | $solution_id = "" , |
|
$subquestion_index = 0 |
|||
) |
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 1837 of file class.assQuestion.php.
References $data, and getId().
assQuestion::saveToDb | ( | $original_id = "" | ) |
Saves the question to the database.
Saves the question to the database
integer | $original_id | public |
Reimplemented in assJavaApplet, assClozeTest, assImagemapQuestion, assTextQuestion, assTextSubset, assMatchingQuestion, assSingleChoice, assMultipleChoice, assNumeric, assOrderingQuestion, and assQuestionTypeTemplate.
Definition at line 1697 of file class.assQuestion.php.
References $result, ilInternalLink\_deleteAllLinksOfSource(), ilInternalLink\_saveLink(), ilObjQuestionPool\_updateQuestionCount(), cleanupMediaObjectUsage(), and getId().
Referenced by syncWithOriginal().
assQuestion::saveWorkingData | ( | $active_id, | |
$pass = NULL |
|||
) |
Saves the learners input of the question to the database.
Saves the learners input of the question to the database
integer | $test_id | The database id of the test containing this question public |
Reimplemented in assClozeTest, assMatchingQuestion, assJavaApplet, assOrderingQuestion, assImagemapQuestion, assTextSubset, assMultipleChoice, assSingleChoice, assNumeric, assTextQuestion, and assQuestionTypeTemplate.
Definition at line 884 of file class.assQuestion.php.
References $pass, $result, ilObjAssessmentFolder\_enabledAssessmentLogging(), ilObjAssessmentFolder\_getLogLanguage(), ilObjTest\_getPass(), ilCourseObjectiveResult\_updateObjectiveResult(), _updateTestPassResults(), calculateReachedPoints(), getId(), and logAction().
assQuestion::setAuthor | ( | $author = "" | ) |
Sets the authors name.
Sets the authors name of the assQuestion object
string | $author | A string containing the name of the questions author public |
Definition at line 463 of file class.assQuestion.php.
References $author.
Referenced by assClozeTest\loadFromDb().
assQuestion::setComment | ( | $comment = "" | ) |
Sets the comment.
Sets the comment string of the assQuestion object
string | $comment | A comment string to describe the question public |
Definition at line 373 of file class.assQuestion.php.
References $comment.
Referenced by assClozeTest\loadFromDb(), and assQuestionTypeTemplate\loadFromDb().
assQuestion::setEstimatedWorkingTime | ( | $hour = 0 , |
|
$min = 0 , |
|||
$sec = 0 |
|||
) |
Sets the estimated working time of a question.
Sets the estimated working time of a question
integer | $hour | Hour |
integer | $min | Minutes |
integer | $sec | Seconds public |
Definition at line 425 of file class.assQuestion.php.
Referenced by assQuestion(), assClozeTest\loadFromDb(), assTextQuestion\loadFromDb(), assOrderingQuestion\loadFromDb(), assNumeric\loadFromDb(), assSingleChoice\loadFromDb(), assMultipleChoice\loadFromDb(), assTextSubset\loadFromDb(), assMatchingQuestion\loadFromDb(), assJavaApplet\loadFromDb(), and assImagemapQuestion\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, assMultipleChoice, assSingleChoice, assJavaApplet, assImagemapQuestion, assOrderingQuestion, assTextSubset, assTextQuestion, assNumeric, and assQuestionTypeTemplate.
Definition at line 2980 of file class.assQuestion.php.
assQuestion::setId | ( | $id = -1 | ) |
Sets the id.
Sets the id of the assQuestion object
integer | $id | A unique integer value public |
Definition at line 345 of file class.assQuestion.php.
References $id.
Referenced by assClozeTest\loadFromDb(), assQuestionTypeTemplate\loadFromDb(), assQuestionTypeTemplate\saveToDb(), assClozeTest\saveToDb(), and syncWithOriginal().
assQuestion::setMultilineAnswerSetting | ( | $a_setting = 0 | ) |
Definition at line 2342 of file class.assQuestion.php.
assQuestion::setObjId | ( | $obj_id = 0 | ) |
Set the object id of the container object.
Set the object id of the container object
integer | $obj_id | The object id of the container object public |
Definition at line 652 of file class.assQuestion.php.
References $obj_id.
Referenced by assClozeTest\loadFromDb().
assQuestion::setOriginalId | ( | $original_id | ) |
Definition at line 1650 of file class.assQuestion.php.
References $original_id.
Referenced by assClozeTest\loadFromDb(), and syncWithOriginal().
assQuestion::setOutputType | ( | $outputType = OUTPUT_HTML | ) |
Sets the output type.
Sets the output type
integer | $outputType | The output type of the question public |
Reimplemented in assMultipleChoice, and assSingleChoice.
Definition at line 387 of file class.assQuestion.php.
References $outputType.
assQuestion::setOwner | ( | $owner = "" | ) |
Sets the creator/owner.
Sets the creator/owner ID of the assQuestion object
integer | $owner | A numerical ID to identify the owner/creator public |
Definition at line 481 of file class.assQuestion.php.
References $owner.
Referenced by assClozeTest\loadFromDb().
assQuestion::setPoints | ( | $a_points | ) |
Sets the maximum available points for the question.
Sets the maximum available points for the question
integer | $a_points | The points public |
Definition at line 2151 of file class.assQuestion.php.
Referenced by assClozeTest\loadFromDb().
assQuestion::setQuestion | ( | $question = "" | ) |
Sets the question text.
Sets the question string of the question object
string | $question | A string containing the question text public |
Definition at line 2589 of file class.assQuestion.php.
References $question.
Referenced by assQuestion(), and assClozeTest\loadFromDb().
assQuestion::setShuffle | ( | $shuffle = true | ) |
Sets the shuffle flag.
Sets the shuffle flag
boolean | $shuffle | A flag indicating whether the answers are shuffled or not public |
Reimplemented in assMatchingQuestion.
Definition at line 402 of file class.assQuestion.php.
References $shuffle.
Referenced by assSingleChoice\loadFromDb(), and assMultipleChoice\loadFromDb().
assQuestion::setSuggestedSolution | ( | $solution_id = "" , |
|
$subquestion_index = 0 , |
|||
$is_import = false |
|||
) |
Sets a suggested solution for the question.
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 1811 of file class.assQuestion.php.
References _resolveInternalLink().
assQuestion::setTestId | ( | $id = -1 | ) |
Sets the test id.
Sets the test id of the assQuestion object
integer | $id | A unique integer value public |
Definition at line 359 of file class.assQuestion.php.
References $id.
assQuestion::setTitle | ( | $title = "" | ) |
Sets the title string.
Sets the title string of the assQuestion object
string | $title | A title string to describe the question public |
Definition at line 331 of file class.assQuestion.php.
References $title.
Referenced by assClozeTest\loadFromDb(), and assQuestionTypeTemplate\loadFromDb().
assQuestion::supportsJavascriptOutput | ( | ) |
Returns true if the question type supports JavaScript output.
Returns true if the question type supports JavaScript output
Reimplemented in assMatchingQuestion, and assOrderingQuestion.
Definition at line 578 of file class.assQuestion.php.
assQuestion::syncFeedbackGeneric | ( | ) |
Definition at line 2735 of file class.assQuestion.php.
References $result.
Referenced by syncWithOriginal().
assQuestion::syncWithOriginal | ( | ) |
Reimplemented in assImagemapQuestion, assMultipleChoice, assSingleChoice, and assQuestionTypeTemplate.
Definition at line 2021 of file class.assQuestion.php.
References $id, $result, ilInternalLink\_deleteAllLinksOfSource(), ilInternalLink\_saveLink(), copyPageOfQuestion(), createPageObject(), deletePageOfQuestion(), getId(), getOriginalId(), saveToDb(), setId(), setOriginalId(), syncFeedbackGeneric(), and syncXHTMLMediaObjectsOfQuestion().
assQuestion::syncXHTMLMediaObjectsOfQuestion | ( | ) |
Definition at line 1564 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.
Returns a QTI xml representation of the question and sets the internal domxml variable with the DOM XML representation of the QTI xml representation
Definition at line 276 of file class.assQuestion.php.
References getQuestionType().
assQuestion::$author |
Definition at line 83 of file class.assQuestion.php.
Referenced by assClozeTest\assClozeTest(), assImagemapQuestion\assImagemapQuestion(), assJavaApplet\assJavaApplet(), assMatchingQuestion\assMatchingQuestion(), assMultipleChoice\assMultipleChoice(), assNumeric\assNumeric(), assOrderingQuestion\assOrderingQuestion(), assQuestion(), assQuestionTypeTemplate\assQuestionTypeTemplate(), assSingleChoice\assSingleChoice(), assTextQuestion\assTextQuestion(), assTextSubset\assTextSubset(), assQuestionTypeTemplate\duplicate(), assImagemapQuestion\duplicate(), assTextQuestion\duplicate(), assOrderingQuestion\duplicate(), assSingleChoice\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assNumeric\duplicate(), assMatchingQuestion\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), getAuthor(), and setAuthor().
assQuestion::$comment |
Definition at line 63 of file class.assQuestion.php.
Referenced by assClozeTest\assClozeTest(), assImagemapQuestion\assImagemapQuestion(), assJavaApplet\assJavaApplet(), assMatchingQuestion\assMatchingQuestion(), assMultipleChoice\assMultipleChoice(), assNumeric\assNumeric(), assOrderingQuestion\assOrderingQuestion(), assQuestion(), assQuestionTypeTemplate\assQuestionTypeTemplate(), assSingleChoice\assSingleChoice(), assTextQuestion\assTextQuestion(), assTextSubset\assTextSubset(), getComment(), and setComment().
assQuestion::$domxml |
Definition at line 175 of file class.assQuestion.php.
assQuestion::$est_working_time |
Definition at line 112 of file class.assQuestion.php.
Referenced by getEstimatedWorkingTime().
assQuestion::$id |
Definition at line 45 of file class.assQuestion.php.
Referenced by getId(), assMatchingQuestion\getTermWithID(), isClone(), isInUse(), assImagemapQuestion\setExportDetailsXLS(), assSingleChoice\setExportDetailsXLS(), assMultipleChoice\setExportDetailsXLS(), setId(), setTestId(), and syncWithOriginal().
assQuestion::$ilias |
Definition at line 148 of file class.assQuestion.php.
Referenced by _setReachedPoints(), assQuestion(), insertIntoTest(), assQuestionTypeTemplate\saveToDb(), assNumeric\saveToDb(), assOrderingQuestion\saveToDb(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assTextSubset\saveToDb(), assTextQuestion\saveToDb(), assImagemapQuestion\saveToDb(), and assJavaApplet\saveToDb().
assQuestion::$lng |
Definition at line 166 of file class.assQuestion.php.
Referenced by _getQuestionTypeName(), _setReachedPoints(), and assQuestion().
assQuestion::$obj_id |
Definition at line 139 of file class.assQuestion.php.
Referenced by delete(), getObjId(), and setObjId().
assQuestion::$original_id |
Definition at line 187 of file class.assQuestion.php.
Referenced by _logAction(), assQuestionTypeTemplate\copyObject(), assTextQuestion\copyObject(), assImagemapQuestion\copyObject(), assOrderingQuestion\copyObject(), assSingleChoice\copyObject(), assTextSubset\copyObject(), assMultipleChoice\copyObject(), assNumeric\copyObject(), assMatchingQuestion\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), assQuestionTypeTemplate\duplicate(), assTextQuestion\duplicate(), assImagemapQuestion\duplicate(), assOrderingQuestion\duplicate(), assSingleChoice\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assNumeric\duplicate(), assMatchingQuestion\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), assImagemapQuestion\duplicateFeedbackAnswer(), assSingleChoice\duplicateFeedbackAnswer(), assMultipleChoice\duplicateFeedbackAnswer(), duplicateFeedbackGeneric(), getOriginalId(), logAction(), assQuestionTypeTemplate\saveToDb(), assNumeric\saveToDb(), assOrderingQuestion\saveToDb(), assMultipleChoice\saveToDb(), assSingleChoice\saveToDb(), assMatchingQuestion\saveToDb(), assTextQuestion\saveToDb(), assTextSubset\saveToDb(), assImagemapQuestion\saveToDb(), assClozeTest\saveToDb(), assJavaApplet\saveToDb(), and setOriginalId().
assQuestion::$outputType |
Definition at line 184 of file class.assQuestion.php.
Referenced by getOutputType(), and setOutputType().
assQuestion::$owner |
Definition at line 73 of file class.assQuestion.php.
Referenced by assClozeTest\assClozeTest(), assImagemapQuestion\assImagemapQuestion(), assJavaApplet\assJavaApplet(), assMatchingQuestion\assMatchingQuestion(), assMultipleChoice\assMultipleChoice(), assNumeric\assNumeric(), assOrderingQuestion\assOrderingQuestion(), assQuestion(), assQuestionTypeTemplate\assQuestionTypeTemplate(), assSingleChoice\assSingleChoice(), assTextQuestion\assTextQuestion(), assTextSubset\assTextSubset(), assQuestionTypeTemplate\duplicate(), assImagemapQuestion\duplicate(), assTextQuestion\duplicate(), assOrderingQuestion\duplicate(), assSingleChoice\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assNumeric\duplicate(), assMatchingQuestion\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), getOwner(), and setOwner().
assQuestion::$points |
Definition at line 103 of file class.assQuestion.php.
Referenced by _getMaximumPoints(), _getReachedPoints(), _isWorkedThrough(), _setReachedPoints(), assTextSubset\addAnswer(), assSingleChoice\addAnswer(), assMultipleChoice\addAnswer(), assOrderingQuestion\addAnswer(), assImagemapQuestion\addAnswer(), assMatchingQuestion\addMatchingPair(), assNumeric\addRange(), assQuestionTypeTemplate\calculateReachedPoints(), assTextQuestion\calculateReachedPoints(), assNumeric\calculateReachedPoints(), assSingleChoice\calculateReachedPoints(), assMultipleChoice\calculateReachedPoints(), assTextSubset\calculateReachedPoints(), assOrderingQuestion\calculateReachedPoints(), assJavaApplet\calculateReachedPoints(), assImagemapQuestion\calculateReachedPoints(), assMatchingQuestion\calculateReachedPoints(), assClozeTest\calculateReachedPoints(), calculateReachedPoints(), assClozeTest\getMaximumGapPoints(), assQuestionTypeTemplate\getMaximumPoints(), assTextQuestion\getMaximumPoints(), assTextSubset\getMaximumPoints(), assJavaApplet\getMaximumPoints(), assSingleChoice\getMaximumPoints(), assMultipleChoice\getMaximumPoints(), assImagemapQuestion\getMaximumPoints(), assOrderingQuestion\getMaximumPoints(), assClozeTest\getMaximumPoints(), assMatchingQuestion\getMaximumPoints(), getPoints(), assClozeTest\setGapAnswerPoints(), and assTextQuestion\setReachedPoints().
assQuestion::$question |
Definition at line 92 of file class.assQuestion.php.
Referenced by _instanciateQuestion(), assImagemapQuestion\assImagemapQuestion(), assJavaApplet\assJavaApplet(), assMatchingQuestion\assMatchingQuestion(), assMultipleChoice\assMultipleChoice(), assNumeric\assNumeric(), assOrderingQuestion\assOrderingQuestion(), assQuestion(), assQuestionTypeTemplate\assQuestionTypeTemplate(), assSingleChoice\assSingleChoice(), assTextQuestion\assTextQuestion(), assTextSubset\assTextSubset(), assClozeTest\getClozeText(), getQuestion(), and setQuestion().
assQuestion::$shuffle |
Definition at line 121 of file class.assQuestion.php.
Referenced by getShuffle(), assClozeTest\setGapShuffle(), setShuffle(), and assMatchingQuestion\setShuffle().
assQuestion::$suggested_solutions |
Definition at line 186 of file class.assQuestion.php.
assQuestion::$test_id |
Definition at line 130 of file class.assQuestion.php.
Referenced by getTestId(), and insertIntoTest().
assQuestion::$title |
Definition at line 54 of file class.assQuestion.php.
Referenced by assClozeTest\assClozeTest(), assImagemapQuestion\assImagemapQuestion(), assJavaApplet\assJavaApplet(), assMatchingQuestion\assMatchingQuestion(), assMultipleChoice\assMultipleChoice(), assNumeric\assNumeric(), assOrderingQuestion\assOrderingQuestion(), assQuestion(), assQuestionTypeTemplate\assQuestionTypeTemplate(), assSingleChoice\assSingleChoice(), assTextQuestion\assTextQuestion(), assTextSubset\assTextSubset(), assQuestionTypeTemplate\copyObject(), assTextQuestion\copyObject(), assImagemapQuestion\copyObject(), assOrderingQuestion\copyObject(), assSingleChoice\copyObject(), assTextSubset\copyObject(), assMultipleChoice\copyObject(), assNumeric\copyObject(), assMatchingQuestion\copyObject(), assJavaApplet\copyObject(), assClozeTest\copyObject(), assQuestionTypeTemplate\duplicate(), assImagemapQuestion\duplicate(), assTextQuestion\duplicate(), assOrderingQuestion\duplicate(), assSingleChoice\duplicate(), assTextSubset\duplicate(), assMultipleChoice\duplicate(), assNumeric\duplicate(), assMatchingQuestion\duplicate(), assJavaApplet\duplicate(), assClozeTest\duplicate(), getSuggestedSolutionTitle(), getTitle(), questionTitleExists(), and setTitle().
assQuestion::$tpl |
Definition at line 157 of file class.assQuestion.php.
Referenced by assQuestion().