Code Monkey home page Code Monkey logo

ptyx-mcq's Introduction

pTyX MCQ Extension

MCQ generation (PDF files) and automatic marking of scanned students answers.

Overview

pTyX is a LaTeX precompiler, written in Python. pTyX enables to generate LaTeX documents, using custom commands or plain python code. One single pTyX file may generate many latex documents, with different values. I developed and used pTyX to make several versions of a same test in exams, for my student, to discourage cheating. Since it uses sympy library, pTyX has symbolic calculus abilities too.

The pTyX MCQ extension makes it easy to use pTyX to generate Multiple Choice Questions in the form of pdf documents. The students MCQ can then be scanned and automatically corrected and marked.

Installation

Obviously, pTyX needs a working Python installation. Python version 3.8 (at least) is required for pTyX MCQ to run.

Currently, pTyX is only supported on GNU/Linux.

The easiest way to install it is to use pip.

$ pip install --user ptyx_mcq

Usage

To generate a template, run:

$ mcq new new_folder

This will generate a new_folder folder with a new.ptyx file inside, which is the main configuration file.

This will also create a new_folder/questions/ folder, where you should put all the exercises, as .txt files.

A few text files are already included as examples.

See the next section (MCQ file format) for more information about those files format.

To compile the template, run:

$ mcq make

For more options:

$ mcq make --help

To automatically corrected the scanned students MCQs, but them as a pdf inside new_folder/scan.

Then run:

$ mcq scan

MCQ file format

When running mcq new, a template folder will be generated, including a new.ptyx file.

(More to come...)

ptyx-mcq's People

Contributors

wxgeo avatar

Watchers

 avatar  avatar

ptyx-mcq's Issues

Rename `mcq update` to `mcq include`.

Create several subcommands:
mcq include update -> add all found .ex files.
mcq include clean -> clean all imports
mcq include resolve -> import code from included files.

Add to function to compare LaTeX expressions and test if there will be rendered identically

The function would be used to avoid proposing the (visually) same answer twice.

The heuristic could be the following : every answer will be converted to a canonic form (which may not be valid LaTeX code), used for comparison.
This function will of course give false negatives, but it will still be better than cuurent basic LaTeX code comparison.

The canonic form would be generated by applying the following rules :

  • seems safe : \, \; \. \quad \qquad -> space
  • seems safe : several spaces or tabs -> one space : s = re.sub("\s+", " ", s)
  • not so safe : recursively : {} -> empty string. This one may lead to false positives though : \command{}text -> \commandtext.
    Should we accept the risk, or take more precautions (test if there is a command r"\\\w+ before {})?

Note that false positives or negatives are not very damaging as long as the error message is very explicit and provide tips to fix it.

Add a title to each exercise

Default title would be the filename of the exercise.

In the .json.config file, a field should be added to get the exercise title for each question: {q: "title"}

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.