This uses eval instead of your wrapper eval1. The button sets data cells
STATIC_RAN_01 and STATIC_RAN_02 to a random value. You can of course set up
as many static fields as you're going to need for your testing.
<$button>Set randoms
<$action-setfield $tiddler="data" $field="STATIC_RAN_01" $value=
<<eval datatiddler:"data" cell:"random1">>/>
<$action-setfield $tiddler="data" $field="STATIC_RAN_02" $value=
<<eval datatiddler:"data" cell:"random1">>/>
</$button>
Mark
On Friday, June 30, 2017 at 7:12:58 AM UTC-7, Stephen Wilson wrote:
>
> Timestamp....arrrghhhhhh....tooo much! :) (good idea)
>
> So it may be my random number generation method..as I say currently I
> can't get a static random number.
>
> On Friday, 30 June 2017 14:45:07 UTC+1, Mark S. wrote:
>>
>> It seems to me that you need a button to generate random numbers
>> somewhere at the top of your testing process. The button would populate
>> whatever random cells you want at the start. Then the rest of your test
>> questions would draw from from those cells. That way the random process
>> only occurs once and nothing changes as tiddlers are refreshed.
>>
>> As a side thought, if you had a start and stop button, then you could
>> also save timestamps and see how long it too to complete the test.
>>
>> Mark
>>
>> On Friday, June 30, 2017 at 3:56:33 AM UTC-7, Stephen Wilson wrote:
>>>
>>> Ok...
>>> I have looked at the wikify widget, then I looked some more...then I
>>> tried to find some examples....then I looked confused...
>>>
>>> Right...so the full story.
>>>
>>> I am using
>>> \define mylatex(a,b)
>>> <$wikify name="doit" text="""
>>> <$latex text="{$a$}+{$b$}" displayMode="true"></$latex>""" >
>>> <<doit>>
>>> </$wikify>
>>> \end
>>>
>>>
>>> <$macrocall $name="mylatex" a=<<eval1 datatiddler:"data" cell:"random3"
>>> >> b=<<eval1 datatiddler:"data" cell:"random4">> >
>>> To put a random value into a LaTeX equation (via the KaTeX plugin).
>>>
>>> The random number is generated by
>>> =@floor((@random() * 10) + 1)
>>> and the eval1 macro is from the mathcell plugin.
>>>
>>> So far so good. Unfortunately, at every update the random number
>>> changes and a different random number is generated for each tiddler that
>>> uses the above code.
>>> In an ideal world, I would want the SAME random number sent to multiple
>>> tiddlers.
>>>
>>> This leads me to my problem.
>>>
>>> 1. I need to generate a random number which I can then insert into an
>>> equation. DONE.
>>> 2. Student reads equation and submits answer.
>>> 3. Answer is compared to a list (generated by me) of 'correct' or
>>> 'nearly' answers and appropriate feedback given.
>>>
>>> So if I generate the random numbers into their own tiddlers and then
>>> take the number displayed in that tiddler back into another field just
>>> containing that plain number I can then transclude that into my latex and
>>> also perform more eval1 functions on it to generate answers which can then
>>> be compared to student imput also using the eval1 macro....
>>>
>>> How hard can it be? *sobs*...
>>>
>>> Regards
>>>
>>> Stephen
>>>
>>>
>>>
>>>
>>>
>>> On Monday, 19 June 2017 14:28:25 UTC+1, Ste Wilson wrote:
>>>>
>>>> I'll go have a look at the wikifi widget then I'll no doubt be back and
>>>> will fill out the details.
>>>>
>>>> Cheers!
>>>>
>>>
--
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/09827b04-012f-4989-9377-a4f7b3e86239%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.