---
schema_version: "1"
id: 3e30b72e492a7388916990d7667f08e885fd32c052af571c38e793196365a3dc
title: LearningEvaluation Class
collection: legacydeveloper
version: current
locale: en-us
portal_url: https://docs.salesforce.com/legacydeveloper/current/en-us/apexref/apex_class_sfdc_enablement_LearningEvaluation.md
canonical_url: https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningEvaluation.htm
source_site: developer.salesforce.com
content_type: documentation
content_hash: bbf7d2ee6dfdfa0e2472b54e8d5dfef9d5ae3498e1507955b6cdae071fd4abad
description: Contains methods to retrieve and update details that are required to evaluate a learning item.Retrieves the details associated with the learning evaluation instance.Retrieves the record ID of the learning item that's associated with this learning evaluation instance.Sets or updates the details of the learning item record for this learning evaluation instance.Sets or updates the learning item record ID for this learning evaluation instance.
---
# LearningEvaluation Class

Contains methods to retrieve and update details that are required to evaluate a learning item.

## Namespace

[sfdc\_enablement](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_namespace_sfdc_enablement.htm "The sfdc_enablement namespace provides classes for creating custom learning items to implement custom exercise types in Enablement programs. Lightning web components are used to render the custom exercises on Program Builder.")

## Usage

Pass this class as input to the [sfdc\_enablement.LearningEvaluationResult](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningEvaluationResult.htm#apex_class_sfdc_enablement_LearningEvaluationResult "Represents a user’s progress and progress status of a custom exercise in an Enablement program.") class.

## Example

See example code in [sfdc\_enablement.LearningItemEvaluationHandler](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningItemEvaluationHandler.htm#apex_class_sfdc_enablement_LearningItemEvaluationHandler "Contains methods to customize the evaluation process of a learning item.").

- **[LearningEvaluation Methods](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningEvaluation.htm#apex_sfdc_enablement_LearningEvaluation_methods)**

## LearningEvaluation Methods

The following are methods for LearningEvaluation.

- **[getDetails()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningEvaluation.htm#apex_sfdc_enablement_LearningEvaluation_getDetails)**  
    Retrieves the details associated with the learning evaluation instance.
- **[getLearningItemId()](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningEvaluation.htm#apex_sfdc_enablement_LearningEvaluation_getLearningItemId)**  
    Retrieves the record ID of the learning item that's associated with this learning evaluation instance.
- **[setDetails(details)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningEvaluation.htm#apex_sfdc_enablement_LearningEvaluation_setDetails)**  
    Sets or updates the details of the learning item record for this learning evaluation instance.
- **[setLearningItemId(learningItemId)](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_sfdc_enablement_LearningEvaluation.htm#apex_sfdc_enablement_LearningEvaluation_setLearningItemId)**  
    Sets or updates the learning item record ID for this learning evaluation instance.

### getDetails()

Retrieves the details associated with the learning evaluation instance.

#### Signature

public Map<String,Object> getDetails()

#### Return Value

Type: [Map](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_map.htm#apex_methods_system_map "Contains methods for the Map collection type.")<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type."),[Object](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_Object.htm#apex_class_System_Object "Contains methods that are implemented by all Apex types.")\>

### getLearningItemId()

Retrieves the record ID of the learning item that's associated with this learning evaluation instance.

#### Signature

public String getLearningItemId()

#### Return Value

Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

### setDetails(details)

Sets or updates the details of the learning item record for this learning evaluation instance.

#### Signature

public void setDetails(Map<String,Object> details)

#### Parameters

- **details**:
    
    Type: [Map](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_map.htm#apex_methods_system_map "Contains methods for the Map collection type.")<[String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type."),[Object](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_class_System_Object.htm#apex_class_System_Object "Contains methods that are implemented by all Apex types.")\>
    
    The details of the learning item record that you get by calling [evaluateLearningItem API](https://developer.salesforce.com/docs/platform/lwc/guide/reference-evaluate-learning-item.html).

#### Return Value

Type: void

### setLearningItemId(learningItemId)

Sets or updates the learning item record ID for this learning evaluation instance.

#### Signature

public void setLearningItemId(String learningItemId)

#### Parameters

- **learningItemId**:
    
    Type: [String](https://developer.salesforce.com/docs/atlas.en-us.apexref.meta/apexref/apex_methods_system_string.htm#apex_methods_system_string "Contains methods for the String primitive data type.")

#### Return Value

Type: void