ILIAS
Release_3_10_x_branch Revision 61812
|
Cloze test question GUI representation. More...
Public Member Functions | |
assClozeTestGUI ($id=-1) | |
assClozeTestGUI constructor | |
getCommand ($cmd) | |
createGaps () | |
Create editable gaps from the question text. | |
changeGapType () | |
Change the type of a gap. | |
checkInput () | |
Checks the obligatory fields from a POST in the edit form. | |
setGapTypes () | |
Sets the gap types from the editing form. | |
setShuffleState () | |
Sets the shuffle state of gaps from the editing form. | |
setGapAnswers () | |
Sets the answers for the gaps from the editing form. | |
setGapPoints () | |
Sets the points for the gaps from the editing form. | |
setGapBounds () | |
Sets the bounds for the gaps from the editing form. | |
addGapText () | |
Adds a new answer text value to a text gap. | |
addSelectGapText () | |
Adds a new answer text value to a select gap. | |
delete () | |
Deletes answer text from a gap. | |
writePostData () | |
Evaluates a posted edit form and writes the form data in the question object. | |
editQuestion () | |
Creates an output of the edit form for the question. | |
outQuestionForTest ($formaction, $active_id, $pass=NULL, $is_postponed=FALSE, $use_post_solutions=FALSE) | |
Creates an output of the question for a test. | |
getPreview ($show_question_only=FALSE) | |
Creates a preview output of the question. | |
getSolutionOutput ($active_id, $pass=NULL, $graphicalOutput=FALSE, $result_output=FALSE, $show_question_only=TRUE, $show_feedback=FALSE, $show_correct_solution=FALSE) | |
Creates a solution output of the question. | |
getTestOutput ($active_id, $pass=NULL, $is_postponed=FALSE, $use_post_solutions=FALSE) | |
addSuggestedSolution () | |
Handler for cmd[addSuggestedSolution] to add a suggested solution for the question. | |
removeSuggestedSolution () | |
saveFeedback () | |
Saves the feedback for a single choice question. | |
feedback () | |
Creates the output of the feedback page for a single choice question. | |
setQuestionTabs () | |
Sets the ILIAS tabs for this question type. | |
Public Member Functions inherited from assQuestionGUI | |
assQuestionGUI () | |
assQuestionGUI constructor | |
& | executeCommand () |
execute command | |
getType () | |
needed for page editor compliance | |
outOtherQuestionData () | |
Sets the extra fields i.e. | |
assessment () | |
output assessment | |
writeOtherPostData ($result=0) | |
Sets the other data i.e. | |
& | _getQuestionGUI ($question_type, $question_id=-1) |
Creates a question gui representation. | |
_getGUIClassNameForId ($a_q_id) | |
_getClassNameForQType ($q_type) | |
& | createQuestionGUI ($question_type, $question_id=-1) |
Creates a question gui representation. | |
getQuestionTemplate () | |
get question template | |
getILIASPage ($html="") | |
Returns the ILIAS Page around a question. | |
outQuestionPage ($a_temp_var, $a_postponed=false, $active_id="", $html="") | |
output question page | |
cancel () | |
cancel action | |
originalSyncForm ($return_to="") | |
sync () | |
cancelSync () | |
saveEdit () | |
save question | |
save () | |
save question | |
apply () | |
apply changes | |
cancelExplorer () | |
addPG () | |
addST () | |
addGIT () | |
getContextPath ($cont_obj, $a_endnode_id, $a_startnode_id=1) | |
get context path in content object tree | |
linkChilds () | |
setSequenceNumber ($nr) | |
getSequenceNumber () | |
setQuestionCount ($a_question_count) | |
getQuestionCount () | |
getErrorMessage () | |
setErrorMessage ($errormessage) | |
addErrorMessage ($errormessage) | |
outAdditionalOutput () | |
getQuestionType () | |
Returns the question type string. | |
getAsValueAttribute ($a_value) | |
Returns a HTML value attribute. | |
getAnswerFeedbackOutput ($active_id, $pass) | |
Returns the answer specific feedback depending on the results of the question. | |
outQuestionType () |
Data Fields | |
$gapIndex | |
A temporary variable to store gap indexes of ilCtrl commands in the getCommand method. | |
$answerIndex | |
A temporary variable to store answer indexes of ilCtrl commands in the getCommand method. | |
Data Fields inherited from assQuestionGUI | |
$object | |
$tpl | |
$lng | |
$error | |
$errormessage | |
$sequence_no | |
sequence number in test | |
$question_count | |
question count in test |
Cloze test question GUI representation.
The assClozeTestGUI class encapsulates the GUI representation for cloze test questions.
Definition at line 36 of file class.assClozeTestGUI.php.
assClozeTestGUI::addGapText | ( | ) |
Adds a new answer text value to a text gap.
Adds a new answer text value to a text gap
public
Definition at line 307 of file class.assClozeTestGUI.php.
References editQuestion(), and writePostData().
assClozeTestGUI::addSelectGapText | ( | ) |
Adds a new answer text value to a select gap.
Adds a new answer text value to a select gap
public
Definition at line 321 of file class.assClozeTestGUI.php.
References editQuestion(), and writePostData().
assClozeTestGUI::addSuggestedSolution | ( | ) |
Handler for cmd[addSuggestedSolution] to add a suggested solution for the question.
Handler for cmd[addSuggestedSolution] to add a suggested solution for the question
public
Reimplemented from assQuestionGUI.
Definition at line 1078 of file class.assClozeTestGUI.php.
References checkInput(), editQuestion(), assQuestionGUI\getErrorMessage(), assQuestionGUI\getQuestionTemplate(), ilUtil\sendInfo(), and writePostData().
assClozeTestGUI::assClozeTestGUI | ( | $id = -1 | ) |
assClozeTestGUI constructor
The constructor takes possible arguments an creates an instance of the assClozeTestGUI object.
integer | $id | The database id of a image map question object public |
Definition at line 58 of file class.assClozeTestGUI.php.
References assQuestionGUI\assQuestionGUI().
assClozeTestGUI::changeGapType | ( | ) |
Change the type of a gap.
Definition at line 99 of file class.assClozeTestGUI.php.
References editQuestion(), and writePostData().
assClozeTestGUI::checkInput | ( | ) |
Checks the obligatory fields from a POST in the edit form.
Definition at line 108 of file class.assClozeTestGUI.php.
Referenced by addSuggestedSolution(), and writePostData().
assClozeTestGUI::createGaps | ( | ) |
Create editable gaps from the question text.
Definition at line 90 of file class.assClozeTestGUI.php.
References editQuestion(), and writePostData().
assClozeTestGUI::delete | ( | ) |
Deletes answer text from a gap.
Deletes answer text from a gap
public
Definition at line 335 of file class.assClozeTestGUI.php.
References editQuestion(), and writePostData().
assClozeTestGUI::editQuestion | ( | ) |
Creates an output of the edit form for the question.
Creates an output of the edit form for the question
public
Definition at line 434 of file class.assClozeTestGUI.php.
References $_GET, assQuestion\_getInternalLinkHref(), ilRTE\_getRTEClassname(), ilObject\_lookupType(), CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, assQuestionGUI\getQuestionTemplate(), assQuestionGUI\outOtherQuestionData(), assQuestionGUI\outQuestionType(), and ilUtil\prepareFormOutput().
Referenced by addGapText(), addSelectGapText(), addSuggestedSolution(), changeGapType(), createGaps(), delete(), and removeSuggestedSolution().
assClozeTestGUI::feedback | ( | ) |
Creates the output of the feedback page for a single choice question.
Creates the output of the feedback page for a single choice question
public
Reimplemented from assQuestionGUI.
Definition at line 1157 of file class.assClozeTestGUI.php.
References $_GET, ilRTE\_getRTEClassname(), ilObject\_lookupType(), and ilUtil\prepareFormOutput().
assClozeTestGUI::getCommand | ( | $cmd | ) |
Reimplemented from assQuestionGUI.
Definition at line 71 of file class.assClozeTestGUI.php.
References $cmd.
assClozeTestGUI::getPreview | ( | $show_question_only = FALSE | ) |
Creates a preview output of the question.
Creates a preview output of the question
Definition at line 757 of file class.assClozeTestGUI.php.
References CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, assQuestionGUI\getILIASPage(), and ilUtil\prepareFormOutput().
assClozeTestGUI::getSolutionOutput | ( | $active_id, | |
$pass = NULL , |
|||
$graphicalOutput = FALSE , |
|||
$result_output = FALSE , |
|||
$show_question_only = TRUE , |
|||
$show_feedback = FALSE , |
|||
$show_correct_solution = FALSE |
|||
) |
Creates a solution output of the question.
Creates a solution output of the question
integer | $active_id | The active id of the current user from the tst_active database table |
integer | $pass | The test pass of the current user |
boolean | $graphicalOutput | If TRUE, additional graphics (checkmark, cross) are shown to indicate wrong or right answers |
boolean | $result_output | If TRUE, the resulting points are shown for every answer |
Definition at line 816 of file class.assClozeTestGUI.php.
References $pass, CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, assQuestionGUI\getAnswerFeedbackOutput(), assQuestionGUI\getILIASPage(), ilUtil\getImagePath(), and ilUtil\prepareFormOutput().
assClozeTestGUI::getTestOutput | ( | $active_id, | |
$pass = NULL , |
|||
$is_postponed = FALSE , |
|||
$use_post_solutions = FALSE |
|||
) |
Definition at line 995 of file class.assClozeTestGUI.php.
References $pass, ilObjTest\_getPass(), ilObjTest\_getUsePreviousAnswers(), CLOZE_NUMERIC, CLOZE_SELECT, CLOZE_TEXT, assQuestionGUI\outQuestionPage(), and ilUtil\prepareFormOutput().
Referenced by outQuestionForTest().
assClozeTestGUI::outQuestionForTest | ( | $formaction, | |
$active_id, | |||
$pass = NULL , |
|||
$is_postponed = FALSE , |
|||
$use_post_solutions = FALSE |
|||
) |
Creates an output of the question for a test.
Creates an output of the question for a test
string | $formaction | The form action for the test output |
integer | $active_id | The active id of the current user from the tst_active database table |
integer | $pass | The test pass of the current user |
boolean | $is_postponed | The information if the question is a postponed question or not |
boolean | $use_post_solutions | Fills the question output with answers from the previous post if TRUE, otherwise with the user results from the database public |
Definition at line 742 of file class.assClozeTestGUI.php.
References $pass, and getTestOutput().
assClozeTestGUI::removeSuggestedSolution | ( | ) |
Reimplemented from assQuestionGUI.
Definition at line 1116 of file class.assClozeTestGUI.php.
References editQuestion().
assClozeTestGUI::saveFeedback | ( | ) |
Saves the feedback for a single choice question.
Saves the feedback for a single choice question
public
Reimplemented from assQuestionGUI.
Definition at line 1141 of file class.assClozeTestGUI.php.
References ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), and ilUtil\stripSlashes().
assClozeTestGUI::setGapAnswers | ( | ) |
Sets the answers for the gaps from the editing form.
Sets the answers for the gaps from the editing form
private
Definition at line 162 of file class.assClozeTestGUI.php.
References assQuestionGUI\$error, assQuestionGUI\addErrorMessage(), CLOZE_NUMERIC, and ilUtil\stripSlashes().
Referenced by writePostData().
assClozeTestGUI::setGapBounds | ( | ) |
Sets the bounds for the gaps from the editing form.
Sets the bounds for the gaps from the editing form
private
Definition at line 221 of file class.assClozeTestGUI.php.
References assQuestionGUI\$error, assQuestionGUI\addErrorMessage(), CLOZE_NUMERIC, and ilUtil\stripSlashes().
Referenced by writePostData().
assClozeTestGUI::setGapPoints | ( | ) |
Sets the points for the gaps from the editing form.
Sets the points for the gaps from the editing form
private
Definition at line 201 of file class.assClozeTestGUI.php.
References ilUtil\stripSlashes().
Referenced by writePostData().
assClozeTestGUI::setGapTypes | ( | ) |
Sets the gap types from the editing form.
Sets the gap types from the editing form
private
Definition at line 124 of file class.assClozeTestGUI.php.
Referenced by writePostData().
assClozeTestGUI::setQuestionTabs | ( | ) |
Sets the ILIAS tabs for this question type.
Sets the ILIAS tabs for this question type
public
Definition at line 1191 of file class.assClozeTestGUI.php.
References $_GET, and $ref_id.
assClozeTestGUI::setShuffleState | ( | ) |
Sets the shuffle state of gaps from the editing form.
Sets the shuffle state of gaps from the editing form
private
Definition at line 143 of file class.assClozeTestGUI.php.
Referenced by writePostData().
assClozeTestGUI::writePostData | ( | ) |
Evaluates a posted edit form and writes the form data in the question object.
Evaluates a posted edit form and writes the form data in the question object
Reimplemented from assQuestionGUI.
Definition at line 350 of file class.assClozeTestGUI.php.
References assQuestionGUI\$error, $result, ilObjAdvancedEditing\_getUsedHTMLTagsAsString(), checkInput(), assQuestionGUI\setErrorMessage(), setGapAnswers(), setGapBounds(), setGapPoints(), setGapTypes(), setShuffleState(), ilUtil\stripSlashes(), and assQuestionGUI\writeOtherPostData().
Referenced by addGapText(), addSelectGapText(), addSuggestedSolution(), changeGapType(), createGaps(), and delete().
assClozeTestGUI::$answerIndex |
A temporary variable to store answer indexes of ilCtrl commands in the getCommand method.
Definition at line 48 of file class.assClozeTestGUI.php.
assClozeTestGUI::$gapIndex |
A temporary variable to store gap indexes of ilCtrl commands in the getCommand method.
Definition at line 42 of file class.assClozeTestGUI.php.