Skip to content

Commit

Permalink
Merge pull request #282 from hpi-swa-teaching/develop
Browse files Browse the repository at this point in the history
Final release 2024
  • Loading branch information
vlindow authored Jul 12, 2024
2 parents a71aec1 + f960a71 commit b4c2f02
Show file tree
Hide file tree
Showing 904 changed files with 3,515 additions and 2,820 deletions.
6 changes: 5 additions & 1 deletion .smalltalk.ston
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ SmalltalkCISpec {
#packages : [ #Liquid-Core, #Liquid-Network, #Liquid-UI ]
},
#exclude : {
#classes : [ #LQLintTests, #LQToolbuilderTests ]
#classes : [ #LQLintTests ]
}
}
}
Expand All @@ -23,3 +23,7 @@ Tests, #LQStatisticsWorkbenchIntegrationTests ]
}
}
}
ionTests ]
}
}
}
17 changes: 11 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -49,16 +49,21 @@ LQStartMenu open.
```

There you should be able to choose between the "Participant" and "Host" View.
If you want to create a poll and run it, close a poll or show the results of a running poll choose "Host". For creating a poll, click "create poll" then type in your Question in the Header of the window.
Every newline in the box under the question is a possible answer, so be sure to keep every answer on its own line.
On the bottom you can run your poll and give it an id. Keep the id, it is used to access the poll and its results.
If you want to close a poll click "close poll" in the host menu. After entering the poll id of the running poll you want to close, participants will not be able to send new answers.
For the poll results, press "Show results" and input the respective poll id.
If you want to create a poll and run it, close a poll or show the results of a running poll choose "Host". For creating a poll, click "create poll" then choose the type of question and type the question and if required possible answers in the according text fields. Alternatively you can create a poll from your saved drafts. When pressing the according button a new window opens showing the saved drafts.
For MultipleChoice and Priotarization questions every newline in the box under the question represents a possible answer, so be sure to keep every answer on its own line.
On the bottom you can run your poll and give it an id. The id is required for the participants to enter. To allow participants easy access to your poll press the copy poll link button while having the right poll selected in the host menu. Now you can send that link to participants by pasting it in.
If you want to close a poll click "close poll" in the host menu. Now participants are not able to enter that poll anymore.
For the poll results there is a live visualization in the host menu. You can also export the results to the DataExports directory in your squeak folder. The export file is named after your poll id. To minimize clutter press delete poll when a poll is not needed anymore.
To stop any user from participating in any of your polls press stop server.

Participants can choose the "Participant" button in the Start Menu. Enter the Poll id of the poll you want to participate in. Choose one or multiple answers and push the send button.
Participants can choose the "Participant" button in the Start Menu. Enter the link of the poll you want to participate in. Answer every question by selecting or writing text and press send answers.

## Tests
We tested the application via:
- Integration Tests (can be found in `Liquid-Tests`-package)
- Unit Tests (can be found in `Liquid-Tests`-package)
- Use Case Tests (can be found in [Use Case Test Specification](https://github.com/hpi-swa-teaching/Liquid/blob/develop/docs/UseCases.md))


Anmerkungen:
Fürs Refactoring haben wir PoppyPrint verwendet. Daher werden unter anderem die Klassen LQUserSetMenu, LQUserSetSelectionMenu, LQMailDialog, LQAntiCheat, LQDelayMessageDecorator, LQLocalObjectDummy, LQObjectRepo, LQPollRepo, LQRemoteError, LQUserSetRepo, LiquidNetworkServiceProvider, LQUserSet, LQUser, LQPasswordManager, LQPasswordGuard, LQDuplicateDetector, LQChoiceProcessor, LQChoice als geändert angezeigt. Diese Klassen haben wir allerdings weder manuell refactored noch anderweitig verändert.
Binary file modified liquid_logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,10 @@ baseline: spec
baseline: 'SwaLint'
with: [spec repository: 'github://hpi-swa-teaching/SwaLint:release/packages'];

baseline: 'Squot'
with: [spec repository: 'github://hpi-swa/Squot:mapper/src'];


package: 'Liquid-Core'
with: [spec requires: #('libraries')];

Expand All @@ -22,7 +26,7 @@ baseline: spec
package: 'Liquid-Tests'
with: [spec requires: #('SwaLint' 'default')];
yourself.
spec group: 'libraries' with: #('StatisticsWorkbench');
spec group: 'libraries' with: #('StatisticsWorkbench' 'Squot');
group: 'default' with: #('Liquid-Core' 'Liquid-Network' 'Liquid-UI');
group: 'tests' with: #('Liquid-Tests')];
yourself
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
"class" : {
},
"instance" : {
"baseline:" : "FLST 6/24/2024 09:16" } }
"baseline:" : "FLST 7/4/2024 10:57" } }
3 changes: 2 additions & 1 deletion packages/Liquid-Core.package/LQAnswer.class/README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
Answers belonging currently all Questions have this type. However, this might be later split up into different question modes.
Notable Instance Variables:
- choicesRanking: An OrderedCollection of all the choices the participant voted.
- choicesRanking: An OrderedCollection of all the choices the participant voted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
class initialization
newWithQuestion: aQuestion

^ LQFreeTextAnswer new
questionId: aQuestion id;
yourself

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
answer

^ ''

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
choicesRanking

^ choicesRanking
^ OrderedCollection new
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,4 @@ initialize-release
initialize

super initialize.
self id: UUID new asString.
self choicesRanking: OrderedCollection new
self id: UUID new asString
Original file line number Diff line number Diff line change
@@ -1,12 +1,4 @@
printing
printDataOn: aStream

self choicesRanking ifEmpty: [^ self].
self choicesRanking
collect: [:votedChoice |
aStream nextPutAll: votedChoice.
aStream nextPutAll: ':']
from: 1
to: self choicesRanking size - 1.

aStream nextPutAll: self choicesRanking last
SubclassResponsibility
Original file line number Diff line number Diff line change
@@ -1,13 +1,12 @@
{
"class" : {
"newWithQuestion:andVotes:" : "Anton Eichstädt 6/5/2024 17:28" },
"newWithQuestion:" : "FLST 7/11/2024 20:42" },
"instance" : {
"choicesRanking" : "Anton Eichstädt 5/24/2024 15:23",
"choicesRanking:" : "Anton Eichstädt 5/24/2024 15:24",
"containsVoteForChoice:" : "Anton Eichstädt 5/24/2024 15:23",
"answer" : "FLST 7/11/2024 20:42",
"choicesRanking" : "FLST 7/11/2024 20:42",
"id" : "JT 8/2/2022 16:59",
"id:" : "JT 8/2/2022 16:59",
"initialize" : "Anton Eichstädt 5/24/2024 15:24",
"printDataOn:" : "Anton Eichstädt 5/24/2024 15:23",
"initialize" : "FLST 7/11/2024 20:42",
"printDataOn:" : "FLST 7/11/2024 20:42",
"questionId" : "JT 8/2/2022 17:01",
"questionId:" : "JT 8/2/2022 17:01" } }
3 changes: 1 addition & 2 deletions packages/Liquid-Core.package/LQAnswer.class/properties.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@
"commentStamp" : "Anton Eichstädt 6/5/2024 17:29",
"instvars" : [
"id",
"questionId",
"choicesRanking" ],
"questionId" ],
"name" : "LQAnswer",
"pools" : [
],
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ class initialization
newWithAnswers: anOrderedCollection for: aPoll

| answerSet |

answerSet := LQAnswerSet new pollId: aPoll id.
anOrderedCollection do: [:answer | answerSet addAnswer: answer].

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
initialize-release
initialize

super initialize.
self answers: Dictionary new.
self id: UUID new asString
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@ printing
printDataOn: aStream for: orderedQuestionIDs with: aDelimiter

orderedQuestionIDs do: [:answerId |
self answers at: answerId ifPresent: [:printedAnswer | printedAnswer printDataOn: aStream].
aStream nextPutAll: aDelimiter].
self answers at: answerId ifPresent: [:printedAnswer | printedAnswer printDataOn: aStream].
aStream nextPutAll: aDelimiter]
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{
"class" : {
"newWithAnswers:for:" : "bwe 8/5/2022 18:05" },
"newWithAnswers:for:" : "FLST 7/11/2024 20:42" },
"instance" : {
"addAnswer:" : "CG 7/30/2021 19:06",
"answers" : "JT 8/2/2022 16:51",
"answers:" : "bn 7/14/2022 22:40",
"id" : "JT 8/2/2022 16:52",
"id:" : "kge 6/25/2022 16:44",
"initialize" : "JT 8/2/2022 16:53",
"initialize" : "FLST 7/11/2024 20:42",
"pollId" : "JS 5/18/2021 18:38",
"pollId:" : "JS 5/18/2021 18:37",
"printDataOn:for:with:" : "leli 5/21/2024 11:35",
"printDataOn:for:with:" : "FLST 7/11/2024 20:42",
"token" : "JT 8/2/2022 16:55",
"token:" : "JT 8/2/2022 16:55" } }
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,10 @@ instance creation
newFrom: aString

| processor choice |

processor := LQChoiceProcessor new.
choice := LQChoice new.
choice
description: (processor extractDescription: aString);
excludedGroups: (processor extractGroups: aString);
rawString: aString.
^ choice
^ choice
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
excludesGroup: aString

^ self excludedGroups includes: aString
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ initialize

super initialize.

self
self
description: '';
excludedGroups: OrderedCollection new
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
rawString: aString

rawString := aString
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
accessing
rawString

^ rawString
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
{
"class" : {
"newFrom:" : "JT 8/5/2022 18:20" },
"newFrom:" : "FLST 7/11/2024 20:42" },
"instance" : {
"description" : "JT 8/2/2022 16:55",
"description:" : "JT 8/2/2022 16:55",
"excludedGroups" : "JT 8/2/2022 16:55",
"excludedGroups:" : "JT 8/2/2022 16:56",
"excludesGroup:" : "kge 8/3/2022 20:52",
"initialize" : "JT 8/2/2022 16:55",
"rawString" : "JT 8/2/2022 16:56",
"rawString:" : "bn 6/12/2022 20:16" } }
"excludesGroup:" : "FLST 7/11/2024 20:42",
"initialize" : "FLST 7/11/2024 20:42",
"rawString" : "FLST 7/11/2024 20:42",
"rawString:" : "FLST 7/11/2024 20:42" } }
Original file line number Diff line number Diff line change
@@ -1,10 +1,9 @@
extracting
extractDescription: aString

| firstBracketLocation rawDescription |

firstBracketLocation := aString findString: '['.
(firstBracketLocation == 0) ifTrue: [^ aString withBlanksTrimmed].

rawDescription := aString copyFrom: 1 to: (firstBracketLocation - 1).
| firstBracketLocation rawDescription |
firstBracketLocation := aString findString: '['.
firstBracketLocation isZero ifTrue: [^ aString withBlanksTrimmed].

rawDescription := aString copyFrom: 1 to: firstBracketLocation - 1.
^ rawDescription withBlanksTrimmed
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@ extracting
extractGroups: aString

| openingBracketLocation closingBracketLocation rawGroups splitGroups |

openingBracketLocation := aString findString: '['.
closingBracketLocation := aString findLastOccurrenceOfString: ']' startingAt: openingBracketLocation.

((openingBracketLocation == 0) or: [closingBracketLocation == 0])
ifTrue: [^ OrderedCollection new].

rawGroups := aString copyFrom: openingBracketLocation + 1 to: (closingBracketLocation - 1).
closingBracketLocation := aString
findLastOccurrenceOfString: ']'
startingAt: openingBracketLocation.

(openingBracketLocation isZero or: [closingBracketLocation isZero]) ifTrue: [^ OrderedCollection new].

rawGroups := aString copyFrom: openingBracketLocation + 1 to: closingBracketLocation - 1.
splitGroups := rawGroups subStrings: ','.

^ (splitGroups collect: [:group | group withBlanksTrimmed]) asOrderedCollection
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"class" : {
},
"instance" : {
"extractDescription:" : "JT 8/5/2022 18:21",
"extractGroups:" : "JT 8/2/2022 16:59" } }
"extractDescription:" : "FLST 7/11/2024 20:42",
"extractGroups:" : "FLST 7/11/2024 20:42" } }
Empty file.
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
as yet unclassified
newWithQuestion: aQuestion andVotes: anOrderedCollection

^ LQChoicesAnswer new
questionId: aQuestion id;
choicesRanking: (anOrderedCollection collect: [:each | each description]);
yourself
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
choicesRanking: anObject

votedChoiceList := anObject
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
accessing
choicesRanking

^ votedChoiceList
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
evaluation
accessing
containsVoteForChoice: aChoice

^ self choicesRanking includes: aChoice description
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
printing
printDataOn: aStream

self choicesRanking ifEmpty: [^ self].
self choicesRanking
collect: [:votedChoice |
aStream nextPutAll: votedChoice.
aStream nextPutAll: ':']
from: 1
to: self choicesRanking size - 1.

aStream nextPutAll: self choicesRanking last
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"class" : {
"newWithQuestion:andVotes:" : "FLST 7/11/2024 20:42" },
"instance" : {
"choicesRanking" : "FLST 7/11/2024 20:42",
"choicesRanking:" : "FLST 7/11/2024 20:42",
"containsVoteForChoice:" : "FLST 7/11/2024 20:42",
"printDataOn:" : "FLST 7/11/2024 20:42" } }
14 changes: 14 additions & 0 deletions packages/Liquid-Core.package/LQChoicesAnswer.class/properties.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
{
"category" : "Liquid-Core",
"classinstvars" : [
],
"classvars" : [
],
"commentStamp" : "",
"instvars" : [
"votedChoiceList" ],
"name" : "LQChoicesAnswer",
"pools" : [
],
"super" : "LQAnswer",
"type" : "normal" }
Loading

0 comments on commit b4c2f02

Please sign in to comment.