Giter Club home page Giter Club logo

dce_course_admin's Introduction

A Django LTI app for viewing and updating Canvas LMS courses.

Setup

  1. copy example.env to .env. The example settings are workable for a dev/test scenario.
  2. create a postgres user and database:
    $ createuser -U postgres -P dce_course_admin
    $ createdb -U postgres -E UTF-8 -T template0 --lc-collate=en_US.UTF-8 --lc-ctype=en_US.UTF-8 --owner dce_course_admin dce_course_admin
    
  3. check that the DATABASE_URL value in your .env matches the user/db you created
  4. run python manage.py migrate
  5. run python manage.py runserver [host:ip]
  6. Use the django /admin UI to create an entry in the canvas_dev_key table containing your canvas developer key values (see below)
  7. check that the app's tool config output is functional by visiting http://host:ip/course_admin/tool_config
  8. register the app in your canvas instance
    1. Go to the canvas Admin -> Settings -> Apps tab and click on + App button
    2. Choose Configuration Type: URL
    3. Name can be whatever you want, e.g. "DCE Course Admin"
    4. Consumer Key will be the LTI_OAUTH_COURSE_ADMIN_CONSUMER_KEY from your .env
    5. Shared Secret will be the LTI_OAUTH_COURSE_ADMIN_CONSUMER_SECRET from your .env
    6. Config URL will be http(s)://[host:ip]/course_admin/tool_config

Canvas developer key

This app makes use of the harvard-dce/django-canvas-api-token extension to handle Canvas's oauth workflow for generating user access tokens. You'll need to get whoever admin's your institution's Canvas instance to generate this developer key for you. In a local dev/testing situation you can possibly make one yourself.

If you happen to be using the canvas-docker docker image there is a pre-generated developer key already included. Using the /admin UI create an entry in the canvas_dev_key table with the following values:

  • consumer_key = "dce_course_admin" (if using the example.env values)
  • client_id = "1"
  • client_secret = "test_developer_key"

Development setup

If you already have easy access to a development instance of Canvas congrats! If you don't I suggest using the canvas-docker docker image.

To start a instance of canvas-docker that can communicate with the dce_course_admin app you will need to start the container using the --network host option of the docker run command, like so:

docker run -t -i -p 3000:3000 --network host lbjay/canvas-docker:latest

Wait a minute or so for the container's services to spin up and then visit http://localhost:3000

Tip: because the canvas-docker container has it's own instance of postgres bound to port 5432, and because we're using docker's --network host option, you will get a port collision if your local postgres server used by the django app is also on port 5432. My workaround for this is to start a container instance of postgres on port 5433:

docker run -d -p 5433:5432 postgres:9.3

dce_course_admin's People

Contributors

lbjay avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dce_course_admin's Issues

Table resets to first page after toggling attributes

Sarah reports:

The tool resets to the first page when I toggle a setting on subsequent pages after the first.
Pick any site that has both the wiki front page and is set to public and toggle it to published. I usually do 2-3 before the page resets to 1.

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.