drlippman / IMathAS

IMathAS Online Math Assessment
Other
110 stars 98 forks source link

IMathAS

The most recent version of the code is available on GitHub

What is IMathAS

IMathAS is an Internet Mathematics Assessment System. It is primarily a web-based math assessment tool for delivery and automatic grading of math homework and tests, similar to publisher-offered systems. Questions are algorithmically generated and numerical and math expression answers can be computer graded. IMathAS includes learning management tools, including posting files, discussion forums and a full gradebook. The system can be used as an LTI tool, integrated with an LMS.

IMathAS powers MyOpenMath.com, WAMAP.org, Lumen OHM, XYZhomework, and others.

Installation

Requirements

IMathAS is designed for simple installation with minimal requirements. The system requires PHP 7.4+, and MySQL 5.6+. PHP has the following recommended or required extensions:

Installation Steps

  1. Download IMathAS, extract it, and copy the files to your webserver.
  2. Alternatively, if you have shell access to your server, enter the directory you want IMathAS in, and checkout the code from Github. Using Git greatly simplifies upgrading.
  3. Create a database for IMathAS
  4. Open a browser and access /install.php. This script will write the config.php file, change directory permissions and set up the database. It will also create local copies of loginpage.php, infoheader.php, and newinstructor.php. At the end of the install you will be given the opportunity to install a small set of example questions.
  5. Check to make sure the following directories have directory permissions to allow the web server to write files into them:
    • /assessment/libsassessment/qimages
    • /admin/import
    • /course/files
    • /filter/graph/imgs
    • /filestore (if you're not using S3 for file storeage)
  6. Log into IMathAS. If you didn't change the initial imathas user settings when running install.php, log in as 'root' with password 'root'.
  7. Edit loginpage.php and infoheader.php if desired, which allow you to customize the login page. If you plan to use the new instructor account request page, you may customize newinstructor.php.

Upgrading

To update the software, either copy the updated files onto the webserver or run git pull if you installed using git. After updating the files, access /upgrade.php to run any necessary database migrations. Be sure to watch the output as occasionally messages about needed config changes are displayed.

Configuration

IMathAS can be configured through variables set in config.php.

Basic Options

These are all added to the config.php by the install script.

System Defaults

Many system defaults can be adjusted using config changes.

Generally Useful Options

Additional Validation

These provide additional validation options beyond $loginformat.

Access Limits

Personalization

In addition to the $CFG['CPS']['theme'] option described above for setting the default theme and even forcing the use of the default theme, you can also provide users with a limited selection of themes by defining the following:

LTI

Email

By default, emails are sent using the built-in PHP mail() function. This can sometimes have reliability issue, so there are options to override the mail sender or reduce the use of email in the system.

Push Notifications

If you wish to enable users to request browser push notifications (does not work in all browsers), you'll need to setup an a project with Firebase Cloud Messaging, and define these values.

As of June 2024, the original method for interfacing with FCM will be eliminated, so to continue using push notifications, you will need to:

Internationalization

The student side of the system is pretty well set up for i18n, but the instructor side is not yet. Currently the only translation pack available is de (German). See /i18n/translating.md for more information about generating translations. To enable a translation:

IPEDS / NCES

The system can create associations with IPEDS/NCES records. For this, you will need to manually populate the imas_ipeds table.

Look to newinstructor-ipeds.php.dist for an example of how to collect ipeds data during account request. The account approval process will auto-create group associations when account requests are collected with this data.

Development

Course Cleanup

Automated course cleanup (unenrolling students from a course) can be enabled. To use this, you'll need to set up a cron job (good on a single server setup) or scheduled web call (better for multi-server environments) to run:

If allowing guest logins:

To cleanup old unused student accounts:

If using a scheduled web call, you'll need to define:

Options:

Additional Feature Setup

LivePoll

IMathAS supports a clicker-style assessment format called LivePoll. To use it, a Node websocket server must be set up to handle the live syncing. You can find the code and basic setup instructions on the IMathAS-Extras Github page. Once set up, define:

Pandoc

IMathAS can convert assessments to Word format using pandoc setup as a web service. It doesn't use pandoc locally for security and stability reasons. To enable converting assessments to word, you'll need to install pandoc on a webserver and set up the front end found on the IMathAS-Extras Github page. Once set up, define:

Modifying the System

Building

Most of the system does not require a build process if changes are made.
There are a couple exceptions.

If you change any of the javascript files with a _min.js version, you'll need to re-minify the javascript. You can do this using the shell script /assess2/vue-src/buildmin.sh.

If you change any of the Vue files for the assessment player, you'll need to re-build the distribution files. See /assess2/vue-src/README.md for more info, and how to configure your system for development mode testing.

If tinymce is changed, or the plugins used are changed, you will need to run /tinymce4/maketinymcebundle.php to re-generate tinymce_bundled.js.

Changing Mathquill

The version of Mathquill used in this repo has it's source in the repo https://github.com/drlippman/mathquill, in the imathas-master branch.