After a user completes a course and is redirected back to us, we display the registration results but they aren’t always accurate. If we go back and pull the registration results again, they are correct. What is going on, and how do we fix it ?
When a course is completed, sometimes the user is redirected to the originating LMS before the registration results are rolled up and persisted in the backend storage for Cloud. Even though the time it takes to store the results is relatively short, we would rather not make the user wait for the rollup and storage to complete before they view their next page. Because of this, calling GetRegistrations to supply the registration results inside the page hosted for the redirect URL can result in old data being displayed instead of the last and most recent results. Following the steps below can prevent this from occurring:
Create a registration include using CreateRegistration and include a postback URL.
Supply the user with the the link back to your LMS/website returned from calling launch using a redirect URL.
If you need to display the user’s results when the user returns to the redirect URL do not call GetRegistrations. Instead, use something like ajax, to provide an asynchronous update on the page by polling for updated registration results against your own system.
When the registration rollup is complete on cloud, the registration results will be posted to the postback URL associated with the registration by step 1.
- At this point you can store the results sent to the postback URL in your system, and any notifications can use the newly stored data. e.g. sending out an email with the score, or the ajax call in step 3 could update the page being displayed to the user with the relevant registration results.
If you have any questions, just send a message to email@example.com