|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.sakaiproject.tool.assessment.qti.helper.item.ItemHelperBase
org.sakaiproject.tool.assessment.qti.helper.item.ItemHelper12Impl
public class ItemHelper12Impl
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....
| Field Summary | |
|---|---|
protected String[] |
itemTypes
|
| Fields inherited from class org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperBase |
|---|
ITEM_AUDIO, ITEM_ESSAY, ITEM_FIB, ITEM_FILE, ITEM_FIN, ITEM_MATCHING, ITEM_MCMC, ITEM_MCMC_SS, ITEM_MCSC, ITEM_MXSURVEY, ITEM_SURVEY, ITEM_TF |
| Fields inherited from interface org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperIfc |
|---|
ITEM_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 Summary | |
|---|---|
ItemHelper12Impl()
|
|
| Method Summary | |
|---|---|
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. |
| Methods inherited from class org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperBase |
|---|
makeItemNodeText, readTypeSurveyItem, readTypeXMLItem, readXMLDocument, updateItemXml |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.sakaiproject.tool.assessment.qti.helper.item.ItemHelperIfc |
|---|
readTypeSurveyItem, readTypeXMLItem, readXMLDocument, updateItemXml |
| Field Detail |
|---|
protected String[] itemTypes
| Constructor Detail |
|---|
public ItemHelper12Impl()
| Method Detail |
|---|
protected AuthoringXml getAuthoringXml()
ItemHelperBase
getAuthoringXml in class ItemHelperBaseprotected int getQtiVersion()
getQtiVersion in class ItemHelperBase
public 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 xml
public void addIncorrectAnswer(String incorrectAnswerLabel,
Item itemXml)
addIncorrectAnswer in interface ItemHelperIfcincorrectAnswerLabel - the answer that is NOT correctitemXml - the encapsulation of the item xml
public 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 correct
public 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 item
public void setFeedback(ArrayList itemTextList,
Item itemXml)
setFeedback in interface ItemHelperIfcitemTextList - the text(s) for itemitemXml -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||