view_experiment.html 16.2 KB
Newer Older
Timo Heikkilä's avatar
Timo Heikkilä committed
1
2
3
4
5
6
7
8
9
10
11
12
{% extends "base.html" %}
{% block content %}

<h1 class="container mt-5 display-4 text-left"><br>Experiment info:</h1>
<br>


<div class="container col-12">
<table class="table">
  <tbody>

{% for exp in experiment_info %}
13
<!-- Why there is a for loop her ?! -->
Timo Heikkilä's avatar
Timo Heikkilä committed
14

Timo Heikkilä's avatar
Timo Heikkilä committed
15
    <tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
16
      <td nowrap>Name:</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
      <td>{{ exp.name }}</td>
      <td>
      <button type="button" class="btn btn-primary btn-block btn-sm btn-dark" data-toggle="modal" data-target="#myModal-remove">Remove experiment</button>
      <!-- Modal -->
      <div class="modal fade" id="myModal-remove" role="dialog">
        <div class="modal-dialog modal-dialog-centered" id="modal-remove">
          <!-- Modal content-->
          <div class="modal-content modal-dialog-centered">
            <div class="modal-header">
              <button type="button" class="close" data-dismiss="modal">&times;</button>
              <h4 class="modal-title">Notice!</h4>
            </div>
            <div class="modal-body">
              <p>Are you sure you want to remove this experiment? All gathered ratings will be lost!</p>
            </div>
            <div class="modal-footer">
              <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
34
              <a class="btn btn-primary" href="{{ url_for('experiment.remove', exp_id=exp.idexperiment) }}" role="button">Yes, remove</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
35
36
37
38
39
40
41
42
            </div>
          </div>
        </div>
      </div>
      
      </td>
    </tr>
    <tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
43
      <td nowrap>Status:</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
44
45
46
      <td>{{ exp.status }}</td>
      <td>
    {% if exp.status == 'Hidden' %}      
47
48
      <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.publish', exp_id=exp.idexperiment) }}" role="button">Publish (visible)</a>
      <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.private', exp_id=exp.idexperiment) }}" role="button">Publish (private)</a>
49
      </td>
Timo Heikkilä's avatar
Timo Heikkilä committed
50
    {% endif %}
51
    {% if exp.status != 'Hidden' %}      
52
      <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.hide', exp_id=exp.idexperiment) }}" role="button">Unpublish</a></td>
Timo Heikkilä's avatar
Timo Heikkilä committed
53
54
    {% endif %}
    </tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
55

Timo Heikkilä's avatar
Timo Heikkilä committed
56
    <tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
57
58
59
      <td nowrap>Creator:</td>
      <td>{{ exp.creator_name }} - {{ exp.creation_time }}</td>
      <td nowrap></td>
Timo Heikkilä's avatar
Timo Heikkilä committed
60
61
    </tr>
    <tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
      <td nowrap>Language:</td>
      <td>{{ exp.language }}</td>
      <td nowrap></td>
    </tr>
     <tr>
      <td nowrap>Stimulus type:</td>
      <td>{{ mtype.type }}</td>
      <td nowrap></td>
    </tr>
     <tr>
      <td nowrap>Stimulus size:</td>
      <td>{{ exp.stimulus_size }}</td>
      <td nowrap>
      </td>
    </tr>

    <tr>
      <td nowrap>Trial randomization:</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
80
      <td>{{ exp.randomization }}</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
81
      <td nowrap>
Timo Heikkilä's avatar
Timo Heikkilä committed
82
    {% if exp.randomization == 'Off' %}      
83
      <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.randomization', exp_id=exp.idexperiment, set='On') }}" role="button">Enable</a></td>
Timo Heikkilä's avatar
Timo Heikkilä committed
84
85
    {% endif %}
    {% if exp.randomization == 'On' %}      
86
      <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.randomization', exp_id=exp.idexperiment, set='Off') }}" role="button">Disable</a></td>
Timo Heikkilä's avatar
Timo Heikkilä committed
87
88
    {% endif %}

Timo Heikkilä's avatar
Timo Heikkilä committed
89
90
91
92
93
94
    </td>
    </tr>
      <td nowrap>Use forced ID for participants:</td>
      <td>{{ exp.use_forced_id }}</td>
      <td nowrap>
    {% if exp.use_forced_id == 'Off' %}      
