Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
Copyright © 2008-16
Restrictions: This document contains confidential information that is protected by copyright; it is intended for
restricted use only, it is not to be disclosed to a third party. All rights reserved. No part of this document may be
photocopied or reproduced in any way without the prior written permission of the authors. The information contained
in this document is subject to change without notice. Authors make no warranty of any kind with regard to this
document. Authors shall not be liable for errors or omissions contained herein or for incidental or consequential
damages in connection with the use of this document.
1.1 Scope
This document contains the specifications for integrating your website with ExpertRating’s
testing engine for the purpose of providing seamless, custom-branded testing with SSO to
your test takers. The name of this solution is ExpertRating ITS.
You may suggest changes to the integration scheme, which can be incorporated after
mutual discussion and approval.
Sentences in orange colored text require follow-up/discussion/exchange of information.
Before allowing access to the production server, ExpertRating will set up the test engine
on a development server. Access to the production server will be given a few days prior
to launch of live testing. The Testing Service Agreement between your company and
ExpertRating must be signed prior to accessing the production server.
As a mandatory requirement, the landing page, test pages, result page and feedback
page (hosted on ExpertRating) must have the tag line “Powered by ExpertRating”
displayed in the footer.
3 Overview and Example of ITS
1. How to generate a testing ticket and how to pass on the user to the test engine from
your site.
2. How to capture the result of a candidate when the test engine posts it back to your
site at the end of the test.
3. How to call the various web service APIs for facilitating test administration.
1. Assume you own a website and you want your users to take some tests. Users can either
sign up on your site to take any test of their choice or you can invite certain users (by sending
out emails or otherwise) to take tests.
2. After registering/logging in to your site, a user browses through the list of available tests.
This list is hosted on your site, not on ExpertRating.
3. After selecting a test from the list, say the Excel test, the user clicks on the ‘Take Test’
button on your site. At this point of time, your server will send a request to the ExpertRating
server specifying the user id, the test id and some other information. In response, the
ExpertRating server will return a link for the test start page ( called the landing page.)
Thereafter, your server will forward the user to the landing page.
4. When the user reaches the landing page, the ExpertRating testing engine loads up the
Syllabus and Instructions of the Excel test.
5. After going through the instructions and syllabus, the user proceeds to take the test.
6. At the end of the test, the result page is displayed (optional.) At this time, the ExpertRating
server posts the test result to your server using JSON over HTTP.
7. Before exiting the testing system, the user is asked to provide optional feedback. This
feedback is posted to your server using JSON over HTTP.
8. Having completed the test, the user clicks a link that points to a page on your site (called
the return URL). Upon clicking the link, the user exits the testing system and lands on the
return URL. Thereafter, he/she can carry on browsing your site.
Notes:
1. To prevent the possibility of users tinkering with data, the landing page URL will
contain an encrypted authentication ticket.
2. All pages hosted on ExpertRating (test page, result page, feedback page, instructions
page) will follow the color scheme and branding of your website. The only compliance
requirement is that the ‘Powered by ExpertRating’ tag line is to be displayed in the
footer of all the pages hosted by ExpertRating.
3. ExpertRating will provide a GetTestList web service API that returns the complete list
of tests along with test Id, syllabus, time duration, passing score etc. You can call this
API to pull the aforementioned data and store it in your database and to display the
list of tests. You are advised to call this API at least once a month in order to refresh
the data in their database. The specs for this and other APIs are given in later
sections of this document.
4. Some programming will be required at your end (ExpertRating’s technical team will
be available for assistance). The three major aspects of programming are:
a) Sending a request to the ExpertRating server for generating a landing page URL,
capturing the response and redirecting the user to this URL.
b) Writing a page that accepts the result post from the ExpertRating server. A similar
page is required for accepting the feedback post (involves server-side scripting
and JSON.)
c) Calling the webservice APIs and collecting the data returned by them (involves
server-side scripting and JSON.)
4 Landing Page & Ticket Generation
4.1 Overview
The landing page is the page on the ExpertRating server where the user lands for taking a
test. Before sending the user to the landing page, you must send a request to the
ExpertRating server. In response, the ExpertRating server will return the landing page URL to
your server. Your server should then redirect the user to this URL. This process has to be
carried out each time before a user starts a test. The URL contains an encrypted ticket which
is used to authenticate the user when he or she lands on ExpertRating
In response, the ExpertRating server will return the test taking URL, which will look something
like this:
http://www.expertrating.com/your_site_name/?ticket=
adfinoidfhdfnsdfnoihoweirhqwdnd2394yuhealsnkxc234rwef45324fvsdf2
The ticket parameter contains all the fields of the request string in encrypted format, along
with a timestamp. Once your server captures the above URL, you are meant to forward the
test taker to it.
Important notes:
o The test engine will initially be deployed on ExpertRating's development server and
will be ported to a production server once the integration programming is complete in
all respects
o Sample code for generating requests and capturing the responses is available in
PHP, ASP.NET and Ruby
o ExpertRating will send you your partnerid and password before starting the
integration programming.
o ExpertRating technical staff can assist and guide your team throughout the
integration process
o The landing page URL can be masked so that it appears to the user that he or she
hasn't left your site.
Example:
http://www.expertrating.com/your_site_name/?ticket=
adfinoidfhdfnsdfnoihoweirhqwdnd2394yuhealsnkxc234rwef45324fvsdf2&debug=1
In development mode, at the end of the test, the results will be posted (JSON over
HTTP) to your development server, rather than your production server.
In development mode, at the end of the tests, the feedback will be posted (JSON over
HTTP) to your development server, rather than your production server.
The development mode feature will continue to be available after the launch of live
testing. Tests taken in development mode will not be billed.
Example:
http://www.expertrating.com/your_site_name/?ticket=
adfinoidfhdfnsdfnoihoweirhqwdnd2394yuhealsnkxc234rwef45324fvsdf2&dev=1
4.5 Landing Page Reuse Mode
Ordinarily a ticket in the landing page URL can only be used once, after which it gets
invalidated. For subsequent test attempts, a fresh URL (containing a fresh ticket) has to be
generated each time. However, if you wish to generate a reusable URL for debugging or QA
purposes, you can do so by passing reuse=1 in the request string. Reusable tickets don't
carry an expiry date.
Example:
http://www.expertrating.com/your_site_name/?ticket=
adfinoidfhdfnsdfnoihoweirhqwdnd2394yuhealsnkxc234rwef45324fvsdf2&reuse=1
The max_retries parameter is used to give leeway to test takers- if max_retiries is set to 0, the
very first violation will result in the test session being terminated. If max_retries is set to 1, the
first violation will result in a warning and the second violation will result in termination.
Max_retries can take values from 0 to 20.
Given below are some scenarios of how the tickets will be used on the ExpertRating server
for validation:
1. If the user tries to start a test with a fresh ticket (one which hasn't been used
previously), the ExpertRating server will allow the test to start.
2. If a user tries to start a test using a ticket that has already been used previously, the
ExpertRating server will not allow the test to start and will display the ‘Ticket has
already been used’ message to the screen.
3. A user starts a test, leaves it midway, goes back to your site with the intention of
resuming the same test and gets a fresh ticket. In this case, the ExpertRating server
will allow the test to resume from the same point where the user had left off provided
the attempt to resume is made within 60 minutes of originally starting the test. If 60
minutes have elapsed, the test will be cancelled.
4. If a user has completed a test (pass or fail), he will not be allowed to re-take the same
test for a period of 24 hours (or some other timeframe, as per your re-take policy).
Note that if a user simply comes to the landing page and goes back your site but
doesn’t actually start the test, he or she will not be required to wait for 24 hours to
take the same test.
5. Suppose a user saves the landing page URL for later use. A ‘Ticket Expired’ error will
be generated if the ticket is more than 60 minutes old and the user will not be allowed
to start the test. If its less than 60 minutes old, the test will be allowed to start.
6. If the ticket is malformed in any way and fails to decrypt, an appropriate message will
be shown on the screen. See section 11 for error codes and messages.
http://www.expertrating.com/your_site_name/?ticket=
adfinoidfhdfnsdfnoihoweirhqwdnd2394yuhealsnkxc234rwef45324fvsdf2&debug=1&reuse=1&
dev=1
5 PostBack Specifications (SubmitUserTestResult API)
5.1 Overview
When a user completes his/her test, the result will be posted to your server. PostBack will be
done using JSON over HTTP.
HTTP Post method will be used for the post back and JSON data will be posted. Your server
should return a JSON response informing ExpertRating whether the post back was a success
or a failure.
{
"request": {
"authentication": {
"password": "",
"partnerid": ""
},
"method": {
"name": "SubmitUserTestResult",
"parameters": [{
"name": "user_id",
"value": "42511"
}, {
"name": "transcript_id",
"value": "4234232"
}, {
"name": "test_id",
"value": "231"
}, {
"name": "test_name",
"value": "ASP 3.0 Test"
}, {
"name": "percentage",
"value": "75"
}, {
"name": "percentile",
"value": "60"
}, {
"name": "average_score",
"value": "50"
}, {
"name": "test_result",
"value": "PASS"
}, {
"name": "time",
"value": "2006-04-19T14:05:11Z"
}]
}
}
}
Before inserting the results in to its database, you should perform the following:
Ensure that the authentication partnerid and password are correct. The actual
partnerid and password will be communicated to you separately. The partnerid and
password are required in all APIs described in this document.
Ensure that the post is coming from the ExpertRating server IP address range.
Ensure that the transcript_id doesn’t already exist in your database. If the
transcript_id already exists, it signifies a duplicate post. In such a case, the data in
the current post should be ignored.
Check if the user_id belongs to a valid user. If it doesn’t, then the post should be
ignored and an error should be returned.
{
"response": {
"info": {
"success": "",
"transcript_id": "",
"error": ""
}
}
}
{
"response": {
"info": {
"success": "0",
"transcript_id": "34234223",
"error": "Incorrect user_id"
}
}
}
In case of a failed post back, the ExpertRating server will log the post back details and add
them to a queue. The ExpertRating server will process the queue on an hourly basis (24
times a day). Postings that still remain stuck will be logged for manual investigation and
subsequent re-posting.
In case your server receives a duplicate post (a test result which had already been received
earlier), it should respond as follows:
{
"response": {
"info": {
"success": "1",
"transcript_id": "34234223"
}
}
}
6 Posting of Feedback Form data (SubmitUserTestFeedback
API)
6.1 Overview
A feedback form is provided at the end of the test to allow test takers to rate the quality of the
test and to suggest improvements. The feedback collected via the form will be posted your
server using a technique similar to the result posting described in the previous section.
POST method will be used and JSON data will be posted. Your server will return a JSON
response informing ExpertRating whether the posting was a success or a failure.
The test feedback will be posted to your server as per the following example:
{
"request": {
"authentication": {
"password": "",
"partnerid": ""
},
"method": {
"name": "SubmitUserTestFeedback",
"parameters": [{
"name": "transcript_id",
"value": "1384111"
}, {
"name": "test_id",
"value": "34"
}, {
"name": "user_id",
"value": "42511"
}, {
"name": "time",
"value": "2007-09-25T06:32:13Z"
}, {
"name": "content_rating",
"value": "3"
}, {
"name": "content_comments",
"value": "Its+great%2Enot+bad%2E%2E%2E
%2Equite+okay"
}, {
"name": "procedure_rating",
"value": "4"
}, {
"name": "procedure_comments",
"value": "Test+procedure%2C+format%2C+performance
%2C+and%0D%0Ageneral+usability%2E%2E%2Eall+these+parameters+are+fine%2E"
}, {
"name": "errors_found",
"value": "no"
}, {
"name": "errors_details",
"value": "no%2E%2E%2E"
}]
}
}
}
6.5 Responding to the Test Feedback Post
When your server receives the test feedback post, it should respond with a JSON stream as
follows:
{
"response": {
"info": {
"success": "",
"transcript_id": "",
"error": ""
}
}
}
{
"response": {
"info": {
"success": "1",
"transcript_id": "42511"
}
}
}
{
"response": {
"info": {
"success": "0",
"transcript_id": "45531",
"error": "Incorrect user_id"
}
}
}
7 Specification of the GetTestList API
7.1 Overview
The GetTestList API is provided so that you can populate your database with the list of
available tests (test_id, test_name, total_questions, coverage, duration, passing_marks and
category). Note that all APIs return a stream of JSON data and they are all to be called
by passing a JSON data request in the form of an HTTP Post. Only requests from your
server IP addresses will be accepted (range of IP addresses to be provided by you)
{
"request": {
"authentication": {
"password": "",
"partnerid": ""
},
"method": {
"name": "GetTestList"
}
}
}
{
"response": {
"result": {
"name": "GetTestList",
"records": [{
"test_id": 0,
"test_name": "",
"coverage": "",
"total_questions": 0,
"duration": 0,
"passing_marks": 0,
"category": ""
}]
}
}
}
{
"response": {
"result": {
"name": "GetTestList",
"records": [{
"test_id": 202,
"test_name": "ADO.NET 2003",
"coverage": "...",
"total_questions": 40,
"duration": 40,
"passing_marks": 60,
"category": "..."
}, {
"test_id": 124,
"test_name": "ASP.Net",
"coverage": "...",
"total_questions": 30,
"duration": 40,
"passing_marks": 60,
"category": "..."
}, {
"test_id": 1143,
"test_name": "PHP 5",
"coverage": "...",
"total_questions": 10,
"duration": 10,
"passing_marks": 60,
"category": "..."
}]
}
}
}
8 Specification of the GetWebAccessLog API
8.1 Overview
The GetWebAccessLog API is provided so that you can view visitor data. The API accepts a
date range and returns the list of visitors coming from your site to ExpertRating between the
dates.
{
"request": {
"authentication": {
"password": "",
"partnerid": ""
},
"method": {
"name": "GetWebAccessLog",
"parameters": [{
"name": "from_date",
"value": "2006-04-19T00:00:00Z"
}, {
"name": "to_date",
"value": "2006-04-19T23:59:59Z"
}, {
"name": "errorsonly",
"value": "1"
}, {
"name": "user_id",
"value": "1243121"
}]
}
}
}
If the user_id element is not present, then access records for all users will be returned.
If the errorsonly parameter has a value of 1 then only error records will be returned.
Otherwise if it has a value of 0 or if the parameter is omitted from the JSON request, all rows
will be returned (error as well as without-error).
9.1 Overview
The GetUserTestInfo API is provided so that you can fetch the test results of any user on the
basis of user_id. The API accepts the user_id and returns all the test results of the specified
user.
{
"request": {
"authentication": {
"password": "",
"partnerid": ""
},
"method": {
"name": "GetUserTestInfo",
"parameters": [{
"name": "user_id",
"value": "42511"
}]
}
}
}
{
"response": {
"result": {
"name": "GetUserTestInfo",
"records": [{
"record": [{
"name": "user_id",
"value": ""
}, {
"name": "transcript_id",
"value": ""
}, {
"name": "test_id",
"value": ""
}, {
"name": "test_name",
"value": ""
}, {
"name": "percentage",
"value": ""
}, {
"name": "percentile",
"value": ""
}, {
"name": "average_score",
"value": ""
}, {
"name": "test_result",
"value": ""
}, {
"name": "time",
"value": ""
}]
}]
}
}
}
{
"response": {
"result": {
"name": "GetUserTestInfo",
"records": [{
"record": [{
"name": "user_id",
"value": "1243121"
}, {
"name": "transcript_id",
"value": "4234232"
}, {
"name": "test_id",
"value": "231"
}, {
"name": "test_name",
"value": "ASP 3.0 Test"
}, {
"name": "percentage",
"value": "75"
}, {
"name": "percentile",
"value": "81"
}, {
"name": "average_score",
"value": "9"
}, {
"name": "test_result",
"value": "PASS"
}, {
"name": "time",
"value": "2006-04-19T14:05:11Z"
}]
}, {
"record": [{
"name": "user_id",
"value": "1243121"
}, {
"name": "transcript_id",
"value": "423231"
}, {
"name": "test_id",
"value": "551"
}, {
"name": "test_name",
"value": "PHP 5 Test"
}, {
"name": "percentage",
"value": "31"
}, {
"name": "percentile",
"value": "1"
}, {
"name": "average_score",
"value": "9"
}, {
"name": "test_result",
"value": "FAIL"
}, {
"name": "time",
"value": "2006-04-19T14:05:11Z"
}]
}]
}
}
}
10 Specification of the GetAllUserTestsInfo API
10.1 Overview
The GetAllUserTestsInfo API is provided so that you can fetch the test results of all your users
based on a date range. The API accepts a date range and returns all the test results of all
users for tests taken between the given dates.
{
"request": {
"authentication": {
"password": "",
"partnerid": ""
},
"method": {
"name": "GetAllUserTestsInfo",
"parameters": [{
"name": "from_date",
"value": "2006-04-19T00:00:00Z"
}, {
"name": "to_date",
"value": "2006-04-19T23:59:59Z"
}]
}
}
}
{
"response": {
"result": {
"name": "GetAllUserTestsInfo",
"records": [{
"record": [{
"name": "user_id",
"value": ""
}, {
"name": "transcript_id",
"value": ""
}, {
"name": "test_id",
"value": ""
}, {
"name": "test_name",
"value": ""
}, {
"name": "percentage",
"value": ""
}, {
"name": "percentile",
"value": ""
}, {
"name": "average_score",
"value": "7"
}, {
"name": "test_result",
"value": ""
}, {
"name": "time",
"value": ""
}]
}]
}
}
}
{
"response": {
"result": {
"name": "GetAllUserTestsInfo",
"records": [{
"record": [{
"name": "user_id",
"value": "ASPGuru10"
}, {
"name": "transcript_id",
"value": "4234232"
}, {
"name": "test_id",
"value": "231"
}, {
"name": "test_name",
"value": "ASP 3.0 Test"
}, {
"name": "percentage",
"value": "75"
}, {
"name": "percentile",
"value": "60"
}, {
"name": "average_score",
"value": "7"
}, {
"name": "test_result",
"value": "PASS"
}, {
"name": "time",
"value": "2006-04-19T14:05:11Z"
}]
}, {
"record": [{
"name": "user_id",
"value": "PHPBoss"
}, {
"name": "transcript_id",
"value": "343231"
}, {
"name": "test_id",
"value": "251"
}, {
"name": "test_name",
"value": "MySQL Test"
}, {
"name": "percentage",
"value": "41"
}, {
"name": "percentile",
"value": "1"
}, {
"name": "average_score",
"value": "7"
}, {
"name": "test_result",
"value": "FAIL"
}, {
"name": "time",
"value": "2006-04-19T14:05:11Z"
}]
}]
}
}
}
11 Specification of the GetProctoringImages API
11.1 Overview
The GetProctoringImages API is provided so that you can fetch the webcam images that have
been captured during a proctored test. The API accepts the transcriptid of the test attempt
and retirns the download link to the image files.
{
"request": {
"authentication": {
"password": "",
"partnerid": ""
},
"method": {
"name": "GetProctoringImages",
"parameters": [{
"name": "Transcriptid",
"value": "123456"
}]
}
}
}
{
"response": {
"result": {
"name": "GetProctoringImages",
"records": [{
"transcriptid": "860934",
"zipfile":
"http://www.expertrating.com/partner_site_name/Reports/GetImgResponse.aspx?
data=5zqfA3JHh8t7EOaNZZ1DXaJdS0DQOsA93erfsUOqGgA=",
"pdffile":
"http://www.expertrating.com/partner_site_name/Reports/GetImgResponse.aspx?
data=HnVPzJPqQll7EOaNZZ1DXaJdS0DQOsA93erfsUOqGgA="
}]
}
}
}
12 Landing Page Errors
In each of these cases, an appropriate message will be displayed to the user along with a link
to return to your site.