CTATChatPanel - CMUCTAT/CTAT GitHub Wiki
Available in CTATv4.5 and later This component enables users of collaborative tutors to communicate via typed chat messages. Unlike most CTAT components, entries are ungraded by default. To use the Chat Panel effectively, Chat Panel must be connected to Tutorshop with a Web Socket connection to multiple members of the collaborating team.
<div id="chat_panel" class="CTATChatPanel"></div>
(live example will be up soon)
-
id
: Required. The name of the component, must be a valid html id name. -
class
: Required. The class list, must includeCTATChatPanel
and no other CTAT<component> classes. -
data-ctat-enabled
:true
orfalse
. Default istrue
. Controls whether the component will accept student interaction. -
data-ctat-tutor
:true
orfalse
. Default isfalse
. Controls whether chat entries are graded. -
data-ctat-highlight
: Optional.true
orfalse
. Default istrue
. Putfalse
if you do not want the chat text to be highlighted (limegreen on correct, red on incorrect and yellow on hint). Controls if the chat text will be colored on feedback whendata-ctat-tutor
istrue
. -
data-ctat-show-feedback
:true
orfalse
. Default istrue
unlessdata-ctat-tutor="false"
. Determines if grading feedback is shown on the component. -
data-ctat-show-hint-highlight
:true
orfalse
. Default istrue
. Determines if hint highlighting is shown on the component. -
data-ctat-disable-on-correct
:true
orfalse
. Default istrue
. Determines if the component becomes locked when it is graded as correct. -
data-ctat-submit-on-blur
:true
orfalse
. Default istrue
. If false the component will not submit the content for grading when the cursor focus exits. -
data-ctat-submit-on-enter
:true
orfalse
. Default istrue
. If false the component will not submit the content for grading when the user presses the Enter key. -
data-ctat-warning-text
: "string". Default is""
. If set, displays string in a fixed panel as a notice to the user. This feature can be used to give instructions or warn the user that, e.g., chat texts should not be abusive. -
data-ctat-warning-img
: "URL". Default is""
, i.e., no image. If set, should be the relative or absolute URL of an image to be displayed beside thedata-ctat-warning-text
, above.
In addition to the common Actions listed in Often Used TPAs this component supports the following actions:
Action | Input | Notes |
---|---|---|
processSend | a string | sends text only to others' panels, not to the local panel |
sendCompMessage | a string | sends text only to the local panel with a prefix attributing it to "Computer" or some system actor |
sendCompMessageBroadcast | a string | sends text to all partners with a prefix attributing it to "Computer" or some system actor |
addOwnMessage | a string | sends input text and time to collaborating partner |
typingIndicator | a string | Notifies when collaborating partner is typing |
CheckTime | a string | Removes typing notification after 2 seconds of idle time |
.CTATChatPanel {
width: 300px;
height: 50px;
margin: 10px;
display: flex;
background-color: white;
position: relative;
flex-direction: column;
}
.CTATChatPanel--chat-area{
height: 70%;
width: 100%;
border: 2px solid rgb(211, 211, 211);
overflow-y: auto;
padding: 7px;
background-color: white;
}
.CTATChatPanel--input-div{
flex-direction: row;
height: 18%;
width: 72%;
border-left: 2px solid rgb(211, 211, 211);
border-right: 2px solid rgb(211, 211, 211);
background-color: white;
}