new AICourseAssist(userId, contextId)
- Description:
Constructor.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
userId |
Integer | The user ID. |
contextId |
Integer | The context ID. |
Members
contextId :Integer
- Description:
The context ID.
- Source:
The context ID.
Type:
- Integer
userId :Integer
- Description:
The user ID.
- Source:
The user ID.
Type:
- Integer
Methods
acceptPolicy() → {Promise.<Object>}
- Description:
Accept the policy.
- Source:
Returns:
- Type
- Promise.<Object>
addPadding()
- Description:
Add padding to the page to make space for the AI drawer.
- Source:
addResponseToStack(action, html)
- Description:
Add the HTML response to the response stack. The stack will be used to display all responses in the AI drawer.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
action |
String | The action key. |
html |
String | The HTML to store. |
closeAIDrawer()
- Description:
Close the AI drawer.
- Source:
(async) displayAction(action)
- Description:
Display the action result in the AI drawer.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
action |
string | The action to display. |
displayError()
- Description:
Display the error.
- Source:
displayLoading()
- Description:
Display the loading spinner.
- Source:
displayPolicy()
- Description:
Display the policy.
- Source:
(async) displayResponse(content, action)
- Description:
Display the responses.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
content |
String | The content to display. |
action |
String | The action used. |
(async) getParamsForAction(action) → {object}
- Description:
Get important params related to the action.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
action |
string | The action to use. |
Returns:
The params to use for the action.
- Type
- object
getResponseStack() → {String}
- Description:
Return a stack of HTML responses.
- Source:
Returns:
HTML responses.
- Type
- String
getTextContent() → {String}
- Description:
Get the text content of the main region.
- Source:
Returns:
The text content.
- Type
- String
hasGeneratedContent(action) → {boolean}
- Description:
Check if the AI drawer has already generated content for a particular action.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
action |
string | The action to check. |
Returns:
True if the AI drawer has generated content, false otherwise.
- Type
- boolean
isAIDrawerOpen() → {boolean}
- Description:
Check if the AI drawer is open.
- Source:
Returns:
True if the AI drawer is open, false otherwise.
- Type
- boolean
(async) isPolicyAccepted() → {bool}
- Description:
Check if the policy is accepted.
- Source:
Returns:
True if the policy is accepted, false otherwise.
- Type
- bool
isRequestCancelled() → {boolean}
- Description:
Check if the request is cancelled.
- Source:
Returns:
True if the request is cancelled, false otherwise.
- Type
- boolean
openAIDrawer()
- Description:
Open the AI drawer.
- Source:
registerErrorEventListeners()
- Description:
Register event listeners for the error.
- Source:
registerEventListeners()
- Description:
Register event listeners.
- Source:
registerPolicyEventListeners()
- Description:
Register event listeners for the policy.
- Source:
registerResponseEventListeners()
- Description:
Register event listeners for the responses.
- Source:
removePadding()
- Description:
Remove padding from the page.
- Source:
removeResponseFromStack(action)
- Description:
Remove a stored response, allowing for a regenerated one.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
action |
String | The action key. |
toggleAIDrawer()
- Description:
Toggle the AI drawer.
- Source: