Note: This release is in preview. Features described here don’t become generally available until the latest general availability date that Salesforce announces for this release. Before then, and where features are noted as beta, pilot, or developer preview, we can’t guarantee general availability within any particular time frame or at all. Make your purchase decisions only on the basis of generally available products and features.

LearningEvaluationResult Class

Represents a user’s progress and progress status of a custom exercise in an Enablement program.

Namespace

sfdc_enablement

Usage

To calculate the user’s progress through an exercise as a percentage and return the progress status, use the sfdc_enablement.LearningEvaluationResult class inside the sfdc_enablement.LearningItemEvaluationHandler. In your custom code, set the percentages to correspond to these sfdc_enablement.LearningItemProgressStatus enum values.

  • NotStarted is equal to 0.00
  • InProgress is from 0.01 through 99.99
  • Completed is equal to 100.00

Example

See example code in sfdc_enablement.LearningItemEvaluationHandler.

LearningEvaluationResult Methods

The following are methods for LearningEvaluationResult.

getLearningItemProgress()

Returns the progress percentage of the learning item.

Signature

public Double getLearningItemProgress()

Return Value

Type: Double

The progress percentage is formatted to two decimal places.

getLearningItemProgressStatus()

Retrieves the progress status of the learning item.

Signature

public sfdc_enablement.LearningItemProgressStatus getLearningItemProgressStatus()

setLearningItemProgress(learningItemProgress)

Sets the progress percentage of the learning item.

Signature

public void setLearningItemProgress(Double learningItemProgress)

Parameters

  • learningItemProgress:

    Type: Double

    The progress in percentage formatted to two decimal places.

Return Value

Type: void

setLearningItemProgressStatus(learningItemProgressStatus)

Sets the progress status of the learning item.

Signature

public void setLearningItemProgressStatus(sfdc_enablement.LearningItemProgressStatus learningItemProgressStatus)

Parameters

Return Value

Type: void