Assessment publishing refers to the way your assessment is made available to respondentss. The way your assessment is published is set when you are creating your assessment. When creating your assessment you are asked the question "How will candidates or respondents access the assessment?". For more details on creating assessment please see Creating Assessments in the Help.

You can change the way your assessments are published by going to:
Edit Assessment -> Assessment Settings -> Publish Settings.

After results exist for an assessment you cannot change the way the assessment is published.

There are 3 main ways your assessment can be published.

Public or Restricted

Your respondents come to our site with a general assessment ID. This ID is unique to your assessment and users can enter it on our site after clicking the Take Assessment button or link. You have the option of adding a general password for the assessment (this password is the same for all users). When a password is added the assessment access is restricted.

Alternatively you can a use a public link that respondents can click on to access the assessment. This link is unique to your assessment. This can be included on your web site or blog or a social network site such as Facebook, LinkedIn.

You can also integrate your assessment into your web site using the Brainsbuilder JavaScript API (see below).

Key Features of Public Assessments
Public assessment are linked by a hyperlink (URL), or seamlessly integrated into your site using the JavaScript API (see below) or users can come to the Brainsbuilder site to take the assessment.
If respondents come to the Brainsbuilder site to take the assessment they use a unique assessment ID.
You can provide optional password which is the same for all users who access the assessment (restricted assessment).

Private Email

Send an email invite. This email is sent to a list of invited people. In the email a there is a link that is clicked to access the assessment.

Key Features of Private Email Assessments
Each user is sent an email invite to take the assessment with a unique link.
You can set how many times a person can retake the assessment using the link.
By default assessment can only be taken once, unless you allow multiple retakes.
When respondents take an assessment it can be paused and resumed.
Respondent emails can be added automatically by accessing our Private Publishing Remote API (see below)

Private Password

Your respondents come to our site our site with a general assessment ID. This ID is unique to your assessment and users can enter it on our site after clicking the Take Assessment button or link. Additionally each person has a unique password, ID or email address which can be used to access the assessment. With private password access you can set the amount of times the assessment can be re-taken. Private password assessments can also be paused and resumed

Key Features of Private Password Assessments
Users must come to our site to take the assessment with a general assessment ID.
In addition each user has a unique ID or password that he/she uses to take the assessment. Any unique ID can be used, for example email address, employee ID, student number etc
You can set how many times a person can retake the assessment using the unique ID or password.
By default retakes are not limited, but you can restrict retakes.
When respondents take an assessment it can be paused and resumed.
Respondent unique IDs or passwords can be added automatically by accessing the Private Publishing Remote API (see below).

JavaScript Library

The Brainsbuilder JavaScript library allows developers and web page publishers to seamlessly and easily include your quiz directly into your web page or web application using only a few lines of code.

For the Brainsbuilder JavaScript library include the script:

<script src="https://www.brainsbuilder.com/js-quiz-lib/quiz.min.js"></script>

Before you start using the JavaScript quiz library you will first need your assessment accessToken. You can get your accessToken on the Publish screen.

Use the below code to embed your assessment into your web page.

If you are using ES6+ and your accessToken is for example Abcd1234:


let ready = (callback) => {
	if (document.readyState != "loading") callback();
	else document.addEventListener("DOMContentLoaded", callback);
}

ready(() => {
	let assessToken = 'Abcd1234';  
	quizMain.quizInit(assessToken, '#quiz-app'); 
});
		

If you are using jQuery you can also use the following code:


$(document).ready(function() {
	var assessToken = 'Abcd1234';  
	quizMain.quizInit(assessToken, '#quiz-app'); 
});
	    

Include the assessment container div with a unique ID should and this ID should be passed into the passed into the quizInit function and this container should be present in the HTML document where you want to display the assessment.

<div id="quiz-app" />

When using the JavaScript library the CSS for the quiz also needs to be included in the page. The for the starting point of the quiz CSS you should use the CSS detailed in Templating section of the help subjects and the amend the CSSS to suit your needs.


Private Publishing Remote API (Application Programming Interface)

The Private Publishing Remote API is a standard REST API. It allows the publishing private email and private password access to assessments and getting the final score via a remote API (Application Programming Interface).

To use it you first need to generate Publish API Key. This is unique for every assessment and must be generated for each assessment that you would like to use with the API.

To obtain the Publish API Key for the assessment go to Edit Assessment -> Assessment Settings. On the Assessment Settings screen scroll down to the Publish Settings pane.

The following URL details are to add private emails or password:

END POINT URL: https://www.brainsbuilder.com/api/no-auth/publish/add
METHOD: POST

The following details are to get the score:

END POINT URL: https://www.brainsbuilder.com/api/no-auth/publish/score
METHOD: GET

Both end point URLs must have a HEADER named assessmentkey which has a value of the Publish API Key. This is used to authenticate the request.

Both these end point URLs also take the URL parameters account which is the account login email address and emailorlogin which is the private email address or private password (login).

Also both these end points will points will return a success or failure response. Where data is returned this is in the data field of the response.