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

java.lang.Object
  extended byorg.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 5548 2006-01-26 00:07:53Z lydial@stanford.edu $

See Also:
Serialized Form

Constructor Summary
ItemBean()
          Creates a new ItemBean object.
 
Method Summary
 void addChoices(ValueChangeEvent event)
           
 String addChoicesAction()
           
 String addMatchPair()
           
 String editMatchPair()
           
 String getAdditionalChoices()
          value of question
 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[] getChoiceCorrectArray()
          This is an array of correct/not correct flags
 String getCorrAnswer()
          ordered array of correct answers
 String[] getCorrAnswers()
          ordered array of correct answers
 String getCorrFeedback()
          for correct feedback
 MatchItemBean getCurrentMatchPair()
           
 String getGeneralFeedback()
          for general feedback
 String getIncorrFeedback()
          for incorrect feedback
 String getInstruction()
           
 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?
 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 getPoolOutcome()
           
 String getRandomized()
          Is question to be randomized?
 String getRationale()
          has rationale ?
 String getRubric()
          get rubric metadata
 String getScaleName()
          for survey
 String getSelectedPool()
          String value of selected pool id
 String getSelectedSection()
          String value of selected section id
 boolean getShowMutuallyExclusiveForFibCheckbox()
          for fib, Mutually exclusive for multiple answers, for grading?
 String getTimeAllowed()
           
 boolean isCorrectChoice(int n)
          is the nth choice correct?
 boolean isCorrectChoice(String label)
           
 boolean isMatchError()
           
 String removeChoices()
           
 String removeMatchPair()
           
 void setAdditionalChoices(String size)
          value of question
 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 setChoiceCorrectArray(boolean[] choiceCorrectArray)
          set array of correct/not correct flags
 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 setCurrentMatchPair(MatchItemBean param)
           
 void setGeneralFeedback(String param)
          set the generalfeedback
 void setIncorrFeedback(String param)
          set the incorrectfeedback
 void setInstruction(String param)
           
 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 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 setPoolOutcome(String poolOutcome)
           
 void setRandomized(String randomized)
          Is question to be randomized?
 void setRationale(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 setSelectedSection(String selectedSection)
          set the String value of selected section id
 void setShowMutuallyExclusiveForFibCheckbox(boolean param)
          for fib questions
 void setTimeAllowed(String param)
           
 void toggleChoiceTypes(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 -

getAdditionalChoices

public String getAdditionalChoices()
value of question

Returns:
score it is worth

setAdditionalChoices

public void setAdditionalChoices(String size)
value of question


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


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

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


getCorrFeedback

public String getCorrFeedback()
for correct feedback

Returns:
the scale

setCorrFeedback

public void setCorrFeedback(String param)
set the corrfeedback


getGeneralFeedback

public String getGeneralFeedback()
for general feedback

Returns:
the scale

setGeneralFeedback

public void setGeneralFeedback(String param)
set the 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


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)

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

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


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


getMultipleChoiceAnswers

public ArrayList getMultipleChoiceAnswers()

toggleChoiceTypes

public void toggleChoiceTypes(ValueChangeEvent event)

addChoices

public void addChoices(ValueChangeEvent event)

addChoicesAction

public String addChoicesAction()

removeChoices

public String removeChoices()

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


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