Rev 17764 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed
Rev 17764 | Rev 18581 | ||
---|---|---|---|
Line 397... | Line 397... | ||
397 | !for i=1 to $choicecnt |
397 | !for i=1 to $choicecnt |
398 | !if $oefsteps!=$empty and c$i notitemof $gotsteps |
398 | !if $oefsteps!=$empty and c$i notitemof $gotsteps |
399 | !goto contc |
399 | !goto contc |
400 | !endif |
400 | !endif |
401 | !default choice$i=0 |
401 | !default choice$i=0 |
402 |
|
402 | choic$i=$[rint($(choice$i))] |
403 | !if |
403 | !if $(choic$i)=0 and ($oefsteps=$empty or c$i isitemof $gotsteps) |
404 | error=empty_data |
404 | error=empty_data |
405 | !goto end |
405 | !goto end |
406 | !endif |
406 | !endif |
407 | !if NaN isin |
407 | !if NaN isin $(choic$i) or $(choic$i)<1 or $(choic$i)>$(choiceitems$i)+2 |
408 |
|
408 | error=bad_answer |
409 | bad_name=$(choicename$i) |
409 | bad_name=$(choicename$i) |
410 | bad_value=$(choice$i) |
410 | bad_value=$(choice$i) |
411 | !goto end |
411 | !goto end |
412 | !else |
412 | !else |
413 |
|
413 | choice$i=$(choic$i) |
414 | !endif |
414 | !endif |
415 |
|
415 | ch$i=!item $(choic$i) of $(choicelist$i) |
416 |
|
416 | m_choice$i=$(ch$i) |
417 | !if $qcmgood<1 and |
417 | !if $qcmgood<1 and $(choic$i)=$[$(choiceitems$i)+2] |
418 | !if $(choicegood$i)=$empty |
418 | !if $(choicegood$i)=$empty |
419 |
|
419 | chh$i=good |
420 | !else |
420 | !else |
421 |
|
421 | chh$i=bad |
422 | !endif |
422 | !endif |
423 | !endif |
423 | !endif |
424 | !if ( |
424 | !if ($(choic$i)<=$(choiceitems$i) and $(ch$i) isitemof $(choicegood$i)) or $(chh$i)=good |
425 | diachoice$i=good |
425 | diachoice$i=good |
426 | m_sc_choice$i=1 |
426 | m_sc_choice$i=1 |
427 | !advance qcmgot |
427 | !advance qcmgot |
428 | !else |
428 | !else |
429 | diachoice$i=bad |
429 | diachoice$i=bad |
430 | m_sc_choice$i=0 |
430 | m_sc_choice$i=0 |
431 | !if $penalty>0 and |
431 | !if $penalty>0 and $(choic$i)!=$[$(choiceitems$i)+1] |
432 | cc=!itemcnt $(choicegood$i) |
432 | cc=!itemcnt $(choicegood$i) |
433 | !if $cc>=$(choiceitems$i) |
433 | !if $cc>=$(choiceitems$i) |
434 | cc=$[$(choiceitems$i)-1] |
434 | cc=$[$(choiceitems$i)-1] |
435 | !endif |
435 | !endif |
436 | qcmgot=$[$qcmgot-$cc/($(choiceitems$i)-$cc)] |
436 | qcmgot=$[$qcmgot-$cc/($(choiceitems$i)-$cc)] |
437 | !endif |
437 | !endif |
438 | !if |
438 | !if $(choic$i)=$[$(choiceitems$i)+1] |
439 | m_sc_choice$i=-1 |
439 | m_sc_choice$i=-1 |
440 | !endif |
440 | !endif |
441 | !endif |
441 | !endif |
442 | :contc |
442 | :contc |
443 | !next i |
443 | !next i |