Skip to content

Configuring the authoring player settings

cjshawMIT edited this page Jun 18, 2018 · 2 revisions

For the authoring and player tools, you need to set certain of the settings values to work correctly with your qbank instance. In some cases, these settings require the creation of specific assessment banks in qbank. This page outlines the settings and how to create the corresponding banks / nodes in qbank.

api_url

This is the main qbank URL where you host your instance. It should include the /api/v1 path. This is used for the OEA player that the students use. Example would be:

https://qbank.example.com/api/v1

eid

This is how you can identify each user (author or student). Since this tool does not include an authentication system, you can put the tool behind a separate user management system and grab the username from a session cookie. We do this in some systems, which you can see here:

https://github.com/CLIxIndia-Dev/unplatform_v2/blob/master/scripts/oea_build_config/_head.html#L7-L16

lambda_url

This is the "root" API URL that loads when the page loads, and it asks for the folder hierarchy from qbank. You first need to set up at least one assessment bank in qbank and add it to the hierarchy as a root node.

  1. Create an assessment bank in qbank. Do a POST request to <qbank host>/api/v1/assessment/banks with a JSON payload: {"name": "My root bank", "description": "for testing purposes"}. You should get a new bank object back with an id property.
  2. Using that id, do a POST request to <qbank host>/api/v1/assessment/hierarchies/roots with a JSON payload: {"id": "<id>"}.
  3. Your lambda_url will now be: https://<qbank host>/api/v1/assessment/hierarchies/nodes/<id>/children?display_names&descendants=6

qBankHost

This is the main qbank URL where you host your instance, and used by the authoring tool. It should include the /api/v1 path. Example would be:

https://qbank.example.com/api/v1

assessmentPlayerUrl

For the authoring tool, when you preview an assessment, this is the OEA student tool that is used to render the preview. It should typically be the same version of code that the authoring tool runs -- so it should point to the same instance. If you are running this locally, that might be https://localhost:8888/index.html. For example, if the authoring tool is hosted at:

https://oea.example.com/authoring.html

Then this setting should be:

https://oea.example.com/index.html

editableBankId

For the authoring tool, you need to create an "editable" assessment bank that all the editable assessments are also housed in. There should only be one per qbank system. If an assessment bank exists with genusTypeId == assessment-bank-genus%3Aeditable%40ODL.MIT.EDU, then you should use that bank's ID here.

To create a new editable bank:

  1. Create an assessment bank in qbank. Do a POST request to <qbank host>/api/v1/assessment/banks with a JSON payload: {"name": "Editable bank", "description": "for editable assessments purposes", "genusTypeId": "assessment-bank-genus%3Aeditable%40ODL.MIT.EDU"}. You should get a new bank object back with an id property.
  2. Use that id in the editableBankId field.

To find an existing editable bank:

  1. Fetch all assessment banks, do a GET request to <qbank host>/api/v1/assessment/banks and do a "find" in the browser for assessment-bank-genus%3Aeditable%40ODL.MIT.EDU.

publishedBankId

For the authoring tool, you need to create an "published" assessment bank that all the published assessments are also housed in. There should only be one per qbank system. If an assessment bank exists with genusTypeId == assessment-bank-genus%3Apublished%40ODL.MIT.EDU, then you should use that bank's ID here.

To create a new published bank:

  1. Create an assessment bank in qbank. Do a POST request to <qbank host>/api/v1/assessment/banks with a JSON payload: {"name": "Published bank", "description": "for published assessments purposes", "genusTypeId": "assessment-bank-genus%3Apublished%40ODL.MIT.EDU"}. You should get a new bank object back with an id property.
  2. Use that id in the publishedBankId field.

To find an existing published bank:

  1. Fetch all assessment banks, do a GET request to <qbank host>/api/v1/assessment/banks and do a "find" in the browser for assessment-bank-genus%3Apublished%40ODL.MIT.EDU.

baseEmbedUrl

In the authoring tool, when you generate an iframe embed code this is the OEA student player code that the iframe src will point to, so it should match the target installation host. If you plan to use it locally, then you would use something like https://localhost:8888/oea. If you have a different host, you might need https://oea.example.com/.