{"id":21258275,"url":"https://github.com/ubc/compair","last_synced_at":"2026-05-26T00:01:20.073Z","repository":{"id":8888145,"uuid":"10607020","full_name":"ubc/compair","owner":"ubc","description":"ComPAIR: a peer review application pairing student answers for deeper learning through comparison of peer work","archived":false,"fork":false,"pushed_at":"2026-05-25T22:23:17.000Z","size":19543,"stargazers_count":38,"open_issues_count":78,"forks_count":10,"subscribers_count":10,"default_branch":"master","last_synced_at":"2026-05-25T22:23:36.739Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"http://ubc.github.io/compair","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubc.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2013-06-10T18:52:38.000Z","updated_at":"2026-05-25T22:21:06.000Z","dependencies_parsed_at":"2026-01-08T22:07:51.252Z","dependency_job_id":null,"html_url":"https://github.com/ubc/compair","commit_stats":null,"previous_names":[],"tags_count":44,"template":false,"template_full_name":null,"purl":"pkg:github/ubc/compair","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcompair","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcompair/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcompair/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcompair/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubc","download_url":"https://codeload.github.com/ubc/compair/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubc%2Fcompair/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33497930,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-25T14:31:05.219Z","status":"ssl_error","status_checked_at":"2026-05-25T14:31:02.878Z","response_time":57,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-21T04:08:00.577Z","updated_at":"2026-05-26T00:01:20.012Z","avatar_url":"https://github.com/ubc.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"ComPAIR\n==========\n\n[![Join the chat at https://gitter.im/ubc/acj-versus](https://badges.gitter.im/ubc/acj-versus.svg)](https://gitter.im/ubc/acj-versus?utm_source=badge\u0026utm_medium=badge\u0026utm_campaign=pr-badge\u0026utm_content=badge)\n\nIntroduction\n------------\nComPAIR is a peer review application developed by the University of British Columbia and freely available for anyone to download, install, and use. ComPAIR distinguishes itself from other peer review tools by harnessing students' innate ability to compare. Rather than have students evaluate one work at a time, ComPAIR presents paired sets of peer work for comparison-based review and feedback.\n\nComPAIR was inspired by Adaptive Comparative Judgement (ACJ), which is based on the law of comparative judgement conceived by L. L. Thurstone in 1927 that states human beings are better at comparing two things than evaluating one in isolation. In the application, instructors can enable a score for each answer that \"adapts\" to how the answer does in each comparison. The scores can then be used in generating subsequent pairs, theoretically increasing the similarity in answer quality and the challenge for students in choosing which better meets the instructor-set criteria.\n\nFrameworks\n----------\nThe frontend is purely written in Javascript, using [AngularJS](http://angularjs.org/) as a MVC-framework and [Bootstrap](http://getbootstrap.com/) for the design.\nThe backend uses the python web application framework [Flask](http://flask.pocoo.org/) with [Flask SQLAlchemy](http://pythonhosted.org/Flask-SQLAlchemy/) for database persistence.\n[Alembic](http://alembic.readthedocs.org/) is used to maintain database updates.\n\nDeveloper Installation - Docker\n-------------------------------\n\n### Development Prerequisites\n\n* [Docker Engine](https://docs.docker.com/engine/installation/)\n* [Docker Compose](https://docs.docker.com/compose/install/)\n* [npm](https://www.npmjs.com/get-npm)\n\nFor running unit tests you may also require a `lapack` and `atlas`. These are needed by the python libraries `scipy` and `numpy` to install properly. These can be installed with:\n\n    yum install lapack-devel atlas-devel\n\nor\n\n    apt-get install libatlas-base-dev liblapack-dev\n\n### Clone Repo and Start Server\n\n    git clone git@github.com:ubc/compair.git compair\n    cd compair\n    npm install\n    node_modules/gulp/bin/gulp.js\n    node_modules/gulp/bin/gulp.js prod\n    docker-compose up -d\n\nAfter initialization is finished, run the following command if it is the first time:\n\n    docker exec -it -e FLASK_APP=manage compair-app-1 flask database create\n\nAlternatively you can create a pre-populated database with demo data:\n\n    docker exec -it -e FLASK_APP=manage compair-app-1 flask database create --sample-data\n\nComPAIR is accessible at\n\n    http://localhost:8080/\n\n### Check Logs\n\n    # app\n    docker logs -f compair-app-1\n    # nginx\n    docker logs -f compair-web-1\n    # db\n    docker logs -f compair-db-1\n\n### Stop Server\n\n    docker-compose stop\n\n### Stop Server and Clean Up\n\n    docker-compose down\n    rm -rf .data\n\n### Access Database\n\n    docker exec -it compair-app-1 mysql\n\n### Upgrade Database\n\n    docker exec -it compair-app-1 alembic upgrade head\n\n### Run Management Command\n\n    docker exec -it -e FLASK_APP=manage compair-app-1 flask COMMAND\n\n### Build Docker Image Locally\n\n    docker build -t ubcctlt/compair-app .\n\n### Upgrade\n\n    docker-compose down\n    docker pull ubcctlt/compair-app # download latest ComPAIR image\n    docker-compose up\n    docker exec -it compair-app-1 alembic upgrade head # upgrade database\n\nRunning tests\n---------------------------\n\n### Testing Prerequisites\n\n`libxmlsec1-dev` is an additional system requirement for using `python3-saml`. If you would like to run your tests locally, you need to install it with:\n\n    # brew\n    brew install libxmlsec1\n    # apt-get\n    apt-get install libxmlsec1-dev\n    # yum\n    yum install xmlsec1-devel\n\n### Python unit tests:\n\n    make testb\n\nAlternatively, these tests may be run inside docker:\n\n    # with compair running via docker-compose, get a shell to the app service\n    docker-compose exec app bash\n    # run all the backend python tests\n    pytest\n    # run individual tests, just use the test module path\n    pytest compair/tests/api/test_assignment.py\n    # to make the test runner stop on the first failure, add -x\n    # to make the test runner capture standard out (for debug prints), add -s\n    # combined, this would be\n    pytest -xs\n\nTo help debug sqlalchemy, you can tell sqlalchemy to log all generated\nstatements to stderr by adding this setting to `compair/settings.py`:\n\n    SQLALCHEMY_ECHO = True\n\n### AngularJS spec tests:\n\n    make testf\n\n### AngularJS acceptance tests:\n\n    make testa\n\nThese tests are written using Cucumber.js, the tests are located in\n`compair/static/test/features/`.\n\nIndividual tests can be run by editing `gulpfile.js`. Edit the `bdd` gulp task:\n\n    // original line:\n    gulp.src([\"compair/static/test/features/*.feature\"])\n    // comment out original line and set it to a specific feature file, then run\n    // make testa\n    gulp.src([\"compair/static/test/features/view_users.feature\"])\n\nGenerate Production Release\n---------------------------\nRun `gulp prod` to generate production assets. This currently just:\n1. Combine all Bower managed javascript libraries into a single minified file.\n2. Compile and minify the less files into a single css file.\n3. Compile and minify the less files used for emails into a single css file in the static folder.\n4. Copies all Bower managed images and fonts into the static folder.\n5. Copies the pdf viewer copy and assets into the static folder.\n\n\nSetting up Learning Analytics\n---------------------------\n\nComPAIR uses the Experience API (xAPI) and/or Caliper for collecting learning analytics. Both requires a [Learning Record Store (LRS)](http://tincanapi.com/learning-record-store/) to use.\n\n`LRS_APP_BASE_URL` Optionally set a base url to use for all statements. This is useful to help keep statement urls consistent if the url of your instance changes over time or is accessible though different routes (ex http+https or multiple sub-domains). (Uses base url of request by default)\n\n`LRS_USER_INPUT_FIELD_SIZE_LIMIT`: Set the character limit on statement fields containing user input. Set this in order to prevent sending large statements to the LRS that it can't handle (default: 10,000 characters)\n\nRestart server after making any changes to settings\n\nStatements require an actor (currently logged in user) account information. The ComPAIR account information will be used by default unless the following settings are changed.\n\n### Actor Account settings\n\nUse these settings to control the actor information sent to the LRS. This requires that all users in the system have a globally unique identifier and that the user has an account outside of the system. See [_Global Unique Identifiers_](#global-unique-identifiers) for more information on configuring global unique identifers though different authorization methods.\n\n`LRS_ACTOR_ACCOUNT_USE_GLOBAL_UNIQUE_IDENTIFIER`: Flag indicating if `global_unique_identifier` should be used for the actor identifier instead of `uuid`.\n\n`LRS_ACTOR_ACCOUNT_GLOBAL_UNIQUE_IDENTIFIER_HOMEPAGE`: Set the actor's homepage when using `global_unique_identifier`.\n\nNote: Both `LRS_ACTOR_ACCOUNT_USE_GLOBAL_UNIQUE_IDENTIFIER` and `LRS_ACTOR_ACCOUNT_GLOBAL_UNIQUE_IDENTIFIER_HOMEPAGE` need to be configured and the user must have a `global_unique_identifier` or else the default ComPAIR actor will be sent.\n\n##XAPI Setup\n\nComPAIR currently only supports basic OAuth1 authentication connections to the LRS. Authentication can be set with either `LRS_XAPI_USERNAME`+`LRS_XAPI_PASSWORD` or `LRS_XAPI_AUTH`.\n\nFor development, you can set `LRS_XAPI_STATEMENT_ENDPOINT` to either the 'local' setting (to dump statements into the `xapi_log` table) or to an account on [https://lrs.adlnet.gov/](https://lrs.adlnet.gov/) for your LRS.\nNote that [https://lrs.adlnet.gov/](https://lrs.adlnet.gov/) is set up for testing purposes only and they can clear their data at any time (do not use in production).\n\n### Settings\n\n`XAPI_ENABLED`: Set to 1 to enable collecting learning analytics (disabled by default)\n\n`LRS_XAPI_STATEMENT_ENDPOINT`: Set the url LRS. Use 'local' for dumping statements into `xapi_log` table ('local' by default)\n\n`LRS_XAPI_USERNAME`: The username for the OAuth1 account.\n\n`LRS_XAPI_PASSWORD`: The password for the OAuth1 account.\n\n`LRS_XAPI_AUTH`: Must be in the format `Basic LRS_XAPI_USERNAME:LRS_XAPI_PASSWORD` where `LRS_XAPI_USERNAME:LRS_XAPI_PASSWORD` has been base64 encoded.\n\n##Caliper Setup\n\n### Settings\n\n`CALIPER_ENABLED`: Set to 1 to enable collecting learning analytics (disabled by default)\n\n`LRS_CALIPER_HOST`: Set the url LRS. Use 'local' for dumping statements into `xapi_log` table ('local' by default)\n\n`LRS_CALIPER_API_KEY`: API key for sending Caliper statements to the LRS.\n\nSetting up Background Tasks\n---------------------------\n\nComPAIR has the following tasks defined under the package `compair.tasks`:\n\n- `reset_demo` - For demo site only.  This task resets the database with default data.\n- `update_lti_course_membership` - updates enrollment for the course based on LTI membership\n- `update_lti_course_grades` and `update_lti_assignment_grades` - update the course grade and assingment grades respecitvely for LTI consumers\n- `send_messages` and `send_message` - send out email messages e.g. students can turn on notification for feedbacks given to their answers\n- `set_passwords` - (bulk) updates user passwords e.g. when importing users\n- `send_lrs_statement` - sends xAPI statements to Learning Record Store\n\nBy default (`CELERY_TASK_ALWAYS_EAGER=1`), these Celery tasks are executed locally by blocking until the task returns. To improve performance, you can configure them as background tasks to run asynchronously.\n\n### Enable tasks to run in background\nTo run tasks asynchronously, you need to:\n\n- Set up a [Celery broker](http://docs.celeryproject.org/en/latest/getting-started/brokers/) (e.g. Redis, RabbitMQ)\n- Set up Celery workers to run the tasks. A worker can be started by running `celery --app=celery_worker.celery worker`. If the work runs in a separate container or virtual machine, remember to apply the same environment variables as the ComPAIR app.\n- Set `CELERY_BROKER_URL` according to your broker setup\n- Set `CELERY_TASK_ALWAYS_EAGER` to `0` (zero). See below for details\n- To add new Celery configuration values, convert the lower case Celery setting into uppercase and prepend it with a `CELERY_` prefix, and then add it to the right overrideable dict in `configuration.py`. E.g.: `broker_url` becomes `CELERY_BROKER_URL`. The setting will be stripped of the `CELERY_` prefix and converted back to lower case via Flask Config's `get_namespace()` before being fed to Celery.\n- If worker memory leak is an issue, setting `CELERY_WORKER_MAX_TASKS_PER_CHILD` or `CELERY_WORKER_MAX_MEMORY_PER_CHILD` on the worker can be a workaround.\n\n### Settings\n\n`CELERY_TASK_ALWAYS_EAGER`: Set to `0` to enable background tasks (`1` by default).\n\n`CELERY_BROKER_URL`: Set the url for the broker tool to be used (ex: redis or rabbitmq instance url)\n\n`CELERY_RESULT_BACKEND`: Set the backend to store results (disabled by default)\n\n`CELERY_TIMEZONE`: Set the timezone used for cron jobs. Currently only used for demo installations ('America/Vancouver' by default)\n\n`CELERY_WORKER_MAX_TASKS_PER_CHILD`: Takes an int. Kills a worker process and forks a new one when it has executed the given number of tasks\n\n`CELERY_WORKER_MAX_MEMORY_PER_CHILD`: Takes an int as memory in kilobytes. Kills a worker process and forks a new one when it hits the given memory usage, the currently executing task will be allowed to complete before being killed.\n\n**Restart server after making any changes to settings**\n\nUser Authentication Settings\n---------------------------\n\nComPAIR needs at least one of the following authentication settings so that users can log in. You can also enable multiple options at once, e.g., you can use both CAS and LTI.\n\n### APP Login Settings\n\n`APP_LOGIN_ENABLED`: Enable login via username \u0026 password (default: True)\n\nRestart server after making any changes to settings\n\n### CAS Login Settings\n\n`CAS_LOGIN_ENABLED`: Enable login via CAS server (default: False)\n\n`CAS_SERVER`: Url of the CAS Server (do not include trailing slash)\n\n`CAS_AUTH_PREFIX`: Prefix to CAS action (default '/cas')\n\n`CAS_USE_SAML`: Determines which authorization endpoint to use. '/serviceValidate' if false (default). '/samlValidate' if true.\n\n`CAS_ATTRIBUTE_USER_ROLE`: CAS field will determine the user's default system role on account creation (default: none). Will only promote to instructor if there is a match against `CAS_INSTRUCTOR_ROLE_VALUES`. If not specified or does not match any value from `CAS_INSTRUCTOR_ROLE_VALUES`, the user will be given the student system role and will manually need to be promoted if needed.\n\n`CAS_INSTRUCTOR_ROLE_VALUES`: List of values `CAS_ATTRIBUTE_USER_ROLE` can contain that would indicate the user is an instructor (default: empty set). Separate values by a space (ex: `instructor teacher staff`).\n\n`CAS_ATTRIBUTE_FIRST_NAME`: Optionally automatically sync user's first name with the supplied CAS attribute (Will only override if attribute is present a contains content).\n\n`CAS_ATTRIBUTE_LAST_NAME`: Optionally automatically sync user's last name with the supplied CAS attribute (Will only override if attribute is present a contains content).\n\n`CAS_ATTRIBUTE_STUDENT_NUMBER`: Optionally automatically sync user's student number with the supplied CAS attribute (Will only override if attribute is present a contains content).\n\n`CAS_ATTRIBUTE_EMAIL`: Optionally automatically sync user's email with the supplied CAS attribute (Will only override if attribute is present a contains content).\n\nRestart server after making any changes to settings\n\n### SAML 2.0 Login Settings\n\n`SAML_LOGIN_ENABLED` Enable login via SAML idp (default: False)\n\n`SAML_SETTINGS` JSON Settings for `python3-saml`\n\n`SAML_SETTINGS_FILE` File location for JSON Settings (only if `SAML_SETTINGS` not used)\n\n`SAML_UNIQUE_IDENTIFIER` Set the attribute that uniquely identifies the user (default: 'uid')\n\n`SAML_METADATA_URL` Optionally load SAML idp metadata by loading the ipd's public metadata.\n\n`SAML_METADATA_ENTITY_ID` Use when loading idp metadata with multiple public entity ids.\n\n`SAML_EXPOSE_METADATA_ENDPOINT` Optionally expose the `/api/saml/metadata` endpoint for the idp's usage (disabled by default).\n\n`SAML_ATTRIBUTE_USER_ROLE`: SAML field will determine the user's default system role on account creation (default: none). Will only promote to instructor if there is a match against `SAML_INSTRUCTOR_ROLE_VALUES`. If not specified or does not match any value from `SAML_INSTRUCTOR_ROLE_VALUES`, the user will be given the student system role and will manually need to be promoted if needed.\n\n`SAML_INSTRUCTOR_ROLE_VALUES`: List of values `SAML_ATTRIBUTE_USER_ROLE` can contain that would indicate the user is an instructor (default: empty set). Separate values by a space (ex: `instructor teacher staff`).\n\n`SAML_ATTRIBUTE_FIRST_NAME`: Optionally automatically sync user's first name with the supplied SAML attribute (Will only override if attribute is present a contains content).\n\n`SAML_ATTRIBUTE_LAST_NAME`: Optionally automatically sync user's last name with the supplied SAML attribute (Will only override if attribute is present a contains content).\n\n`SAML_ATTRIBUTE_STUDENT_NUMBER`: Optionally automatically sync user's student number with the supplied SAML attribute (Will only override if attribute is present a contains content).\n\n`SAML_ATTRIBUTE_EMAIL`: Optionally automatically sync user's email with the supplied SAML attribute (Will only override if attribute is present a contains content).\n\nYou must provide `SAML_SETTINGS` or `SAML_SETTINGS_FILE` to use SAML Login. See [python3-saml](https://github.com/onelogin/python3-saml) for details on setting up the JSON settings.\nYou can use `SAML_METADATA_URL` and `SAML_METADATA_ENTITY_ID` to fetch the idp's public metadata for very request.\nYou can use `SAML_EXPOSE_METADATA_ENDPOINT` to expose public metadata for the idp.\n\n`libxmlsec1-dev` is an additional system requirement for using `python3-saml`. If you would like to run your tests locally, you can install it with\n\n    # brew\n    brew install libxmlsec1\n    # apt-get\n    apt-get install libxmlsec1-dev\n    # yum\n    yum install xmlsec1-devel\n\nNote: [https://www.testshib.org](https://www.testshib.org) is used for using saml authentication for development purposes. `deploy/development/dev_saml_settings.json` contains testing settings and should not be used in production. if you edit `dev_saml_settings.json`, you must upload it to [https://www.testshib.org/register.html](https://www.testshib.org/register.html). Please also replace `deploy/development/compair_dev_saml_metadata.xml` with the metadata so it can be kept track of.\n\n### LTI Settings\n\n`LTI_LOGIN_ENABLED`: Enable login via LTI consumer (default: True)\nThe launch URL will be `https://YOUR_SITE_DOMAIN/api/lti/auth`\n\nRestart server after making any changes to settings\n\nIn addition, you must create a LTI consumer key/secret by:\n- Logging into ComPAIR as a system administrator\n- Clicking on 'Manage LTI' in the header\n- Clicking 'Add LTI Consumer'\n- Entering a unique key and a hard to guess secret and clicking 'Save'\n\nYou can enable/disable consumers from the Manage LTI screen as needed\n\n### Global Unique Identifiers\n\nUseful if your institution has globally unique identifers that are available from the different authorization methods (CAS, SAML, LTI).\n\nGlobal unique identifers allow ComPAIR to:\n- Automatically linking new CAS, SAML, LTI logins to existing accounts associated with the `global_unique_identifier`. The user will not be prompted to login or create a new account.\n- Enhance LTI membership service/extension roster syncing by allowing new LTI accounts can be automatically linking to existing ComPAIR accounts or creating new ones (user would no longer be forced to launch an LTI link at least once from the LTI consumer).\n- Send learning records to the LRS using `global_unique_identifier` and a different homepage url for the actor account instead of ComPAIR `uuid` and the ComPAIR app url. See [_Actor Account settings_](#actor-account-settings) for more information.\n\n#### CAS\n\n`CAS_GLOBAL_UNIQUE_IDENTIFIER_FIELD`: CAS attribute used to identify an account across third party logins and LTI. Only required when CAS is enabled.\n\n#### SAML\n\n`SAML_GLOBAL_UNIQUE_IDENTIFIER_FIELD`: Optional SAML attribute used to identify an account across third party logins and LTI.\n\n#### LTI\n\nSystem admins can manage global unique identifiers for each LTI consumer from the 'Manage LTI' screen. Setting the `global_unique_identifier_param` field will use that param to unique identify an account across third party logins and LTI.\n\nLogin Screen Customization\n---------------------------\n\nNote all html content used for login screen will be [sanitized](https://docs.angularjs.org/api/ngSanitize/service/$sanitize) by AngularJS.\n\n`LOGIN_ADDITIONAL_INSTRUCTIONS_HTML`: Set the text or HTML displayed to users beside the login prompt. By default it will display UBC specific login troubleshooting information (it is recommended to change this value). If left blank, the instruction area will not appear.\n\n`CAS_LOGIN_HTML`: Set the text or HTML displayed to users for selecting to login with CAS (default will be a UBC CWL login button).\n\n`SAML_LOGIN_HTML`: Set the text or HTML displayed to users for selecting to login with SAML (default will be a UBC CWL login button).\n\n(Optional) Email Notification Settings\n-----------------------------\n\nRun `gulp prod` in order to generate the combined minified css used in the html emails.\n\n`MAIL_NOTIFICATION_ENABLED`: Enable email notifications application wide (default: False).\n\nEven if notifications are enabled, users can disable them for themselves on the edit account screen.\n\nSee [Flask-Mail](https://pythonhosted.org/Flask-Mail/#configuring-flask-mail) for details on configuration settings for mailing notifications.\n\nDisable outgoing https requirements\n-----------------------------\n\n`ENFORCE_SSL`: Enforce https on all requests made though LTI and CAS (default: True)\n\nCan be used to disable secure SSL requirements for outgoing and incoming traffic from LTI and CAS.\nNote that SAML https settings should be adjusted in `SAML_SETTINGS` or `SAML_SETTINGS_FILE`.\nThis should only be used for development or staging purposes.\n\nSetup a demo installation\n-----------------------------\n\nDemo installations have default data of one course, 2 assignments, 1 instructor, and 30 students. Demo installations do not allow editing/deleting the course, assignments, student answers, or enrollment of any automatic generated default data. Users can still create other courses, assignments, etc and modify them as needed. **Demo installations also allow anyone to create system administrators, instructors, and students at any time.** If the cron job is setup, all data will be automatically reset to defaults every day at 3:00 a.m.\n\n**You should never turn a server with existing data into a demo.** Always delete all existing data first with:\n\n    FLASK_APP=manage flask database drop\n\n### Demo Settings\n\n`DEMO_INSTALLATION`: Turns the ComPAIR installation into a demo (default: False)\n\nSetting `DEMO_INSTALLATION` to True will also force `APP_LOGIN_ENABLED` to True and `CAS_LOGIN_ENABLED` to False. `LTI_LOGIN_ENABLED` may still be optionally set to True or False if you want to allow LTI connections to be made to the demo installation.\n\n### Additional Setup\n\nIn order for the cron job to work properly, you must also create an additional celery process (ex: `celery -A celery_worker.celery beat`). You should also set `CELERY_TIMEZONE` to your preferred timezone so that the automatic scheduler will reset properly at 3:00 a.m. in your timezone.\n\nYou can set the data the first time by running:\n\n    FLASK_APP=manage flask database create\n\nAttachments Settings\n---------------------------\n\n`ATTACHMENT_UPLOAD_LIMIT`: The file size upload limit (in bytes) for all attachments including Kaltura uploads. (default 250MB).\n\n`ATTACHMENT_ALLOWED_EXTENSIONS`: List of file extensions allowed for upload (default: pdf, mp3, mp4, webm, jpg, jpeg, png). Separate values by a space (ex: `pdf mp3 mp4 webm jpg jpeg png`).\n\n`ATTACHMENT_PREVIEW_EXTENSIONS`: List of file extensions allowed for image preview (default: jpg, jpeg, png). Must also be included in `ATTACHMENT_ALLOWED_EXTENSIONS`. Separate values by a space (ex: `jpg jpeg png`).\n\nRestart server after making any changes to settings\n\n(Optional) Kaltura Media Attachments\n---------------------------\n\nYou may optionally enable Kaltura uploads to support more media file attachment types with better cross browser playback compatibility.\n\nIt is highly recommended to create a separate account for ComPAIR so it does not interfere with other content. You should have a Kaltura player setup and configured for the account.\n\nBy Default, ComPAIR treats the account provided as a bucket account to store all video/audio uploads. If global unique identifers are setup, you may alternatively allow users to control their media by turning `KALTURA_USE_GLOBAL_UNIQUE_IDENTIFIER` on. This requires that Kaltura user ids use the same global unique identifer.\n\nCurrently only version 3 of the Kaltura api is supported.\n\n### Settings\n\n`KALTURA_ENABLED`: Set to 1 to enable uploading media attachments to a Kaltura account (off by default).\n\n`KALTURA_SERVICE_URL`: The base url of the Kaltura server.\n\n`KALTURA_PARTNER_ID`: The partner id of the Kaltura account.\n\n`KALTURA_SECRET`: The secret for the partner id provided.\n\n`KALTURA_USER_ID`: The user id (email) of the Kaltura account.\n\n`KALTURA_PLAYER_ID`: A Kaltura player id (conf ui id) to display the media in.\n\n`KALTURA_VIDEO_EXTENSIONS`: Set of video file extensions that will be uploaded to the Kaltura instead of ComPAIR (default: mp4, mov, and webm). Separate values by a space (ex: `mp4 mov webm`).\n\n`KALTURA_AUDIO_EXTENSIONS`: Set of audio file extensions that will be uploaded to the Kaltura instead of ComPAIR (default: mp3). Separate values by a space (ex: `mp3`).\n\n`KALTURA_USE_GLOBAL_UNIQUE_IDENTIFIER`: Optionally use a user's global unique identifer if available for the Kaltura upload's user_id (off by default). Doing so will allow the user to control their media with Kaltura. Note that it is possible for them to remove the media and it to no longer be available in ComPAIR for comparisons or review.\n\nRestart server after making any changes to settings\n\nStudent Data Privacy Settings\n-----------------------------\n\nYou can control data accessibility for certain sensitive fields with the following settings\n\n`EXPOSE_EMAIL_TO_INSTRUCTOR`: Set to 1 to allow instructors to see and modify email address for students in any of their classes (disabled by default). Instructors can see email info by exporting their class lists or view one of their student's profiles.\n\n`EXPOSE_THIRD_PARTY_USERNAMES_TO_INSTRUCTOR`: Set to 1 to allow instructors to see CAS/SAML usernames for students in any of their classes (disabled by default). Instructors can see CAS?SAML username info by exporting their class lists\n\nIn addition you can control if students are able to edit their first name, last name, display name, and student number. System admins and instructors can still modify these profile fields. Any student disabled field for editing will be automatically updated with values from LTI or CAS/SAML on login. Please check the LTI, CAS, or SAML sections for additional environment variables that may need to be included (for example if student number is disabled, then `CAS_ATTRIBUTE_STUDENT_NUMBER` need to be set for automatic updated on student login)\n\n`ALLOW_STUDENT_CHANGE_NAME`: Allows students to edit their first \u0026 last names (default: enabled).\n\n`ALLOW_STUDENT_CHANGE_DISPLAY_NAME`: Allows students to edit their display name (default: enabled).\n\n`ALLOW_STUDENT_CHANGE_STUDENT_NUMBER`: Allows students to edit their student number (default: enabled).\n\n`ALLOW_STUDENT_CHANGE_EMAIL`: Allows students to edit their email address (default: enabled).\n\nGoogle Analytics Web Tracking\n-----------------------------\n1. Register for a Google Analytics web property ID at http://www.google.ca/analytics/.\n2. Set `GA_TRACKING_ID` to your web property id (ex: 'UA-XXXX-Y')\n\nRestart server after making any changes to settings\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fcompair","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubc%2Fcompair","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubc%2Fcompair/lists"}