org.sakaiproject.tool.assessment.ui.bean.author
Class ItemBean

java.lang.Object
  extended by org.sakaiproject.tool.assessment.ui.bean.author.ItemBean
All Implemented Interfaces:
Serializable

public class ItemBean
extends Object
implements Serializable

UI bean for authoring an Item $Id: ItemBean.java 95934 2011-07-29 22:13:46Z ktsao@stanford.edu $

See Also:
Serialized Form

Constructor Summary
ItemBean()
          Creates a new ItemBean object.
 
Method Summary
 String addChoicesAction()
           
 String addMatchPair()
           
 String editMatchPair()
           
 boolean getAddComment()
           
 String getAdditionalChoices()
          value of question
 boolean getAddToFavorite()
           
 String getAnswer(int n)
          get the nth answer
 int[] getAnswerCounter()
          get 1, 2, 3... for each answer
 String[] getAnswerLabels()
          ordered array of answers
 String getAnswerNumber(int n)
          Return the nth answer number, "A", "B", "C" etc.
 String[] getAnswers()
          ordered array of answers
 boolean getCaseSensitiveForFib()
          for fib, case sensitive for grading?
 boolean getCaseSensitiveForFin()
          for fin, case sensitive for grading?
 boolean[] getChoiceCorrectArray()
          This is an array of correct/not correct flags
 String getColumnChoices()
           
 String getCommentField()
           
 String getCorrAnswer()
          ordered array of correct answers
 String[] getCorrAnswers()
          ordered array of correct answers
 String getCorrFeedback()
          for correct feedback
 String getCurrentFavorite()
           
 ArrayList getCurrentFavoriteList()
           
 MatchItemBean getCurrentMatchPair()
           
 String getFavoriteName()
           
 boolean getForceRanking()
           
 boolean getFromFavoriteSelectOneMenu()
           
 String getGeneralFeedback()
          for general feedback
 boolean getHasFavoriteList()
           
 String getIncorrFeedback()
          for incorrect feedback
 String getInstruction()
           
 String getItemDiscount()
          value of question discount
 String getItemId()
           
 String getItemScore()
          value of question
 String getItemText()
           
 String getItemType()
           
 String getKeyword()
          get keyword metadata
 String getMatch(int n)
          Maching only.
 String getMatchAnswer(int n)
          Corresponding answer number for nth match
 String[] getMatchAnswers()
          Corresponding answer number list ordered for match
 int[] getMatchCounter()
          get 1, 2, 3... for each match
 String[] getMatches()
          Maching only.
 String getMatchFeedback(int n)
          feedback for nth match
 String[] getMatchFeedbackList()
          array of matching feeback
 ArrayList getMatchItemBeanList()
           
 String getMaxNumberRecordings()
          for audio recording
 String getMaxRecordingTime()
          for audio recording
 ArrayList getMultipleChoiceAnswers()
           
 boolean getMultipleCorrect()
          for multiple choice questions, multiple correct?
 String getMultipleCorrectString()
          for multiple choice questions, multiple correct?
 boolean getMutuallyExclusiveForFib()
          for fib, Mutually exclusive for multiple answers, for grading?
 boolean getMutuallyExclusiveForFin()
          for fin, Mutually exclusive for multiple answers, for grading?
 boolean getNewAddToFavorite()
           
 boolean getNewFavoriteChoice()
           
 String getNumAttempts()
           
 String getObjective()
          get objective metadata
 String getOrigPool()
          String value of selected pool id
 String getOrigSection()
          String value of selected pool id
 String getOutcome()
           
 String getPartialCreditFlag()
           
 String getPoolOutcome()
           
 String getRandomized()
          Is question to be randomized?
 String getRationale()
          has rationale ?
 int getRelativeWidth()
           
 String getRowChoices()
           
 String getRubric()
          get rubric metadata
 String getScaleName()
          for survey
 String getSelectedPool()
          String value of selected pool id
 String getSelectedRelativeWidth()
           
 String getSelectedSection()
          String value of selected section id
 boolean getShowMutuallyExclusiveForFibCheckbox()
          for fib, Mutually exclusive for multiple answers, for grading?
 boolean getShowMutuallyExclusiveForFinCheckbox()
          for fin, Mutually exclusive for multiple answers, for grading?
 String getTimeAllowed()
           
 int gettotalMCAnswers()
           
 boolean isCorrectChoice(int n)
          is the nth choice correct?
 boolean isCorrectChoice(String label)
           
 boolean isMatchError()
           
 boolean isPartialCreditEnabled()
           
 String removeChoices()
           
 String removeChoicesSingle()
           
 String removeMatchPair()
           
 void resetPartialCreditValues()
           
 String resetToDefaultGradingLogic()
           
 void setAddComment(boolean param)
           
 void setAdditionalChoices(String size)
          value of question
 void setAddToFavorite(boolean param)
           
 void setAnswer(int n, String answer)
          set the nth answer
 void setAnswerLabels(String[] answers)
          set ordered array of answers
 void setAnswers(String[] answers)
          set ordered array of answers
 void setCaseSensitiveForFib(boolean param)
          for fib questions
 void setCaseSensitiveForFin(boolean param)
          for fin questions
 void setChoiceCorrectArray(boolean[] choiceCorrectArray)
          set array of correct/not correct flags
 void setColumnChoices(String param)
           
 void setColumnChoicesFromFavorite(String strFavorite)
           
 void setCommentField(String param)
           
 void setCorrAnswer(String answer)
          set correct answer for True/False
 void setCorrAnswers(String[] answers)
          set ordered array of correct answers
 void setCorrectChoice(int n, boolean correctChoice)
          set the nth choice correct?
 void setCorrFeedback(String param)
          set the corrfeedback
 void setCurrentFavorite(String favorite)
           
 void setCurrentFavoriteList(String[] list)
           
 void setCurrentMatchPair(MatchItemBean param)
           
 void setFavoriteName(String param)
           
 void setForceRanking(boolean param)
           
 void setFromFavoriteSelectOneMenu(boolean param)
           
 void setGeneralFeedback(String param)
          set the generalfeedback
 void setHasFavoriteList(boolean param)
           
 void setIncorrFeedback(String param)
          set the incorrectfeedback
 void setInstruction(String param)
           
 void setItemDiscount(String discount)
          value of question discount
 void setItemId(String string)
           
 void setItemScore(String score)
          value of question
 void setItemText(String itemText)
           
 void setItemType(String param)
           
 void setKeyword(String param)
          set metadata
 void setMatch(int n, String match)
          Maching only.
 void setMatchAnswer(int n, String matchAnswer)
          set answer number for nth match
 void setMatchAnswers(String[] matchAnswers)
          Corresponding answer number list ordered for match
 void setMatches(String[] matches)
          Maching only.
 void setMatchFeedback(int n, String matchFeedback)
          set feedback for nth match
 void setMatchFeedbackList(String[] matchFeedbackList)
          set array of matching feeback
 void setMatchItemBeanList(ArrayList list)
           
 void setMaxNumberRecordings(String maxNumberRecordings)
          set audio recording maximum attempts
 void setMaxRecordingTime(String maxRecordingTime)
          for audio recording
 void setMultipleChoiceAnswers(ArrayList list)
           
 void setMultipleCorrect(boolean multipleCorrect)
          for multiple choice questions
 void setMultipleCorrectString(String multipleCorrect)
          for multiple choice questions
 void setMutuallyExclusiveForFib(boolean param)
          for fib questions
 void setMutuallyExclusiveForFin(boolean param)
          for fin questions
 void setNewAddToFavorite(boolean param)
           
 void setNewFavoriteChoice(boolean param)
           
 void setNumAttempts(String param)
           
 void setObjective(String param)
          set metadata
 void setOrigPool(String param)
          set the String value of selected pool id
 void setOrigSection(String param)
          set the String value of selected pool id
 void setOutcome(String outcome)
           
 void setPartialCreditFlag(String partialCreditFlag)
           
 void setPoolOutcome(String poolOutcome)
           
 void setRandomized(String randomized)
          Is question to be randomized?
 void setRationale(String param)
           
 void setRelativeWidth(int param)
           
 void setRowChoices(String param)
           
 void setRubric(String param)
          set metadata
 void setScaleName(String scaleName)
          set the survey scale
 void setSelectedPool(String selectedPool)
          set the String value of selected pool id
 void setSelectedRelativeWidth(String param)
           
 void setSelectedSection(String selectedSection)
          set the String value of selected section id
 void setShowMutuallyExclusiveForFibCheckbox(boolean param)
          for fib questions
 void setShowMutuallyExclusiveForFinCheckbox(boolean param)
          for fin questions
 void setTimeAllowed(String param)
           
 void settotalMCAnswers()
           
 void toggleAddComment(javax.faces.event.ValueChangeEvent event)
           
 void toggleAddToFavorite(javax.faces.event.ValueChangeEvent event)
           
 void toggleChoiceTypes(javax.faces.event.ValueChangeEvent event)
           
 void togglePartialCredit(javax.faces.event.ValueChangeEvent event)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ItemBean

public ItemBean()
Creates a new ItemBean object.

Method Detail

getOutcome

public String getOutcome()
Returns:

setOutcome

public void setOutcome(String outcome)

getPoolOutcome

public String getPoolOutcome()

setPoolOutcome

public void setPoolOutcome(String poolOutcome)

getItemId

public String getItemId()

setItemId

public void setItemId(String string)
Parameters:
string -

getItemType

public String getItemType()

setItemType

public void setItemType(String param)

getItemText

public String getItemText()

setItemText

public void setItemText(String itemText)

getItemScore

public String getItemScore()
value of question

Returns:
score it is worth

setItemScore

public void setItemScore(String score)
value of question

Parameters:
score -

getItemDiscount

public String getItemDiscount()
value of question discount

Returns:
discountit is worth

setItemDiscount

public void setItemDiscount(String discount)
value of question discount

Parameters:
discount -

getAdditionalChoices

public String getAdditionalChoices()
value of question

Returns:
score it is worth

setAdditionalChoices

public void setAdditionalChoices(String size)
value of question

Parameters:
score -

getAnswerLabels

public String[] getAnswerLabels()
ordered array of answers

Returns:

setAnswerLabels

public void setAnswerLabels(String[] answers)
set ordered array of answers

Parameters:
answers - ordered array of answers

