Exemple #1
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

two_of_four_ocd = Blueprint('spq',
                            __name__,
                            static_url_path='/experiments/spq',
                            static_folder='/scif/apps/spq',
                            template_folder='/scif/apps')


@two_of_four_ocd.route('/experiments/spq/')
def two_of_four_ocd_base():
    context = {'experiment': 'spq/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="spq")


two_of_four_ocd.before_request(csrf.protect)
app.register_blueprint(two_of_four_ocd)
Exemple #2
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

starter = Blueprint('starter',
                    __name__,
                    static_url_path='/experiments/starter',
                    static_folder='/scif/apps/starter',
                    template_folder='/scif/apps')


@starter.route('/experiments/starter/')
def starter_base():
    context = {'experiment': 'starter/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="starter")


starter.before_request(csrf.protect)
app.register_blueprint(starter)
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

teacher_practice = Blueprint('teacher_practice',
                             __name__,
                             static_url_path='/experiments/teacher_practice',
                             static_folder='/scif/apps/teacher_practice',
                             template_folder='/scif/apps')


@teacher_practice.route('/experiments/teacher_practice/')
def teacher_practice_base():
    context = {'experiment': 'teacher_practice/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="teacher_practice")


teacher_practice.before_request(csrf.protect)
app.register_blueprint(teacher_practice)
Exemple #4
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

extra = Blueprint('extra',
                  __name__,
                  static_url_path='/experiments/extra',
                  static_folder='/scif/apps/extra',
                  template_folder='/scif/apps')


@extra.route('/experiments/extra/')
def extra_base():
    context = {'experiment': 'extra/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="extra")


extra.before_request(csrf.protect)
app.register_blueprint(extra)
Exemple #5
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

oci = Blueprint('oci',
                __name__,
                static_url_path='/experiments/oci',
                static_folder='/scif/apps/oci',
                template_folder='/scif/apps')


@oci.route('/experiments/oci/')
def oci_base():
    context = {'experiment': 'oci/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="oci")


oci.before_request(csrf.protect)
app.register_blueprint(oci)
Exemple #6
0
'''
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template, 
)
from expfactory.views.utils import (
    perform_checks, 
    clear_session
)
from expfactory.server import app, csrf
import os


{{ exp_id_python }} = Blueprint('{{ exp_id }}', __name__,
                                static_url_path='/experiments/{{ exp_id }}', 
                                static_folder='/scif/apps/{{ exp_id }}',
                                template_folder='/scif/apps')

@{{ exp_id_python }}.route('/experiments/{{ exp_id }}/')
def {{ exp_id_python }}_base():
    context = {'experiment': '{{ exp_id }}/index.html'}
    if context['experiment'] is not None:
        return perform_checks('experiments/experiment.html', context=context)
    return redirect('/next')

{{ exp_id_python }}.before_request(csrf.protect)
app.register_blueprint({{ exp_id_python }})
Exemple #7
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

teacher_test = Blueprint('teacher_test',
                         __name__,
                         static_url_path='/experiments/teacher_test',
                         static_folder='/scif/apps/teacher_test',
                         template_folder='/scif/apps')


@teacher_test.route('/experiments/teacher_test/')
def teacher_test_base():
    context = {'experiment': 'teacher_test/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="teacher_test")


teacher_test.before_request(csrf.protect)
app.register_blueprint(teacher_test)
Exemple #8
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

two_of_four_ocd_practice = Blueprint(
    'two_of_four_ocd_practice',
    __name__,
    static_url_path='/experiments/two_of_four_ocd_practice',
    static_folder='/scif/apps/two_of_four_ocd_practice',
    template_folder='/scif/apps')


@two_of_four_ocd_practice.route('/experiments/two_of_four_ocd_practice/')
def two_of_four_ocd_practice_base():
    context = {'experiment': 'two_of_four_ocd_practice/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="two_of_four_ocd_practice")


two_of_four_ocd_practice.before_request(csrf.protect)
app.register_blueprint(two_of_four_ocd_practice)
Exemple #9
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

teacher_starter = Blueprint('teacher_starter',
                            __name__,
                            static_url_path='/experiments/teacher_starter',
                            static_folder='/scif/apps/teacher_starter',
                            template_folder='/scif/apps')


@teacher_starter.route('/experiments/teacher_starter/')
def teacher_starter_base():
    context = {'experiment': 'teacher_starter/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="teacher_starter")


teacher_starter.before_request(csrf.protect)
app.register_blueprint(teacher_starter)
Exemple #10
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

bdi = Blueprint('bdi',
                __name__,
                static_url_path='/experiments/bdi',
                static_folder='/scif/apps/bdi',
                template_folder='/scif/apps')


@bdi.route('/experiments/bdi/')
def bdi_base():
    context = {'experiment': 'bdi/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="bdi")


bdi.before_request(csrf.protect)
app.register_blueprint(bdi)
Exemple #11
0
from expfactory.logger import bot

from flask import (
    Blueprint,
    render_template,
)
from expfactory.views.utils import (perform_checks, clear_session)
from expfactory.server import app, csrf
import os

stai = Blueprint('stai',
                 __name__,
                 static_url_path='/experiments/stai',
                 static_folder='/scif/apps/stai',
                 template_folder='/scif/apps')


@stai.route('/experiments/stai/')
def stai_base():
    context = {'experiment': 'stai/index.html'}
    return perform_checks('experiments/experiment.html',
                          quiet=True,
                          context=context,
                          next="stai")


stai.before_request(csrf.protect)
app.register_blueprint(stai)