| java.lang.Object org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperBase org.sakaiproject.tool.assessment.qti.helper.item.ItemHelper12Impl
ItemHelper12Impl | public class ItemHelper12Impl extends ItemHelperBase implements ItemHelperIfc(Code) | | Version for QTI 1.2 item XML, significant differences between 1.2 and 2.0
version: $Id: ItemHelper12Impl.java 9274 2006-05-10 22:50:48Z daisyf@stanford.edu $ version: Many methods in Fill in Blank and Numerical Responses(FIN) are identical for now. version: This might change if we want to add random variable, parameterized calculation.... |
Method Summary | |
public void | addCorrectAnswer(String correctAnswerLabel, Item itemXml) Flags an answer as correct. | public void | addIncorrectAnswer(String incorrectAnswerLabel, Item itemXml) Flags an answer as INCORRECT. | public void | addMaxScore(Float score, Item itemXml) Add maximum score to item XML. | public void | addMinScore(Float score, Item itemXml) | public void | addResponseEntry(Item itemXml, String xpath, String value, boolean isInsert, String responseNo, String responseLabel) | public void | flagAnswerCorrect(String answerLabel, Item itemXml, boolean correct) Flags an answer as correct/incorrect. | protected AuthoringXml | getAuthoringXml() | public String | getItemType(Item itemXml) | public String | getMetaLabelXPath(String fieldlabel) | public String | getMetaXPath() | protected int | getQtiVersion() | public String | getText(Item itemXml) | public void | setAnswers(ArrayList itemTextList, Item itemXml) Set the answer texts for item. | public void | setFeedback(ArrayList itemTextList, Item itemXml) Set the feedback texts for item. | public void | setItemText(String itemText, Item itemXml) Set the item text. | public void | setItemTexts(ArrayList itemTextList, Item itemXml) Set the (one or more) item texts. |
ItemHelper12Impl | public ItemHelper12Impl()(Code) | | |
addCorrectAnswer | public void addCorrectAnswer(String correctAnswerLabel, Item itemXml)(Code) | | Flags an answer as correct.
Parameters: correctAnswerLabel - the answer that is correct Parameters: itemXml - the encapsulation of the item xml |
addIncorrectAnswer | public void addIncorrectAnswer(String incorrectAnswerLabel, Item itemXml)(Code) | | Flags an answer as INCORRECT.
Currently, only used for true false questions.
Parameters: incorrectAnswerLabel - the answer that is NOT correct Parameters: itemXml - the encapsulation of the item xml |
addMaxScore | public void addMaxScore(Float score, Item itemXml)(Code) | | Add maximum score to item XML.
Parameters: score - Parameters: itemXml - |
addMinScore | public void addMinScore(Float score, Item itemXml)(Code) | | Add minimum score to item XML
Parameters: score - Parameters: itemXml - |
addResponseEntry | public void addResponseEntry(Item itemXml, String xpath, String value, boolean isInsert, String responseNo, String responseLabel)(Code) | | Add/update a response label entry
Parameters: itemXml - Parameters: xpath - Parameters: itemText - Parameters: isInsert - Parameters: responseNo - Parameters: responseLabelIdent - |
flagAnswerCorrect | public void flagAnswerCorrect(String answerLabel, Item itemXml, boolean correct)(Code) | | Flags an answer as correct/incorrect.
Parameters: correctAnswerLabel - the answer that is correct Parameters: itemXml - the encapsulation of the item xml Parameters: correct - true, or false if not correct |
getItemType | public String getItemType(Item itemXml)(Code) | | get item type string
Parameters: itemXml - type as string |
getMetaLabelXPath | public String getMetaLabelXPath(String fieldlabel)(Code) | | Get the metadata field entry XPath for a given label
Parameters: fieldlabel - the XPath |
getMetaXPath | public String getMetaXPath()(Code) | | Get the metadata field entry XPath
the XPath |
getQtiVersion | protected int getQtiVersion()(Code) | | get the qti version
|
getText | public String getText(Item itemXml)(Code) | | Get the text for the item
Parameters: itemXml - the text |
setAnswers | public void setAnswers(ArrayList itemTextList, Item itemXml)(Code) | | Set the answer texts for item.
Parameters: itemTextList - the text(s) for item |
setFeedback | public void setFeedback(ArrayList itemTextList, Item itemXml)(Code) | | Set the feedback texts for item.
Parameters: itemTextList - the text(s) for item Parameters: itemXml - |
setItemText | public void setItemText(String itemText, Item itemXml)(Code) | | Set the item text.
This is valid for all undelimited single item texts.
Not valid for matching or fill in the blank, but OK for instructional text
Parameters: itemText - text to be updated Parameters: itemXml - |
setItemTexts | public void setItemTexts(ArrayList itemTextList, Item itemXml)(Code) | | Set the (one or more) item texts.
Valid for single and multiple texts.
Parameters: itemXml - Parameters: itemText - text to be updated |
|
|