GithubHelp home page GithubHelp logo

fossee / online_test Goto Github PK

View Code? Open in Web Editor NEW
297.0 39.0 226.0 23.68 MB

Online quiz/exam taking application.

Home Page: https://yaksh.fossee.in

License: Other

Python 32.46% Shell 0.02% CSS 13.56% JavaScript 44.13% HTML 9.82%

online_test's Introduction

Yaksh

Build Status Documentation Status Version Status Coverage Status

To get an overview of the Yaksh interface please refer to the user documentation at Yaksh Docs

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

Introduction

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++, Java, R, Scilab and Bash.
  • Supports Multiple choice, Fill in the blanks, Arrange options and File upload based questions.
  • Since it runs on Python, you could technically test any Python based library.
  • Create course with lessons and quiz for online learning.
  • Almost real-time monitoring for quiz.
  • Supports automatic and manual grading, regrading of quiz.
  • Add grading system to the course.
  • Scales to over 500+ simultaneous users.
  • Distributed under the BSD license.

To get a glimpse of all the available features check our demo website https://yaksh-demo.fossee.in. It has 50 teacher and student login.

Sample teacher login

Username:- teacher1 Password:- teacher1

Sample student login

Username:- student1 Password:- student1

Requirements

Python 3.6, 3.7, 3.8

Django 3.0.3

Celery 4.4.2

Installation

Note: Currently, only Linux and MacOS is supported for the project.

If Python 3.6 and above is not available in the system, then we recommend using miniconda. Download miniconda with Python 3.6 and above.

Installing Miniconda

  1. Download miniconda from https://docs.conda.io/en/latest/miniconda.html according to the OS version.
  2. Follow the installation instructions as given in https://conda.io/projects/conda/en/latest/user-guide/install/index.html#regular-installation
  3. Restart the Terminal.

Pre-Requisite

  • Install redis server

    Redis is required for celery. Celery runs a background task to re-evaluate the submissions.

    sudo apt install redis-server (Debian/Ubuntu)
    
    yum install redis (Centos)
  • Start redis server

    systemctl start redis
  • Check redis server status

    systemctl status redis
  • Run celery worker

    celery -A online_test worker -B
  • Ensure pip is installed

Installing Yaksh

  • Clone the repository

    git clone https://github.com/FOSSEE/online_test.git
  • Go to the online_test directory

    cd online_test
  • Install the dependencies:
    • Install Django and dependencies

      pip3 install -r requirements/requirements-common.txt
    • Install Code Server dependencies

      sudo pip3 install -r requirements/requirements-codeserver.txt

Quick Start

  1. Start up the code server that executes the user code safely:
    • To run the code server in a sandboxed docker environment, run the command:

      $ invoke start
    • Make sure that you have Docker installed on your system beforehand. Docker Installation
    • To run the code server without docker, locally use:

      $ invoke start --unsafe
    • Note this command will run the yaksh code server locally on your machine and is susceptible to malicious code. You will have to install the code server requirements in sudo mode.
  2. On another terminal, run the application using the following command:

    $ invoke serve
    • Note: The serve command will run the django application server on the 8000 port and hence this port will be unavailable to other processes.
  3. Open your browser and open the URL http://localhost:8000/exam
  4. 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
  5. User can also login to the Default Django admin using;
    • Admin - Username: admin | Password: admin

History

At FOSSEE, Nishanth had implemented a nice django based app to 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 that he had built on top of GAE that basically checked your Python code, live. This made it fun and interesting.

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

For further information and support you can contact

Python Team at FOSSEE: [email protected]

License

This is distributed under the terms of the BSD license. Copyright information is at the bottom of this file.

Authors

FOSSEE Developers

Copyright (c) 2011-2017 FOSSEE

online_test's People

Contributors

adityacp avatar akshen avatar ankitjavalkar avatar cruisedevice avatar hardythe1 avatar jayparikh111 avatar jramnai avatar kumanna avatar maheshgudi avatar manish-kr avatar nishi2rock avatar parth115 avatar pllvsis avatar prabhuramachandran avatar prathamesh920 avatar rohmhatre avatar shelsy-royal avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

online_test's Issues

File Based Questions

Need to change download feature. Instead of separate links give a add a button to download files as zip file.
Need to add validation to check if moderator uploads two files with same name
Add testcase if file does not exists.

Ordering of questions

It would be nice if the ordering of the questions was as chosen in the question paper instead of it being based on the key.

Add validation to Question creation Form

  • When filling form to create new Question, add javascript validation to hide/show partial_grading field based on the type of question.
  • Add javascript validation to check partial grade total marks should be equal to 1

Main file headers and auto generation.

