Commit Graph

497 Commits

Author SHA1 Message Date
Rob Orton faf315abed properly scope report to an account
fixes CNVS-27480

test plan
 - run lti report on a sub account
 - it should only contain lti tools from sub_account

Change-Id: I4f70326b0da296c30c2fed039be27c900347afb8
Reviewed-on: https://gerrit.instructure.com/72897
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-03-02 19:16:49 +00:00
Simon Williams 260691f1d1 i18n: add hebrew (crowd-sourced)
There have been some inconsistencies in date and time formats. However,
by standardizing our own translation config files on 24 hour time
formats and including the Hebrew Geresh symbol (׳) in our day and month
name abbreviations we have found a configuration that seems to work well
(or at least consistently).

closes CNVS-26264

test plan:
- enable translations locally and set your language to hebrew
- make sure both ruby and javascript translations work
- check a datetime field specifically

Change-Id: I07128071fb89d7129a1fbdc1e0c446866850f3f5
Reviewed-on: https://gerrit.instructure.com/69911
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
2016-03-02 19:10:58 +00:00
James Williams f65a9919b6 don't import moodle announcements as module items
test plan:
* import the package referenced in the ticket
* it should not create any module items linked to announcements

closes #CNVS-27609

Change-Id: I86a8c7ec2efbc766e7f82dac46a449faf0989788
Reviewed-on: https://gerrit.instructure.com/73412
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-02 12:52:40 +00:00
Cody Cutrer bd9f0d3fa5 migrations fixes, especially for partitioned tables
* for PartitionManager, don't have your own migrations paths, just
   use ActiveRecord's
 * vendor/plugins is long gone; don't look for migrations there
   anymore

Change-Id: Ia4e2c91e59beb2d723cbdc5072b26cddd70638c9
Reviewed-on: https://gerrit.instructure.com/53267
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-25 21:21:15 +00:00
Landon Wilkins 3d3777eddd lint: discourage execute_script, fixes SD-852
Change-Id: I986ea10f3fa25ce2bc5363353fd35fcd7dc92267
Reviewed-on: https://gerrit.instructure.com/72890
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-02-24 22:32:24 +00:00
Strand McCutchen ca5631a53e Use RFC-5646 language codes
fixes CNVS-26357
refs  CNVS-19910
fixes CNVS-27098
fixes CNVS-27099
fixes CNVS-27100

A few of our language codes were somewhat inaccurate, either
lacking an appropriate suffix or using underscores and not
hyphens. This change uses more accurate language codes.

When language codes were passed to the JavaScript layer, one of
the languages, zh_Hant, did not conform to RFC-5646.
When it was consumed later in the JS, its underscore caused
an issue which prevented editing in the Gradebook.

Test plan:
 0. Create and publish course. Create and publish an assignment.
 1. Add a user named "匿名" to the course.
 2. Give the user a grade in the gradebook.
 3. In the course settings (`/courses/:id/settings`) set the
    course language to zh_hant (2nd from bottom).
 4. Navigate to Gradebook and verify that you can still edit
    grades.

Revert "rollback aba0de7 and its effects"

This reverts commit 7339952ea4.

Change-Id: I9de7c3a6d5f046c6e06671a44b1f77dc47d62954
Reviewed-on: https://gerrit.instructure.com/72753
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
2016-02-24 20:53:40 +00:00
Landon Wilkins 8068d2de31 ensure spec files are *_spec.rb, fixes SD-594
test plan:
* see test commit

Change-Id: I8483b6979629642f9524f4fa7fecd17e402d56b4
Reviewed-on: https://gerrit.instructure.com/72669
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-02-24 20:33:44 +00:00
Rob Orton aea3467f45 create course storage report
refs CNVS-26643

test plan
 - report should run
 - report should have list of courses and storage
   used for each course

Change-Id: Ife1244ecfcef3b074cdf25954f7be07f0745e8de
Reviewed-on: https://gerrit.instructure.com/72421
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-02-23 21:54:09 +00:00
James Williams 5fad5cac17 tighten qti neutral feedback matching
test plan:
* import the QTI 1.2 package referenced in the ticket
* the question referenced in the ticket
 should not have neutral feedback set, but rather
 all the answers should have individual feedback set

