Beispiel #1
0
def render_for_experiment(page, experiment, **other_args):
    #TODO - headers, and general chrome/css
    other_args['conditions'] = generate_conditions(
        json.loads(experiment.conditions_json))
    other_args['experiment'] = experiment
    other_args['earned_so_far_cents'] = cherrypy.session['earned_so_far_cents']
    other_args['round'] = cherrypy.session.get('round')
    return env.get_template(page).render(**other_args)
Beispiel #2
0
def render_for_experiment(page, experiment, **other_args):
  #TODO - headers, and general chrome/css
  other_args['conditions'] = generate_conditions(
    json.loads(experiment.conditions_json))
  other_args['experiment'] = experiment
  other_args['earned_so_far_cents'] = cherrypy.session['earned_so_far_cents']
  other_args['round'] = cherrypy.session.get('round')
  return env.get_template(page).render(**other_args)
Beispiel #3
0
def condition_get(condition_name):
    conditions = generate_conditions(
        json.loads(cherrypy.session['experiment'].conditions_json))
    return conditions.get(condition_name)
Beispiel #4
0
def condition_get(condition_name):
  conditions = generate_conditions(
    json.loads(cherrypy.session['experiment'].conditions_json))
  return conditions.get(condition_name)