forked from js-parsons/js-parsons
-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.html
53 lines (44 loc) · 1.41 KB
/
test.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>JS Parsons Test</title>
<link rel="stylesheet" href="parsons.css"/>
<link rel="stylesheet" href="lib/prettify.css"/>
</head>
<body>
<div id="starter-code" class="sortable-code"></div>
<div id="parsons-solution" class="sortable-code"></div>
<div style="clear:both"></div>
<div class="row float-right">
</div>
</body>
<script src="lib/jquery.min.js"></script>
<script src="lib/jquery-ui.min.js"></script>
<script src="lib/jquery.ui.touch-punch.min.js"></script>
<script src="lib/prettify.js"></script>
<script src="lib/skulpt.js"></script>
<script src="lib/skulpt-stdlib.js"></script>
<script src="lib/underscore-min.js"></script>
<script src="lib/lis.js"></script>
<script src="parsons.js"></script>
<script>
let ParsonsGlobal = {};
ParsonsGlobal.initial = `def hello_world():
!BLANK = True
return "Hello World"
for !BLANK in !BLANK:`;
$(document).ready(function() {
ParsonsGlobal.widget = new ParsonsWidget({
'sortableId': 'parsons-solution',
'trashId': 'starter-code',
'max_wrong_lines': 1,
});
ParsonsGlobal.widget.init(ParsonsGlobal.initial);
ParsonsGlobal.widget.alphabetize();
});
function printSolution() {
return ParsonsGlobal.widget.solutionCode();
}
</script>
</html>