diff options
-rw-r--r-- | .gitignore | 40 | ||||
-rw-r--r-- | README.rst | 271 | ||||
-rw-r--r-- | README.txt | 190 | ||||
-rw-r--r-- | apache/django.wsgi | 18 | ||||
-rw-r--r-- | bootstrap.py | 77 | ||||
-rw-r--r-- | buildout.cfg | 19 | ||||
-rw-r--r-- | production.cfg | 20 | ||||
-rw-r--r-- | testapp/__init__.py (renamed from __init__.py) | 0 | ||||
-rwxr-xr-x | testapp/code_server.py (renamed from code_server.py) | 0 | ||||
-rw-r--r-- | testapp/docs/sample.args (renamed from docs/sample.args) | 0 | ||||
-rwxr-xr-x | testapp/docs/sample.sh (renamed from docs/sample.sh) | 0 | ||||
-rw-r--r-- | testapp/docs/sample_questions.py (renamed from docs/sample_questions.py) | 0 | ||||
-rw-r--r-- | testapp/docs/sample_questions.xml (renamed from docs/sample_questions.xml) | 0 | ||||
-rw-r--r-- | testapp/exam/__init__.py (renamed from exam/__init__.py) | 0 | ||||
-rw-r--r-- | testapp/exam/admin.py (renamed from exam/admin.py) | 0 | ||||
-rw-r--r-- | testapp/exam/forms.py (renamed from exam/forms.py) | 0 | ||||
-rw-r--r-- | testapp/exam/management/__init__.py (renamed from exam/management/__init__.py) | 0 | ||||
-rw-r--r-- | testapp/exam/management/commands/__init__.py (renamed from exam/management/commands/__init__.py) | 0 | ||||
-rw-r--r-- | testapp/exam/management/commands/dump_user_data.py (renamed from exam/management/commands/dump_user_data.py) | 0 | ||||
-rw-r--r-- | testapp/exam/management/commands/load_exam.py (renamed from exam/management/commands/load_exam.py) | 0 | ||||
-rw-r--r-- | testapp/exam/management/commands/load_questions_xml.py (renamed from exam/management/commands/load_questions_xml.py) | 0 | ||||
-rw-r--r-- | testapp/exam/management/commands/results2csv.py (renamed from exam/management/commands/results2csv.py) | 0 | ||||
-rw-r--r-- | testapp/exam/migrations/0001_initial.py (renamed from exam/migrations/0001_initial.py) | 0 | ||||
-rw-r--r-- | testapp/exam/migrations/__init__.py (renamed from exam/migrations/__init__.py) | 0 | ||||
-rw-r--r-- | testapp/exam/models.py (renamed from exam/models.py) | 0 | ||||
-rw-r--r-- | testapp/exam/tests.py (renamed from exam/tests.py) | 0 | ||||
-rw-r--r-- | testapp/exam/urls.py (renamed from exam/urls.py) | 0 | ||||
-rw-r--r-- | testapp/exam/views.py (renamed from exam/views.py) | 0 | ||||
-rw-r--r-- | testapp/exam/xmlrpc_clients.py (renamed from exam/xmlrpc_clients.py) | 0 | ||||
-rwxr-xr-x | testapp/manage.py (renamed from manage.py) | 0 | ||||
-rw-r--r-- | testapp/output/README.txt (renamed from output/README.txt) | 0 | ||||
-rw-r--r-- | testapp/production.py | 10 | ||||
-rw-r--r-- | testapp/settings.py (renamed from settings.py) | 0 | ||||
-rw-r--r-- | testapp/static/exam/css/base.css (renamed from static/exam/css/base.css) | 0 | ||||
-rw-r--r-- | testapp/templates/404.html (renamed from templates/404.html) | 0 | ||||
-rw-r--r-- | testapp/templates/500.html (renamed from templates/500.html) | 0 | ||||
-rw-r--r-- | testapp/templates/base.html (renamed from templates/base.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/complete.html (renamed from templates/exam/complete.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/grade_user.html (renamed from templates/exam/grade_user.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/intro.html (renamed from templates/exam/intro.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/login.html (renamed from templates/exam/login.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/monitor.html (renamed from templates/exam/monitor.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/question.html (renamed from templates/exam/question.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/quit.html (renamed from templates/exam/quit.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/register.html (renamed from templates/exam/register.html) | 0 | ||||
-rw-r--r-- | testapp/templates/exam/user_data.html (renamed from templates/exam/user_data.html) | 0 | ||||
-rw-r--r-- | testapp/test_server.py (renamed from test_server.py) | 0 | ||||
-rw-r--r-- | testapp/urls.py (renamed from urls.py) | 0 |
48 files changed, 437 insertions, 208 deletions
@@ -1,3 +1,43 @@ *.pyc +*.zip +*~ +.project +.pydevproject +app.yaml +build +tests/coverageResults +*,cover +tests/.coverage +*.git +*.egg-info +eggs +parts +.installed.cfg +bin +develop-eggs +.DS_Store +.settings +.*.swp +*.egg +*.egg-link +*.svn* +*.wpr +.installed.cfg +src/* +parts +downloads +.xvpics* +.project +pytask/local.py +pytask/pytask.egg-info +pytask/static/media +pytask/uploads +apache/* +*.swp +*.bak +*.swo +*.db-journal *.db +migrations +wsgi.log diff --git a/README.rst b/README.rst new file mode 100644 index 0000000..72463c3 --- /dev/null +++ b/README.rst @@ -0,0 +1,271 @@ +Introduction +============ + +This app provides an "exam" app that lets users take an online +programming quiz. Currently only Python and simple Bash scripts can be +tested. At FOSSEE, Nishanth had implemented a nice django based app to +test for multiple-choice questions. However, I was inspired by a +programming contest that I saw at PyCon APAC 2011. Chris Boesch, who +administered the contest, used a nice web application that he had built +on top of GAE that basically checked your Python code, live. This made +it fun and interesting. Their application can be seen at +http://singpath.com + +I wanted an implementation that was not tied to GAE and decided to write +one myself and the result is the "exam" app. The idea being that I can +use this to test students programming skills and not have to worry about +grading their answers myself and I can do so on my machines. + +You can define fairly complicated programming problems and have users +solve the problem and the solution is checked immediately. The system +supports pretty much arbitrary Python and uses "test cases" to test the +implementations of the students. It also supports simple bash scripts +-- see the sample questions in "docs/". In addition it supports simple +multiple choice questions. Since it runs on your Python, you could +technically test any Python based library. It is distributed under the +BSD license. + +It can use a lot more work but the basics work and the app scales to +over 500+ simultaneous users. :) + + +Production Deployment +===================== + +Pre-Requisite +------------- + + #. Install MySql Server + + #. Install Python MySql support + + #. Install Apache Server for deployment + +Configure MySql server +---------------------- + + #. Create a database named ``online_test`` by following the steps below + + #. $> mysql -u root -p + + #. mysql> create database online_test + + #. Add a user named ``online_test_user`` and give access to it on the database ``online_test`` by following the steps below + + #. mysql> grant usage on online_test.* to online_test_user@localhost identified by 'mysecretpassword'; + + #. mysql> grant all privileges on online_test.* to online_test_user@localhost; + + #. Create a file named `local.py` in folder `testapp` and insert `DATABASE_PASSWORD = 'mysecretpassword'` + +To deploy this app follow the steps below: + + #. Clone this repository and cd to the cloned repo. + + #. run:: + + python bootstrap.py + + #. run:: + + ./bin/buildout -c production.cfg + + #. run:: + + ./bin/django syncdb + + run:: + + ./bin/django migrate exam + + #. Add questions by editing the "docs/sample_questions.py" or any other file in the same format and then run the following:: + + ./bin/django load_exam docs/sample_questions.py + + Note that you can supply multiple Python files as arguments and all of + those will be added to the database. + + #. First run the python server provided. This ensures that the code is executed in a safe environment. Do this like so:: + + $ sudo python testapp/code_server.py + + Put this in the background once it has started since this will not + return back the prompt. It is important that the server be running + *before* students start attempting the exam. Using sudo is + necessary since the server is run as the user "nobody". This runs + on the ports configured in the settings.py file in the variable + "SERVER_PORTS". The "SERVER_TIMEOUT" also can be changed there. + This is the maximum time allowed to execute the submitted code. + Note that this will likely spawn multiple processes as "nobody" + depending on the number of server ports specified. + + #. The ``bin/django.wsgi`` script should make it + easy to deploy this using mod_wsgi. You will need to add a line of the form: + + WSGIScriptAlias / "/var/www/online_test/bin/django.wsgi" + + to your apache.conf. For more details see the Django docs here: + + https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ + + #. Go to http://desired_host_or_ip:desired_port/admin + + #. Login with your credentials and look at the questions and modify if + needed. Create a new Quiz, set the date and duration or + activate/deactivate the quiz. + + #. Now ask users to login at: + + http://host:port/exam + + And you should be all set. + + #. Note that the directory "output" will contain directories, one for each + user. Users can potentially write output into these that can be used + for checking later. + + #. As admin user you can visit http://host/exam/monitor to view + results and user data interactively. You could also "grade" the + papers manually if needed. + + #. You may dump the results and user data using the results2csv and + dump_user_data commands. + + #. The file docs/sample_questions.py is a template that you can use for your own questions. + + #. Sometimes you might be in the situation where you are not hosted as + "host.org/exam/" but as "host.org/foo/exam/" for whatever reason. In + this case edit "settings.py" and set the "URL_ROOT" to the root you + have to serve at. In the above example for "host.org/foo/exam" set + URL_ROOT='/foo'. + +Development Settings +==================== + +To install this app follow the steps below: + + #. Clone this repository and cd to the cloned repo. + + #. run:: + + python bootstrap.py + + #. run:: + + ./bin/buildout -c production.cfg + + #. run:: + + ./bin/django syncdb + + run:: + + ./bin/django migrate exam + + #. Add questions by editing the "docs/sample_questions.py" or any other file in the same format and then run the following:: + + ./bin/django load_exam docs/sample_questions.py + + Note that you can supply multiple Python files as arguments and all of + those will be added to the database. + + #. First run the python server provided. This ensures that the code is executed in a safe environment. Do this like so:: + + $ sudo python testapp/code_server.py + + Put this in the background once it has started since this will not + return back the prompt. It is important that the server be running + *before* students start attempting the exam. Using sudo is + necessary since the server is run as the user "nobody". This runs + on the ports configured in the settings.py file in the variable + "SERVER_PORTS". The "SERVER_TIMEOUT" also can be changed there. + This is the maximum time allowed to execute the submitted code. + Note that this will likely spawn multiple processes as "nobody" + depending on the number of server ports specified. + + #. Now, run:: + + $ ./bin/django runserver <desired_ip>:<desired_port> + + #. Go to http://deserved_host_or_ip:desired_port/admin + + #. Login with your credentials and look at the questions and modify if + needed. Create a new Quiz, set the date and duration or + activate/deactivate the quiz. + + #. Now ask users to login at: + + http://host:port/exam + + And you should be all set. + + #. Note that the directory "output" will contain directories, one for each + user. Users can potentially write output into these that can be used + for checking later. + + #. As admin user you can visit http://host/exam/monitor to view + results and user data interactively. You could also "grade" the + papers manually if needed. + + #. You may dump the results and user data using the results2csv and + dump_user_data commands. + + #. The file docs/sample_questions.py is a template that you can use for your own questions. + + #. Sometimes you might be in the situation where you are not hosted as + "host.org/exam/" but as "host.org/foo/exam/" for whatever reason. In + this case edit "settings.py" and set the "URL_ROOT" to the root you + have to serve at. In the above example for "host.org/foo/exam" set + URL_ROOT='/foo'. + +Additional commands available +============================== + +We provide several convenient commands for you to use: + + - load_exam : load questions and a quiz from a python file. See + docs/sample_questions.py + + - load_questions_xml : load questions from XML file, see + docs/sample_questions.xml use of this is deprecated in favor of + load_exam. + + - results2csv : Dump the quiz results into a CSV file for further + processing. + + - dump_user_data : Dump out relevalt user data for either all users or + specified users. + +For more information on these do this:: + + $ ./manage.py help [command] + +where [command] is one of the above. + +License +======= + +This is distributed under the terms of the BSD license. Copyright +information is at the bottom of this file. + +Authors +======= + +Main author: Prabhu Ramachandran + +I gratefully acknowledge help from the following: + + - Nishanth Amuluru originally from FOSSEE who wrote bulk of the + login/registration code. He wrote an initial first cut of a quiz app + which supported only simple questions which provided motivation for + this app. The current codebase does not share too much from his + implementation although there are plenty of similarities. + + - Harish Badrinath (FOSSEE) -- who provided a first cut of the bash + related scripts. + + - Srikant Patnaik and Thomas Stephen Lee, who helped deploy and test + the code. + + +Copyright (c) 2011 Prabhu Ramachandran and FOSSEE (fossee.in) diff --git a/README.txt b/README.txt deleted file mode 100644 index a265675..0000000 --- a/README.txt +++ /dev/null @@ -1,190 +0,0 @@ -Introduction -============ - -This app provides an "exam" app that lets users take an online -programming quiz. Currently only Python and simple Bash scripts can be -tested. At FOSSEE, Nishanth had implemented a nice django based app to -test for multiple-choice questions. However, I was inspired by a -programming contest that I saw at PyCon APAC 2011. Chris Boesch, who -administered the contest, used a nice web application that he had built -on top of GAE that basically checked your Python code, live. This made -it fun and interesting. Their application can be seen at -http://singpath.com - -I wanted an implementation that was not tied to GAE and decided to write -one myself and the result is the "exam" app. The idea being that I can -use this to test students programming skills and not have to worry about -grading their answers myself and I can do so on my machines. - -You can define fairly complicated programming problems and have users -solve the problem and the solution is checked immediately. The system -supports pretty much arbitrary Python and uses "test cases" to test the -implementations of the students. It also supports simple bash scripts --- see the sample questions in "docs/". In addition it supports simple -multiple choice questions. Since it runs on your Python, you could -technically test any Python based library. It is distributed under the -BSD license. - -It can use a lot more work but the basics work and the app scales to -over 500+ simultaneous users. :) - -Dependencies -============= - -Before you install/deploy, make sure you have the following installed: - - - Django 1.3 or above. - - South (tested with 0.7.3). - -That and a running Python is pretty much all you need. Of course, for -serious deployment you are going to need Apache or some other decent -webserver. - - -Installation and Deployment -============================= - -To install/deploy this app follow the steps below: - - 1. Clone this repository and cd to the cloned repo. - - 2. Run:: - - $ python manage.py syncdb - [ enter password etc.] - - $ python manage.py migrate exam - - 3. Add questions by editing the "docs/sample_questions.py" or any other - file in the same format and then run the following:: - - $ python manage.py load_exam docs/sample_questions.py - - Note that you can supply multiple Python files as arguments and all of - those will be added to the database. - - 4. First run the python server provided. This ensures that the code is - executed in a safe environment. Do this like so:: - - $ sudo python code_server.py - - Put this in the background once it has started since this will not - return back the prompt. It is important that the server be running - *before* students start attempting the exam. Using sudo is - necessary since the server is run as the user "nobody". This runs - on the ports configured in the settings.py file in the variable - "SERVER_PORTS". The "SERVER_TIMEOUT" also can be changed there. - This is the maximum time allowed to execute the submitted code. - Note that this will likely spawn multiple processes as "nobody" - depending on the number of server ports specified. - - 5. Now, run:: - - $ python manage.py runserver <desired_ip>:<desired_port> - - For deployment use Apache or a real webserver, see below for more - information. - - 6. Go to http://deserved_host_or_ip:desired_port/admin - - 7. Login with your credentials and look at the questions and modify if - needed. Create a new Quiz, set the date and duration or - activate/deactivate the quiz. - - 8. Now ask users to login at: - - http://host:port/exam - - And you should be all set. - - 9. Note that the directory "output" will contain directories, one for each - user. Users can potentially write output into these that can be used - for checking later. - - 10. As admin user you can visit http://host/exam/monitor to view - results and user data interactively. You could also "grade" the - papers manually if needed. - - 11. You may dump the results and user data using the results2csv and - dump_user_data commands. - -WARNING: django is running in debug mode for this currently, CHANGE it -during deployment. To do this, edit settings.py and set DEBUG to False. -Also look at other settings and change them suitably. - -The file docs/sample_questions.py is a template that you can use for your -own questions. - -Additional commands available -============================== - -We provide several convenient commands for you to use: - - - load_exam : load questions and a quiz from a python file. See - docs/sample_questions.py - - - load_questions_xml : load questions from XML file, see - docs/sample_questions.xml use of this is deprecated in favor of - load_exam. - - - results2csv : Dump the quiz results into a CSV file for further - processing. - - - dump_user_data : Dump out relevalt user data for either all users or - specified users. - -For more information on these do this:: - - $ ./manage.py help [command] - -where [command] is one of the above. - -Deploying via Apache -===================== - -For any serious deployment, you will need to deploy the app using a real -webserver like Apache. The ``apache/django.wsgi`` script should make it -easy to deploy this using mod_wsgi. You will need to add a line of the -form: - - WSGIScriptAlias / "/var/www/online_test/apache/django.wsgi" - -to your apache.conf. For more details see the Django docs here: - -https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/ - - -Sometimes you might be in the situation where you are not hosted as -"host.org/exam/" but as "host.org/foo/exam/" for whatever reason. In -this case edit "settings.py" and set the "URL_ROOT" to the root you -have to serve at. In the above example for "host.org/foo/exam" set -URL_ROOT='/foo'. - -License -======= - -This is distributed under the terms of the BSD license. Copyright -information is at the bottom of this file. - -Authors -======= - -Main author: Prabhu Ramachandran - -I gratefully acknowledge help from the following: - - - Nishanth Amuluru originally from FOSSEE who wrote bulk of the - login/registration code. He wrote an initial first cut of a quiz app - which supported only simple questions which provided motivation for - this app. The current codebase does not share too much from his - implementation although there are plenty of similarities. - - - Harish Badrinath (FOSSEE) -- who provided a first cut of the bash - related scripts. - - - Srikant Patnaik and Thomas Stephen Lee, who helped deploy and test - the code. - - -Copyright (c) 2011 Prabhu Ramachandran and FOSSEE (fossee.in) - diff --git a/apache/django.wsgi b/apache/django.wsgi deleted file mode 100644 index ef88526..0000000 --- a/apache/django.wsgi +++ /dev/null @@ -1,18 +0,0 @@ -import os -from os.path import dirname, abspath -import sys - -# This file is inside online_test/apache/django.wsgi -# pth should be online_test -pth = abspath(dirname(dirname(__file__))) -if pth not in sys.path: - sys.path.append(pth) -# Now add the parent of online_test also. -pth = dirname(pth) -if pth not in sys.path: - sys.path.append(pth) - -os.environ['DJANGO_SETTINGS_MODULE'] = 'online_test.settings' - -import django.core.handlers.wsgi -application = django.core.handlers.wsgi.WSGIHandler() diff --git a/bootstrap.py b/bootstrap.py new file mode 100644 index 0000000..7728587 --- /dev/null +++ b/bootstrap.py @@ -0,0 +1,77 @@ +############################################################################## +# +# Copyright (c) 2006 Zope Corporation and Contributors. +# All Rights Reserved. +# +# This software is subject to the provisions of the Zope Public License, +# Version 2.1 (ZPL). A copy of the ZPL should accompany this distribution. +# THIS SOFTWARE IS PROVIDED "AS IS" AND ANY AND ALL EXPRESS OR IMPLIED +# WARRANTIES ARE DISCLAIMED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +# WARRANTIES OF TITLE, MERCHANTABILITY, AGAINST INFRINGEMENT, AND FITNESS +# FOR A PARTICULAR PURPOSE. +# +############################################################################## +"""Bootstrap a buildout-based project + +Simply run this script in a directory containing a buildout.cfg. +The script accepts buildout command-line options, so you can +use the -c option to specify an alternate configuration file. + +$Id$ +""" + +import os, shutil, sys, tempfile, urllib2 + +tmpeggs = tempfile.mkdtemp() + +is_jython = sys.platform.startswith('java') + +try: + import pkg_resources +except ImportError: + ez = {} + exec urllib2.urlopen('http://peak.telecommunity.com/dist/ez_setup.py' + ).read() in ez + ez['use_setuptools'](to_dir=tmpeggs, download_delay=0) + + import pkg_resources + +if sys.platform == 'win32': + def quote(c): + if ' ' in c: + return '"%s"' % c # work around spawn lamosity on windows + else: + return c +else: + def quote (c): + return c + +cmd = 'from setuptools.command.easy_install import main; main()' +ws = pkg_resources.working_set + +if is_jython: + import subprocess + + assert subprocess.Popen([sys.executable] + ['-c', quote(cmd), '-mqNxd', + quote(tmpeggs), 'zc.buildout'], + env=dict(os.environ, + PYTHONPATH= + ws.find(pkg_resources.Requirement.parse('setuptools')).location + ), + ).wait() == 0 + +else: + assert os.spawnle( + os.P_WAIT, sys.executable, quote (sys.executable), + '-c', quote (cmd), '-mqNxd', quote (tmpeggs), 'zc.buildout', + dict(os.environ, + PYTHONPATH= + ws.find(pkg_resources.Requirement.parse('setuptools')).location + ), + ) == 0 + +ws.add_entry(tmpeggs) +ws.require('zc.buildout') +import zc.buildout.buildout +zc.buildout.buildout.main(sys.argv[1:] + ['bootstrap']) +shutil.rmtree(tmpeggs) diff --git a/buildout.cfg b/buildout.cfg new file mode 100644 index 0000000..c04ec59 --- /dev/null +++ b/buildout.cfg @@ -0,0 +1,19 @@ +[buildout] +parts = + django +eggs = + South + +[versions] +django = 1.3 + +[django] +recipe = djangorecipe +project = testapp +settings = settings +wsgi = true +wsgilog=wsgi.log +eggs = + ${buildout:eggs} +extra-paths = + testapp diff --git a/production.cfg b/production.cfg new file mode 100644 index 0000000..9ea9f7b --- /dev/null +++ b/production.cfg @@ -0,0 +1,20 @@ +[buildout] +parts = + django +eggs = + South + MySQL-python + +[versions] +django = 1.3 + +[django] +recipe = djangorecipe +project = testapp +settings = production +wsgi = true +wsgilog=wsgi.log +eggs = + ${buildout:eggs} +extra-paths = + testapp diff --git a/__init__.py b/testapp/__init__.py index e69de29..e69de29 100644 --- a/__init__.py +++ b/testapp/__init__.py diff --git a/code_server.py b/testapp/code_server.py index 1276c76..1276c76 100755 --- a/code_server.py +++ b/testapp/code_server.py diff --git a/docs/sample.args b/testapp/docs/sample.args index 4d9f00d..4d9f00d 100644 --- a/docs/sample.args +++ b/testapp/docs/sample.args diff --git a/docs/sample.sh b/testapp/docs/sample.sh index e935cb3..e935cb3 100755 --- a/docs/sample.sh +++ b/testapp/docs/sample.sh diff --git a/docs/sample_questions.py b/testapp/docs/sample_questions.py index aa7f239..aa7f239 100644 --- a/docs/sample_questions.py +++ b/testapp/docs/sample_questions.py diff --git a/docs/sample_questions.xml b/testapp/docs/sample_questions.xml index 53c76f8..53c76f8 100644 --- a/docs/sample_questions.xml +++ b/testapp/docs/sample_questions.xml diff --git a/exam/__init__.py b/testapp/exam/__init__.py index e69de29..e69de29 100644 --- a/exam/__init__.py +++ b/testapp/exam/__init__.py diff --git a/exam/admin.py b/testapp/exam/admin.py index 8482ef9..8482ef9 100644 --- a/exam/admin.py +++ b/testapp/exam/admin.py diff --git a/exam/forms.py b/testapp/exam/forms.py index a5ca26f..a5ca26f 100644 --- a/exam/forms.py +++ b/testapp/exam/forms.py diff --git a/exam/management/__init__.py b/testapp/exam/management/__init__.py index e69de29..e69de29 100644 --- a/exam/management/__init__.py +++ b/testapp/exam/management/__init__.py diff --git a/exam/management/commands/__init__.py b/testapp/exam/management/commands/__init__.py index e69de29..e69de29 100644 --- a/exam/management/commands/__init__.py +++ b/testapp/exam/management/commands/__init__.py diff --git a/exam/management/commands/dump_user_data.py b/testapp/exam/management/commands/dump_user_data.py index ec016bb..ec016bb 100644 --- a/exam/management/commands/dump_user_data.py +++ b/testapp/exam/management/commands/dump_user_data.py diff --git a/exam/management/commands/load_exam.py b/testapp/exam/management/commands/load_exam.py index 3f247a1..3f247a1 100644 --- a/exam/management/commands/load_exam.py +++ b/testapp/exam/management/commands/load_exam.py diff --git a/exam/management/commands/load_questions_xml.py b/testapp/exam/management/commands/load_questions_xml.py index 8bc2701..8bc2701 100644 --- a/exam/management/commands/load_questions_xml.py +++ b/testapp/exam/management/commands/load_questions_xml.py diff --git a/exam/management/commands/results2csv.py b/testapp/exam/management/commands/results2csv.py index 2993745..2993745 100644 --- a/exam/management/commands/results2csv.py +++ b/testapp/exam/management/commands/results2csv.py diff --git a/exam/migrations/0001_initial.py b/testapp/exam/migrations/0001_initial.py index 49048cc..49048cc 100644 --- a/exam/migrations/0001_initial.py +++ b/testapp/exam/migrations/0001_initial.py diff --git a/exam/migrations/__init__.py b/testapp/exam/migrations/__init__.py index e69de29..e69de29 100644 --- a/exam/migrations/__init__.py +++ b/testapp/exam/migrations/__init__.py diff --git a/exam/models.py b/testapp/exam/models.py index 717e02e..717e02e 100644 --- a/exam/models.py +++ b/testapp/exam/models.py diff --git a/exam/tests.py b/testapp/exam/tests.py index 501deb7..501deb7 100644 --- a/exam/tests.py +++ b/testapp/exam/tests.py diff --git a/exam/urls.py b/testapp/exam/urls.py index 34e329f..34e329f 100644 --- a/exam/urls.py +++ b/testapp/exam/urls.py diff --git a/exam/views.py b/testapp/exam/views.py index c178a0b..c178a0b 100644 --- a/exam/views.py +++ b/testapp/exam/views.py diff --git a/exam/xmlrpc_clients.py b/testapp/exam/xmlrpc_clients.py index 817e37d..817e37d 100644 --- a/exam/xmlrpc_clients.py +++ b/testapp/exam/xmlrpc_clients.py diff --git a/manage.py b/testapp/manage.py index 3e4eedc..3e4eedc 100755 --- a/manage.py +++ b/testapp/manage.py diff --git a/output/README.txt b/testapp/output/README.txt index 3163ed4..3163ed4 100644 --- a/output/README.txt +++ b/testapp/output/README.txt diff --git a/testapp/production.py b/testapp/production.py new file mode 100644 index 0000000..2710bdb --- /dev/null +++ b/testapp/production.py @@ -0,0 +1,10 @@ +from project.settings import * + +DEBUG=False +TEMPLATE_DEBUG=DEBUG + +DATABASE_ENGINE = 'django.db.backends.mysql' +DATABASE_NAME = 'online_test' +DATABASE_USER = 'online_test_user' +# Imports DATABASE_PASSWORD from testapp/local.py that is not part of git repo +from testapp.local import DATABASE_PASSWORD
\ No newline at end of file diff --git a/settings.py b/testapp/settings.py index f1c48b9..f1c48b9 100644 --- a/settings.py +++ b/testapp/settings.py diff --git a/static/exam/css/base.css b/testapp/static/exam/css/base.css index 1323116..1323116 100644 --- a/static/exam/css/base.css +++ b/testapp/static/exam/css/base.css diff --git a/templates/404.html b/testapp/templates/404.html index 7d33dd3..7d33dd3 100644 --- a/templates/404.html +++ b/testapp/templates/404.html diff --git a/templates/500.html b/testapp/templates/500.html index d02721f..d02721f 100644 --- a/templates/500.html +++ b/testapp/templates/500.html diff --git a/templates/base.html b/testapp/templates/base.html index c2bbabb..c2bbabb 100644 --- a/templates/base.html +++ b/testapp/templates/base.html diff --git a/templates/exam/complete.html b/testapp/templates/exam/complete.html index 4c3f3d5..4c3f3d5 100644 --- a/templates/exam/complete.html +++ b/testapp/templates/exam/complete.html diff --git a/templates/exam/grade_user.html b/testapp/templates/exam/grade_user.html index 75ed2e0..75ed2e0 100644 --- a/templates/exam/grade_user.html +++ b/testapp/templates/exam/grade_user.html diff --git a/templates/exam/intro.html b/testapp/templates/exam/intro.html index 1d3e5de..1d3e5de 100644 --- a/templates/exam/intro.html +++ b/testapp/templates/exam/intro.html diff --git a/templates/exam/login.html b/testapp/templates/exam/login.html index 8e6352e..8e6352e 100644 --- a/templates/exam/login.html +++ b/testapp/templates/exam/login.html diff --git a/templates/exam/monitor.html b/testapp/templates/exam/monitor.html index fb6cb58..fb6cb58 100644 --- a/templates/exam/monitor.html +++ b/testapp/templates/exam/monitor.html diff --git a/templates/exam/question.html b/testapp/templates/exam/question.html index 8b589b6..8b589b6 100644 --- a/templates/exam/question.html +++ b/testapp/templates/exam/question.html diff --git a/templates/exam/quit.html b/testapp/templates/exam/quit.html index 37b5c08..37b5c08 100644 --- a/templates/exam/quit.html +++ b/testapp/templates/exam/quit.html diff --git a/templates/exam/register.html b/testapp/templates/exam/register.html index 921e7b5..921e7b5 100644 --- a/templates/exam/register.html +++ b/testapp/templates/exam/register.html diff --git a/templates/exam/user_data.html b/testapp/templates/exam/user_data.html index 9fb442a..9fb442a 100644 --- a/templates/exam/user_data.html +++ b/testapp/templates/exam/user_data.html diff --git a/test_server.py b/testapp/test_server.py index be9f876..be9f876 100644 --- a/test_server.py +++ b/testapp/test_server.py diff --git a/urls.py b/testapp/urls.py index d956bfc..d956bfc 100644 --- a/urls.py +++ b/testapp/urls.py |