closes #CNVS-26762

Change-Id: Ie4ce0231bc502e0255a06c35fdd571311b3d0027
Reviewed-on: https://gerrit.instructure.com/72680
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-02-23 19:29:36 +00:00
Ryan Taylor ccddb9d036 Add statistics for manually graded question types
This adds the ability to see the breakdown of grades for
essay/file-upload question types.  They are broken up as the top 27%,
the bottom 27%, the middle 46%, and any ungraded answers, then displayed
in table format.

Refs CNVS-25737
Closes CNVS-26756

Test Plan:
  - Check that essay+file_upload question type tables look good
  - Buckets show themselves as "correct" if they contain a student
    score >= to the question points possible
  - Buckets can contain more students than 27% if the scores are
    identical (All 100% scores show up in top bucket/middle bucket
    even if 100% are 100% scores)
  - New answer tables are accessible like other tables
  - Buckets are explicitly ordered as top, middle, bottom, ungraded

Change-Id: I62798938b9176de97df2e498a2f9b3b02a81086c
Reviewed-on: https://gerrit.instructure.com/70907
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-02-23 03:31:09 +00:00
Landon Wilkins d8be32710c lint: discourage unnecessary fj & ffj calls, fixes BR-765
test plan:
* make a change to a spec:
-- use fj instead of f with a vanilla css selector like "#someID"
* run the linter
* verify you get an error, telling you to use f instead of fj
* same for ffj
* see test commits

Change-Id: Ifde5c325ee5b0ef62e089762fafd57b3e067c491
Reviewed-on: https://gerrit.instructure.com/72151
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2016-02-19 08:13:44 +00:00
Cody Cutrer a0bcab0497 Merge branch 'unthor_moodle_importer' of git://github.com/dgynn/canvas-lms
Change-Id: Iddededbaeed449c83530649d991c66c60793d08c
Reviewed-on: https://gerrit.instructure.com/72029
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
2016-02-11 14:47:06 -07:00
Dave Gynn 143ac39ba3 remove unnecessary thor dependency
The `moodle_importer` does not directly use `thor` and has no need
for a specific version dependency. `moodle2cc` already has an
unversioned thor dependency and `railties` itself requires `>= 0.18.1`.

Specifically for me, this hard dependency caused issues with the
current releases of  `derailed_benchmarks` and `foreman` which
required `~> 0.19` and `~> 0.19.1` respectively.

0.19.1 is the current release as of 3/2014.

Test Plan:
- run bundle update
- run `moodle2cc help` to verify moodle2cc thor tasks still load
2016-02-11 12:11:13 -05:00
Dave Gynn 34380c8f7f Support class reloading with BroadcastPolicy
Since Notification and NotificationPolicy can be reloaded,
BroadcastPolicy needs to re-cache the references on reload.

To test:
You can experience a reloading error before applying this patch
by triggering a notification after a reload.
- rails console
- reload!
- Course.last.enroll_student(User.last).accept!
This will cause `ArgumentError: A copy of Notifier has been removed from the module tree but is still active!`

With this patch applied, there should be no error (assuming
that student can be enrolled in that class).
2016-02-11 11:08:17 -05:00
James Williams f89012e220 rails 4.2: couple more fixes
refs #CNVS-26056

Change-Id: I5fd18402b639d87c94ee9bafb52871ab31e52974
Reviewed-on: https://gerrit.instructure.com/71368
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-03 16:17:49 +00:00
Brad Horrocks 3fee901ac0 Remove Google Docs plugin
Google drive relevant code has been moved to the gems/google_drive
Actually test google drive with mocked api responses
cleaned up lots of code

Fixes PLAT-1301

Test Plan:
*** You'll need to use 2 separate google accounts to fully test ***
** Its helpful to have multiple chrome profiles so you dont have to log in and
** out a bunch https://support.google.com/chrome/answer/2364824?hl=en

BEFORE SWITCHING TO THIS PATCH SET
  - Make sure you have some google doc collaborations
    - Directions for creating one are below
  - Disable your google docs plugin

