public class ItemHelper12Impl extends ItemHelperBase implements ItemHelperIfc
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 $ 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_ESSAY, ITEM_FIB, ITEM_FILE, ITEM_FIN, ITEM_MATCHING, ITEM_MCMC, ITEM_MCMC_SS, ITEM_MCSC, ITEM_MXSURVEY, ITEM_SURVEY, ITEM_TFITEM_AUDIO, ITEM_ESSAY, ITEM_FIB, ITEM_FILE, ITEM_FIN, 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(Float score,
Item itemXml)
Add maximum score to item XML.
|
void |
addMinScore(Float 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(ArrayList itemTextList,
Item itemXml)
Set the answer texts for item.
|
void |
setFeedback(ArrayList itemTextList,
Item itemXml)
Set the feedback texts for item.
|
void |
setItemText(String itemText,
Item itemXml)
Set the item text.
|
void |
setItemTexts(ArrayList itemTextList,
Item itemXml)
Set the (one or more) item texts.
|
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(Float score, Item itemXml)
addMaxScore in interface ItemHelperIfcscore - itemXml - public void addMinScore(Float 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 setItemText(String itemText, Item itemXml)
setItemText in interface ItemHelperIfcitemText - text to be updateditemXml - public void setItemTexts(ArrayList itemTextList, Item itemXml)
setItemTexts in interface ItemHelperIfcitemXml - itemText - text to be updatedpublic String getItemType(Item itemXml)
getItemType in interface ItemHelperIfcitemXml - public void setAnswers(ArrayList itemTextList, Item itemXml)
setAnswers in interface ItemHelperIfcitemTextList - the text(s) for itempublic void setFeedback(ArrayList itemTextList, Item itemXml)
setFeedback in interface ItemHelperIfcitemTextList - the text(s) for itemitemXml - Copyright © 2005-2014 Sakai Project. All Rights Reserved.