95
      <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.set_forced_id', exp_id=exp.idexperiment, set='On') }}" role="button">Enable</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
96
97
98
99
      
      
    {% endif %}
    {% if exp.use_forced_id == 'On' %}      
100
101
      <a class="btn btn-primary w-50 btn-sm btn-info" href="{{ url_for('experiment.set_forced_id', exp_id=exp.idexperiment, set='Off') }}" role="button">Disable</a>
      <a class="btn btn-primary w-50 btn-sm btn-info" href="{{ url_for('experiment.view_forced_id_list', exp_id=exp.idexperiment) }}" role="button">Check ID</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
102
103
104
    {% endif %}
      
    </td>
Timo Heikkilä's avatar
Timo Heikkilä committed
105
106
    </tr>
    <tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
107
108
109
    <td> Research bulletin:</td>   
    <td> {{ exp.research_notification_filename }}</td>   
    {% if exp.research_notification_filename  %}
110
    <td> <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.remove_research_notification', exp_id=exp.idexperiment) }}" role="button">Remove</a></td>   
Timo Heikkilä's avatar
Timo Heikkilä committed
111
    {% else %}
112
    <td> <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.upload_research_notification', exp_id=exp.idexperiment) }}" role="button">Upload</a></td>   
Timo Heikkilä's avatar
Timo Heikkilä committed
113
    {% endif %}
Timo Heikkilä's avatar
Timo Heikkilä committed
114
    </tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
115
116
117
    
    <tr>
      <td nowrap>Detailed instructions:</td>
118
119
120
121
      
      
      <td class="text-justify">{{ exp.instruction }}</td>
      
Timo Heikkilä's avatar
Timo Heikkilä committed
122
      <td nowrap>
123
     <a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.edit', exp_id=exp.idexperiment) }}" role="button">Edit properties</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
124
    </td>
Timo Heikkilä's avatar
Timo Heikkilä committed
125
126
    </tr>
    <tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
127
      <td nowrap>Short description:</td>
128
      <td class="text-justify">{{ exp.short_instruction }}</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
129
130
131
132
133
134
135
136
137
138
139
      <td nowrap></td>
    </tr>

    <tr>
      <td nowrap>Single sentence instruction:</td>
      <td>{{ exp.single_sentence_instruction }}</td>
      <td nowrap></td>
    </tr>

    <tr>
      <td nowrap>Consent form text:</td>
140
      <td class="text-justify">{{ exp.consent_text }}</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
141
142
143
144
      <td nowrap></td>
    </tr>
    <tr>
      <td nowrap>Experiment database ID:</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
145
      <td>{{ exp.idexperiment }}</td>
Timo Heikkilä's avatar
Timo Heikkilä committed
146
      <td nowrap></td>
Timo Heikkilä's avatar
Timo Heikkilä committed
147
148
    </tr>

Timo Heikkilä's avatar
Timo Heikkilä committed
149
150


Timo Heikkilä's avatar
Timo Heikkilä committed
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
{% endfor %}
  </tbody>
</table>
</div>



<h1 class="container mt-5 display-4 text-left"><br>Background questions:</h1>
<br>

    {% for options in questions1 %}
    
    <table class="table">
      <tbody>  
      <tr>
Timo Heikkilä's avatar
Timo Heikkilä committed
166
      <td class="col-11">
Timo Heikkilä's avatar
Timo Heikkilä committed
167
168
        <label for="{{ options[0] }}">{{ options[1] }}</label>
            <select required class="form-control" name="{{ options[0] }}">  
Timo Heikkilä's avatar
Timo Heikkilä committed
169
                <option disabled selected value>Please select</option>
Timo Heikkilä's avatar
Timo Heikkilä committed
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
                {% for op in questions1[options] %}
                     <option value="{{ op[0] }}" name="{{ op[0] }}">{{ op[0] }}</option>
                {% endfor %}   
            </select>
    </td>
    <td class="text-nowrap align-bottom">
    
             <button type="button" class="btn btn-primary btn-sm btn-dark" data-toggle="modal" data-target="#myModal{{options[0]}}">Remove</button>
                      <!-- Modal -->
                      <div class="modal fade" id="myModal{{options[0]}}" role="dialog">
                        <div class="modal-dialog modal-dialog-centered" id="{{options[0]}}">
                          <!-- Modal content-->
                          <div class="modal-content modal-dialog-centered">
                            <div class="modal-header">
                              <button type="button" class="close" data-dismiss="modal">&times;</button>
                              <h4 class="modal-title">Notice!</h4>
                            </div>
                            <div class="modal-body">
                              <p>Are you sure you want to remove this?</p>
                            </div>
                            <div class="modal-footer">
                              <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
