-
public final class CfLogExamEvent.BuilderCfLogExamEvent is required to log actions related to e-learning module exams. which includes the related to starting, retaking, reviewing and submit the exam. BsLogExamEvent also updates the user level if they achieved a milestone.
-
-
Field Summary
Fields Modifier and Type Field Description private StringexamIdValueprivate StringactionValueprivate IntegerdurationValueprivate FloatscoreValueprivate BooleanisPassedValue
-
Method Summary
Modifier and Type Method Description final StringgetExamIdValue()final UnitsetExamIdValue(String examIdValue)final StringgetActionValue()final UnitsetActionValue(String actionValue)final IntegergetDurationValue()final UnitsetDurationValue(Integer durationValue)final FloatgetScoreValue()final UnitsetScoreValue(Float scoreValue)final BooleangetIsPassedValue()final UnitsetIsPassedValue(Boolean isPassedValue)final <ERROR CLASS>setExamId(String examId)setExamId is required to log examId for the Exam on which user is performing actions. final <ERROR CLASS>setExamAction(ExamAction action)setExamAction is required to set the Action type for the Exam event. final <ERROR CLASS>setExamAction(String action)setExamAction is required to set the Action type for the Exam event. final <ERROR CLASS>setDuration(Integer duration)setDuration is required to log the duration (time elapsed) by the user to complete the exam. final <ERROR CLASS>setScore(Float score)setScore is required if there is some score provided ot the user in result of the exam submitted. final <ERROR CLASS>isPassed(Boolean isPassed)isPassed is required if the user passed or failed the exam. final <ERROR CLASS>setMeta(Object meta)You can pass any type of value in setMeta. final <ERROR CLASS>updateImmediately(Boolean updateImmediately)updateImmediately is responsible for updating the values ot the backend immediately. final <ERROR CLASS>build()build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources. -
-
Method Detail
-
getExamIdValue
final String getExamIdValue()
-
setExamIdValue
final Unit setExamIdValue(String examIdValue)
-
getActionValue
final String getActionValue()
-
setActionValue
final Unit setActionValue(String actionValue)
-
getDurationValue
final Integer getDurationValue()
-
setDurationValue
final Unit setDurationValue(Integer durationValue)
-
getScoreValue
final Float getScoreValue()
-
setScoreValue
final Unit setScoreValue(Float scoreValue)
-
getIsPassedValue
final Boolean getIsPassedValue()
-
setIsPassedValue
final Unit setIsPassedValue(Boolean isPassedValue)
-
setExamId
final <ERROR CLASS> setExamId(String examId)
setExamId is required to log examId for the Exam on which user is performing actions. Exam Id should be in a string format and must be in accordance to the catalog provided.
-
setExamAction
final <ERROR CLASS> setExamAction(ExamAction action)
setExamAction is required to set the Action type for the Exam event. SDK provides enum classes to support available log types. 3 main are start, submit and result. SDK provides 2 approaches to log this event, one being enum type and the other is string type. Below is the function to log type using enum.
-
setExamAction
final <ERROR CLASS> setExamAction(String action)
setExamAction is required to set the Action type for the Exam event. SDK provides enum classes to support available log types. 3 main are start, submit and result. SDK provides 2 approaches to log this event, one being enum type and the other is string type. Below is the function to log type using string. Remember to note that values provided using string should be the same as provided in enum or else the events will be discarded.
-
setDuration
final <ERROR CLASS> setDuration(Integer duration)
setDuration is required to log the duration (time elapsed) by the user to complete the exam. Duration should be in Seconds. This is required in case of examAction been submit.
-
setScore
final <ERROR CLASS> setScore(Float score)
setScore is required if there is some score provided ot the user in result of the exam submitted. This is required in case of examAction been result.
-
isPassed
final <ERROR CLASS> isPassed(Boolean isPassed)
isPassed is required if the user passed or failed the exam. This log is required only in case when examAction is result
-
setMeta
final <ERROR CLASS> setMeta(Object meta)
You can pass any type of value in setMeta. It is for developer and partners to log additional information with the log that they find would be helpful for logging and providing more context to the log. Default value for the meta is null.
-
updateImmediately
final <ERROR CLASS> updateImmediately(Boolean updateImmediately)
updateImmediately is responsible for updating the values ot the backend immediately. By default this is set to false or whatever the developer has set in the SDK initialisation block. This differs the time for which the logs will be logged, if true, the SDK will log the content instantly and if false it will wait till the end of user session which is whenever the app goes into background.
-
build
final <ERROR CLASS> build()
build will validate all of the values provided and if passes will call the track function and queue the events based on it's updateImmediately value and also on the user's network resources.
-
-
-
-