public class ItemHelper12Impl extends ItemHelperBase implements ItemHelperIfc
Version for QTI 1.2 item XML, significant differences between 1.2 and 2.0
* @version $Id$ Many methods in Fill in Blank and Numerical Responses(FIN) are identical for now. This might change if we want to add random variable, parameterized calculation....| Modifier and Type | Field and Description |
|---|---|
protected String[] |
itemTypes |
ITEM_AUDIO, ITEM_CALCQ, ITEM_EMI, ITEM_ESSAY, ITEM_FIB, ITEM_FILE, ITEM_FIN, ITEM_IMAGMQ, ITEM_MATCHING, ITEM_MCMC, ITEM_MCMC_SS, ITEM_MCSC, ITEM_MXSURVEY, ITEM_SURVEY, ITEM_TFITEM_AUDIO, ITEM_CALCQ, ITEM_EMI, ITEM_ESSAY, ITEM_FIB, ITEM_FILE, ITEM_FIN, ITEM_IMAGMQ, ITEM_MATCHING, ITEM_MCMC, ITEM_MCMC_SS, ITEM_MCSC, ITEM_MXSURVEY, ITEM_SURVEY, ITEM_TF| Constructor and Description |
|---|
ItemHelper12Impl() |
| Modifier and Type | Method and Description |
|---|---|
void |
addCorrectAnswer(String correctAnswerLabel,
Item itemXml)
Flags an answer as correct.
|
void |
addIncorrectAnswer(String incorrectAnswerLabel,
Item itemXml)
Flags an answer as INCORRECT.
|
void |
addMaxScore(Double score,
Item itemXml)
Add maximum score to item XML.
|
void |
addMinScore(Double discount,
Item itemXml)
Add minimum score to item XML
|
void |
addResponseEntry(Item itemXml,
String xpath,
String value,
boolean isInsert,
String responseNo,
String responseLabel)
Add/update a response label entry
|
void |
flagAnswerCorrect(String answerLabel,
Item itemXml,
boolean correct)
Flags an answer as correct/incorrect.
|
protected AuthoringXml |
getAuthoringXml()
We will have a versioned AuthoringXml in subclasses.
|
String |
getItemType(Item itemXml)
get item type string
|
String |
getMetaLabelXPath(String fieldlabel)
Get the metadata field entry XPath for a given label
|
String |
getMetaXPath()
Get the metadata field entry XPath
|
protected int |
getQtiVersion()
get the qti version
|
String |
getText(Item itemXml)
Get the text for the item
|
void |
setAnswers(List<ItemTextIfc> itemTextList,
Item itemXml)
Set the answer texts for item.
|
void |
setAttachments(Set<? extends AttachmentIfc> attachmentSet,
Item itemXml) |
void |
setFeedback(List<ItemTextIfc> itemTextList,
Item itemXml)
Set the feedback texts for item.
|
void |
setItemLabel(String itemLabel,
Item itemXml)
Set the label for the item.
|
void |
setItemText(String itemText,
Item itemXml)
Set the item text.
|
void |
setItemText(String itemText,
String flowClass,
Item itemXml)
Set the (usually instructional text) for the item for the specified flow.
|
void |
setItemTexts(List<ItemTextIfc> itemTextList,
Item itemXml)
Set the (one or more) item texts.
|
void |
setPresentationFlowResponseIdent(String presentationFlowResponseIdent,
Item itemXml)
Set the public void Presentation Flow Response Ident
|
void |
setPresentationLabel(String presentationLabel,
Item itemXml)
Set the presentation label.
|
makeItemNodeText, readTypeSurveyItem, readTypeXMLItem, readXMLDocument, updateItemXmlclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitreadTypeSurveyItem, readTypeXMLItem, readXMLDocument, updateItemXmlprotected String[] itemTypes
protected AuthoringXml getAuthoringXml()
ItemHelperBasegetAuthoringXml in class ItemHelperBaseprotected int getQtiVersion()
getQtiVersion in class ItemHelperBasepublic void addMaxScore(Double score, Item itemXml)
addMaxScore in interface ItemHelperIfcscore - itemXml - public void addMinScore(Double discount, Item itemXml)
addMinScore in interface ItemHelperIfcscore - itemXml - public void addCorrectAnswer(String correctAnswerLabel, Item itemXml)
addCorrectAnswer in interface ItemHelperIfccorrectAnswerLabel - the answer that is correctitemXml - the encapsulation of the item xmlpublic void addIncorrectAnswer(String incorrectAnswerLabel, Item itemXml)
addIncorrectAnswer in interface ItemHelperIfcincorrectAnswerLabel - the answer that is NOT correctitemXml - the encapsulation of the item xmlpublic void flagAnswerCorrect(String answerLabel, Item itemXml, boolean correct)
correctAnswerLabel - the answer that is correctitemXml - the encapsulation of the item xmlcorrect - true, or false if not correctpublic void addResponseEntry(Item itemXml, String xpath, String value, boolean isInsert, String responseNo, String responseLabel)
itemXml - xpath - itemText - isInsert - responseNo - responseLabelIdent - public String getMetaXPath()
getMetaXPath in interface ItemHelperIfcpublic String getMetaLabelXPath(String fieldlabel)
getMetaLabelXPath in interface ItemHelperIfcfieldlabel - public String getText(Item itemXml)
getText in interface ItemHelperIfcitemXml - public void setItemLabel(String itemLabel, Item itemXml)
ItemHelperIfcsetItemLabel in interface ItemHelperIfcpublic void setPresentationLabel(String presentationLabel, Item itemXml)
ItemHelperIfcsetPresentationLabel in interface ItemHelperIfcpublic void setPresentationFlowResponseIdent(String presentationFlowResponseIdent, Item itemXml)
ItemHelperIfcsetPresentationFlowResponseIdent in interface ItemHelperIfcpublic void setItemText(String itemText, Item itemXml)
setItemText in interface ItemHelperIfcitemText - text to be updateditemXml - public void setItemText(String itemText, String flowClass, Item itemXml)
ItemHelperIfcsetItemText in interface ItemHelperIfcpublic void setItemTexts(List<ItemTextIfc> itemTextList, Item itemXml)
setItemTexts in interface ItemHelperIfcitemXml - itemText - text to be updatedpublic String getItemType(Item itemXml)
getItemType in interface ItemHelperIfcitemXml - public void setAnswers(List<ItemTextIfc> itemTextList, Item itemXml)
setAnswers in interface ItemHelperIfcitemTextList - the text(s) for itempublic void setFeedback(List<ItemTextIfc> itemTextList, Item itemXml)
setFeedback in interface ItemHelperIfcitemTextList - the text(s) for itemitemXml - public void setAttachments(Set<? extends AttachmentIfc> attachmentSet, Item itemXml)
setAttachments in interface ItemHelperIfcCopyright © 2005–2018 Sakai Project. All rights reserved.