-
Notifications
You must be signed in to change notification settings - Fork 0
SLG Task Types
There are 4 different Task Types a lesson can consist of.
Each Task Type is split into Task and View. The Task-Class handles all of the Logic behind a Task Type, while the View-Class takes care of how to display a certain Task-Type.
Each Task-Type has
Instance Variable | Location | Purpose |
---|---|---|
taskDescription |
TaskView class side | Telling User what to do |
question |
Task instance side | Additional Information, actual question in MultipleChoice
|
status |
TaskView instance side | Success or Failure |
correctAnswer |
Task instance side | object which will be compared with Userinput to verify the correctness of the Input, different type of Object for each Task-Type |
The first three parts have fixed positions on the TaskView Morph. As well as the Submit-Button
that is created in TaskView.
When the Submit-Button
is pressed, it calls verifyAnswer
on the TaskView Instance, which then prepares all necessary information and passes it to the Task Instance, which actually verifies the information.
Instance Variables in TaskView classes, that just store information that came from corresponding Task class have the prefix task
.
To create a Task, create an Instance of Task-Class first and then create an Instance of corresponding View-Class with Task-Class Instance as a parameter.
- Base Choice is the parent for
MultipleChoice
andSingleChoice
- it contains everything to create a Multiple Choice like task
- has an instance variable on the class side
isSingleChoice
- has a method
resetToggleButtons
that is called, when anisSingleChoice
returnstrue
-
answerOptions
: options from which the User can choose (Array)
- inherits from
BaseChoice
- in addition to Base Choice this type also prints a percentage, when answers are submitted
-
isSingleChoice
returnsfalse
task := SLGMultipleChoiceTask
newMultipleChoiceWithQuestion: aString
withOptions: Array of Strings
withAnswers: Array of Boolean (true for correct option, false for wrong option).
ui := SLGMultipleChoiceUI newMultipleChoiceUIwithTask: task
task := SLGMultipleChoiceTask
newMultipleChoiceWithQuestion: 'Do you really like Squeak?'
withOptions: #('Yes' 'No' 'Maybe')
withAnswers: #(true true false).
ui := SLGMultipleChoiceUI newMultipleChoiceUIwithTask: task
- inherits from
BaseChoice
- lets the User only choose from one option
-
isSingleChoice
returnstrue
- can easily be used to create True-And-False-Questions
task := SLGSingleChoiceTask
newSingleChoiceWithQuestion: 'Do you like Squeak?'
withOptions: #('Yes' 'No' 'Maybe')
withAnswers: #(true false false).
ui := SLGSingleChoiceUI newSingleChoiceUIwithTask: task
(In German: "Lückentext")
-
cloze
: a Text with gaps (String)
task := SLGClozeTask
newClozeWithQuestion: aString
withCloze: aString containg 'xx'
withAnswer: aString that replaces 'xx' with the actual answer.
ui := SLGClozeUI newClozeUIwithTask: task
task := SLGClozeTask
newClozeWithQuestion: ''
withCloze: 'Everything in Squeak is a xx.'
withAnswer: 'Everything in Squeak is a Morph.'.
ui := SLGClozeUI newClozeUIwithTask: task
In progress