Components#
Components are the building blocks of Amplify Classroom's activities, and are the pieces tied together and controlled with CL. Components connect to each other by their sinks and sources. The sinks of a component are the values which define its appearance and behavior, and the sources of a component are variables which contain the state of the component.
This resource is intended to be a quick reference for the data types and purpose of each source and sink. For a more interactive and official documentation, see Amplify's Documentation.
Note#
| Sink | Type | Description |
|---|---|---|
| content | string | latex |
Content of the note. |
| hidden | boolean |
Hides the component when true |
| Source | Type | Description |
|---|---|---|
Free Response#
| Sink | Type | Description |
|---|---|---|
| initialText | string | latex |
Initial text of the free response. Often a prompt for student input. |
| placeholderText | string | latex |
Placeholder text of the free response. (default value of response) |
| showSubmitButton | boolean |
Hides submit button if true. |
| submitDisabled | boolean |
Disables the submit button if false. |
| submitLabel | string | latex |
A label for the submit button. |
| hidden | boolean |
Hides the component when true |
| Source | Type | Description |
|---|---|---|
| content | string |
The current entered content. |
| submitted | boolean |
true if the component is submitted |
| timeSinceSubmit | number |
Returns number of seconds since submit button was pressed. Can take one parameter maxTime, and will use this as a ceiling for its output value. |
Math Response#
| Sink | Type | Description |
|---|---|---|
| capture(key::string) | number |
Capture a numeric value (often the evaluated result of the submission), which can later be referenced with key |
| clearOnReset | boolean |
Description needed |
| correct | boolean |
Displays a checkmark in the student summary screen if true |
| disableEdit | boolean |
Disables editing the expression if true |
| disableEvaluation | boolean |
Does not evaluate the expression for the student when true |
| errorMessage | string |
Error message to show the student after attempted submission. Blocks submission when not empty. |
| explainPrompt | string |
Replaces the "Explain your thinking" prompt. |
| hidden | boolean |
Hides the component when true |
| initialLatex | string | latex |
The initial text in the expression input |
| initialText | string | latex |
The initial text in the text input under "Explain your thinking" |
| placeholderLatex | string | latex |
The placeholder for the expression input. |
| readOnly | boolean |
Description needed |
| resetLabel | string |
Specifies a label for the button that allows the student to edit their answer. |
| resetOnChange | string |
Resets the expression when the string itself changes. |
| showExplain | boolean |
If true, then show the request for student to explain answer. |
| showPeerResponses | boolean |
Description needed |
| showSubmitButton | boolean |
Hides submit button if true. |
| submitDisabled | boolean |
Disables the submit button if false. |
| submitLabel | string | latex |
A label for the submit button. |
| suffix | string |
Adds this suffix to the end of student input. |
| warning | string |
Puts a warning on the teacher dashboard associated with the student. |
| Source | Type | Description |
|---|---|---|
| explainContent | string |
The current content of the "Explain your thinking" box |
| history | List<number> |
The history of the key variable (same key should appear in a capture statement in the component) |
| lastValue | number |
The last value of the key variable |
| latex | latex |
The latex content of the expression input. |
| numericValue | number |
The numeric value of the expression input. |
| submitCount | number |
The number of submissions the student has made. |
| submitted | boolean |
true if the component is submitted |
| timeSinceSubmit | number |
Returns number of seconds since submit button was pressed. Can take one parameter maxTime, and will use this as a ceiling for its output value. |
Multiple Choice#
| Sink | Type | Description |
|---|---|---|
| choiceContent(index::number) | string |
Sets the content of index choice. |
| correct | boolean |
Displays a checkmark in the student summary screen if true |
| disableChange | boolean |
Disables changing a selection if true |
| explainPrompt | string |
Replaces the "Explain your thinking" prompt. |
| hidden | boolean |
Hides the component when true |
| initialText | string | latex |
The initial text in the text input under "Explain your thinking" |
| maxButtonsPerRow | number |
Max numbers of buttons laid out in each row |
| prompt | string |
Sets the prompt above the selections. |
| readOnly | boolean |
Description needed |
| resetOnChange | string |
Resets the expression when the string itself changes. |
| showExplain | boolean |
If true, then show the request for student to explain answer. |
| showPeerResponses | boolean |
Description needed |
| showSubmitButton | boolean |
Hides submit button if true. |
| submitLabel | string | latex |
A label for the submit button. |
| warning | string |
Puts a warning on the teacher dashboard associated with the student. |
| Source | Type | Description |
|---|---|---|
| choiceContent | string |
The content for the choice of index index |
| explainContent | string |
The current content of the "Explain your thinking" box |
| isSelected | boolean |
Whether the choice at index choiceIndex is selected. |
| isSelectedList | List<boolean> |
Boolean list indicating which selections are selected. |
| matchesKey | boolean |
Returns true if the current answer matches a provided answer key. |
| submitCount | number |
The number of submissions the student has made. |
| submitted | boolean |
true if the component is submitted |
| timeSinceSubmit | number |
Returns number of seconds since submit button was pressed. Can take one parameter maxTime, and will use this as a ceiling for its output value. |
Checkboxes#
| Sink | Type | Description |
|---|---|---|
| choiceContent(index::number) | string |
Sets the content of index choice. |
| correct | boolean |
Displays a checkmark in the student summary screen if true |
| disableChange | boolean |
Disables changing a selection if true |
| explainPrompt | string |
Replaces the "Explain your thinking" prompt. |
| hidden | boolean |
Hides the component when true |
| initialText | string | latex |
The initial text in the text input under "Explain your thinking" |
| maxButtonsPerRow | number |
Max numbers of buttons laid out in each row |
| maxSelectedChoices | number |
Maximum number of choices that can be selected. |
| prompt | string |
Sets the prompt above the selections. |
| readOnly | boolean |
Description needed |
| resetOnChange | string |
Resets the expression when the string itself changes. |
| showExplain | boolean |
If true, then show the request for student to explain answer. |
| showPeerResponses | boolean |
Description needed |
| showSubmitButton | boolean |
Hides submit button if true. |
| submitLabel | string | latex |
A label for the submit button. |
| warning | string |
Puts a warning on the teacher dashboard associated with the student. |
| Source | Type | Description |
|---|---|---|
| choiceContent | string |
The content for the choice of index index |
| explainContent | string |
The current content of the "Explain your thinking" box |
| isSelected | boolean |
Whether the choice at index choiceIndex is selected. |
| isSelectedList | List<boolean> |
Boolean list indicating which selections are selected. |
| matchesKey | boolean |
Returns true if the current answer matches a provided answer key. |
| submitCount | number |
The number of submissions the student has made. |
| submitted | boolean |
true if the component is submitted |
| timeSinceSubmit | number |
Returns number of seconds since submit button was pressed. Can take one parameter maxTime, and will use this as a ceiling for its output value. |
Ordered List#
| Sink | Type | Description |
|---|---|---|
| correct | boolean |
Displays a checkmark in the student summary screen if true |
| hidden | boolean |
Hides the component when true |
| initialOrder | List<number> |
Defines the initial ordering of the items. Orders items based on the order of the numbers in the list (integers not necessary) |
| itemContent(index::number) | string |
Sets the content of item at index. |
| readOnly | boolean |
Description needed |
| warning | string |
Puts a warning on the teacher dashboard associated with the student. |
| Source | Type | Description |
|---|---|---|
| indexOfItem | number |
Returns the resulting index of an item that started at initialItemIndex |
| itemAtIndex | number |
Returns the initial index of the item that ended up at itemIndex. |
| matchesKey | boolean |
Returns true if the current answer matches a provided answer key. |
| order | List<number> |
List of indexs where items currently are |
| textAtIndex | string |
The text at index itemIndex. |
| timeSinceSubmit | number |
Returns number of seconds since submit button was pressed. Can take one parameter maxTime, and will use this as a ceiling for its output value. |
Graph#
| Sink | Type | Description |
|---|---|---|
| Source | Type | Description |
|---|---|---|
Sketch#
| Sink | Type | Description |
|---|---|---|
| Source | Type | Description |
|---|---|---|
Media#
| Sink | Type | Description |
|---|---|---|
| Source | Type | Description |
|---|---|---|
Table#
| Sink | Type | Description |
|---|---|---|
| Source | Type | Description |
|---|---|---|
Action Button#
| Sink | Type | Description |
|---|---|---|
| Source | Type | Description |
|---|---|---|
Polypad#
| Sink | Type | Description |
|---|---|---|
| Source | Type | Description |
|---|---|---|