-
Notifications
You must be signed in to change notification settings - Fork 1
/
training.php
94 lines (77 loc) · 4.22 KB
/
training.php
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
<?php
if (isset($_GET['task'])) {
$contents = file_get_contents("data/training.json", true);
$parsedContent = json_decode($contents, true);
?>
<!DOCTYPE html>
<html>
<?php include 'elements/head.php' ?>
<body class="container">
<div >
<div class="jumbotron" style="background:white ; text-align: center" >
<h1 class="display-4">Classifying Scientific Abstracts</h1>
<p class="lead">Welcome crowdworker!</p>
</div>
<div>
<div class="row">
<div style="background-color: #efefef" class="card col-md-4">
<span style="text-align: center; width: 100%" ><img style="padding: 5px" src="../images/teacher.png" width="80"></span>
<p style="text-align: center; width: 100%" >Training</p>
</div>
<div class="card col-md-4">
<span style="text-align: center; width: 100%"><img style="padding: 5px" src="../images/document.png" width="80"></span>
<p style="text-align: center; width: 100%">Task</p>
</div>
<div class="card col-md-4">
<span style="text-align: center; width: 100%"><img style="padding: 5px" src="../images/checkmark.png" width="80"></span>
<p style="text-align: center; width: 100%">Finish</p>
</div>
</div>
</div>
<?php include 'elements/instructions.php' ?>
<div class="jumbotron" style="background:white ; text-align: center" >
<h1 class="display-4">Let's start the training phase!</h1>
</div>
<form action="/crowdslr/task.php?task=<?= $_GET['task'] ?>" method="POST">
<?php foreach ($parsedContent as $abs) { ?>
<br><hr><br>
<p class="lead">Study <?= $abs['idAbstract'] + 1 ?></p>
<div class="card alert-secondary" style="margin-top:20px;padding: 20px">
<h3 class="display-5"><b><?= $abs['title'] ?></b></h3>
<p class="lead">Abstract: <?= $abs['fullAbstract'] ?></p>
</div>
<div id="question" style="margin-top:20px; padding: 20px; " class="card alert-info">
<p>IC1 - Does the article focus on aligning Software Engineering education with industrial needs?</p>
<select required="true" id="q<?= $abs['idAbstract'] ?>ic1" class="form-control" name="q<?= $abs['idAbstract'] ?>ic1">
<option value="select">Select an option</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<br>
<p>IC2 - Is the article based on empirical data and not just the opinion of the authors?</p>
<select required="true" id="q<?= $abs['idAbstract'] ?>ic2" class="form-control" name="q<?= $abs['idAbstract'] ?>ic2">
<option value="select">Select an option</option>
<option value="yes">Yes</option>
<option value="no">No</option>
</select>
<br>
<p>Final decision</p>
<select required="true" id="q<?= $abs['idAbstract'] ?>" class="form-control" name="q<?= $abs['idAbstract'] ?>">
<option value="select">Select an option</option>
<option value="Included">Included</option>
<option value="Excluded">Excluded</option>
</select>
</div>
<?php } ?>
<div style="margin: 40px;text-align: right;">
<input type="submit" name="submit" style="width: 200px" value ="Next" class="btn btn-success">
</div>
</form>
</div>
</body>
</html>
<?php
} else {
echo "<h1>Error: the page you are trying to access does not exist </h1>";
}
?>