getAnswers

public String[] getAnswers()
ordered array of answers

Returns:

setAnswers

public void setAnswers(String[] answers)
set ordered array of answers

Parameters:
answers - ordered array of answers

getCorrAnswer

public String getCorrAnswer()
ordered array of correct answers

Returns:

setCorrAnswer

public void setCorrAnswer(String answer)
set correct answer for True/False

Parameters:
answers - ordered array of correct answers

getCorrAnswers

public String[] getCorrAnswers()
ordered array of correct answers

Returns:

setCorrAnswers

public void setCorrAnswers(String[] answers)
set ordered array of correct answers

Parameters:
answers - ordered array of correct answers

getAnswerCounter

public int[] getAnswerCounter()
get 1, 2, 3... for each answer

Parameters:
n -
Returns:

getAnswer

public String getAnswer(int n)
get the nth answer

Parameters:
n -
Returns:
the nth answer

setAnswer

public void setAnswer(int n,
                      String answer)
set the nth answer

Parameters:
n -
answer - the nth answer

getAnswerNumber

public String getAnswerNumber(int n)
Return the nth answer number, "A", "B", "C" etc.

Parameters:
n -
Returns:

getChoiceCorrectArray

public boolean[] getChoiceCorrectArray()
This is an array of correct/not correct flags

Returns:
the array of correct/not correct flags

setChoiceCorrectArray