Switch to the patch set
Enable google drive. (if not already)
  - You should be able to paste in a client_secrets.json
  - Update Redirect URI to point to your local instance (The URI should exist in the JSON)

As an admin/teacher
  - Goto `profile/settings` and add the google drive user service
    - Your email should be displayed with the service
  - Goto Collaborations
    - Make sure existing collaborations still work
    - Click "Start new collaboration"
    - give it a nice name (Created by admin)
    - select your student
    - click start collaborating
    - You should be redirected to the new doc in google
    - create another collaboration without the student (Created by admin, no users)
  - Create an assignment with
    Submission Type: Online
    Online Entry Options: File Uploads
  - Make sure your student has access to the course/assignment
  - Goto Account settings -> Users
    - Click View User Groups in the top right
    - create a new group set with a group in it
    - add yourself and your student to the group
  - Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
    - Click "Start new collaboration"
    - give it a nice name (Created by admin for group)
    - select your student
    - click start collaborating
    - You should be redirected to the new doc in google

As a student
  - Goto `profile/settings` and add the google drive user service
    - Your email should be displayed with the service
  - Goto the assignment
    - Submit the assignment
    - You should have a "Google Doc" tab
    - Choose a document and submit it
    - After it submitted, click download on the right side
      just to make sure its correct
  - Goto Collaborations
    - Make sure existing collaborations still work
    - make sure the "created by admin" collaboration works
    - make sure you can't see "Created by admin, no users"
    - Click "Start new collaboration"
    - give it a nice name (created by a student)
    - click start collaborating
    - You should be redirected to the new doc in google
    - Switch to your admin/teacher and make sure they can't access it
    - Edit the collaboration add the teacher, click Save
    - Switch to your admin/teacher and make sure they can access it
  - Goto `profile/settings` and REMOVE the google drive user service
  - Go back to collaborations
  - You should be forced to add the google service in order to use a collaboration
  - Goto the Group's Collaborations (Courses & Groups -> [group name] -> Collaborations)
    - Make sure you can access "Created by admin for group"
    - Click "Start new collaboration"
    - select your admin/teacher
    - click start collaborating
    - You should be redirected to the new doc in google
    - make sure your admin can access it to

As a site admin
  - Disable Google Drive
  - Then with your student
    - Make sure you can still do file upload submissions on the assignment
    - Collaborations should no longer show up (unless you have etherpad enabled)
  - Google drive should no longer show up in your profile settings as a registered service
Change-Id: I4dfaff6f5262743c044aadd12266fd0bd85a60e1
Reviewed-on: https://gerrit.instructure.com/69078
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-02-01 23:41:53 +00:00
James Williams 56e555543a rails 4.2: fix simply_verioned_spec
prevents Woozel from breaking sharding setup

refs #CNVS-26056

Change-Id: Iecc28589336e21c416df90e0a9cd7a2d3624b6f5
Reviewed-on: https://gerrit.instructure.com/71132
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-01 21:02:56 +00:00
James Williams 1ce5a75400 rails 4.2: fix i18n tasks
refs #CNVS-26056

Change-Id: I0cb3c3c46ccee9e26972853aa0f08db0f0fffcce
Reviewed-on: https://gerrit.instructure.com/70967
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-26 20:35:54 +00:00
James Williams ca36398dbf rails 4.2: bump folio-pagination
refs #CNVS-26056

Change-Id: I1ad89e2d9922e9994937963b0ad783eccebc5bc5
Reviewed-on: https://gerrit.instructure.com/70759
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-22 16:16:29 +00:00
James Williams 7897b92ce4 rails 4.2: fix account reports specs
refs #CNVS-26056

Change-Id: I07bd4c15c2d6eb3840a0a600acece485a01d4f05
Reviewed-on: https://gerrit.instructure.com/70785
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-22 14:13:33 +00:00
Cody Cutrer f552f4fc00 simplify gem test harnesses
rely on test_all_gems.sh to output header and trailer,
and use `set -e` in each test.sh to simplify passing
through errors

