My Learning is a personalized dashboard where the user can easily access all enrolled courses, track their progress, view upcoming events, check social activity and earned rewards. It serves as a main page to stay organized and motivated on the learning journey. Here is an example of My Learning interface that is implemented using Opigno Enterprise API: My learning Let’s check more precisely what queries were used to build this page.

”Trainings passed” block

The block represents the number of the trainings that were successfully completed by the current user. The main query to work with training listings is getCatalogData that can be modified with the filters.
  query getCatalogData {
    getCatalogData(first: 1, filters: [{key: "filter_status", value: ["PASSED"]}]) {
      totalItems
    }
  }
Different filters can be combined in getCatalogData query to achieve different goals. For example, to get all trainings that were started or ever finished by the user, you should use the same filter_status with the following combination of values: ["IN_PROGRESS", "COMPLETED", "EXPIRED"].
Another example of the same query usage is “Trainings in progress” block.

”Trainings in progress” block

The block contains the list of trainings that were started by the current API user, but not finished yet.
  query getCatalogData {
    getCatalogData(first: 3, filters: [{key: "filter_status", value: ["IN_PROGRESS"]}]) {
      edges {
        node {
          cta {
            actionId
            title
            arguments {
              key
              value
            }
            metadata {
              key
              value
            }
          }
          modulesNumber
          activitiesNumber
          training {
            title
            attempt {
              metrics {
                progress
              }
            }
          }
        }
      }
    }
  }
In the example above a progress for the second training (“Advanced training 1”) is 100%, but it’s still in status “In progress”. This is ok, because the training contains not attended live sessions.

”Your connections” block

This block is a part of Opigno social features and shows the number of user connections is the current user’s network. To retrieve this information, getUserConnectionsNetwork should be used:
  query getUserConnectionsNetwork {
    getUserConnectionsNetwork(first: 1) {
      totalItems
    }
  }

“Recent posts” block

Another block that is the part of Opigno social features. It represents the list of the newest posts that were created by the current user or other users from the network. To get this data, getPostsFeed query should be used:
  query getPostsFeed {
    getPostsFeed(first: 4) {
      edges {
        node {
          text
          created
            authorUserContext {
              uuid
            }
          }
        }
      }
    }