public void setChoiceCorrectArray(boolean[] choiceCorrectArray)
set array of correct/not correct flags

Parameters:
choiceCorrectArray - of correct/not correct flags

isCorrectChoice

public boolean isCorrectChoice(String label)

isCorrectChoice

public boolean isCorrectChoice(int n)
is the nth choice correct?

Parameters:
n -
Returns:

setCorrectChoice

public void setCorrectChoice(int n,
                             boolean correctChoice)
set the nth choice correct?

Parameters:
n -
correctChoice - true if it is

getMaxRecordingTime

public String getMaxRecordingTime()
for audio recording

Returns:
maximum time for recording

setMaxRecordingTime

public void setMaxRecordingTime(String maxRecordingTime)
for audio recording

Parameters:
maxRecordingTime - maximum time for recording

getMaxNumberRecordings

public String getMaxNumberRecordings()
for audio recording

Returns:
maximum attempts

setMaxNumberRecordings

public void setMaxNumberRecordings(String maxNumberRecordings)
set audio recording maximum attempts

Parameters:
maxNumberRecordings -

getScaleName

public String getScaleName()
for survey

Returns:
the scale

setScaleName

public void setScaleName(String scaleName)
set the survey scale

Parameters:
scaleName -

getIncorrFeedback

public String getIncorrFeedback()
for incorrect feedback

Returns:
the incorrFeedback

setIncorrFeedback

public void setIncorrFeedback(String param)
set the incorrectfeedback

Parameters:
incorrFeedback -

getCorrFeedback

public String getCorrFeedback()
for correct feedback

Returns:
the scale

setCorrFeedback

public void setCorrFeedback(String param)
set the corrfeedback

Parameters:
corrfeedback -

getGeneralFeedback

public String getGeneralFeedback()
for general feedback

Returns:
the scale

setGeneralFeedback

public void setGeneralFeedback(String param)
set the generalfeedback

Parameters:
generalfeedback -

getKeyword

public String getKeyword()
get keyword metadata


setKeyword

public void setKeyword(String param)
set metadata

Parameters:
param -

getObjective

public String getObjective()
get objective metadata


setObjective

public void setObjective(String param)
set metadata

Parameters:
param -

getRubric

public String getRubric()
get rubric metadata


setRubric

public void setRubric(String param)
set metadata

Parameters:
param -

getTimeAllowed

public String getTimeAllowed()

setTimeAllowed

public void setTimeAllowed(String param)

getNumAttempts

public String getNumAttempts()

setNumAttempts

public void setNumAttempts(String param)

getMultipleCorrectString

public String getMultipleCorrectString()
for multiple choice questions, multiple correct?

Returns:

setMultipleCorrectString

public void setMultipleCorrectString(String multipleCorrect)
for multiple choice questions

Parameters:
multipleCorrectString - multiple correct?

setMultipleChoiceAnswers

public void setMultipleChoiceAnswers(ArrayList list)

setMatchItemBeanList

public void setMatchItemBeanList(ArrayList list)

getMatchItemBeanList

public ArrayList getMatchItemBeanList()

setCurrentMatchPair

public void setCurrentMatchPair(MatchItemBean param)

getCurrentMatchPair

public MatchItemBean getCurrentMatchPair()

getMultipleCorrect

public boolean getMultipleCorrect()
for multiple choice questions, multiple correct?

Returns:

setMultipleCorrect

public void setMultipleCorrect(boolean multipleCorrect)
for multiple choice questions

Parameters:
multipleCorrect - multiple correct?

getRandomized

public String getRandomized()
Is question to be randomized?

Returns:
true or false

setRandomized

public void setRandomized(String randomized)
Is question to be randomized?

Parameters:
randomized - true if it is

getInstruction

public String getInstruction()

setInstruction

public void setInstruction(String param)

getRationale

public String getRationale()
has rationale ?

Returns:
true or false

setRationale

public void setRationale(String param)
Parameters:
rationale - true if it is

