Class TestingFunctions
java.lang.Object
org.deltava.taglib.functions.TestingFunctions
A JSP Function Library to define Testing Center-related functions.
- Since:
- 1.0
- Version:
- 8.0
- Author:
- Luke
-
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
Checks if a question has been answered correctly.static boolean
Checks if a question has been answered incorrectly.static boolean
isCheckRide
(Test t) Checks if a Test is a CheckRide, not an Examination.static boolean
Checks if a Test has been failed.static boolean
Returns whether the question is a multiple-choice question.static boolean
Checks if a Test has been passed.static boolean
Checks if a Test is pending (new or submitted).static boolean
Returns whether the question is a route plotting question.static boolean
isSubmitted
(Test t) Check if a Test is submitted.static boolean
Returns whether this is a Check Ride waiver or initial hire waiver.
-
Method Details
-
isCheckRide
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
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
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
Checks if a question has been answered correctly.- Parameters:
q
- the Question- Returns:
- TRUE if the answer is correct, otherwise FALSE
-
incorrect
Checks if a question has been answered incorrectly.- Parameters:
t
- the Examinationq
- 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
Checks if a Test has been passed.- Parameters:
t
- the Test- Returns:
- TRUE if the test is scored and passed, otherwise FALSE
-
isFail
Checks if a Test has been failed.- Parameters:
t
- the Test- Returns:
- TRUE if the test is scored and not passed, otherwise FALSE
-
isPending
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
Check if a Test is submitted.- Parameters:
t
- the Test- Returns:
- TRUE if the test has been submitted
-
isWaiver
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
-