192
                              <a class="btn btn-primary" href="{{ url_for('experiment.remove_bg_question', idbackground_question=options[0], exp_id=exp_id) }}" role="button">Yes, remove</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
193
194
195
196
                            </div>
                          </div>
                        </div>
                      </div>
197
    <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.edit_bg_question', idbackground_question=options[0]) }}" role="button">Edit</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
198
199
200
201
202
203
204
205
206
207

    </td>
    </tr>
        
       {% endfor %}
    </tbody>
    </table>
    <table class="table">
    <tbody>
    <td class="text-nowrap align-bottom text-right col-8">
208
    <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.add_bg_question', exp_id=exp_id) }}" role="button">Add more</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
209
210
211
212
213
214
215
    </td>
    </tbody>
    </table>



<h1 class="container mt-5 display-4 text-left"><br>Rating set:</h1>
216

217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
<table class="table">
  <colgroup>
    <col style="width:33%;%">
    <col style="width:33%;%">
    <col style="width:33%;%">
  </colgroup>
  <tr>
    <td>Add embody tool:</td>
    <td> 
    {% if experiment_info[0].embody_enabled %}   
      Enabled
    {% else %}
      Disabled
    {% endif %}
    </td>
    <td><a class="btn btn-primary btn-block btn-sm btn-info" href="{{ url_for('experiment.set_embody', exp_id=exp_id) }}" role="button">Enable embody</a></td>
  </tr>
</table>

Timo Heikkilä's avatar
Timo Heikkilä committed
236
237
<hr>
<br>    
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
{% for category in categories1 %}
    {% for scale in categories1[category] %}
        <div class="row form-group">
            <div class="col-2 text-center">
                <p>{{ scale[0] }}</p> 
            </div>
            <div class="col text-center">
                <label for="customRange">{{ category[1] }}</label>
                <input type="range" class="custom-range" id="customRange" name={{ category[0] }}>
              </div>
            <div class="col-2 text-center">
            <p>{{ scale[1] }}</p> 
            </div>
            <div class="col-2 text-center">
            
            
                <button type="button" class="btn btn-primary btn-sm btn-dark" data-toggle="modal" data-target="#mymodal{{category[0]}}">Remove</button>
                  <!-- Modal -->
                  <div class="modal fade" id="mymodal{{category[0]}}" role="dialog">
                    <div class="modal-dialog modal-dialog-centered" id="{{category[0]}}">
                      <!-- Modal content-->
                      <div class="modal-content modal-dialog-centered">
                        <div class="modal-header">
                          <button type="button" class="close" data-dismiss="modal">&times;</button>
                          <h4 class="modal-title">Notice!</h4>
                        </div>
                        <div class="modal-body">
                          <p>Are you sure you want to remove this?</p>
                        </div>
                        <div class="modal-footer">
                          <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
                          <a class="btn btn-primary" href="{{ url_for('experiment.remove_question', idquestion=category[0], exp_id=exp_id) }}" role="button">Yes, remove</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
270
271
                        </div>
                      </div>
272
273
274
275
                    </div>
                  </div>
            <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.edit_question', idquestion=category[0]) }}" role="button">Edit</a>
              
Timo Heikkilä's avatar
Timo Heikkilä committed
276
            </div>
277
278
279
280

        </div>
      {% endfor %}   
{% endfor %}
Timo Heikkilä's avatar
Timo Heikkilä committed
281
282
283
284
285

    </table>
    <table class="table">
    <tbody>
    <td class="text-nowrap align-bottom text-right col-8">
286
    <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.add_questions', exp_id=exp_id) }}" role="button">Add more</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
    </td>
    </tbody>
    </table>


 <h1 class="container mt-5 display-4 text-left"><br>Stimuli:</h1>
 <hr>

  <p class="lead">Please notice that the Page ID is just the reference ID of the stimulus in the database. When stimulus randomization is set to "OFF"
                  the stimulus will be presented in the order below even if there would be numbers missing from the page ID sequence.
                  If randomization is set to "ON" the order will be randomized for each participant.
  </p>
 <br>   
<div class="container col-12">
 <table class="table col-12">
  <tbody>
    {% if mtype.type=='text' %}
