Skip to content

Repository structure

cjshawMIT edited this page Jul 7, 2017 · 2 revisions

Introduction

unplatform includes both server-side and client-side components. Various scripts are also included in the repository. They are not used explicitly in the running code, but are used as part of the installed package and included in the repository for that purpose.

Server-side components

All of the server-side code is located in main.py. Here we see session management, listing of the available modules, and routing.

Client-side components

Client-side code is located in the ui/ directory, and uses the react-redux starter kit.

Scripts and build files

Located in the scripts/ directory, these have various uses.

build_scripts

Located in scripts/build_scripts/, there is a single script that bundles for Windows / OS X / Linux via OS detection. The Windows portion of the script is usually kept most up to date, since that is the target deployment platform. The others are not guaranteed to be current, though we have built on OS X successfully.

More instructions for using these scripts is located on the bundling page.

content_player_build_config

Located in scripts/content_player_build_config/, these files are used during the build process to make sure the content player is configured correctly for a local unplatform build.

data_extraction

These files are used on the Windows build to extract student response data and files into a single zip file, for the FSPs.

launchers

These scripts provide a single launch script (platform-specific) to start both unplatform and qbank executables.

oea_build_config

Located in scripts/oea_build_config/, these files are used during the build process to make sure the open assessments player is configured correctly for a local unplatform build.

SQL scripts

Located in sql/, this is a simple .sql script that initializes the sqlite3 database used to manage sessions with web.py. We use sqlite3 as a light-weight datastore for sessions, instead of the built-in filesystem store, because of concurrency issues.

Tools

You can see that modules/Tools/ is pre-populated in the repository, even though the rest of the modules/ directory is ignored. These files provide navigation and iframe wrappers around the tool pages, which are fetched and built as part of the unplatform build process.

SSL certs

Since some of the tools and assessments require access to the computer's microphone, unplatform must be served over https. Self-signed certificates are located in unplatform/, and can be changed / updated as needed. If they are changed, the values for these variables in main.py may also need to be updated:

CherryPyWSGIServer.ssl_certificate
CherryPyWSGIServer.ssl_private_key