Change-Id: I3ba724ad2539ddfe31195394c43f646acfc73920
Reviewed-on: https://gerrit.instructure.com/70469
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-19 17:52:58 +00:00
Jon Jensen e0b97727a1 spec: ensure consistent ordering
order by context type, then id. previously it just ordered by id, and since
we're comparing apples and oranges (well, courses and accounts), there's no
guarantee that one's sequence would be higher/lower than the other (depends
on which specs run beforehand)

Change-Id: I3e91d67c9cbf60d0151f0c8d52627d23ffa173f5
Reviewed-on: https://gerrit.instructure.com/70536
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2016-01-19 03:19:58 +00:00
Cody Cutrer 1b7ce8aacb don't include plugin dir in gergich output sent to jenkins
it's useful locally, but causes mismatches for Jenkins

Change-Id: I2606b1a0d15bafc5f6f9ad90735d4207dcc8bddf
Reviewed-on: https://gerrit.instructure.com/70502
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-18 22:08:19 +00:00
James Williams b1f3daf044 rails 4.2: misc spec fixes
refs #CNVS-26056

Change-Id: Ia94ee2fcfded1ec66cb77a19085b005c81304800
Reviewed-on: https://gerrit.instructure.com/70251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-18 21:45:39 +00:00
Cody Cutrer 86ee3aaae2 enable rubocop for plugins
locally, pass `--plugin PLUGIN` to script/rlint

Change-Id: Ib5944c25ef25c2142340e40ceda5ff24948b05c2
Reviewed-on: https://gerrit.instructure.com/70470
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-18 18:11:29 +00:00
August Thornton d0c68246bc create admin level LTI report
closes PLAT-701

As an admin I would like to be able to tell what tools are installed
in my Canvas instance. I want to see if there are tools we are using a
lot or if there are tools we do not want our instructors to use.
Ideally, I would see tool information, course information and privacy
level (including if variable substitution is used).

test plan:
  * run 'Lti Report' as an admin
    and make sure it works
  * should run in root and sub accounts
  * should be scoped to only run on current root
    account and associated sub-accounts

Change-Id: I24fd1cb4c542f70d967ef34cfd46df881d239ae8
Reviewed-on: https://gerrit.instructure.com/69622
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2016-01-15 19:11:53 +00:00
Simon Williams f9285e3483 spec: fix aux build by pinning old rubocop version
This reverts commit 2073553507.
This reverts commit 56381d06b4.

rubocop upgraded today, and we tried a couple times to fix it, but since
we only run rubocop when ruby files change, the fixes themselves passed
the build but didn't fully fix the problem.  for now, until we can
complete an upgrade, just pin the known working version of rubocop.

Change-Id: Ib7587e5ff9f3c00817f920506208a0e20444d379
Reviewed-on: https://gerrit.instructure.com/70356
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-15 06:09:04 +00:00
Ethan Vizitei 56381d06b4 spec: fix aux build
rubocop wasn't version pinned, so jenkins got a later version,
and the aux build started failing because of a config difference.
this fixes the config and pins the version of rubocop

Change-Id: I5d94b779a8d29dac66ad0e121737816459c62ba3
Reviewed-on: https://gerrit.instructure.com/70337
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 23:38:15 +00:00
Ethan Vizitei 2073553507 build: Fix aux build failure in script/rlint
Parser::CurrentRuby hadn't been loaded in some cases, requiring
explicitly makes sure it's always available here.

TEST PLAN:
 1) aux build should pass

Change-Id: Ic5d2ef0ebbd8673e9ccec0c6617be49ef451f617
Reviewed-on: https://gerrit.instructure.com/70305
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
2016-01-14 21:31:26 +00:00
Jon Jensen dfff1c06bd spec: ensure changes to test gems trigger a full run
Change-Id: Ic770eba54f21682479042f9a3d3155fa11f2885b
Reviewed-on: https://gerrit.instructure.com/70177
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-13 18:59:28 +00:00
Jacob Fugal 371ec30967 refactor CSRF handling for clarity and rails3+
closes CNVS-18870

