HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Calculate scores without using Question or Test objects
Calculate scores without using Question or Test objects
  View type:
Hi,

I created a question using the dropdown menu from the Form object library.

How can I let the program check the value a user selects and score by comparing to the the correct value?
 
First you'll need a variable to store the response. This will be just for the question response.
Then you need to make something trigger some actions, either a timer of a button.
The button/timer expire triggers the varuable to be filled with the response then checks that variables contents against a condition you set.
After that you can pass it to a total score counter or the standard scorm variable.
 
 
thank you for the useful reply.

could you please show me how?

Well, I am not that "guru" in programming...
 
 
 
A small contribution is the actions to get the value from the dropdown list.

I hop Nick can give the second part, compare the value to the score.

In a new document, 1 page, I put a dropdown element and gave it identifier q.
I made several items in the list:
Description - Value - Selected
make a choice - 0 - yes
choice 1 - 1 - no
choice 2 - 2 - no
choice 3 - 3 - no
The descriptions are important for your student; the values for the actions.

Then I put a button (object - form) on the stage, made it invisible and gave it identifier submit.

Then I put four textboxes on the stage, each one with the feedback. I gave them identifier u0, u1, u2, u3.
Contents:
u0: please make a choice and press 'submit'.
u1: you choose for '1'
u2: you choose for '2'
u2: you choose for '3'
I made all these four textboxes invisible.

On the dropdownlist I made action:
On Select Item
DISPLAY(Object='submit',Display='Show',Effect='Object',Duration='0')

On the submit button I made an action
IF(Condition='$q.value==0')
DISPLAY(Object='u0',Display='Show',Effect='Object',Duration='0')

and three more actions: if .. == 1 then display u1; 2 => 2 and 3 => 3.
Don't forgte the leading space in the line below the 'IF' statement, see another thread or Nick's site.

That's it.

Instead of using '$q.value' you might open the properties of the dropdown list and enter a Run-time variable name, I used ddVar.
Now the value is in a variable you can use in this page and if I remember well, in pages after this one.

The IF statements change in:
IF(Condition='#ddVar==0')
DISPLAY(Object='u0',Display='Show',Effect='Object',Duration='0')
etc.

Succes![:cool:]
 
 
 
 
Thanks it worked.

I will be waiting for the second part of the "formula"[:)]

 
 
 
 
 
You might add to the onclick action of the submit button:
METHOD(Object='q',Method='DisableInput')

Then in the first slide add an action beforeDisplay:
VARIABLE(Name='scoreCounter',Value='0',Scope='Entire Module')

and at the right IF condition on the onclick of the submit button:
VARIABLE(Name='scoreCounter',Value='#scoreCounter+1',Scope='Entire Module')

Now each correct answer adds 1 to your own variable 'scoreCounter'.
In the end of your course / test you can use the value of scoreCounter.
On a slide make an object 'Simple Textbox', identifier myText. Enter the text 'your score is:'.

This slide's action afterdisplay:
METHOD
Object='myText'
Method='Add Text'
Where to add: At the end
Adding style: One paragraph
Text to add: #scoreCounter

[:)]
 
 
 
 
 
 
Thank you

That was really great.

Now, what should I do to let LMS calculate the scores? [:confused:]
 
 
 
 
 
 
 
That one is certainly for Nick [;)]
 
 
 
 
 
 
 
 
You need to put the score variables from your own variables into the standard variables that the LMS uses.
It might have been quicker to put yours staright into the master score.
 
 
 
 
 
 
 
 
 
So, now i have three slides with each has one question and variable to calculate the score and display the total scores in a separate slide at the end of the module.

How can I tell the LMS to use the same calcualted score from the last slide?
Subject:
Message options
No additional options