Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to set tags #23

Open
RobertBoes opened this issue Sep 28, 2016 · 0 comments
Open

Unable to set tags #23

RobertBoes opened this issue Sep 28, 2016 · 0 comments

Comments

@RobertBoes
Copy link

I'm unable to set the learner tags with the API. The API gives a OK response (<rsp stat="ok"><success /></rsp>), but the tags are not set in the SCORM cloud environment. I'm using the (pseudo) code below:

// Setup SCORM API
$scormService = new ScormEngineService(
  'http://cloud.scorm.com/EngineWebServices',
  $scormCloudAppId,
  $scormCloudSecretKey,
  $scormCloudOrigin
);

$invitationService = $scormService->getInvitationService();
$taggingService = $scormService->getTaggingService();
$registrationService = $scormService->getRegistrationService();

// Some variables
$email = '[email protected]';
...
$lastname = 'example';

// Create invite and update the registration
$response = $invitationService->CreateInvitation($courseId, 'false', 'true', $email, $emailSubject, $body, $creatingUserEmail);
$response = $registrationService->UpdateLearnerInfo($email, $firstname, $lastname);

// Adding a tag and echo if the status was OK
$response = $taggingService->AddLearnerTag($email, 'some,tags');
$xml = new SimpleXMLElement($response);
if (isset($xml['stat']) && $xml['stat'] == 'ok') {
    echo 'Tags added';
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant