LessonSession from lessons.start(), the question loop is how your app drives the lesson forward. Call session.next() to get a question, render it, then call session.submit() with the student’s answer.
The basic loop
Fetch a question
session.next() returns the next LessonQuestion, or null when there are no more questions:
id and content.rawXml with QTI XML. Your app is responsible for parsing and rendering this XML.
See the reference for the full type.
Submit an answer
After the student answers, submit their response:correct, the updated score, and whether the lesson is now complete. After each submission, the session’s score and finalized properties update automatically.
See the reference for full parameter and return type documentation.
Adaptive vs linear delivery
The SDK handles two delivery modes transparently. Your code uses the samenext() / submit() loop regardless of mode.
You do not need to detect which mode is active. The
LessonSession handles it based on the
lessonType set during
lessons.start().Adaptive (powerpath-100)
Each next() call hits the server, which asks PowerPath for the next question based on the student’s performance so far. Questions are served one at a time, and difficulty adapts.
Linear (quiz, test-out, etc.)
On the first next() call, the SDK fetches all questions at once and buffers them locally. Subsequent next() calls return from the local buffer without a network round trip. Already-answered questions are skipped automatically.
Track progress during the loop
The session properties update in real time as the student progresses. Usesession.score, session.finalized, and session.lessonType to render progress indicators, score displays, or early-completion UI.
Next steps
Completion
Finalize scoring and interpret results
Reference
Parameters, properties, methods, and return types