-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathexerciseadmin.html
More file actions
75 lines (73 loc) · 2.32 KB
/
Copy pathexerciseadmin.html
File metadata and controls
75 lines (73 loc) · 2.32 KB
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
{% extends "page_template.html" %}
{% block pagescript %}
<script type="text/javascript" src="/javascript/ckeditor/ckeditor.js">
</script>
<script type="text/javascript">
function submitForm(value){
document.forms['addexercise'].submit();
}
$(function(){
// Swap in CKEditors
$("textarea").each(function(){
CKEDITOR.replace(this.id, {
toolbar: 'Full',
skin: 'kama',
resize_minWidth: 300,
width: "80%",
height: 400,
scayt_autoStartup: false,
disableNativeSpellChecker: false
});
});
});
</script>
<style>
li {
display: inline;
}
label {
display: block;
}
</style>
{% endblock pagescript %}
{% block pagecontent %}
<article>
<section>
<h1>Select an existing exercise to edit</h1>
<p>
<ul>
{% for exercise in exercises %}
<li>
<a href="/editexercise?name={{exercise.name}}">{{exercise.display_name}}</a>
</li>
{% endfor %}
</ul>
</p>
</section>
<section>
<h1>Add a new exercise</h1>
<form id="addexercise" action="/updateexercise" method="post">
<input type="hidden" name="v_position" value="0" /><input type="hidden" name="h_position" value="0" />
<p>
<label for="name">
Name (file name without .html for legacy exercises)
</label>
<input id="name" type="text" name="name" size="40" />
<span style="padding-left: 20px;">
<input id="summative" name="summative" type="checkbox" value="1" />
<label style="display:inline;" for="summative">Summative</label>
</span>
</p>
<p>
<label for="raw_html">
Exercise content (leave blank for legacy exercises)
</label>
<textarea id="raw_html" name="raw_html">
</textarea>
</p>
<p>
<input type="button" value="Add Exercise" onClick="submitForm()"/>
</p>
</form>
</section>
</article>{% endblock pagecontent %}