Commit dc85793f authored by Ossi Laine's avatar Ossi Laine
Browse files

Show all experiments if language not defined in session

parent 52da9456
......@@ -23,8 +23,8 @@ def index():
session['group'] = None
if not session:
session['language'] = "English"
if 'language' not in session:
session['language'] = "All"
return render_template('home.html', title='Home', groups=groups)
......@@ -42,8 +42,8 @@ def group_page(group_tag):
experiments = experiment.query.filter_by(group_id=group.id).all()
session['group'] = group_tag
if not session:
session['language'] = "English"
if 'language' not in session:
session['language'] = "All"
return render_template('index.html', title='Home', experiments=experiments, group=group)
......
......@@ -15,7 +15,7 @@
a previously started task, click on the "Continue task" button.') }}</p>
<p class="lead text-center">{{ _('You can choose the language suitable for you from the language menu in the upper right corner.') }}</p>
</p>
<div class="row">
<div class="col mt-5">
......@@ -23,7 +23,7 @@
<p class="lead text-left mt-3 font-weight-bold">{{ _('List of experiments:') }}</p>
{% block attributes %}
{% for exp in experiments %}
{% if exp.status == 'Public' and session['language'] == exp.language %}
<ul class="list-group mb-3">
......@@ -74,9 +74,6 @@
{% autoescape false %}
{{ exp.short_instruction }}</li>
{% endautoescape %}
{% if current_user.is_authenticated %}
<li class="list-group-item"><span class="font-weight-bold">ID number:</span> {{ exp.idexperiment }} </li>
......@@ -91,7 +88,7 @@
<li class="list-group-item">
<a class="btn btn-outline-primary" href="{{ url_for('consent', exp_id=exp.idexperiment) }}" role="button">{{ _('Begin task') }}</a>
<a class="btn btn-outline-primary" href="{{ url_for('task.continue_task', exp_id=exp.idexperiment) }}" role="button">{{ _('Continue task') }}</a
<a class="btn btn-outline-primary" href="{{ url_for('task.continue_task', exp_id=exp.idexperiment) }}" role="button">{{ _('Continue task') }}</a>
{% if current_user.is_authenticated %}
<span class="text-right">
......@@ -108,14 +105,6 @@
{% endif %}
{% if (exp.status == 'Private') and (current_user.is_authenticated) and session['language'] == exp.language %}
<br>
<h3>Private experiment:</h3>
......@@ -196,11 +185,6 @@
{% endif %}
{% if (exp.status == 'Hidden') and (current_user.is_authenticated) and session['language'] == exp.language %}
<br>
<h3>Unpublished experiment:</h3>
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment