summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--pyc/grader/views.py3
-rw-r--r--pyc/templates/faq.html47
-rw-r--r--pyc/templates/index.html2
-rw-r--r--pyc/templates/lab.html4
-rw-r--r--pyc/urls.py1
5 files changed, 53 insertions, 4 deletions
diff --git a/pyc/grader/views.py b/pyc/grader/views.py
index 9c688be..e74d540 100644
--- a/pyc/grader/views.py
+++ b/pyc/grader/views.py
@@ -92,6 +92,9 @@ def submission(request, lab_id, user_id):
'code' : code,
})
+def faq(request):
+ return render_to_response('faq.html')
+
def grade(file, id):
import subprocess
from os import path
diff --git a/pyc/templates/faq.html b/pyc/templates/faq.html
new file mode 100644
index 0000000..a90e95a
--- /dev/null
+++ b/pyc/templates/faq.html
@@ -0,0 +1,47 @@
+{% extends 'base.html' %}
+{% block body %}
+<ol>
+ <li>
+How do I submit a solution?
+<p>
+You need an account. Ask raylu to create you one.
+</p>
+ </li>
+
+ <li>
+I don't know any Python.
+<p>
+This is more of "learn to code" excercise than a "learn Python" exercise.
+Python just happens to be a good first language. In fact, I only want
+participants who have little&ndash;to&ndash;no coding experience.
+</p>
+ </li>
+
+ <li>
+Why should I learn Python?
+<p>
+It's a good first language for a
+<a href="http://docs.python.org/faq/general.html#is-python-a-good-language-for-beginning-programmers">variety</a>
+of <a href="http://www.stanford.edu/~pgbovine/python-teaching.htm">reasons</a>.
+</p>
+ </li>
+
+ <li>
+Which scores are shown on the lab ranking pages?
+<p>
+Each user's highest score and earliest time with that score are displayed.
+</p>
+ </li>
+
+ <li>
+Am I allowed to look for help on the web?
+<p>
+Yes.
+</p>
+ </li>
+</ol>
+
+<p>
+<a href="/">Home</a>
+</p>
+{% endblock %}
diff --git a/pyc/templates/index.html b/pyc/templates/index.html
index 439beb9..f99165d 100644
--- a/pyc/templates/index.html
+++ b/pyc/templates/index.html
@@ -25,5 +25,7 @@ If you are interested, please contact raylu.
{% else %}
<a href="{% url django.contrib.auth.views.login %}">Login</a>
{% endif %}
+<br />
+<a href="{% url grader.views.faq %}">FAQ</a>
</p>
{% endblock %}
diff --git a/pyc/templates/lab.html b/pyc/templates/lab.html
index 6cc241d..4194edc 100644
--- a/pyc/templates/lab.html
+++ b/pyc/templates/lab.html
@@ -26,10 +26,6 @@ Lab {{ lab.id }} due {{ lab.due }} at 11:59:59 PDT (UTC-7):
</table></p>
<p>
-Users' highest scores and earliest time with that score are displayed.
-</p>
-
-<p>
<a href="/submit/{{ lab.id }}/">Submit</a> your solution
<br>
<a href="/">Back</a> to the homepage
diff --git a/pyc/urls.py b/pyc/urls.py
index 899689b..aa1228b 100644
--- a/pyc/urls.py
+++ b/pyc/urls.py
@@ -8,6 +8,7 @@ urlpatterns = patterns('',
url(r'^lab/(?P<lab_id>\d+)/$', 'grader.views.lab'),
url(r'^submit/(?P<lab_id>\d+)/$', 'grader.views.submit'),
url(r'^submission/(?P<lab_id>\d+)/(?P<user_id>\d+)/$', 'grader.views.submission'),
+ url(r'^faq/$', 'grader.views.faq'),
url(r'^login/$', 'django.contrib.auth.views.login', {'template_name': 'login.html'}),
url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),