Skip to content

How do I create a customized abort_page for the al.ListRandomizer? #238

Discussion options

You must be logged in to vote

The abort_page should be a page instance, but you are providing a page class. An example for correct usage can be found here: https://alfredo3.psych.bio.uni-goettingen.de/docs/generated/alfred3.randomizer.ListRandomizer.get_condition.html#alfred3.randomizer.ListRandomizer.get_condition

Here's a copy of that example:

import alfred3 as al
exp = al.Experiment()

@exp.setup
def setup(exp):
    full_page = al.Page(title="Experiment closed.", name="fullpage")
    full_page += al.Text("Sorry, the experiment currently does not accept any further participants.")

    randomizer = al.ListRandomizer(("cond1", 10), ("cond2", 10), exp=exp, abort_page=full_page)

    exp.condition = randomizer.get_cond…

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@slussinator
Comment options

@jobrachem
Comment options

Answer selected by slussinator
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants