I have created MCQs with radio buttons and I want to know if there is a way to check whether the answer is correct or not without <>
Your question ended with
If you included a code example then please use the
</> Preformatted text option when doing so, it stops the forum’s software eating your code.
The simplest method for checking the current value(s) of end-user enter answers is to use an interactive button/link that runs the “checking” code. The following simple example outputs a Correct/Incorrect message when a Check Answers button is selected…
What's my favorite pie? * <<radiobutton "$pie" "blueberry" autocheck>> Blueberry? * <<radiobutton "$pie" "cherry" autocheck>> Cherry? * <<radiobutton "$pie" "coconut cream" autocheck>> Coconut cream? <<button "Check Answers">> <<if $pie is "coconut cream">> <<replace "#result">>Correct<</replace>> <<else>> <<replace "#result">>Incorrect<</replace>> <</if>> <</button>> Result: @@#result;@@
Thank you for this. Do you know how we could give the user two attempts in this case and in each attempt points will be deducted. The user can’t try more than twice