57 lines
2.5 KiB
HTML
57 lines
2.5 KiB
HTML
|
{% extends "courses/course.html" %}
|
||
|
{% load staticfiles %}
|
||
|
{% load main_extras %}
|
||
|
|
||
|
|
||
|
{% block exercise_content %}
|
||
|
{{ slide.content |safe }}
|
||
|
|
||
|
<div id="code-editor"><textarea name="sol" id="code">{{ slide_data.code |safe }}</textarea></div>
|
||
|
|
||
|
<script>
|
||
|
var cEditor = CodeMirror.fromTextArea(document.getElementById("code"), {
|
||
|
lineNumbers: true,
|
||
|
viewportMargin: Infinity,
|
||
|
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" />
|
||
|
|
||
|
|
||
|
<div id="job-control" style="display: none; margin-top: 1em; marign-bottom: 1em;">
|
||
|
<button type="submit" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-remove"></i> Cancel Job</button>
|
||
|
<button type="submit" class="btn btn-info btn-xs" disabled><i class="glyphicon glyphicon-refresh"></i> Collect results <span id="collect-results-countdown"></span></button>
|
||
|
</div>
|
||
|
|
||
|
<!--
|
||
|
</br>
|
||
|
</br>
|
||
|
<button type="submit" class="btn btn-info btn-xs"><i class="glyphicon glyphicon-refresh"></i> Collect results</button>
|
||
|
<button type="submit" class="btn btn-info btn-xs"><i class="glyphicon glyphicon-inbox"></i> Collect results</button>
|
||
|
<button type="submit" class="btn btn-info btn-xs"><i class="glyphicon glyphicon-download-alt"></i> Collect results</button>
|
||
|
<button type="submit" class="btn btn-info btn-xs"><i class="glyphicon glyphicon-cloud-download"></i> Collect results</button>
|
||
|
<button type="submit" class="btn btn-info btn-xs"><i class="glyphicon glyphicon-save"></i> Collect results</button>
|
||
|
<button type="submit" class="btn btn-info btn-xs"><i class="glyphicon glyphicon-copy"></i> Collect results</button>
|
||
|
|
||
|
</br>
|
||
|
</br>
|
||
|
<button type="submit" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-remove"></i> Cancel Job</button>
|
||
|
<button type="submit" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-remove-sign"></i> Cancel Job</button>
|
||
|
<button type="submit" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-remove-circle"></i> Cancel Job</button>
|
||
|
<button type="submit" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-off"></i> Cancel Job</button>
|
||
|
<button type="submit" class="btn btn-danger btn-xs"><i class="glyphicon glyphicon-trash"></i> Cancel Job</button>
|
||
|
-->
|
||
|
{% endblock %}
|
||
|
|
||
|
|
||
|
{% block exercise_script %}
|
||
|
<script type="text/javascript" src="{% static 'generated_exercises' %}/{{ slide.slide_type }}/script.js"></script>
|
||
|
{% endblock %}
|