This common function should go into a header file and be included. I think these main files can be actually auto-generated from the test cases desired.

Improve yaksh script

Currently it seems you can only have one demo instance to play with. Instead of writing the NAME and PATH to the project_details.py it should either write a config file, or expect an additional argument to the path which should be used as the directory with the NAME as the basename of the dir.

The cli.py also does not satisfy PEP 8 and has other issues such as:

  1. It does not pass any additional command line args to run_code_server.
  2. The demo_settings.py seem to use an older django version. This should be updated.

Associate a general course code with a course

A course can set prerequisites using this course code. Now instead of implementing this with strings, which is very fragile. We should create a course template which is simply referred to in this particular course. A moderator should be able to then edit and modify this course if needed by adding/removing quizzes, editing quizzes etc.

No error message specifying correct file name when uploading questions

The upload functionality assumes that the questions are saved in questions_dump.json.
I couldn't find any documentation specifying this and the upload page also did not show any errors when I tried to upload the JSON file with a different file name.

For better UI, it would be nice if the upload button is disabled or hidden until the user selects a file to upload or clicking it should directly open up the upload file dialog.

Error formatting

We can have a method for error handling, which will produce error in a proper format.

Grades and weightage for course

  1. Moderator should be allowed to create a grading scheme for a particular course.
  2. Each quiz within a course should have a quiz weightage.

Multiple Issues with Evaluators

Please refer to PR #152

  • File not found and Default arguments missing should raise an exception in the evaluator
  • Code evaluator should return a list of errors
  • Evaluators should return a HTML error instead of string blobs

StdIO question with strange results

Try setting up a question like so:

Expected input: 55
Expected output:
5
5

Write the solution with Python and the error message is poorly formatted and not at all helpful. Worse, I can't seem to get the right answer no matter what I try. Why is this so difficult?

Add check for cheat answers

Add an field which checks if a given string is not in the submitted code to make sure user is not just returning the answer directly and warn user (and moderator) suitably.

error while installing

i used "pip install yaksh" it throws a error
Could not find a version that satisfies the requirement yaksh (from versions: )
No matching distribution found for yaksh
please reply asap

Add yaml input for questions

This will make it easy to add new questions. It would be nice if the questions could also be saved into a yaml file.

Create an access code for students to enroll

Each course will have a particular access code . The institute or organisation willing to enroll for a particular course, will be given the course code in advance. Once the student logs in, he/she would be asked for a course code on the landing page. On entering the correct course code, the student will be enrolled for that course and the student will only be able to see all the courses that they have enrolled for.

docker container fails to start

  • Checkout source code master
  • Step into online_test directory and execute docker build -t yaksha:v1 -f Dockerfile .
  • docker images will show the docker image successfully created
  • docker run -d -p 8001:8001 -p 53579:53579 yaksha:v1 - start the server

Actual: The container immediately dies. docker logs -f <container_id> shows the following error stack trace. Traceback (most recent call last): File "/src/yaksh/code_server.py", line 51, in <module> from tornado.ioloop import IOLoop ImportError: No module named tornado.ioloop

Expected: Server starts without error inside container and able to access the web ui on :8001

StdIO Evaluator Subclassing and Refactoring

Currently the StdIO evaluator functions properly by using an instance of a generic class. We need to make the following changes;

  • Need to create a generic Standard Input/Output evaluator class that can be sub classed for various languages.
  • Need to re-factor code in order to eliminate any possible redundancies.

Running the code server on OSX as nobody causes problems

On a simple test demo instance, if you run sudo yaksh run_code_server, it is unable to create the temporary directory or so leading to an exception like so:

 File "envs/yaksh/lib/python3.5/xmlrpc/client.py", line 1322, in parse_response
    return u.close()
  File "envs/yaksh/lib/python3.5/xmlrpc/client.py", line 655, in close
    raise Fault(**self._stack[0])
xmlrpc.client.Fault: <Fault 1: "<class 'PermissionError'>:[Errno 13] Permission denied: '/var/folders/tr/pfk3lcgd4dndrbppzjwp_tp40000gn/T/output'">

Glitches in production.py

The first line must be from testapp.settings import *

Setting database details is different in Django 1.3.
It must be

DATABASES["default"]["ENGINE"] = 'django.db.backends.mysql'
DATABASES["default"]["NAME"] = 'online_test'
DATABASES["default"]["USER"] = 'online_test_user'

from testapp.local import DATABASE_PASSWORD
DATABASES["default"]["PASSWORD"] = DATABASE_PASSWORD

Add option allow_skip to quiz

This should allow an instructor to create a quiz where users cannot skip a question and can proceed to the next question only when they finish the current question.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.