| |
3484 |
3484 |
# |
| |
3485 |
3485 |
# A correct answer might be: |
| |
3486 |
3486 |
# - a mark on a correct entry |
| |
3487 |
3487 |
# - no mark on a wrong entry |
| |
3488 |
3488 |
# |
| |
3489 |
3489 |
if {$a} { |
| |
3490 |
3490 |
incr r |
| |
3491 |
3491 |
set correctly_answered [expr {$v in $value}] |
| |
3492 |
3492 |
} else { |
| |
3493 |
3493 |
set correctly_answered [expr {$v ni $value}] |
| |
3494 |
3494 |
incr f |
| |
3495 |
3495 |
#:log "enumeration - CORRECT? <$a> <$v ni $value> -> [expr {$v ni $value}]" |
| |
3496 |
3496 |
} |
| |
3497 |
3497 |
lappend :correction $correctly_answered |
| |
3498 |
3498 |
if {$correctly_answered} { |
| |
3499 |
3499 |
incr R |
| |
3500 |
3500 |
} else { |
| |
3501 |
3501 |
incr W |
| |
3502 |
3502 |
} |
| |
3503 |
3503 |
|
| |
3504 |
|
if {[expr {$v in $value}]} { |
| |
|
3504 |
if {$v in $value} { |
| |
3505 |
3505 |
# |
| |
3506 |
3506 |
# Marked entries: mark can be correct or wrong. |
| |
3507 |
3507 |
# |
| |
3508 |
3508 |
if {$a} { |
| |
3509 |
3509 |
incr rk |
| |
3510 |
3510 |
} else { |
| |
3511 |
3511 |
incr fk |
| |
3512 |
3512 |
} |
| |
3513 |
3513 |
} |
| |
3514 |
3514 |
# |
| |
3515 |
3515 |
# Now calculate the scores of different scoring schemes. For |
| |
3516 |
3516 |
# now, we do not allow questions having no correct answer. |
| |
3517 |
3517 |
# |
| |
3518 |
3518 |
if {$r > 0} { |
| |
3519 |
3519 |
if {$f == 0} { |
| |
3520 |
3520 |
# |
| |
3521 |
3521 |
# No penalty for marking a wrong solution, when there is |
| |
3522 |
3522 |
# no wrong solution. |
| |
3523 |
3523 |
# |
| |
3524 |
3524 |
set wi1 [expr {max((100.0/$r) * $rk,0)}] |