Class TestingFunctions

java.lang.Object
org.deltava.taglib.functions.TestingFunctions

public class TestingFunctions extends Object
A JSP Function Library to define Testing Center-related functions.
Since:
1.0
Version:
8.0
Author:
Luke
  • Method Details

    • isCheckRide

      public static boolean isCheckRide(Test t)
      Checks if a Test is a CheckRide, not an Examination.
      Parameters:
      t - the Test
      Returns:
      TRUE if t is an instanceof CheckRide, otherwise FALSE
    • isMultiChoice

      public static boolean isMultiChoice(Question q)
      Returns whether the question is a multiple-choice question.
      Parameters:
      q - the Question or QuestionProfile bean
      Returns:
      TRUE if the question is multiple-choice, otherwise FALSE
      See Also:
    • isRoutePlot

      public static boolean isRoutePlot(Question q)
      Returns whether the question is a route plotting question.
      Parameters:
      q - the Question or QuestionProfile bean
      Returns:
      TRUE if the question is a route plotting question, otherwise FALSE
      See Also:
    • correct

      public static boolean correct(Question q)
      Checks if a question has been answered correctly.
      Parameters:
      q - the Question
      Returns:
      TRUE if the answer is correct, otherwise FALSE
    • incorrect

      public static boolean incorrect(Test t, Question q)
      Checks if a question has been answered incorrectly.
      Parameters:
      t - the Examination
      q - the Question
      Returns:
      TRUE if the test is scored and answer is not correct, otherwise FALSE
      Throws:
      NullPointerException - if t or q are null
    • isPass

      public static boolean isPass(Test t)
      Checks if a Test has been passed.
      Parameters:
      t - the Test
      Returns:
      TRUE if the test is scored and passed, otherwise FALSE
    • isFail

      public static boolean isFail(Test t)
      Checks if a Test has been failed.
      Parameters:
      t - the Test
      Returns:
      TRUE if the test is scored and not passed, otherwise FALSE
    • isPending

      public static boolean isPending(Test t)
      Checks if a Test is pending (new or submitted).
      Parameters:
      t - the Test - can be null
      Returns:
      TRUE if the Test is Submitted or New
    • isSubmitted

      public static boolean isSubmitted(Test t)
      Check if a Test is submitted.
      Parameters:
      t - the Test
      Returns:
      TRUE if the test has been submitted
    • isWaiver

      public static boolean isWaiver(CheckRide cr)
      Returns whether this is a Check Ride waiver or initial hire waiver.
      Parameters:
      cr - the CheckRide
      Returns:
      TRUE if the Check Ride is an iniital hire waiver or check ride waiver, otherwise FALSE