getMatches

public String[] getMatches()
Maching only. Get an array of match Strings.

Returns:
array of match Strings.

setMatches

public void setMatches(String[] matches)
Maching only. Set array of match Strings.

Parameters:
matches - array of match Strings.

getMatch

public String getMatch(int n)
Maching only. Get the nth match String.

Parameters:
n -
Returns:
the nth match String

setMatch

public void setMatch(int n,
                     String match)
Maching only. Set the nth match String.

Parameters:
n -
match -

getMatchCounter

public int[] getMatchCounter()
get 1, 2, 3... for each match

Parameters:
n -
Returns:

getMatchAnswers

public String[] getMatchAnswers()
Corresponding answer number list ordered for match

Returns:
answer number

setMatchAnswers

public void setMatchAnswers(String[] matchAnswers)
Corresponding answer number list ordered for match

Parameters:
matchAnswers - answer number list ordered for match

getMatchAnswer

public String getMatchAnswer(int n)
Corresponding answer number for nth match

Parameters:
n -
Returns:

setMatchAnswer

public void setMatchAnswer(int n,
                           String matchAnswer)
set answer number for nth match

Parameters:
n -
matchAnswer -

getMatchFeedback

public String getMatchFeedback(int n)
feedback for nth match

Parameters:
n -
Returns:
feedback for nth match

setMatchFeedback

public void setMatchFeedback(int n,
                             String matchFeedback)
set feedback for nth match

Parameters:
n -
matchFeedback - feedback for match

getMatchFeedbackList

public String[] getMatchFeedbackList()
array of matching feeback

Returns:
array of matching feeback

setMatchFeedbackList

public void setMatchFeedbackList(String[] matchFeedbackList)
set array of matching feeback

Parameters:
matchFeedbackList - array of matching feeback

getSelectedSection

public String getSelectedSection()
String value of selected section id

Returns:
String value of selected section id

setSelectedSection

public void setSelectedSection(String selectedSection)
set the String value of selected section id

Parameters:
selectedSection - String value of selected section id

getSelectedPool

public String getSelectedPool()
String value of selected pool id

Returns:
String value of selected pool id

setSelectedPool

public void setSelectedPool(String selectedPool)
set the String value of selected pool id

Parameters:
selectedPool - String value of selected pool id

getOrigPool

public String getOrigPool()
String value of selected pool id

Returns:
String value of selected pool id

setOrigPool

public void setOrigPool(String param)
set the String value of selected pool id

Parameters:
selectedPool - String value of selected pool id

getOrigSection

public String getOrigSection()
String value of selected pool id

Returns:
String value of selected pool id

setOrigSection

public void setOrigSection(String param)
set the String value of selected pool id

Parameters:
selectedSection - String value of selected pool id

getMultipleChoiceAnswers

public ArrayList getMultipleChoiceAnswers()

toggleChoiceTypes

public void toggleChoiceTypes(javax.faces.event.ValueChangeEvent event)

addChoicesAction

public String addChoicesAction()

removeChoices

public String removeChoices()

removeChoicesSingle

public String removeChoicesSingle()

isMatchError

public boolean isMatchError()

addMatchPair

public String addMatchPair()

editMatchPair

public String editMatchPair()

removeMatchPair

public String removeMatchPair()

getCaseSensitiveForFib

public boolean getCaseSensitiveForFib()
for fib, case sensitive for grading?

Returns:

setCaseSensitiveForFib

public void setCaseSensitiveForFib(boolean param)
for fib questions

Parameters:
case - sensitive for grading?

getMutuallyExclusiveForFib

public boolean getMutuallyExclusiveForFib()
for fib, Mutually exclusive for multiple answers, for grading?

Returns:

setMutuallyExclusiveForFib

public void setMutuallyExclusiveForFib(boolean param)
for fib questions


getShowMutuallyExclusiveForFibCheckbox

public boolean getShowMutuallyExclusiveForFibCheckbox()
for fib, Mutually exclusive for multiple answers, for grading?

