HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... question
question
  View type:
i have question with 3 choices i need to do the following
if(choice 1)do something
if(choice 2 ) do something
if(choice 3 ) do something
how can i write this with actions ???
 
Depends of ...

if (choice1) {action1}
if (choice2) {action2}
if (choice3) {action3}

will be like

IF (choice1)
>Action1
IF (choice2)
>Action2
IF (choice3)
>Action3
where '>' is a blank space

but

if (choice1) {action1}
else {
if (choice2) {action2}
else {
if (choice3) {action3}
}
}

will be like
IF (choice1)
>Action1
>IF (choice2)
>>Action2
>>IF (choice3)
>>>Action3
where '>' is a blank space

[:D]
 
 
thanks but , i need to know how to choice id
to make acondition
if (choice 1)
what is the syntax of choice 1 ????
 
 
 
There are many ways.

You'd best first look in the documentation (help file) how to use Courselab variables and identifiers in an IF statement (see: actions - if).

Then I'd have a look at examples from www.friendsofcourselab.info
 
 
 
 
i have qustion with 3 choices
1- answer1
2-answer2
3-answer3
is this condition true:
$q.questionvalue==answer1
?????
 
 
 
 
 
Have a look at the documentation and do an experiment.

Documentation:
- Actions - msgbox
- Objects - Questions - Single Choice Question - scroll down

Experiment:
- Make an empty CL project
- Put a Single Choice question on stage, identifier 'q'
- actions of this object:
-- On Change Choice - MSGBOX(Text='$q.questionValue')
NB: case sensitive ('V'), type the text without the quotes.

Make a preview and click on a choice. You'll see the value of $q.questionValue

Succes
 
 
 
 
 
 
Thanks Alot
Error was in 'V' i wrote it 'v'[:D]
Subject:
Message options
No additional options