From 5203ce57f2a08fe9aef8b97b569855fa9cd50ba4 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Tue, 6 Oct 2015 16:29:45 +0530 Subject: Clean setup procedure - Make corresponding app name changes in script - Change app name in setup.py - Minor changes in Readme, it is now split into quickstart & production - rename install script --- README.md | 220 ++++++-------------------------------------------------------- 1 file changed, 20 insertions(+), 200 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 45c3e4f..edc4d33 100644 --- a/README.md +++ b/README.md @@ -2,6 +2,8 @@ Yaksh ======== [![Build Status](https://travis-ci.org/FOSSEE/online_test.svg?branch=master)](https://travis-ci.org/FOSSEE/online_test) +This is a Quickstart guide to help users setup a trial instance. If you wish to deploy Yaksh in a production environment here is a [Production Deployment Guide] (https://github.com/FOSSEE/online_test/blob/master/README_production.md) + #### Introduction This project provides an "exam" app that lets users take an online @@ -29,22 +31,28 @@ Quick Start #### Installation 1. Install the yaksh + - For latest stable release - pip install yaksh + pip install yaksh + + - For the development version + + pip install git+https://github.com/FOSSEE/online_test.git 1. In the terminal run - yaksh create_demo [-p PATH] project_name - - ```project_name``` is the desired name of the django project - - PATH is an optional argument to specify where the django project will be installed + yaksh create_demo [-p PATH] [project_name] + - ```project_name``` is the desired name of the django project. + - In case a ```project_name``` is not specified, the project is initialised with the name ```yaksh_demo``` + - PATH is an optional flag to specify where the django project will be installed - If PATH is not provided, the project is created 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 two users, test moderator and test examinee - 1. Loads demo questions - 1. Loads demo quiz + 1. Creates a new django project called `project_name` + 1. Creates a new demo database + 1. Creates two users, test moderator and test examinee + 1. Loads demo questions + 1. Loads demo quiz 1. Run: @@ -57,197 +65,9 @@ Quick Start 1. Open your browser and open the URL ```http://localhost:8000/exam``` 1. Login 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 - - 1. Install dependencies using - pip install -r requirements.txt - 1. Install MySql Server - 1. Install Python MySql support - 1. Install Apache Server for deployment - -#### Configure MySql server - - 1. Create a database named ``yaksh`` by following the steps below - - $> mysql -u root -p - mysql> create database yaksh - - 1. Add a user named ```yaksh_user``` and give access to it on the database ```yaksh``` by following the steps below - - 1. mysql> grant usage on yaksh.* to yaksh_user@localhost identified by 'mysecretpassword'; - - 1. mysql> grant all privileges on yaksh.* to yaksh_user@localhost; - - 1. Add `DATABASE_PASSWORD = 'mysecretpassword'` and `DATABASE_USER = 'yaksh_user'` to online_test/settings.py - -To deploy this app follow the steps below: - - 1. Clone this repository and cd to the cloned repo. - git clone https://github.com/FOSSEE/online_test.git - - 1. Run: - python manage.py syncdb - - 1. 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. - - 1. First run the python server provided. This ensures that the code is executed in a safe environment. Do this like so: - - $ sudo python yaksh/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. - - 1. The ```wsgi.py``` script should make it - easy to deploy this using mod_wsgi. You will need to add a line of the form: - - WSGIScriptAlias / "/online_test/wsgi.py" - - to your apache.conf. For more details see the Django docs here: - - https://docs.djangoproject.com/en/1.6/howto/deployment/wsgi/ - - 1. Go to http://desired_host_or_ip:desired_port/admin - - 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. - - 1. Now ask users to login at: - - http://host:port/exam - - And you should be all set. - - 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. - - 1. As Moderator user you can visit http://host/exam/monitor to view - results and user data interactively. You could also "grade" the - papers manually if needed. - - 1. You may dump the results and user data using the results2csv and - dump_user_data commands. - - 1. The file docs/sample_questions.py is a template that you can use for your own questions. - - 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 - URL_ROOT='/foo'. - -Development Settings -==================== - -To install this app follow the steps below: - - 1. Clone this repository and cd to the cloned repo. - ```git clone https://github.com/FOSSEE/online_test.git``` - - 1. Run: - - python manage.py syncdb - - 1. 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. - - 1. First run the python server provided. This ensures that the code is executed in a safe environment. Do this like so: - - $ sudo python yaksh/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. - - 1. Now, Run: - - python manage.py runserver : - - 1. Go to http://desired_host_or_ip:desired_port/admin - - 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. - - 1. Now ask users to login at: - - http://host:port/exam - - And you should be all set. - - 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. - - 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. - - 1. You may dump the results and user data using the results2csv and - dump_user_data commands. - - 1. The file docs/sample_questions.py is a template that you can use for your own questions. - - 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 - 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: - - $ python manage.py help [command] - -where [command] is one of the above. - + Credentials: + - Student - Username: student | Password: student + - Teacher - Username: teacher | Password: teacher Inspiration =========== -- cgit From 81393bfd4581b3f2217a979aaffec999c89d6755 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Wed, 7 Oct 2015 17:21:25 +0530 Subject: Modify fixtures and load them on quickstart --- README.md | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index edc4d33..ed19e16 100644 --- a/README.md +++ b/README.md @@ -33,11 +33,11 @@ Quick Start 1. Install the yaksh - For latest stable release - pip install yaksh + $ pip install yaksh - For the development version - pip install git+https://github.com/FOSSEE/online_test.git + $ pip install git+https://github.com/FOSSEE/online_test.git 1. In the terminal run @@ -56,11 +56,11 @@ Quick Start 1. Run: - yaksh run_demo + $ yaksh run_demo 1. In a new terminal run: - sudo yaksh run_code_server + $ sudo yaksh run_code_server 1. Open your browser and open the URL ```http://localhost:8000/exam``` @@ -69,6 +69,9 @@ Quick Start - Student - Username: student | Password: student - Teacher - Username: teacher | Password: teacher +1. User can also login to the Default Django admin using; + - Admin - Username: admin | Password: admin + Inspiration =========== -- cgit From d84aa639765096078763fe2caab24e4751a339aa Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Thu, 8 Oct 2015 12:37:56 +0530 Subject: Minor changes to setup.py and README.md --- README.md | 23 +++++++++++++---------- 1 file changed, 13 insertions(+), 10 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index ed19e16..79e4766 100644 --- a/README.md +++ b/README.md @@ -72,21 +72,22 @@ Quick Start 1. User can also login to the Default Django admin using; - Admin - Username: admin | Password: admin -Inspiration -=========== +History +======= 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 +test for multiple-choice questions. Prabhu Ramchandran was inspired by a +programming contest that he 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. +Prabhu wanted an implementation that was not tied to GAE and hence wrote +the initial cut of what is now 'Yaksh'. The idea being that +anyone can use this to test students programming skills and not have to worry +about grading their answers manually and instead do so on their machines. +The application has since been refactored and maintained by FOSSEE Developers. Contact ======= @@ -107,7 +108,7 @@ Authors Main author: Prabhu Ramachandran -I gratefully acknowledge help from the following: +Help from the following is gratefully acknowledged: - Nishanth Amuluru originally from FOSSEE who wrote bulk of the login/registration code. He wrote an initial first cut of a quiz app @@ -121,5 +122,7 @@ I gratefully acknowledge help from the following: - Srikant Patnaik and Thomas Stephen Lee, who helped deploy and test the code. + - [FOSSEE Developers](http://singpath.com) + -Copyright (c) 2011 Prabhu Ramachandran and FOSSEE (fossee.in) +Copyright (c) 2011 FOSSEE (fossee.in) -- cgit From f39f8e1b2b487426a38d2c69372a1f58dcaeee79 Mon Sep 17 00:00:00 2001 From: ankitjavalkar Date: Fri, 9 Oct 2015 11:07:38 +0530 Subject: minor changes to README post review --- README.md | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) (limited to 'README.md') diff --git a/README.md b/README.md index 79e4766..b7c6fc4 100644 --- a/README.md +++ b/README.md @@ -76,7 +76,7 @@ History ======= At FOSSEE, Nishanth had implemented a nice django based app to -test for multiple-choice questions. Prabhu Ramchandran was inspired by a +test for multiple-choice questions. Prabhu Ramachandran was inspired by a programming contest that he 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 @@ -94,8 +94,7 @@ Contact For further information and support you can contact -* Forum Link -* Email Address +Python Team at FOSSEE: pythonsupport@fossee.in License ======= @@ -106,23 +105,7 @@ information is at the bottom of this file. Authors ======= -Main author: Prabhu Ramachandran - -Help from the following is gratefully acknowledged: - - - 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. - - - [FOSSEE Developers](http://singpath.com) + [FOSSEE Developers] (https://github.com/FOSSEE/online_test/graphs/contributors) Copyright (c) 2011 FOSSEE (fossee.in) -- cgit