Timo Heikkilä's avatar
Timo Heikkilä committed
304
            {% for page in media %}
Timo Heikkilä's avatar
Timo Heikkilä committed
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
                <tr class="col-12">
                    <td class="text-nowrap">Page ID: {{ page.idpage }}
                    </td>
                    <td class="col-8">{{ page.text }}
                    </td>
                    <td class="col-2 text-nowrap">
                    <button type="button" class="btn btn-primary btn-sm btn-dark" data-toggle="modal" data-target="#mymodal{{page.idpage}}">Remove</button>
                      <!-- Modal -->
                      <div class="modal fade" id="mymodal{{page.idpage}}" role="dialog">
                        <div class="modal-dialog modal-dialog-centered" id="{{page.idpage}}">
                          <!-- Modal content-->
                          <div class="modal-content modal-dialog-centered">
                            <div class="modal-header">
                              <button type="button" class="close" data-dismiss="modal">&times;</button>
                              <h4 class="modal-title">Notice!</h4>
                            </div>
                            <div class="modal-body">
                              <p>Are you sure you want to remove this?</p>
                            </div>
                            <div class="modal-footer">
                              <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
326
                              <a class="btn btn-primary" href="{{ url_for('experiment.remove_stimuli', idpage=page.idpage, exp_id=exp_id) }}" role="button">Yes, remove</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
327
328
329
330
                            </div>
                          </div>
                        </div>
                      </div>
331
                     <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.edit_stimuli', idpage=page.idpage, exp_id=exp_id) }}" role="button">Edit</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
332
333
334
335
336
337
338
                    </td>
                </tr>
            {% endfor %}
            
                  <table class="table">
                  <tbody>
                  <td class="text-nowrap align-bottom text-right col-8">
339
                  <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.add_stimuli', exp_id=exp_id, stimulus_type=mtype.type) }}" role="button">Add more</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
340
341
342
343
344
345
                  </td>
                  </tbody>
                  </table>
   
    {% else %}
        <div class="container col-12">
Timo Heikkilä's avatar
Timo Heikkilä committed
346
            {% for page in media %}
Timo Heikkilä's avatar
Timo Heikkilä committed
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
                <tr class="col-12 text-left">
                    <td class="col-2 text-nowrap">Page ID: {{ page.idpage }}
                    </td>
                    <td class="col-8" >{{ page.media }}
                    </td>
                    <td class="col-2 text-nowrap">
                    <button type="button" class="btn btn-primary btn-sm btn-dark" data-toggle="modal" data-target="#mymodal{{page.idpage}}">Remove</button>
                      <!-- Modal -->
                      <div class="modal fade" id="mymodal{{page.idpage}}" role="dialog">
                        <div class="modal-dialog modal-dialog-centered" id="{{page.idpage}}">
                          <!-- Modal content-->
                          <div class="modal-content modal-dialog-centered">
                            <div class="modal-header">
                              <button type="button" class="close" data-dismiss="modal">&times;</button>
                              <h4 class="modal-title">Notice!</h4>
                            </div>
                            <div class="modal-body">
                              <p>Are you sure you want to remove this?</p>
                            </div>
                            <div class="modal-footer">
                              <button type="button" class="btn btn-default" data-dismiss="modal">Cancel</button>
368
                              <a class="btn btn-primary" href="{{ url_for('experiment.remove_stimuli', idpage=page.idpage, exp_id=exp_id) }}" role="button">Yes, remove</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
369
370
371
372
                            </div>
                          </div>
                        </div>
                      </div>
373
                     <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.edit_stimuli', idpage=page.idpage, exp_id=exp_id) }}" role="button">Replace</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
374
375
376
377
378
379
380
381
                 
                    </td>
                </tr>
            {% endfor %}
            
                          <table class="table">
                  <tbody>
                  <td class="text-nowrap align-bottom text-right col-8">
382
383
                  {{ mtype }}
                  <a class="btn btn-primary btn-sm btn-info" href="{{ url_for('experiment.add_stimuli', exp_id=exp_id, stimulus_type=mtype.type) }}" role="button">Add more</a>
Timo Heikkilä's avatar
Timo Heikkilä committed
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
                  </td>
                  </tbody>
                  </table>    
        
    {% endif %}

    </tbody>
    </table>
    
    </div>
    <br>
 

    
{% endblock %}