CNVS-18870 as described in the ticket description is not a bug. see
comments on the ticket for more details. but while investigating and
confirming that, it became obvious that the odd structure and scattered
implementation of the CSRF protection was both making it hard to reason
about and easy to introduce new bugs. after the refactor, we still:

* don't perform CSRF validation on GET requests
* don't perform it on token-authenticated API requests
* do perform it on session-authenticated API requests
* do perform it on non-API requests regardless of authentication method

additionally, we now:

* don't perform CSRF validation on HEAD requests

finally, we _don't_ support a csrf_token in the session anymore. that's
been deprecated forever; we can remove the code now.

test-plan:
 - should not perform CSRF validation for:
   - GET requests
   - token-authenticated POST requests to API endpoints (path prefixed
     by /api/) without an authenticity_token parameter or X-CSRF-Token
     header
   - token-authenticated POST requests to API endpoints even with an
     authenticity_token parameter
   - token-authenticated POST requests to API endpoints even with an
     X-CSRF-Token header

 - should perform CSRF validation for:
   - POST requests to non-API endpoints
   - session-authenticated POST requests to API endpoints

 - when CSRF validation should occur, but the user has cookies off:
   - POST requests to non-API endpoints should redirect to a "need
     cookies" page
   - XHR POST requests to non-API endpoints should not redirect
   - POST requests to API endpoints should not redirect

Change-Id: I3dbb3a68623bc9d03a3e744a9d4e1f038a32709c
Reviewed-on: https://gerrit.instructure.com/65103
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2016-01-11 23:31:47 +00:00
Cody Cutrer 43c561d2d3 rip out more polymorphic shims
Change-Id: Ie93eb06d746aa2f6968b0e29e1d22dfb2242c12f
Reviewed-on: https://gerrit.instructure.com/69683
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-11 17:40:03 +00:00
James Williams cc36e9288b fix attachment downloading from url
test plan:
* use the content migrations api to import
 content from a course using a url
* it should work as expected

closes #CNVS-26233:

Change-Id: I66ef4a7d445cfb40209b46386179395de58e59f2
Reviewed-on: https://gerrit.instructure.com/70005
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-10 04:00:09 +00:00
Brad Horrocks 1de37eb112 Admin: API Token Reporting
As an admin, I would like to be able to easily see who in my Canvas
account has API tokens and for what tools. This will allow me to audit who is
accessing data and manage tools.

columns:

user_name, user_id, token_name, token_expiration, token_creation_date,
token_last_used, developer_key_name, developer_key_id

Fixes PLAT-1261

Test Plan:
Generate the report
make sure it has all of the right columns

Change-Id: Ifb5b950586fd344ede8eb95b9d3c5e6783bbd70d
Reviewed-on: https://gerrit.instructure.com/69734
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-01-08 22:29:58 +00:00
Cody Cutrer 7437881340 remove syck from the canvas_stringex gemfile
Change-Id: Ie095c9a6c8352960401c2bbd01041e7563b7ed5f
Reviewed-on: https://gerrit.instructure.com/69854
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-08 20:35:53 +00:00
Jon Jensen 2b806932bc spec: don't improperly selinimize changes to the tinymce bundle
compiled/tinymce is special-cased in config/build.js.erb and friends; since
it's special/separate like the common bundle, we need to test all the
things when it changes

test plan:
1. edit a tinymce file, like public/javascripts/tinymce_plugins/instructure_equation/plugin.js
2. run `rake canvas:compile_assets`
3. run `gems/selinimum/bin/selinimize any list of spec files`
4. the last line of output should be that same list of spec files

Change-Id: I14d52003dd095769967053022bc2433999d23418
Reviewed-on: https://gerrit.instructure.com/69886
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-07 21:39:48 +00:00
Cody Cutrer 10ec2b4ee3 use JSON for unicode transliteration data
to avoid Syck/Psych incompatibilities

Change-Id: Iea7f6d7f448afa3db8d1186f2497b8e8a6198329
Reviewed-on: https://gerrit.instructure.com/69778
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-07 16:14:16 +00:00
James Williams 3e1481aa6e rails 4.2: s/destroy!/destroy_permanently!
destroy! is now a method in rails

