How to create interactive HTML/CSS labs?
Attach to course item
button. Once that is done, click the three dots again and click on “Edit” to edit the lab.Edit
button a new page will open. On this page you need to setup instructions for lab. These instructions would be visible to the user when they’re attempting the lab. Therefore, include all the helper material, lab setup instructions here.
.cdmrc
file, a critical configuration file for Fermion labs. Familiarize yourself with the .cdmrc guide to understand how it works before proceeding.
UNIT_TEST_OUTPUT_FILE
environment, all we have to do is trigger that script via Node.js.
The full path of the script is made available at run-time with another environment variable called TEST_FILE_NAME
. Therefore, all we have to do is write the following in the evaluation script area:
Evaluation
tab, you’ll see another section called “Custom test file”. You can use this test file to add custom code for testing user work.
Test command to run section
inside the evaluation tab we were in earlier.
The point of having a file like this to provide you with a place where you can write your evaluation script.
For HTML/CSS labs, you can use the default test file for playwright: