Skip to main content
Participant
February 20, 2022
Question

Mark attendance using API

  • February 20, 2022
  • 1 reply
  • 190 views

Hi , 

I am trying to mark attendance for given course /module using (https://captivateprime.adobe.com/docs/primeapi/v2/#!/user/post_users_userId_userModuleGrade) . 

 

Trying to use body as below , but hitting error, provided below. Any help is appreciated..

 

{

  "data": {

    "type""userModuleGrade",

    "attributes": {

      "completed"true,

      "dateCompleted""2022-02-20T15:45:00.000Z",

      "dateStarted""2022-02-18T15:45:00.000Z",

      "dateSuccess""2022-02-20T15:45:00.000Z",

      "started"true,

      "success"true

    },

    "relationships": {

      "course": {

        "data": {

          "type""course",

          "id""3166514"

        }

      },

      "learner": {

        "data": {

          "type""user",

          "id""15445312"

        }

      },

      "module": {

        "data": {

          "type""courseModule",

          "id""course:3166514_3601550_8294627_0"

        }

      }

    }

  }

}
 ******************************************************************
 
Hitting below error : 
{
    "status""BAD_REQUEST",
    "title""An internal error occurred",
    "source": {
        "info""There is a discrepancy between input modules and db"
    }
}
 
 
This topic has been closed for replies.

1 reply

Debiprasad Maharana
Adobe Employee
Adobe Employee
May 31, 2022

Hi @Ajeet5FBB,

 

Thank you for contacting Adobe Captivate Prime Team.

 

Could you please try the below changes to the "courseModule" and try again?

 

This is what you have used:

  "module": {
        "data": {
          "type""courseModule",
          "id""course:3166514_3601550_8294627_0"  }}
 
Instead, use this:
  "module": {
        "data": {
          "type""courseModule",
          "id""course:3166514_8294627_0"  }}
 
The format of the ID should be courseid_moduleID_version. We need to remove the instance ID from this value.
I hope this helps. 
 

Kindly let me know if any further assistance is required.
Hope to hear from you soon.

 

Regards,
Debiprasad Maharana
Adobe Inc.