ClassMarker exam integration
Feeling a bit lost? Have a quick look over the ClassMarker concepts.
The following steps describe how developers can customize ClassMarker exam integration in a website.
Use your own user IDs with ClassMarker
Example:
https://www.classmarker.com/online-test/start?quiz={QUIZ_ID}&cm_user_id=123
You can use your own user IDs for ClassMarker exams by automatically appending value cm_user_id
to the link your users select to take an exam (such as if they are logged on to your website).
cm_user_id
holds the user ID for your system (or any other string you might want to use for tracking purposes). It is an alphanumeric string of up to 100 characters.
You can use the cm_user_id
string to:
- track exam takers from your system by ID (for example,
cm_user_id=123
) - track where a user came from on your website (for example,
cm_user_id=course7
) - track a combination of both (for example,
cm_user_id=123-course7
)
The value is saved with user exam results, so you can view it and export it with exam results in ClassMarker, and retrieve it with webhooks and API requests.
Restrict access by user ID
You can also require that exams can only be taken when a cm_user_id
is supplied, and limit each user to one attempt only per exam in the exam link settings.
Pre-populate user details
GET example
https://www.classmarker.com/online-test/start?quiz={QUIZ_ID}
&cm_fn=John
&cm_ln=Smith
&cm_e=john@example.com
&cm_user_id=123
&cm_access_list_item=456
POST example
<form action="https://www.classmarker.com/online-test/start/" method="post">
<input type="hidden" name="quiz" value="{QUIZ_ID}"/>
<input type="hidden" name="cm_fn" value="John"/>
<input type="hidden" name="cm_ln" value="Smith"/>
<input type="hidden" name="cm_e" value="john@example.com"/>
<input type="hidden" name="cm_user_id" value="123"/>
<input type="hidden" name="cm_access_list_item" value="456"/>
<input type="submit" value="Take your online test"/>
</form>
Embed Exam example
<script src="https://www.classmarker.com/public/js/embed-classmarker-1.0.0.js?quiz={quid_id}&cm_fn=John&cm_ln=Smith&cm_e=john@example.com
&cm_user_id=123&cm_access_list_item=456" data-quiz="{quid_id}" data-width="700" data-height="800" ></script>
When using links for exams, you can send user details to ClassMarker to save them having to fill in their name and email address (should you select to require their details) before they start the exam.
When you assign your exam to a link, you are given the unique link for your exam. This is the link you can send user details to.
Send details using either GET or POST with the following parameter names:
cm_fn
=First name (optional)
cm_ln
=Last name (optional)
cm_e
=Email (optional)
cm_user_id
=123 (optional - see above)
cm_access_list_item
=456 (optional - see below)
Restrict access using access lists
When testing non-registered users directly via a link or by embedding exams within your website, as well as password protecting your exams, you also have the option to restrict user access to your exams by using access lists.
An access list is a list of unique identifiers (for example, email address, employee IDs) that a user must use to access your exams. You can limit how many times each unique identifier can be used per exam. IDs are recorded along with exam results.
You can learn more about access lists here.
Both access list items (cm_access_list_item
) and user IDs (cm_user_id
) values can be exported to Excel format with exam results, date taken, exam duration and IP address.
These methods do not require users to be registered to take your exams, and if using access lists you can batch import identifiers when creating and editing lists.
There are two ways access lists can be used in ClassMarker for taking exams:
- Pass access list items for automatic checking using the method described in Pre-populate user details
- Give exam takers their own access list item (
cm_access_list_item
) to type in when taking the exam
Manage access lists with the ClassMarker API
You can add and remove access list items using the ClassMarker API.
You may want to add an access code to an access list when:
- a new user registers on your website for a course and needs to take their online exam via ClassMarker
- a user passed an exam in ClassMarker, you received their results from the ClassMarker API or webhooks and ou want to give them access to their next exam
- you need to skill test employees on a monthly basis and send them their details with their exam link and new access code
You may want to remove an access code from an access list when:
- a user has left your company
- a user has changed to a different course and is no longer allowed to access certain exams
See the ClassMarker API Access lists endpoint for guidance on automating the process of adding and removing access codes.
Return users and results to your website
ClassMarker lets you set a return link for users to return to your website after they have completed their exam. You can opt to append user details, exam results and duration appended to the return link for you to record in real time on your own website.
Send exam results with return links
Example
https://yourReturnLink?
cm_ts=30.0
cm_tsa=40.0
&cm_tp=75.0
&cm_td=0-12-35
&cm_fn=John
&cm_ln=Smith
&cm_e=john@example.com
&cm_user_id=123
&cm_access_list_item=456
Where:
cm_ts=Test Score (Points scored)
cm_tsa=Test Score Available (Total points available)
cm_tp=Test Percentage
cm_td=Test Duration (0-12-35 = 0h 12m 35s)
cm_fn=first name
cm_ln=last name
cm_e=email address
cm_user_id=123
cm_access_list_item=456
To include a return link with exam results:
- In your ClassMarker account, assign a new exam (or an existing exam) to a link.
- In the Test Completion section, expand Return link, then expand Advanced and check option Append 'Test results' parameters to return link.
Each time a user completes your exam and clicks your return link, the test scores will be sent to your website via the return link.
cm_ts
, cm_tsa
and cm_tp
are given to one decimal place, if applicable, for example 50 or 50.1.
You need to ensure your system will accept a value to 1 decimal place.
For a better approach to passing these parameters in real time, check out our webhooks.
Return custom variables with return links
You can also add your own unique parameters to be returned to you in return links, by adding prefix cm_return_
to parameter names.
For example, cm_return_employee_id
will be returned to you as https://yourreturnURL&cm_return_employee_id=1234
Receive exam results in real time with webhooks
You can set up a script to retrieve exam results in real time using webhooks. You can find more details in the webhooks documentation.
ClassMarker sends exam results securely to your website for you to save in your database and use as required.
Exam results use the cm_user_id
parameter you sent to ClassMarker, so if, for example, this is a user ID from your system, then you know who the exam results belong to.
You can also receive a unique URL to record in your database (one URL per exam result), to allow users to view their test results again in the future. For more details, see View results URL.
Customize your exam branding
You can add your own logos and colors to customize your exams to reflect your own branding.
- In your ClassMarker Account, open Links.
- In the Themes tab, click New Theme.
- Upload a logo image.
- Customize the other display elements including colors, layout, text, and so on.
- Click Save and preview theme.