summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorankitjavalkar2015-06-22 16:45:53 +0530
committerankitjavalkar2015-08-03 15:22:39 +0530
commit36d8e3decc13b775e7f464e891e400bc686da4b8 (patch)
tree09c1b2d404ab578f3e966d8c7a63cb7b7c129f04
parent516284689fa9daa9b4487e4c5683997111df6049 (diff)
downloadonline_test-36d8e3decc13b775e7f464e891e400bc686da4b8.tar.gz
online_test-36d8e3decc13b775e7f464e891e400bc686da4b8.tar.bz2
online_test-36d8e3decc13b775e7f464e891e400bc686da4b8.zip
Edit readme
-rw-r--r--README.md (renamed from README.rst)225
1 files changed, 129 insertions, 96 deletions
diff --git a/README.rst b/README.md
index 3472dfc..ae48595 100644
--- a/README.rst
+++ b/README.md
@@ -1,93 +1,108 @@
-Introduction
-============
+Vimarsh
+========
+[![Build Status](https://travis-ci.org/ankitjavalkar/online_test.svg?branch=master)](https://travis-ci.org/ankitjavalkar/online_test)
-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
+#### Introduction
-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.
+This project provides an "exam" app that lets users take an online
+programming quiz.
+
+#### Features
+
+ * Define fairly complicated programming problems and have users
+ solve the problem.
+ * Immediate verification of code solution.
+ * Supports pretty much arbitrary coding questions in Python, C, C++ and
+ simple Bash and uses "test cases" to test the implementations of the students.
+ * Supports simple multiple choice questions and File uploads.
+ * Since it runs on your Python, you could technically test any Python based library.
+ * Scales to over 500+ simultaneous users.
+ * Distributed under the BSD license.
+
+Quick Start
+===========
+
+#### Pre-Requisite
+
+1. Ensure [pip](https://pip.pypa.io/en/latest/installing.html) is installed
+
+#### Installation
-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.
+1. Install the vimarsh app
+ ```pip install vimarsh```
-It can use a lot more work but the basics work and the app scales to
-over 500+ simultaneous users. :)
-
+1. In the terminal run ```vimarsh create_demo <projectname> [destination-path]```
+ - <projectname> is the name of the django project and [destination-path] is the path where the django project will be installed
+ - If [destination-path] is not provided, the project is initialised in the current directory
+
+1. The script does the following;
+ 1. Creates a new django project called <projectname>
+ 1. Creates a new demo database
+ 1. Creates a two users test moderator and a test examinee
+ 1. Loads demo questions
+ 1. Loads demo quiz
+
+1. Run ```vimarsh run_demo```
+
+1. In a new terminal run ```code_server```
+
+1. Open your browser and run http://localhost:8000/exam
+
+1. Login with as a teacher to edit the quiz or as a student to take the quiz
+ Credentials:
+ - Student - Username: student | Password: student
+ - Teacher - Username: teacher | Password: teacher
Production Deployment
-=====================
+======================
-Pre-Requisite
--------------
+#### Pre-Requisite
- #. Install MySql Server
+ 1. Install MySql Server
- #. Install Python MySql support
+ 1. Install Python MySql support
- #. Install Apache Server for deployment
+ 1. Install Apache Server for deployment
-Configure MySql server
-----------------------
+#### Configure MySql server
- #. Create a database named ``online_test`` by following the steps below
+ 1. Create a database named ``online_test`` by following the steps below
- #. $> mysql -u root -p
+ 1. $> mysql -u root -p
- #. mysql> create database online_test
+ 1. 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
+ 1. 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';
+ 1. 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;
+ 1. 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'`
+ 1. 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::
+ 1. Clone this repository and cd to the cloned repo.
+ ```git clone https://github.com/FOSSEE/online_test.git```
+
+ 1. Run:
- ./bin/django syncdb
+ django syncdb
- run::
+ 1. Run:
- ./bin/django migrate exam
+ 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::
+ 1. 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
+ 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::
+ 1. 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
+ $ sudo python testapp/exam/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
@@ -99,7 +114,7 @@ To deploy this app follow the steps below:
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
+ 1. 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"
@@ -108,32 +123,32 @@ To deploy this app follow the steps below:
https://docs.djangoproject.com/en/1.3/howto/deployment/modwsgi/
- #. Go to http://desired_host_or_ip:desired_port/admin
+ 1. Go to http://desired_host_or_ip:desired_port/admin
- #. Login with your credentials and look at the questions and modify if
+ 1. 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:
+ 1. 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
+ 1. 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
+ 1. 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
+ 1. 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.
+ 1. 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
+ 1. 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
@@ -144,32 +159,25 @@ Development Settings
To install this app follow the steps below:
- #. Clone this repository and cd to the cloned repo.
-
- #. run::
-
- python bootstrap.py
-
- #. run::
+ 1. Clone this repository and cd to the cloned repo.
+ ```git clone https://github.com/FOSSEE/online_test.git```
- ./bin/buildout -c buildout.cfg
+ 1. Run:
- #. run::
+ django syncdb
- ./bin/django syncdb
-
- run::
+ Run:
- ./bin/django migrate exam
+ 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::
+ 1. 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
+ 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::
+ 1. 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
@@ -183,36 +191,36 @@ To install this app follow the steps below:
Note that this will likely spawn multiple processes as "nobody"
depending on the number of server ports specified.
- #. Now, run::
+ 1. Now, Run:
- $ ./bin/django runserver <desired_ip>:<desired_port>
+ $ django runserver <desired_ip>:<desired_port>
- #. Go to http://deserved_host_or_ip:desired_port/admin
+ 1. Go to http://deserved_host_or_ip:desired_port/admin
- #. Login with your credentials and look at the questions and modify if
+ 1. 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:
+ 1. 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
+ 1. 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
+ 1. 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
+ 1. 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.
+ 1. 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
+ 1. 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
@@ -236,12 +244,37 @@ We provide several convenient commands for you to use:
- dump_user_data : Dump out relevalt user data for either all users or
specified users.
-For more information on these do this::
+For more information on these do this:
- $ ./manage.py help [command]
+ $ ./manage.py help [command]
where [command] is one of the above.
+
+Inspiration
+===========
+
+At FOSSEE, Nishanth had implemented a nice django based app to
+test for multiple-choice questions. 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
+[Singpath](http://singpath.com) that he had built on top of GAE that
+basically checked your Python code, live. This made it fun and interesting.
+
+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.
+
+
+Contact
+=======
+
+For further information and support you can contact
+
+* Forum Link
+* Email Address
+
License
=======