Returns:

setShowMutuallyExclusiveForFibCheckbox

public void setShowMutuallyExclusiveForFibCheckbox(boolean param)
for fib questions


getCaseSensitiveForFin

public boolean getCaseSensitiveForFin()
for fin, case sensitive for grading?

Returns:

setCaseSensitiveForFin

public void setCaseSensitiveForFin(boolean param)
for fin questions

Parameters:
case - sensitive for grading?

getMutuallyExclusiveForFin

public boolean getMutuallyExclusiveForFin()
for fin, Mutually exclusive for multiple answers, for grading?

Returns:

setMutuallyExclusiveForFin

public void setMutuallyExclusiveForFin(boolean param)
for fin questions


getShowMutuallyExclusiveForFinCheckbox

public boolean getShowMutuallyExclusiveForFinCheckbox()
for fin, Mutually exclusive for multiple answers, for grading?

Returns:

setShowMutuallyExclusiveForFinCheckbox

public void setShowMutuallyExclusiveForFinCheckbox(boolean param)
for fin questions


setPartialCreditFlag

public void setPartialCreditFlag(String partialCreditFlag)

getPartialCreditFlag

public String getPartialCreditFlag()
Returns:

isPartialCreditEnabled

public boolean isPartialCreditEnabled()

togglePartialCredit

public void togglePartialCredit(javax.faces.event.ValueChangeEvent event)

resetPartialCreditValues

public void resetPartialCreditValues()

resetToDefaultGradingLogic

public String resetToDefaultGradingLogic()

gettotalMCAnswers

public int gettotalMCAnswers()

settotalMCAnswers

public void settotalMCAnswers()

getAddToFavorite

public boolean getAddToFavorite()

setAddToFavorite

public void setAddToFavorite(boolean param)

getForceRanking

public boolean getForceRanking()

setForceRanking

public void setForceRanking(boolean param)

getRelativeWidth

public int getRelativeWidth()

setRelativeWidth

public void setRelativeWidth(int param)

getSelectedRelativeWidth

public String getSelectedRelativeWidth()

setSelectedRelativeWidth

public void setSelectedRelativeWidth(String param)

getAddComment

public boolean getAddComment()

setAddComment

public void setAddComment(boolean param)

getRowChoices

public String getRowChoices()

setRowChoices

public void setRowChoices(String param)

getColumnChoices

public String getColumnChoices()

setColumnChoices

public void setColumnChoices(String param)

getFavoriteName

public String getFavoriteName()

setFavoriteName

public void setFavoriteName(String param)

getFromFavoriteSelectOneMenu

public boolean getFromFavoriteSelectOneMenu()

setFromFavoriteSelectOneMenu

public void setFromFavoriteSelectOneMenu(boolean param)

getNewFavoriteChoice

public boolean getNewFavoriteChoice()

setNewFavoriteChoice

public void setNewFavoriteChoice(boolean param)

getNewAddToFavorite

public boolean getNewAddToFavorite()

setNewAddToFavorite

public void setNewAddToFavorite(boolean param)

getCommentField

public String getCommentField()

setCommentField

public void setCommentField(String param)

toggleAddToFavorite

public void toggleAddToFavorite(javax.faces.event.ValueChangeEvent event)

toggleAddComment

public void toggleAddComment(javax.faces.event.ValueChangeEvent event)

getCurrentFavorite

public String getCurrentFavorite()

setCurrentFavorite

public void setCurrentFavorite(String favorite)

getHasFavoriteList

public boolean getHasFavoriteList()

setHasFavoriteList

public void setHasFavoriteList(boolean param)

setCurrentFavoriteList

public void setCurrentFavoriteList(String[] list)

getCurrentFavoriteList

public ArrayList getCurrentFavoriteList()

setColumnChoicesFromFavorite

public void setColumnChoicesFromFavorite(String strFavorite)


Copyright © 2005-2012 Sakai Project. All Rights Reserved.