{% extends "otree/BaseSite.html" %}

{% block title %}
    Persistent Lab URLs
{% endblock %}

{% block content %}
    <p>
    Here are some example persistent URLs you can use in the lab. They will stay constant for new sessions, even if the database is recreated.
    </p>

    <p>
    {% for url in default_session_example_urls %}
        <a href="{{ url }}">{{ url }}</a>
        <br/>
    {% endfor %}
    </p>

    <p>
    You should take these links, copy them for as many participants are in your session,
    and modify the <code>{{ participant_label }}</code> parameter of each link.
    The above is just an example.
    You can use whatever naming scheme you would like to use, e.g. <code>{{ participant_label }}=PC-1</code>, <code>{{ participant_label }}=PC-2</code>, etc.
    </p>

    <p>
    Note the parameter <code>{{ access_code_for_default_session }}</code>. This is defined in your <code>settings.py</code>.
    You can change it as frequently as you'd like, to prevent unauthorized server access.
    </p>

    {% if default_session %}
    <div class="alert alert-info" role="alert">
        Your current default session is 
        <a href="{% url 'session_description' default_session.pk %}" target="_blank">{{ default_session.code }}</a>.
        All participants are going to be routed to this session.
    </div>
    {% else %}
    <div class="alert alert-warning" role="alert">
        The default session is currently not set.
        Before launching your experiment set the default session
        via the <a href="{% url 'sessions' %}" target="_blank">sessions page</a> to route
        the participants to it.
    </div>
    {% endif %}
{% endblock %}
