{"id":18544546,"url":"https://github.com/instructure/rollcall-attendance","last_synced_at":"2025-04-08T03:09:01.857Z","repository":{"id":37677763,"uuid":"99267801","full_name":"instructure/rollcall-attendance","owner":"instructure","description":"An attendance LTI tool that integrates with Canvas","archived":false,"fork":false,"pushed_at":"2025-03-23T19:59:41.000Z","size":1744,"stargazers_count":31,"open_issues_count":41,"forks_count":39,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-03-31T17:18:44.718Z","etag":null,"topics":["canvas-lms"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"agpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/instructure.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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}},"created_at":"2017-08-03T19:27:25.000Z","updated_at":"2025-03-06T03:56:21.000Z","dependencies_parsed_at":"2024-04-29T17:28:58.337Z","dependency_job_id":"ee839ddc-e039-4104-975a-b7a2a7f7a0ad","html_url":"https://github.com/instructure/rollcall-attendance","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Frollcall-attendance","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Frollcall-attendance/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Frollcall-attendance/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/instructure%2Frollcall-attendance/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/instructure","download_url":"https://codeload.github.com/instructure/rollcall-attendance/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247767234,"owners_count":20992547,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["canvas-lms"],"created_at":"2024-11-06T20:16:53.689Z","updated_at":"2025-04-08T03:09:01.826Z","avatar_url":"https://github.com/instructure.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Roll Call Attendance Tracker\n\n## Dependencies\n\n- Ruby 2.4\n- PostgreSQL\n- Redis\n\n## Development setup\n\nRoll Call can be run locally on your machine or with Docker. These instructions\nassume you are using Docker.\n\n### 1. Setup Canvas:\n\nYou need to have a local Canvas install running, and it needs to be in\ndocker (otherwise having rollcall post back to it will not work, it needs\na domain both it and the browser can reach).\n\nFollow our general Docker setup here:\nhttps://github.com/instructure/canvas-lms/blob/stable/doc/docker/getting_docker.md\n\nAnd our Canvas in Docker setup here:\nhttps://github.com/instructure/canvas-lms/blob/stable/doc/docker/developing_with_docker.md\n\nOnce you have a dockerized Canvas up and running, you need to add a\ndeveloper key to Canvas for rollcall to connect with. As an admin\naccount, go to `http://canvas.docker/accounts/\u003cid\u003e/developer_keys`,\ncreate an API key with a `tool_id` of \"rollcall\" and a redirect url of\n`http://rollcall.docker/canvas_oauth`. Ensure the key state is `ON`.\nOnce it's been created, get the ID number (an integer) from the index\npage along with the token and add them as `CANVAS_KEY` and\n`CANVAS_SECRET`, respectively, in `.env`.\n\n### 2. Configure the LTI\n\nThe LTI will run in development without further configuration; however, some\nthings like mail delivery (for attendance report exports) may not work. You can\nfurther configure the LTI by specifying environment variables in `.env`. Refer\nto `env.sample` for inspiration.\n\nSome aspects (such as database and mail) can also be configured in the\ntraditional Rails way of YAML files in the `config` directory. Refer to\n`config/database.yml.sample` and `config/mail.yaml.sample` for examples.\n\nNote that in production you will want to make sure to configure the SMTP\noutgoing address parameter to an email address on your own domain; otherwise,\nyour reports will be sent from \"`Roll Call \u003cnotifications@instructure.com\u003e`\",\nwhich is most certainly not what you want.\n\n### 3. Configure your docker environment for SSL\n\nDo to recent changes in browsers, the session cookies for rollcall are required to have `SaveSite=None` and `secure`.\nDue to `secure` local development is easier if you configure your dockerized canvas and rollcall to use SSL. If you are\nusing dinghy for OS X based development. You can find instructions on how to create self signed certificates at\nhttps://github.com/codekitchen/dinghy-http-proxy/blob/master/README.md#ssl-support\n\nThe default docker-compose.override.yml file will share your ~/.dinghy/cert directory into the docker containers and add\nthe certifications in that directory as trusted certificates to the container.\n\n### 4. Docker build + Database migrations:\n\nNOTE: By default this setup uses postgres. To use mysql instead, export:\n\n    COMPOSE_FILE=docker-compose.yml:docker-compose.override.yml:docker-compose.mysql.yml\n\nNow you should be able to build your containers with:\n\n    docker compose build\n\nYou can get your database prepped for development with the normal\nrake tasks, you just have to run them in the container:\n\n    docker compose run --rm web bundle install\n    docker compose run --rm web bundle exec rake db:create\n    docker compose run --rm web bundle exec rake db:migrate\n\n### 5. Run it!\n\nYou should be able to start everything with:\n\n    docker compose up\n\nThis will start up 5 containers: a web process to hit with your browser, a\nworker process to consume jobs, a postgres data store, a redis cache, and a\nminio server so you don't need a real AWS S3 bucket. When they're running, you\ncan visit your app in the browser by going to:\n\n`http://rollcall.docker`\n\n### 6. Add Roll Call to Canvas:\n\nIn Canvas, go to Account \u003e\u003e Settings \u003e\u003e Apps, click \"Add App\", and use the following settings:\n\n    Configuration Type: By URL\n    Name: Roll Call\n    Consumer Key: 12345\n    Shared Secret: secret\n    Config URL: http://rollcall.docker/configure.xml\n\nYou can change the consumer key and shared secret by overriding `LTI_KEY` and `LTI_SECRET`\nin `docker-compose.yml`.\n\nYou're all set!\n\n## Running Tests (With Docker!)\n\nRollcall has three test suites (RSpec, Cucumber, \u0026 Jasmine).\n\nMake sure your test database is in the right state before trying to run them:\n\n    docker compose run --rm web bundle exec rake db:test:prepare\n\nNow you can run your rspec tests in the web container like this:\n\n    docker compose run --rm web bundle exec rake spec\n\nYou can watch your jasmine specs run by starting your docker compose config, and then navigating to the `./jasmine` directory:\n\n    docker compose up\n\nAnd then visit in your browser: `http://rollcall.docker/jasmine`\n\nbut that kind of sucks for rerunning. Run your javascript tests from the command line like this:\n\n    docker compose run --rm web bundle exec rake jasmine:ci\n\nFinally, you can run your cucumber tests, but it's kind of hacky. For linux\n(which the container is) you need to wrap a cucumber run in \"xvfb-run\" for\ncapybara-webkit to work correctly, but something in that process is\nmaking output redirection not work right, so you won't see the output if you\njust run \"docker compose run --rm web xvfb-run bundle exec cucumber\".\n\nWe've found you can get around this by telling docker compose you want it to run\na bash script, and having the bash script kick off the xvfb-run command,\nso run this to see your cuke output:\n\n    docker compose run --rm web bash bin/cucumber\n\n#### Running the Whole Suite\n\nIf you want to run the whole suite of tests, like a CI would, just run:\n\n    ./build.sh\n\nand watch the output fly by. It builds the docker image and runs in sequence the rspec tests,\nthe jasmine tests, and the cukes. Failures in any should exit the script with a non-zero exit code.\n\n### Avatars\n\nYou can enable or disable the avatars service in Canvas via the Rails console in `canvas-lms`:\n\n    # from the canvas-lms directory\n    docker compose run --rm web bundle exec rails c\n\n    Account.find_each { |a| a.enable_service(:avatars) ; a.save }\n    - or -\n    Account.find_each { |a| a.disable_service(:avatars) ; a.save }\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstructure%2Frollcall-attendance","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finstructure%2Frollcall-attendance","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finstructure%2Frollcall-attendance/lists"}