Skip to content

Commit

Permalink
updated default participant IDs
Browse files Browse the repository at this point in the history
  • Loading branch information
dialoguetoolkit committed Jan 6, 2022
1 parent 671811f commit 0e3a595
Show file tree
Hide file tree
Showing 3 changed files with 67 additions and 9 deletions.
2 changes: 1 addition & 1 deletion pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>lx</groupId>
<artifactId>chattoolTG</artifactId>
<version>5.3.5</version>
<version>5.3.7</version>
<packaging>jar</packaging>
<dependencies>
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,13 @@ public MazeGameConversationControllerMultipleDyads(Conversation c) {
sett.client_numberOfWindows = 1;
}

@Override
public boolean requestParticipantJoinConversation(String participantID) {
return true;
}



@Override
public boolean requestParticipantJoinConversation(String participantID) {
//@Override
public boolean requestParticipantJoinConversationDEPRECATED(String participantID) {

//This section is only for autologin (i.e. when programming / testing the setup)
if(DefaultConversationController.sett.login_autologin){
Expand Down Expand Up @@ -128,7 +130,16 @@ else if(this.participantsQueuedLLLL.size()==this.participantsQueuedRRRRR.size())
}


@Override









@Override
public synchronized void participantJoinedConversation(final Participant p) {
super.participantJoinedConversation(p);
c.changeClientInterface_disableScrolling(p);
Expand All @@ -138,6 +149,53 @@ public synchronized void participantJoinedConversation(final Participant p) {
else if (p.getParticipantID().startsWith("RRRR")){
this.participantsQueuedRRRRR.addElement(p);
}
else if (c.getParticipants().getAllParticipants().size() % 2 == 0){
this.participantsQueuedLLLL.addElement(p);
}
else{
this.participantsQueuedRRRRR.addElement(p);
}




Conversation.printWSln("Main", "No. of participants in set 1:"+this.participantsQueuedLLLL.size()+" No. of participants in set 2:"+ this.participantsQueuedRRRRR.size());
if(this.participantsQueuedLLLL.size()!=this.participantsQueuedRRRRR.size()){
Conversation.printWSln("Main","UNEQUAL SET SIZES - DO NOT START THE EXPERIMENT");
}
else{
Conversation.printWSln("Main","EQUAL SET SIZES: OK TO START");
}


if(c.getParticipants().getAllParticipants().size()==2) {

//this.startmazegame();
}

}













public synchronized void participantJoinedConversationDEPRECATED(final Participant p) {
super.participantJoinedConversation(p);
c.changeClientInterface_disableScrolling(p);
if(p.getParticipantID().startsWith("LLLL")){
this.participantsQueuedLLLL.addElement(p);
}
else if (p.getParticipantID().startsWith("RRRR")){
this.participantsQueuedRRRRR.addElement(p);
}


Conversation.printWSln("Main", "No. of LLLL:"+this.participantsQueuedLLLL.size()+" No. of RRRR:"+ this.participantsQueuedRRRRR.size());
Expand All @@ -159,7 +217,7 @@ else if (p.getParticipantID().startsWith("RRRR")){

public void startexperiment(boolean shuffle){
if(this.participantsQueuedLLLL.size()!=this.participantsQueuedRRRRR.size()){
Conversation.printWSln("Main", "CANNOT START - THERE IS AN UNEQUAL NUMBER OF GROUPS");
Conversation.printWSln("Main", "CANNOT START - THERE IS AN UNEQUAL NUMBER OF PARTICIPANTS");
return;
}

Expand Down Expand Up @@ -190,8 +248,8 @@ public void startexperiment(boolean shuffle){

public void startexperimentChooseSet(){
if(this.participantsQueuedLLLL.size()!=this.participantsQueuedRRRRR.size()){
Conversation.printWSln("Main", "CANNOT START - THERE IS AN UNEQUAL NUMBER OF GROUPS");
CustomDialog.showDialog("CANNOT START - THERE IS AN UNEQUAL NUMBER OF GROUPS");
Conversation.printWSln("Main", "CANNOT START - THERE IS AN UNEQUAL NUMBER OF PARTICIPANTS");
CustomDialog.showDialog("CANNOT START - THERE IS AN UNEQUAL NUMBER OF PARTICIPANTS");
return;
}

Expand Down
Binary file modified swapfile
Binary file not shown.

0 comments on commit 0e3a595

Please sign in to comment.