refs #CNVS-26056

Change-Id: I66e512265ff5cda6a12d7820e3cf69c77ef9e746
Reviewed-on: https://gerrit.instructure.com/69721
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-07 14:00:13 +00:00
Cody Cutrer 02ced44cc7 some vendored gem test fixes
* explicitly depend on syck/iconv when used
 * fix cassandra spec config checking

Change-Id: Id9b706943c6b46190cf753fd302cbca0f7bf2a2b
Reviewed-on: https://gerrit.instructure.com/69779
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-07 05:33:25 +00:00
Ethan Vizitei 839035007f replace handlebars_spec
refs CNVS-25916

remove selenium tests for handlebars compilation,
and move relevant coverage to unit tests in that
gem.  Also removes an unused helper.  Translation
wiring is covered in i18n_js_spec in the selenium
suite

Change-Id: Ib63ca0e1cdd73529a5e1a15cd579edc70fca02e0
Reviewed-on: https://gerrit.instructure.com/69772
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-06 22:30:19 +00:00
Cody Cutrer fef71f7ff3 fix reporting of all gem tests
Change-Id: I8c59f6876402afd1a14701a48b6df5b2cd5d7dc8
Reviewed-on: https://gerrit.instructure.com/69774
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-06 19:06:41 +00:00
James Williams 6ace965ee2 rails 4.2: remove attachment_fu callbacks hackery
refs #CNVS-26056

Change-Id: I46d64790db53f81a33bd8bec55a32c44088568fa
Reviewed-on: https://gerrit.instructure.com/69569
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-05 20:33:18 +00:00
James Williams 7b10d15b9f rails 4.2: use AR#connection on class instead of model
refs #CNVS-26056

Change-Id: Idee28041d97a6e8a7566ef922f3001906c617864
Reviewed-on: https://gerrit.instructure.com/69500
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-05 13:53:41 +00:00
James Williams baf3df8f44 rails 4.2: fix suspend_callbacks
refs #CNVS-26056

Change-Id: Ied93b069b5124f2e2c9e5587c6d9d2c70d3ae78b
Reviewed-on: https://gerrit.instructure.com/69611
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-05 13:52:00 +00:00
Rob Orton 4267d6b857 use slave for enrollmment activity report
refs CNVS-18507

test plan
 - report should work the same as it did before

Change-Id: I40dc56c0383cc2fe102bb0daf2d121efa69cc62a
Reviewed-on: https://gerrit.instructure.com/69531
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2016-01-04 22:42:58 +00:00
James Williams 8a41991d74 rails4.2: replace Relation#scoped
either with Relation#all or Association#scope

refs #CNVS-26056

Change-Id: Ie370a3c47c575007ce3b0ba75a122d854e6f8fbc
Reviewed-on: https://gerrit.instructure.com/69497
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-30 18:42:04 +00:00
James Williams c0ac1dfcdd rails 4.2: allow bootup
refs #CNVS-26056

Change-Id: I4a4d91c8f96a9d86646bdd14ba9ed75e365a9764
Reviewed-on: https://gerrit.instructure.com/69227
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-30 18:30:27 +00:00
James Williams c400e137f6 rails 4.2: fix attachment_fu callbacks
refs #CNVS-26056

Change-Id: I6048e9c9e0d3eaf897c4082f7d936fe2b687c66c
Reviewed-on: https://gerrit.instructure.com/69499
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-30 17:53:29 +00:00
James Williams 20cdfd24b1 rails4.2: Fixnum#ago is deprecated
e.g. use .seconds.ago instead of .ago

refs #CNVS-26056

Change-Id: I5af8541116623a8fc8b49682b0829a065aba59c8
Reviewed-on: https://gerrit.instructure.com/69339
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-29 21:14:11 +00:00
Shawn Meredith 384e22382c spec: selinimum yaml require
error seen in this build for docker
rspect-plugins-ruby21-docker/532/console

Change-Id: Ieaaaedf35925f68dccc17b28d259d85ddf963c6b
Reviewed-on: https://gerrit.instructure.com/69357
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2015-12-28 18:33:40 +00:00