\o/

tks Eric, 
for correcting my code 
...and my english :)
now, it works perfectly.

Em quinta-feira, 21 de julho de 2016 13:48:03 UTC-3, Eric Shulman escreveu:
>
> On Thursday, July 21, 2016 at 6:58:39 AM UTC-7, Carlos Caimi wrote:
>>
>> I'm try to make a simple avaliation ("evaluation" ???) form using a macro 
>> to create radios for awnser ("ANSWER") and <$reveal> to show the correct 
>> awnser for the student. But dont work.
>>
>
> In your code, you write: 
> <$radio field="$:/state/q/$quest$" value="a">A</$radio>
>
> However, to specify the target of a radio button, you must specify the 
> *tiddler* and *field* separately.  Something like this will work:
> <$radio tiddler="$:/state/q/$quest$" field="text" value="a">A</$radio>
> (note: the *field* name will default to "text" if not provided)
>
> You will also need to change your debugging output from
> {{!!$:/state/q/$quest$}}
> to
> {{$:/state/q/$quest$}}
>
> Then, the rest of your script will work as you intend:
>  
> \define q(quest: "q1" answer: "b")
> """
> <$radio tiddler="$:/state/q/$quest$" value="a">A</$radio>
> <$radio tiddler="$:/state/q/$quest$" value="b">B</$radio>
> <$radio tiddler="$:/state/q/$quest$" value="c">C</$radio>
> <$radio tiddler="$:/state/q/$quest$" value="d">D</$radio>
> <$radio tiddler="$:/state/q/$quest$" value="e">E</$radio>
> """
> debug: quest: ''$quest$''; correctAnswer: ''$answer$''; answer: ''{{$:
> /state/q/$quest$}}''
> <$reveal type="match" state="$:/state/q/$quest$" text="$answer$">
>    CORRECT!!
> </$reveal>
> <$reveal type="nomatch" state="$:/state/q/$quest$" text="$answer$">
>    WRONG!!
> </$reveal>
> \end
>
> <<q "q1" "c">> 
> (note: I corrected your spelling of "answer")
>
> enjoy,
> -e
> Eric Shulman
> TiddlyTools / ELS Design Studios
> InsideTiddlyWiki: The Missing Manuals
>

-- 
You received this message because you are subscribed to the Google Groups 
"TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/tiddlywiki.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tiddlywiki/3923e3be-b03b-47d4-9462-ea29b0c9c3ad%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to