DeliveryElementProps
View Sourceoli / Exports / DeliveryElementProps
Interface: DeliveryElementProps<T>
Delivery web component properties made available via the
render method.
Type parameters
| Name | Type |
|---|---|
T | extends ActivityModelSchema |
Table of contents
Properties
Methods
- onReadUserState
- onRequestHint
- onResetActivity
- onResetPart
- onSaveActivity
- onSavePart
- onSubmitActivity
- onSubmitEvaluations
- onSubmitPart
- onWriteUserState
Properties
context
• context: ActivityContext
The larger context that this activity operates within.
Defined in
src/components/activities/DeliveryElement.ts:95
mode
• mode: DeliveryMode
The current delivery mode.
Defined in
src/components/activities/DeliveryElement.ts:100
model
• model: T
The model of the activity, pruned to remove the authoring specific portion.
Defined in
src/components/activities/DeliveryElement.ts:85
mountPoint
• Optional mountPoint: HTMLElement
The HTML div element reference created by the abstract component for use in rendering by the concrete implementation.
Defined in
src/components/activities/DeliveryElement.ts:111
state
• state: ActivityState
The state of the activity and part attempts.
Defined in
src/components/activities/DeliveryElement.ts:90
Methods
onReadUserState
▸ Optional onReadUserState(attemptGuid, partAttemptGuid, payload): Promise<any>
Allows read access to the user state.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partAttemptGuid | string |
payload | any |
Returns
Promise<any>
Defined in
src/components/activities/DeliveryElement.ts:116
onRequestHint
▸ onRequestHint(attemptGuid, partAttemptGuid): Promise<RequestHintResponse>
Requests a hint for a specific part.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partAttemptGuid | string |
Returns
Promise<RequestHintResponse>
Defined in
src/components/activities/DeliveryElement.ts:144
onResetActivity
▸ onResetActivity(attemptGuid): Promise<ResetActivityResponse>
Resets this activity attempt to create a new attempt.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
Returns
Promise<ResetActivityResponse>
Defined in
src/components/activities/DeliveryElement.ts:139
onResetPart
▸ onResetPart(attemptGuid, partAttemptGuid): Promise<PartActivityResponse>
Resets the attempt for one part.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partAttemptGuid | string |
Returns
Promise<PartActivityResponse>
Defined in
src/components/activities/DeliveryElement.ts:167
onSaveActivity
▸ onSaveActivity(attemptGuid, partResponses): Promise<Success>
Initiates saving of the student response for all parts.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partResponses | PartResponse[] |
Returns
Promise<Success>
Defined in
src/components/activities/DeliveryElement.ts:126
onSavePart
▸ onSavePart(attemptGuid, partAttemptGuid, response): Promise<Success>
Saves the state of a specific part.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partAttemptGuid | string |
response | StudentResponse |
Returns
Promise<Success>
Defined in
src/components/activities/DeliveryElement.ts:149
onSubmitActivity
▸ onSubmitActivity(attemptGuid, partResponses): Promise<EvaluationResponse>
Submits all parts of the attempt for evaluation.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partResponses | PartResponse[] |
Returns
Promise<EvaluationResponse>
Defined in
src/components/activities/DeliveryElement.ts:131
onSubmitEvaluations
▸ onSubmitEvaluations(attemptGuid, clientEvaluations): Promise<EvaluationResponse>
Submits client-side evaluations.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
clientEvaluations | ClientEvaluation[] |
Returns
Promise<EvaluationResponse>
Defined in
src/components/activities/DeliveryElement.ts:172
onSubmitPart
▸ onSubmitPart(attemptGuid, partAttemptGuid, response): Promise<EvaluationResponse>
Submits for evaluation one part.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partAttemptGuid | string |
response | StudentResponse |
Returns
Promise<EvaluationResponse>
Defined in
src/components/activities/DeliveryElement.ts:158
onWriteUserState
▸ Optional onWriteUserState(attemptGuid, partAttemptGuid, payload): Promise<any>
Allows writing to the user state.
Parameters
| Name | Type |
|---|---|
attemptGuid | string |
partAttemptGuid | string |
payload | any |
Returns
Promise<any>