![]() closes OUT-1534 Scheduling of outcome import jobs will occur in a separate PS, after this merges and OUT-1997 is merged too. test plan: - start up canvas - generate api docs: > docker-compose run --rm web bundle exec rake doc:api - load api docs in http://canvas.docker/doc/api/index.html - read over the "Outcomes CSV Format" and make sure it reads well - read over the "Outcomes Import" and make sure it reads well - obtain an access token: https://community.canvaslms.com/docs/DOC-10806-4214724194 - request an outcome import, replace "canvas-path" and "token" values: curl -F attachment=@<canvas-path>/spec/lib/outcomes/fixtures/demo.csv \ -F 'import_type=instructure_csv' \ -H "Authorization: Bearer <token>" \ http://canvas.docker/api/v1/accounts/1/outcome_imports - in a rails console, confirm that the import was accepted: > docker-compose run --rm web bin/rails console % pp OutcomeImport.last # confirm that the import is in the 'created' state, associated with your user and associated with an account context # note the "id" value for later use % pp OutcomeImport.last.attachment # confirm that the attachment is in the 'processed' state and has the filename "test_outcomes_1.csv" passed in above - request the status of the outcome import (should return a message saying "The specified resource does not exist"): curl -H "Authorization: Bearer <token>" \ http://canvas.docker/api/v1/accounts/1/outcome_imports/latest - back in the rails console created above, manually transition the import to "importing": % OutcomeImport.last.job_started - run the above curl command again, and this time the latest outcome import should be returned, in the 'importing' state - run the above curl command again, replacing "latest" with the "id" value obtained above. it should return the same response as the previous step. Change-Id: Ice7d67b625b443cec70f531f2e673face6d6fbeb Reviewed-on: https://gerrit.instructure.com/142024 Reviewed-by: Neil Gupta <ngupta@instructure.com> Reviewed-by: Frank Murphy <fmurphy@instructure.com> Tested-by: Jenkins QA-Review: Frank Murphy <fmurphy@instructure.com> Product-Review: Neil Gupta <ngupta@instructure.com> |
||
---|---|---|
.. | ||
api | ||
diagrams | ||
docker | ||
examples | ||
images | ||
styleguide | ||
yard_plugins | ||
high_level.txt | ||
live_events.md | ||
merging-gradezilla.md | ||
testing_javascript.md | ||
working_with_webpack.md |