32 lines
827 B
HTML
32 lines
827 B
HTML
|
{% extends "courses/course.html" %}
|
||
|
{% load staticfiles %}
|
||
|
{% load main_extras %}
|
||
|
|
||
|
|
||
|
{% block exercise_content %}
|
||
|
{{ slide.content |safe }}
|
||
|
|
||
|
<div><textarea name="sol" id="code">{{ slide_data.code |safe }}</textarea></div>
|
||
|
|
||
|
<script>
|
||
|
var cEditor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||
|
lineNumbers: true,
|
||
|
matchBrackets: true,
|
||
|
mode: "text/x-csrc",
|
||
|
});
|
||
|
</script>
|
||
|
{% endblock%}
|
||
|
|
||
|
|
||
|
|
||
|
{% block exercise_buttons %}
|
||
|
<input type="button" name="test" id="submit-test" value="Execute" class="btn btn-primary" />
|
||
|
<input type="button" name="submit" id="submit-grade" value="Submit Solution" class="btn btn-default" />
|
||
|
{% endblock %}
|
||
|
|
||
|
|
||
|
{% block exercise_script %}
|
||
|
script program/match-regex
|
||
|
<script type="text/javascript" src="{% static 'generated_exercises' %}/{{ slide.slide_type }}/script.js"></script>
|
||
|
{% endblock %}
|