Evaluate an expression in a ?


Author
Message
writekristin
writekristin
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 17, Visits: 62
thank you!

Dave
Dave
Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)Supreme Being (1M reputation)
Group: Administrators
Posts: 13K, Visits: 104K
Yes, you can embed expressions or create inline expressions in a <page> as usual.

<expressions>
/ pagetext = if (trial.mytrial.correct) "You won!" else "You lost!"
</expressions>

<block myblock>
/ postinstructions = (end)
/ trials = [1=mytrial]
</block>

<trial mytrial>
/ validresponse = ("e", "i")
/ correctresponse = ("e")
</trial>

<page end>
^<% expressions.pagetext %>
^Goodbye!
</page>

writekristin
writekristin
Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)Distinguished Member (2.6K reputation)
Group: Forum Members
Posts: 17, Visits: 62
I am creating a <page> for my post instructions that will report on how the user performed, however depending on the performance, I want it to say different things.  Is there a way to evaluate a value in the <page> and have it display different wording?  Alternatively, I can create two different pages, but can I then do branching in the postinstructions of the <block>?

Thanks!

GO

Merge Selected

Merge into selected topic...



Merge into merge target...



Merge into a specific topic ID...




Reading This Topic

Explore
Messages
Mentions
Search