View Source DeliveryElementProps

oli / Exports / DeliveryElementProps

Interface: DeliveryElementProps<T>

Delivery web component properties made available via the render method.

Type parameters

NameType
Textends ActivityModelSchema

Table of contents

Properties

Methods

Properties

context

context: ActivityContext

The larger context that this activity operates within.

Defined in

src/components/activities/DeliveryElement.ts:88


mode

mode: DeliveryMode

The current delivery mode.

Defined in

src/components/activities/DeliveryElement.ts:93


model

model: T

The model of the activity, pruned to remove the authoring specific portion.

Defined in

src/components/activities/DeliveryElement.ts:78


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:104


state

state: ActivityState

The state of the activity and part attempts.

Defined in

src/components/activities/DeliveryElement.ts:83

Methods

onReadUserState

Optional onReadUserState(attemptGuid, partAttemptGuid, payload): Promise<any>

Allows read access to the user state.

Parameters

NameType
attemptGuidstring
partAttemptGuidstring
payloadany

Returns

Promise<any>

Defined in

src/components/activities/DeliveryElement.ts:109


onRequestHint

onRequestHint(attemptGuid, partAttemptGuid): Promise<RequestHintResponse>

Requests a hint for a specific part.

Parameters

NameType
attemptGuidstring
partAttemptGuidstring

Returns

Promise<RequestHintResponse>

Defined in

src/components/activities/DeliveryElement.ts:137


onResetActivity

onResetActivity(attemptGuid): Promise<ResetActivityResponse>

Resets this activity attempt to create a new attempt.

Parameters

NameType
attemptGuidstring

Returns

Promise<ResetActivityResponse>

Defined in

src/components/activities/DeliveryElement.ts:132


onResetPart

onResetPart(attemptGuid, partAttemptGuid): Promise<PartActivityResponse>

Resets the attempt for one part.

Parameters

NameType
attemptGuidstring
partAttemptGuidstring

Returns

Promise<PartActivityResponse>

Defined in

src/components/activities/DeliveryElement.ts:160


onSaveActivity

onSaveActivity(attemptGuid, partResponses): Promise<Success>

Initiates saving of the student response for all parts.

Parameters

NameType
attemptGuidstring
partResponsesPartResponse[]

Returns

Promise<Success>

Defined in

src/components/activities/DeliveryElement.ts:119


onSavePart

onSavePart(attemptGuid, partAttemptGuid, response): Promise<Success>

Saves the state of a specific part.

Parameters

NameType
attemptGuidstring
partAttemptGuidstring
responseStudentResponse

Returns

Promise<Success>

Defined in

src/components/activities/DeliveryElement.ts:142


onSubmitActivity

onSubmitActivity(attemptGuid, partResponses): Promise<EvaluationResponse>

Submits all parts of the attempt for evaluation.

Parameters

NameType
attemptGuidstring
partResponsesPartResponse[]

Returns

Promise<EvaluationResponse>

Defined in

src/components/activities/DeliveryElement.ts:124


onSubmitEvaluations

onSubmitEvaluations(attemptGuid, clientEvaluations): Promise<EvaluationResponse>

Submits client-side evaluations.

Parameters

NameType
attemptGuidstring
clientEvaluationsClientEvaluation[]

Returns

Promise<EvaluationResponse>

Defined in

src/components/activities/DeliveryElement.ts:165


onSubmitPart

onSubmitPart(attemptGuid, partAttemptGuid, response): Promise<EvaluationResponse>

Submits for evaluation one part.

Parameters

NameType
attemptGuidstring
partAttemptGuidstring
responseStudentResponse

Returns

Promise<EvaluationResponse>

Defined in

src/components/activities/DeliveryElement.ts:151


onWriteUserState

Optional onWriteUserState(attemptGuid, partAttemptGuid, payload): Promise<any>

Allows writing to the user state.

Parameters

NameType
attemptGuidstring
partAttemptGuidstring
payloadany

Returns

Promise<any>

Defined in

src/components/activities/DeliveryElement.ts:114