-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #683 from uccser/python-interpreter-refactor
Refactor python-interpreter interactive.
- Loading branch information
Showing
4 changed files
with
40 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
39 changes: 0 additions & 39 deletions
39
csfieldguide/static/interactives/python-interpreter/index.html
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
38 changes: 38 additions & 0 deletions
38
csfieldguide/templates/interactives/python-interpreter.html
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
{% extends interactive_mode_template %} | ||
|
||
{% load i18n %} | ||
{% load static %} | ||
|
||
{% block html %} | ||
<div class="container mb-3"> | ||
<div class="row"> | ||
<div class="col"> | ||
<div id="interactive-python-interpreter"> | ||
<form> | ||
<h4>{% trans "Program" %}</h4> | ||
<textarea id="interactive-python-interpreter-code" wrap="off" class="form-control"></textarea> | ||
<button id="interactive-python-interpreter-run" type="button" class="btn btn-primary btn-expand"> | ||
{% trans "Run program" %} | ||
</button> | ||
<h4>{% trans "Output" %}</h4> | ||
<textarea id="interactive-python-interpreter-output" wrap="off" class="form-control" disabled></textarea> | ||
</form> | ||
</div> | ||
</div> | ||
</div> | ||
</div> | ||
{% endblock html %} | ||
|
||
{% block css %} | ||
<link rel="stylesheet" href="{% static 'interactives/python-interpreter/css/python-interpreter.css' %}"> | ||
{% endblock css %} | ||
|
||
{% block js %} | ||
<script type="text/javascript"> | ||
var py_interpreter_il8n = { | ||
"welcome": "{% trans 'Welcome to computer programming, Student' %}" | ||
}; | ||
</script> | ||
<script type="text/javascript" src="{% static 'interactives/python-interpreter/js/python-interpreter.js' %}"></script> | ||
<script type="text/javascript" src="{% static 'interactives/python-interpreter/js/third-party/skulpt.min.js' %}"></script> | ||
{% endblock js %} |