problem list item

Reply

Join Date: Oct 2006
Posts: 11
Reputation: Mohandsa is an unknown quantity at this point 
Solved Threads: 0
Mohandsa Mohandsa is offline Offline
Newbie Poster

problem list item

 
0
  #1
Oct 15th, 2008
status

teacher build exam (question and answer) and student take the exam

form build_pre_exam add data into pre_exam table

when form run ,
user(teacher ) have to insert question and four cooses then choose from list item which one i correct answer (to enable to check exam for student) ,after that i need to insert 1 an correct answer and 0 in wrong one (these is my problem)


for example if he select choose 1 (from list item) ,insert into answer1 = 1
for example if he select choose 2 (from list item),insert into answer2 = 1

could u help me ?

attach

build_pre_exam.fmb and pre_exam table

Thanks
Attached Files
File Type: zip BUILD_PRE_EXAM.zip (11.7 KB, 2 views)
File Type: zip PRE EXAM.zip (333 Bytes, 2 views)
Reply With Quote Quick reply to this message  
Join Date: Dec 2008
Posts: 9
Reputation: like_to_learn is an unknown quantity at this point 
Solved Threads: 0
like_to_learn's Avatar
like_to_learn like_to_learn is offline Offline
Newbie Poster

Re: problem list item

 
0
  #2
Dec 10th, 2008
you need to handled this in "WHEN-LIST-CHANGED"
EX:
table name A,field name :question
question: what is the result of 10+5?
1)25
2)35
3)15
4)45
you know that which is the answer for that question,right?
here answer is 3
So, you need to write code like
declare
var1 number;--(to store ques no)
var2 number;--(to store ans no)
var3 number;--(to store updated ans result)
cursor c1 is
select ques_no,ans from A
where ques_no = :A.ques_no;
begin
open c1;
fetch c1 into var1,var2;
close c1;

IF :A.ques_no = var1 then
if :A.ans = var2 then
var3:=1;
-- you just assign 0's to remaining options
end if;
end if;
--after this you just update the table with thease values or you can insert these into required fields.............

I hope this can help you to handle your requirement.......Otherwise
you can get some ideas by seeing this as per your requirement.....
If you get the solution by someother way means plesase send the solution for reference purpose....
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC