Skip to main content
The Opigno Enterprise API allows administrators to control access to a specific training by defining Training Prerequisites conditions. These conditions ensure that a learner can only access the training after successfully completing one or more designated prerequisite trainings. By configuring prerequisites, administrators can specify the condition type that defines which trainings must be completed before a training is made accessible to the user.

Data Structure

TrainingPrerequisite

Represents a conditions preset to be met by user context for training application.
FieldTypeDescription
conditionTypeTrainingPrerequisitesConditionType!The condition type.
conditionFormulaExpressionString!The logical expression formula to be met for accessing the Learning Path. Represented by list of LP’s ids separated by logical operators such as: AND, OR.
learningPaths[LearningPath]List of referenced LearningPath objects to be considered for prerequisites conditions.
conditionPassedBoolean!Indicates whether the current user context is passed the prerequisites condition for the Learning Path.

TrainingPrerequisitesConditionType

The TrainingPrerequisitesConditionType enum defines the possible variant of training prerequisites condition types
Condition typeDescription
ANDAll the listed Learning Paths in the prerequisites section should be successfully passed.
ORAt least one Learning Paths from listed references in the prerequisites section should be successfully passed.
CUSTOMThe list of required Learning Paths to be passed is defined by custom condition formula expression.

Queries

The training prerequisites can be accessed by any LearningPass object with trainingPrerequisites field:
query getLearningPath {
  getLearningPath(lpId: 60) {
    training {
      title
    }
    trainingPrerequisites {
      conditionType
      conditionFormulaExpression
      conditionPassed
      learningPaths {
        id
        training {
          title
        }
      }
    }
  }
}
  • You must have AUTHENTICATED scope to access prerequisites. Anonymous users cannot retrieve this data.
  • The API user context must be present and valid - otherwise, training prerequisites data won’t be presented.