org.sakaiproject.tool.assessment.ui.listener.evaluation.util
Class EvaluationListenerUtil

java.lang.Object
  extended byorg.sakaiproject.tool.assessment.ui.listener.evaluation.util.EvaluationListenerUtil

public class EvaluationListenerUtil
extends Object

Utility methods for Action Listeners Evaluation

Copyright: Copyright (c) 2004

Organization: Sakai Project

Much of this code was originally in EvaluationAction

Version:
$Id: EvaluationListenerUtil.java 1294 2005-08-19 17:22:35Z esmiley@stanford.edu $
Author:
Ed Smiley

Constructor Summary
EvaluationListenerUtil()
           
 
Method Summary
static boolean answerRight(String correctAnswerVar, String answerVar)
          Utility
static String castingNum(double n)
          utility
static String getSortOrder()
          Looks for a command JSF id that has "sortBy" (e.g.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EvaluationListenerUtil

public EvaluationListenerUtil()
Method Detail

getSortOrder

public static String getSortOrder()
Looks for a command JSF id that has "sortBy" (e.g. "sortByAssessmentResultId") and computes the sort property (e.g., as above, "assessmentResultId").

Returns:
String sort field

answerRight

public static boolean answerRight(String correctAnswerVar,
                                  String answerVar)
Utility

Parameters:
correctAnswerVar -
answerVar -
Returns:
true if correct

castingNum

public static String castingNum(double n)
utility

Parameters:
n - a double value
Returns:
a string value