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:101
mode
• mode: DeliveryMode
The current delivery mode.
Defined in
src/components/activities/DeliveryElement.ts:106
model
• model: T
The model of the activity, pruned to remove the authoring specific portion.
Defined in
src/components/activities/DeliveryElement.ts:91
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:117
state
• state: ActivityState
The state of the activity and part attempts.
Defined in
src/components/activities/DeliveryElement.ts:96
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:122
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:150
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:145
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:173
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:132
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:155
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:137
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:178
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:164
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>