What this block does
Custom Activity hosts self-contained HTML, CSS, and JavaScript inside a lesson. Use it for a simulation, visualization, or subject-specific practice tool. Activities can save learner progress and provide assessment evidence.
How to use it
- In lesson Edit mode, type /custom and insert Custom Activity.
- Ask CuraAI to generate or refine an activity, or edit its HTML, CSS, and JavaScript yourself.
- Review the source and proposed changes. Try the controls in instructor preview.
- Use Debug activity in the block menu to inspect runtime errors and reported assessment results.
- Set points and assessment behavior, then publish the lesson when the learner workflow is ready.
Save progress
Activity code can read saved state with CuraCourse.getState() and save JSON-serializable progress with CuraCourse.setState(...). Restore controls from that state when the activity loads. Saving progress alone never awards points.
Choose assessment behavior
Set points to 0 for exploration. For formative assessment, activity code can call CuraCourse.submitScore(...). Choose all-or-nothing or partial credit for the block. Client-reported results can be inspected or altered in the browser; use private server rules when the expected answers must remain hidden.
Private server assessment
Choose Server assessment rules in the block menu to configure numeric, literal-choice, or text answers. Submit answers with CuraCourse.submitAnswer(...). Keep expected answers out of the activity HTML. On normal lesson submission, the backend checks submitted answers against the published private rules.
Preview and troubleshooting
Test correct answers, incorrect answers, returning to saved work, and reset. Author preview writes do not become student responses. Hosted activities must be self-contained; use the Embed block for an external website. If an activity fails, inspect the Debug activity panel before publishing.