HOME ➔ SUPPORT ➔ Community ➔ General CourseLab issues ... Other type of questions for a test
Other type of questions for a test
  View type:
Hi!

I'd like to create other type of questions for my tests. I'm using the "form" resource. However I don't know how to create a button for students to click on and grade their answers. I'm doing something like this:

Instructions: Fill in the gaps with the correct form of the verbs.

I _________(live) in California. I ________(have) one brother. He _______(study) French and he ________(not work).....


Each line represents a "text input form" and at the end I want to create a button that submits the answers.

Could you help me?

Thank you very much.[;)]
 
Hi Ayari,
There are two things you need to do.
1/ Check for an answer.
The problem here is you are looking for a text response. The first could be one of several words,for example "I live" "I reside" can both be correct. So you need to set words that you are matching for.
Basically you will be making a little script that takes the input and then compares it to the answer or answers. You will also needs to make sure the answer is in the correct case. Say you have defined live as correct, live and LIVE are the same words but using a string comparison only one will be correct. The same will hold for any other words that might also be correct.
At its most basic you are going to be telling courselab to compare text strings .... $response = $answer or $answer2 ....
2/. Making abutton is easy but making what actions that button triggers is less easy. What are you submitting the answers to? AND are you trying to send each individual response OR just a pass fail status on the question.
How well or if this works at all will depend not only on how you handle the coding behind the question but also where the answers are going. You will need a CMS or LMS for this and not all will support this part of the SCORM API.
You can do this but it will take a little work to set up the question section and need to be targetted to the CMS / LMS to work.
There is a nice work around to pass things like this to Sharepoint, just search the form for sharepoint.
 
 
Thank you very much for your reply Nickj.

I don't know about java code or programming. So I'd appreciate if you could send me an example.

By the way, I'm trying to do a game, but I have some problems. The game is a "lettersoup" I want to click at the beggining of a word and at the end of it. (When this two steps are done, then it has to appear an arrow covering the option) I tried setting variables, but they don't work as I thought they would. Here is what I've done:

In the actions of the first letter of the word:
afterdisplay Variable(Name='word',Value='0',Scope='CurrentSlide')
onclick Variable(Name='word',Value='1',Scope='CurrentSlide)

In the actions of the last letter of the word:
onclick If(Condition='#varword==1')
Display(Object='shape59',Display='Show',Effect='Object',Duration='0')

The problem is that even I don't click on the first letter of the word; if I do it on the last one, the shape59 appears anyway.

I want the shape59 appears just when the first and last letter of the word have been clicked. Is this possible?

Thank you very much for your help. I know I'm trying to do very difficult things, but I need them for my courses.

I know I can do them on java. The point is that when I run them on my website they're really slow.(It would be great to be able to do it in courselab).[:D]

Thank you very much for your help.
 
 
 
OK see what you're doing there. The first statement sets your variable 'word' to 1.
The second statement is then using that variable...
If(condition='#varword==1') is saying IF the variable word value (or logical value) is 1 then carry on. The == means does the left side expression have equivalence to the right side expression. The small problem is that equivalence can mean two things depending on the context!
A/ It can be used of expressions with letters to mean that the left hand side is not just the same as the right hand side for one special combination of values for letters, but ALL possible assignments of values to letters.
B/ It can also mean Identity. The left hand side and right hand side are not merely the same value but are exactly the same thing.
Not a big difference but it does mean the operator == can act differently. The value in word can be interpreted as different things and this ambiguity is probably messing the statement up a little.
You want to set the second statement slightly differently to check the numeric value in your variable, that is don't use condition but value.
I'd suggest using IF ParseInt(#varword) = 1 as it will guarantee the contents of your variable are evaluated as a number and not a piece of boolean logic.

That's the best I can think of Arayi !!
 
 
 
 
Thank you very much for your reply Nick.

I tried IF Parseint(#varword)= 1 but it didn't work. Is there a javascript I can use. Thanks.[:confused:]

P.D. I'd appreciate an example because I don't know how to program.
Subject:
Message options
No additional options