Commit Graph

900 Commits

Author SHA1 Message Date
James Williams e2ea8435c7 remove remove_index reference from plugin
Change-Id: I01094e16974c2f2ecaadef15e16666097131a23b
Reviewed-on: https://gerrit.instructure.com/70865
Tested-by: Jenkins
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
2016-01-22 21:37:05 +00:00
James Williams 4f9a25a79c rails 4.2: fix migration methods + unhack things
fixes index_exists?, add_index, remove_index, and
 add_foreign_key method calls in migrations

unhacks remove_index to fail silently if the index
 doesn't exist (and removes some unnecessary remove_index calls)

also fixes migration specs for rails 4.2

refs #CNVS-26056

Change-Id: Id878aa4cb871fc5ae6d0d4e7c6e8cfe1c5d88d35
Reviewed-on: https://gerrit.instructure.com/70692
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:17:36 +00:00
Cameron Matheson 22635c78a8 remove bad foreign keys from canvadocs_submissions
fixes CNVS-26068
fixes CNVS-26463

The crocodoc_document/canvadoc may live on another shard, so we can't
use foreign keys for those columns

Change-Id: Ief6ae9c70d3b7eea79c108d40a544ded7235b8b1
Reviewed-on: https://gerrit.instructure.com/70698
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-01-21 17:45:16 +00:00
Cameron Matheson 987b6c2bb1 make canvadocs_submissions entries unique
closes CNVS-26089

Test plan:
  * in a rails console, call
    DataFixup::CreateCanvadocsSubmissionsRecords.run
    a few times
  * run migrations
  * there should be no duplicate entries in canvadocs_submissions
  * you should not be able to create duplicate entries in
    canvadocs_submissions

Change-Id: I38cd3c990c13434d5daa016f3b4d192bdc877e16
Reviewed-on: https://gerrit.instructure.com/69327
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-01-21 00:28:13 +00:00
James Williams 9b5b7ec603 remove role name unique index migration
breaks specs when initializing a test db by running
 predeploys before postdeploys because the index gets removed
 in a later (predeploy) migration

Change-Id: I8b18ec05693bfbcf34e3f514800d34dd7d90c61b
Reviewed-on: https://gerrit.instructure.com/70565
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-20 13:52:27 +00:00
Cody Cutrer db87c8a555 add index on enrollments
fixes CNVS-26586

Change-Id: I056b1fc2109baf72efca272df3e66baecc753f88
Reviewed-on: https://gerrit.instructure.com/70570
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-19 19:33:04 +00:00
Keith Garner a0be4e2665 Add date of (canva|croco)doc student view to speedgrader
SpeedGrader now shows the date a student viewed (canva|croco)doc. The
attachment.viewed_at is filled with a date when the attachment's owner
invokes a (canva|croco)doc session. This results in the instructor
being able to better confirm that their students are viewing their
feedback.

fixes CNVS-25136

test plan:
 - Enable crocodocs
 - create an assignment that takes a crocodocable document
 - as a student, submit a crocodocable document
 - as a teacher, go into speedgrader and view the assignment.
 - Note the abscence of "Student Viewed Document" in the submission
   information.
 - as a student, go into the submission details and view the feedback
 - as a teacher, go into speedgrader and view the assignment.
 - Note the presence of "Student Viewed Document" in the submission
   information.
 - repeat the above process for canvadocs

Change-Id: I0a21cc6abe3d469628646e4d5771e8d6453cda61
Reviewed-on: https://gerrit.instructure.com/69783
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-01-14 00:03:23 +00:00
Rob Orton 256c2b68cf create reset_mfa permission
fixes CNVS-23897

test plan
 - reset MFA permission should be available in
   site_admin admin role overrides
 - reset MFA permission should be available in
   regular root_account admin role overrides if
   MFA is enabled in settings
 - user 1 = a user that is an admin for site_admin
   and that has MFA enabled
 - create a site_admin role that only has the
   reset mfa permission
 - user 2 = a user that has the new reset MFA role
 - user 2 should be able to reset MFA for user 1

Change-Id: I030f95600ee1260b4e4a541c2a49bb5d2ccb4afe
Reviewed-on: https://gerrit.instructure.com/69815
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-01-12 23:12:18 +00:00
Alex Boyd a3eaf1a5da Add API to bulk fetch and reset communication channels
Fixes CNVS-24295

Test plan:
 - Create at least three users and give each of them a few email
   addresses
 - Add 'foo@example.com', 'bar@example.com', and 'foobar@example.com'
   as addresses to the first of those three users
 - Run the following, with U1 and U2 replaced with the ids of the
   first and second users you created, respectively (do not
   include the id of the third user in this list):
     CommunicationChannel
       .where(user_id: U1)
       .update_all(bounce_count: 1, last_bounce_at: Time.now)
     CommunicationChannel
       .where(user_id: U2)
       .update_all(bounce_count: 1, last_bounce_at: Time.now - 1.day)
 - As a site admin and on the account's domain, navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv
 - Ensure that you're given a CSV file that mentions all of the
   first and second user's channels but none of the third user's
   channels
 - Ensure that the second user's channels come before the first
   user's channels, and that the first user's channels mention
   today's date as the last date at which they bounced while
   the second user's channels mention yesterday instead
 - Navigate to /api/v1/accounts/.../bouncing_communication_channels.csv,
   where ... is the id of the account, and verify that you get
   the same result
 - Navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv?pattern=foo*
 - Ensure that the resulting CSV mentions foo@example.com and
   foobar@example.com but not bar@example.com
 - Navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv?before=TODAY
   where TODAY is today's date in ISO 8601 format
 - Ensure that the resulting CSV mentions only the second user's
   channels and not the first user's
 - Navigate to
   /api/v1/accounts/self/bouncing_communication_channels.csv?after=TODAY
 - Ensure that the resulting CSV mentions only the first user's
   channels and not the second user's
 - Make a POST request to
   /api/v1/accounts/self/boucing_communication_channels/reset with parameters
   pattern=foo*
 - View the first user's profile
 - Ensure that foo@example.com and foobar@example.com are no longer
   marked as bouncing, but all the other addresses are
 - Make a POST request to
   /api/v1/accounts/self/bouncing_communication_channels/reset with parameters
   before=TODAY where TODAY is today's date in ISO 8601 format
 - View the second user's profile
 - Ensure that all of the second user's communication channels are
   no longer marked as bouncing
 - View the first user's profile
 - Ensure that the user's channels are still marked as bouncing
 - Make a POST request to
   /api/v1/accounts/self/bouncing_communication_channels/reset
 - View the first user's profile
 - Ensure that their channels are now no longer marked as bouncing

Change-Id: Ic937777a03481dc0b442ff6cf766175cc987fd80
Reviewed-on: https://gerrit.instructure.com/68328
Reviewed-by: Alex Boyd <aboyd@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
Tested-by: Jenkins
2016-01-11 21:19:42 +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 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
James Williams 7ef0b75785 rails 4.2: active record fixes
refs #CNVS-26056

Change-Id: Ie6635bc9df7df4ee6504bba0fb32afb9dcb07e7a
Reviewed-on: https://gerrit.instructure.com/69525
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:23 +00:00
Cameron Matheson d990265772 add graded_at column to enrollments table
Test info:
  This commit adds a graded_at column that should be updated whenever
  the grades for an enrollment change

Change-Id: If1fa48cb9f15a8a5b8c651b1124db111d355d6c1
Reviewed-on: https://gerrit.instructure.com/49513
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-01-04 23:08:47 +00:00
James Williams a0bde6838c clear rails cache for rails 4 move
Change-Id: I2c8a238969bab0ed0f6717a2883a10263ff7f618
Reviewed-on: https://gerrit.instructure.com/69451
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-29 19:16:41 +00:00
James Williams 0f46bc4a4f retroactively fix folders with names that end in spaces
refs #CNVS-26055

Change-Id: I9b0dd6f1a65359915122c8f024b737a6d8313880
Reviewed-on: https://gerrit.instructure.com/69350
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-23 21:44:56 +00:00
Brad Horrocks cf1adc2978 LTI Reregistration
add support for reregistration launches
Allow tool providers to send updated tool proxies

Saves the payload and acknowledgment url in the update_payload field
Show an update indicator, and options to update or dismiss the update
basic UI functionality

fixes: PLAT-1247
Fixes PLAT-1276
Fixes PLAT-1248

Test Plans:

using the test tool you should be able to install it,
then from the gear context menu you should be able to do a reregistration
launch the tool and canvas only support the launch right now, and not the
rest of the process

Populate update payload on a tool proxy (LTI2 tool)
make sure a badge is displayed indicating there is an update available
make sure you the options to update or dismiss are displayed
make sure when you update it actually updates, and no longer shows an
update is available
make sure when you dismiss it no longer show an update

Change-Id: I93e2db40f81523e9518e529460ea2b16f5de103a
Reviewed-on: https://gerrit.instructure.com/68004
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-12-17 23:26:05 +00:00
Jeremy Stanley 7912c4b209 expire content migration jobs after 48 hours
test plan:
 - in a console, do
   Setting.set('content_migration_job_expiration_hours', -1)
 - try to do course copies and course imports.
   they should fail with "job expired" errors.
 - go back to the console and undo the expire-migration-jobs-
   -in-the-past setting with the following:
   Setting.remove('content_migration_job_expiration_hours')
 - now migration jobs should work again

fixes CNVS-25113

Change-Id: I2578c3e124276a950b73b4402f30625d8738a6c3
Reviewed-on: https://gerrit.instructure.com/68867
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-16 20:29:32 +00:00
Cody Cutrer cc924aec56 add index for attachments (folder_id, position)
closes CNVS-25931

Change-Id: I4fa823755d849f98bec0d08771013f43bec00d37
Reviewed-on: https://gerrit.instructure.com/69022
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-12-16 19:56:27 +00:00
James Williams 902d3535eb improve max_concurrent on delayed jobs
should always try to run the max number

closes #CNVS-25769

Change-Id: Iff6d8899c3ed2df0998f758a93b47b17869a41ef
Reviewed-on: https://gerrit.instructure.com/68933
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-15 20:31:56 +00:00
James Williams 78ccf1cede remove course_imports table
isn't used for anything anymore, replaced by content_migrations

closes #CNVS-25860

Change-Id: Ifa8909043381cef9df75c1db6eeb02c02b534797
Reviewed-on: https://gerrit.instructure.com/68880
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-15 17:17:28 +00:00
Chris Hart 45ed0d6b81 Add Minimalist Theme to Theme Editor
Fixes: CNVS-25766

This is the first of four themes we are going to
add to Theme Editor's default offerings.

Test plan:
- Pull down the patchset, migrate your
  database, and restart Canvas
- Open Theme Editor. Make sure you have delayed
  jobs running in the background:
  script/delayed_job run
- You should now see the Minimalist theme listed in
  the select input:
  http://screencast.com/t/m7RvtWpDuZFw
- If you lose all your styles after doing this, you
  might need to run:
  bundle exec rake brand_configs:generate_and_upload_all
  ... then restart.
- Canvas should now look Minimalist!
  http://screencast.com/t/NCYCNjcc2lc

Change-Id: I04c093a8dd7e6d989c3b83656354ce0cdb38ea27
Reviewed-on: https://gerrit.instructure.com/68008
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-12-11 21:06:53 +00:00
Chris Hart 76b8661e0d Add State U. Theme to Theme Editor
Fixes: CNVS-25765

This is the second of four themes we are going to
add to Theme Editor's default offerings.

Test plan:
- Pull down the patchset, migrate your
  database, and restart Canvas
- Open Theme Editor. Make sure you have delayed
  jobs running in the background:
  script/delayed_job run
- You should now see the State U. theme listed in
  the select input
- If you lose all your styles after doing this, you
  might need to run:
  bundle exec rake brand_configs:generate_and_upload_all
  ... then restart.
- Canvas should now look like this:
  http://screencast.com/t/dOZs5zGVI

Change-Id: Ifbb529f815a82a025020b8c573193e6d370b5ab8
Reviewed-on: https://gerrit.instructure.com/68174
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
Tested-by: Jenkins
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2015-12-11 19:57:08 +00:00
Cody Cutrer 6ba1571fe1 JIT provisioning
closes CNVS-25392

test plan:
 * try each of the auth providers with a user that doesn't exist in
   Canvas
 * it should still give the "unknown user error"
 * enable JIT provisioning on each, and repeat
 * you should be able to log in now
 * smoke test "self registration" workflows (they've been migrated
   from an account setting to be configured on the Canvas
   authentication provider)

Change-Id: Ia01189d6d5a1235926c4723f13ef906cf4a6261f
Reviewed-on: https://gerrit.instructure.com/63253
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-12-09 17:00:45 +00:00
Cody Cutrer 440290c08f remove active_polymorph
fixes CNVS-25580

Change-Id: Id1a001e8b85f87d1c0e9678500ed13d435872b55
Reviewed-on: https://gerrit.instructure.com/68292
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-12-08 02:03:53 +00:00
James Williams 9635b20149 add moderated grading permission role overrides
closes #CNVS-25479

Change-Id: I1fb439c8f4df1d30b0063912731066b69cd104c2
Reviewed-on: https://gerrit.instructure.com/68070
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-12-04 14:00:30 +00:00
Cody Cutrer 34b8f46ba5 several qualified names fixes in raw SQL
refs CNVS-21900

Change-Id: I54afb7f5b35109f4cc78ab2f285e5bc9cb01190f
Reviewed-on: https://gerrit.instructure.com/67243
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-11-18 22:01:23 +00:00
James Williams c291a53cd8 add tags to all the migrations
Change-Id: I06c07b3b5d676e5aa49e88b547e965c214862a9f
Reviewed-on: https://gerrit.instructure.com/66528
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-11-06 00:59:33 +00:00
Cameron Matheson cd7bd26a79 associate c(anva|roco)docs with submissions
this is necessary to do permission checks for submissions with multiple
versions

closes CNVS-10734

Change-Id: Ifee6e35d851dc3953c5f3fe1086015bf51e469f1
Reviewed-on: https://gerrit.instructure.com/62648
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-11-05 18:47:48 +00:00
Alex Boyd 8dab220b69 Store transient bounces as well as permanent bounces
Fixes CNVS-22956

Test plan:
 - Amazon's documentation is ambiguous about whether
   ooto@simulator.amazonses.com will actually generate a
   transient failure, so this may not actually work.
 - Set up outgoing email through the Amazon SES test account
 - Set up bounce_notifications.yml with the SQS test creds
 - Set a user's email address to ooto@simulator.amazonses.com
 - Cause a message to be sent to that user
 - Wait for the bounce notification processor to run (~5 minutes)
 - At a Rails console, check the CommunicationChannel's
   last_transient_bounce_at and verify that it roughly corresponds
   to when the initial message was sent
 - Check the CommunicationChannel's last_transient_bounce_details and
   ensure that they have been filled in

Change-Id: Ic3a4110319673d6ec6f0789885c760faec4775b3
Reviewed-on: https://gerrit.instructure.com/62562
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2015-10-30 16:04:22 +00:00
James Williams b4ce2b49e1 update canvas-jobs
includes n-strand improvements to perform load balancing
at runtime instead of queue time

(e.g. should prevent one strand from getting blocked when
 queueing many imports at a time)

test plan:
* regression test delayed jobs

Change-Id: I2f616d380c841d7231af5159c09c24cbcc8d235d
Reviewed-on: https://gerrit.instructure.com/65976
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-29 19:17:14 +00:00
Nathan Mills 2bceb54da7 start expiring access tokens created by new dev keys
add warning message to the api docs about expiring access tokens

fixes PLAT-1263 PLAT-1243

test plan:
*create a developer key before cherry picking change set
*cherry-pick change set
*generate an Access Token using the old dev key
*it should not have an expiration

*create a new developer key
*create an access token with the new dev key
*it should have an expiration

*check the api doc on the oauth page for the warning message

Change-Id: Id53d9b7fab4b8b308a0abbae0268c1c25a2d4c6f
Reviewed-on: https://gerrit.instructure.com/64881
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-10-28 22:00:55 +00:00
Cody Cutrer d454218928 modify dj functions on the dj database
Change-Id: Ief0293a58922eed2d87a39b239ba8933cba636b8
Reviewed-on: https://gerrit.instructure.com/65887
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-27 21:21:55 +00:00
Cody Cutrer 1c2dfd068c fix functions to run with an explicit search path
fixes CNVS-24230

for qualified name compatibility

Change-Id: If72049e954de330a6392805cc3ddbcba2c557be5
Reviewed-on: https://gerrit.instructure.com/65671
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-26 20:56:16 +00:00
Jeremy Stanley 28a13a706b crocodoc filtering for moderated grading
Test plan:
  * Ensure Crocodoc annotation filtering works in a moderated
    assignment:
    - Prior to publishing grades,
     - Students see only their own annotations, _not_ any
       annotations made by provisional graders or moderators
       (using the View Feedback link on the submission page)
     - TAs as provisional graders see their own annotations
       and the student's annotations, _not_ those made by
       teachers or other TAs
     - Moderators see the correct provisional grader's annotations
       in the 1st Mark / 2nd Mark Speedgrader tabs
       * if the moderator copies an existing mark from another
         grader to the final mark, she should see her own
         annotations as well as the original grader's
         annotations
    - After publishing grades, all users (students, TAs, and
      teachers) should see the same set of annotations:
     - If a provisional grade was selected for publication,
       that grader's annotations and the student's annotations
       should be visible
     - If a provisional grade was copied to the final mark,
       the original grader's, moderator's, and student's
       annotations should be visible
     - If a student was not in the moderation set,
       no filtering should take place (all annotations should be
       visible to everyone)
     - Other users (provisional graders whose grades were
       not selected for publication) should not be able to
       create new annotations (because we have no way to
       hide _past_ annotations but allow _future_ ones--
       our only solution is to lock them out)
  * Regression test Crocodoc annotations in a non-moderated
    setting:
    - teachers can annotate student submissions
    - students can see teacher annotations
    - teachers can see student annotations

fixes CNVS-23952

Change-Id: Ib842fac356263cff2fc27e6ff4e9abe3e712d6c1
Reviewed-on: https://gerrit.instructure.com/64970
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-10-23 16:39:21 +00:00
Cameron Matheson 8bd92920a2 make unique index on turnitin columns
Change-Id: I8b5b105023b492905ee878f6db09490d4caff98c
Reviewed-on: https://gerrit.instructure.com/65076
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-13 16:27:35 +00:00
Simon Williams 3c4938a61a add timestamps to group_categories table
test plan:
- run migrations
- look at a group category in the console
- it should have a created_at and updated_at field

Change-Id: Ie09dce263e4dcbd2bc34b4d296fab190a21f7c2d
Reviewed-on: https://gerrit.instructure.com/64775
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-10-08 17:04:04 +00:00
Simon Williams 8e10447e66 lengthen the user_services.token column
fixes CNVS-5391

test plan:
- insert a fake user service in the console with a token > 255 chars
- it should work

Change-Id: Ie10b5ef94ce2f88913b5727747b84bd2d1eeb7fb
Reviewed-on: https://gerrit.instructure.com/64719
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-10-08 15:59:53 +00:00
Cameron Matheson 189ce7e3f2 make Turnitin::Client#id shard aware
refs CNVS-17473
fixes CNVS-21075

Test plan:
  turnitin still works

Change-Id: I36c34b2a4be67e4d0348dba2de43880ce4a8520a
Reviewed-on: https://gerrit.instructure.com/56782
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-10-07 20:57:02 +00:00
Jon Willesen 8dd8e03623 record anonymous grading in grade change audit log
anonymous grading is currently only possible from speedgrader.
when a grade is changed in speedgrader, it now sends in a
parameter that indicates whether the "hide student names" flag
was on (by any means).

when the grade changes on a submission, the submission also
remembers whether it was graded anonymously. If the grade
changes and the graded anonymously flag was not explicitly set,
the flag is reset to false. This way we don't have to modify
every place that changes a grade to update the anonymous flag.

this commit includes migrations to add anonymous grading to both
the submission record and the cassandra auditing table. The
grade change audit API was augmented to include this information

finally, added the 'Anonymous' column to the grade change audit
log displays admin tool to display the value of the field
fetched from the API.

closes CNVS-21537

test plan:
 - setup your environment for grade change auditing (requires
   cassandra).
 - check "Grade Change Log" API documentation and behavior for
   the new "graded_anonymously" field.
 - check the behavior of the new "Anonymous" column in the
   "Grade Change Activity" account admin tool.

Change-Id: Ief6c0da2a36986acf8639ba2620820813d2b8047
Reviewed-on: https://gerrit.instructure.com/63815
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-10-06 16:20:22 +00:00
Rob Orton 1400746cd7 change auth_filter from string to text
fixes CNVS-21313

test plan
 - db:migrate should pass

Change-Id: I0f61ad9d71a6d3fc4c5d31ecffa685bb7f699000
Reviewed-on: https://gerrit.instructure.com/64008
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2015-10-01 17:18:37 +00:00
Rob Orton 075c90cbad expand external_feed_entries urls to text
fixes CNVS-23676
refs CNVS-17774

test plan
 - db:migrate should work

Change-Id: I13633c077e2f1c0b9b9df521dc8942c9c87d0aa3
Reviewed-on: https://gerrit.instructure.com/64091
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2015-10-01 17:18:32 +00:00
Abhishek Singh 4ba84e29a4 adds UI & backend for offline content
fixes CNVS-21793, CNVS-21794, CNVS-21795

- Adds EpubExport model to manage state of generated epubs.
- Adds controller to list, create & show epub exports.
- Adds a mini react app to manage UI for creating epub exports.
- Adds shared ApiProgressBar react comoponent to diplay a progress bar
  that polls the progress API.
- Updates ContentExport to have a relationship with EpubExport.

test plan:
- Navigate to `/epub_exports`.
- Observe a list of courses that are active & user is enrolled in.
- Click on the Generate button.
- Observe that info about the state of the export and the timestamp are
  added to the middle of the row.
- Observe that a progress bar is displayed while the export is in
  progress.
- Observe that upon completion, the progress bar is replaced by two
  button / links: Download & Regenerate.
- Observe that Download at the moment does nothing... this is because
  the backend is not yet hooked up to generate the epub.
- Observe that the Regenerate button triggers the process all over
  again.

Change-Id: I6cd844baa06db0c6648ad19389d235b89659919c
Reviewed-on: https://gerrit.instructure.com/62135
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-09-30 16:22:18 +00:00
Rob Orton d252a7f2b4 mobile css and js overrides
closes CNVS-19900

test plan:
 - create a brand_config for an account
 - apply brand_config
 - add ?mobile=1 to an api request that returns a
   body (like a wiki page);
   observe no additional stylesheets in the body
 - go to /accounts/self/, and go to brand
   config and upload a mobile_css_override
 - add ?mobile=1 and check the api result again
   your stylesheet should be there appended to the
   body of the wiki page
 - back in brand_config, remove the uploaded file
 - check your source again - there should not be
   an empty stylesheet tag

Change-Id: Ief728a397d185282a57f8cede0916c7ffe4a2584
Reviewed-on: https://gerrit.instructure.com/61885
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2015-09-28 19:24:55 +00:00
Brad Horrocks 62eb09cdb6 As a OAuth consumer I want to get a refresh token during OAuth2 Registration
refresh token is now returned in oath registration

Fixes PLAT-1218

Test Plan:
Create a dev_key that has an invalid redirect_ur, this makes it easier
to subvert the oauth process later.

attempt to authorize your new key with a user. I used something like
blackmesa.canvas.dev/login/oauth2/auth?client_id=30000000000001&response_type=code&redirect_uri=http://blackmesa.dev/redirect&state=YYY

Sign in and authorize. You should be redirected to something similar to
http://blackmesa.dev/redirect?code=1c8d2ff5498eb879db9737d494a4bbd64810c84cf7e1776d1f4cebdb9699244c6209add4838d02f0d67b969a599cee589fecbeef5f84ababb1ef6e4cb9099b68&state=YYY

Take the code out of the url. open up
[postman](<https://chrome.google.com/webstore/detail/postman/fhbjgbiflinjbdggehcddcbncdddomop?hl=en)
create a new post request with the following params
    code: #{code}
    client_id: #{your dev key's client id}
    client_secret: #{your dev key's client secret}

make sure the response includes a refresh_token property. A postman
request that can be imported [can be found
here](https://gist.github.com/defektive/f1cced73b08e5f6a2925)

 ________
< Thanks >
 --------
        \   ^__^
         \  (oo)\_______
            (__)\       )\/\
                ||----w |
                ||     ||

Change-Id: I8a8a8450825309232c903251231dec8c5d4e7463
Reviewed-on: https://gerrit.instructure.com/63256
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-09-23 20:59:34 +00:00
James Williams 02f67869f4 fix media comment link replacement in imported questions
test plan:
* create a quiz with a question with a bunch of
 text and a media comment
* export the course to a file
* re-import the course
* the quiz and question should work as before

closes #CNVS-22857

Change-Id: I309a6bd39d55bbc6959c4e89bd4d6ea1f3220c55
Reviewed-on: https://gerrit.instructure.com/63777
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Charles Kimball <ckimball@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-23 19:35:01 +00:00
Jacob Fugal 7339952ea4 rollback aba0de7 and its effects
until we can update transifex at the same time as we merge the rename.

this reverts commits:

 * f2cbb3e76e
   (Updated zh_Hant translation)

 * 9ab70066fd
   (Updated zh translation)

 * d861ceca74
   (Updated fa-IR translation)

 * aba0de7b96
   (rename some locales)

Change-Id: I130a0a14e366274c86026bbaccad985a24bb4f1f
Reviewed-on: https://gerrit.instructure.com/63496
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jacob Fugal <jacob@instructure.com>
QA-Review: Jacob Fugal <jacob@instructure.com>
2015-09-21 14:51:24 +00:00
Brandon Broschinsky a25fe068c9 add notes option in scheduler
fixes: PFS-2584

**Test Plan
1. create new appt. group
2. as student reserve a slot in the appt. group
3. enter comments for the appt. and save
4. validate that on appt. popup it shows entered comments
5. as teacher view the appt. group slot the student reserved
6. should show comments the student entered.

Change-Id: I6e20c16da1fcbf1555ac22c011b2bf7a5db8eb67
Reviewed-on: https://gerrit.instructure.com/63129
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Peyton Craighill <pcraighill@instructure.com>
2015-09-18 20:31:08 +00:00
Nathan Mills f4171754cf add split secret support for lti 2
fixes PLAT-1134

test-plan:
install an LTI 2 tool  using the test tool
the secret should be 256 char long
the enabled capability on the tool proxy should have Oauth.splitSecret

Change-Id: I0641f17b9b52207362dfa7437d440feae2ef8f3e
Reviewed-on: https://gerrit.instructure.com/57292
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-09-18 16:41:04 +00:00
Cody Cutrer 2c2e687e59 qualified names fixes for migrations
refs CNVS-21900

Change-Id: I6b7e323e3c700aee3a7c86cb8f06fce78e5606df
Reviewed-on: https://gerrit.instructure.com/63384
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-17 22:03:28 +00:00
Cody Cutrer aba0de7b96 rename some locales
fixes CNVS-19910
fixes CNVS-23061

 * zh_Hant => zh-Hant (dash according to IETF standard)
 * zh => zh-Hans (it's really simplified Chinese)
 * fa-IR => fa (so that it will apply for _any_ Persian locale,
   not just Iran)

also handle fallbacks for deprecated languages

test plan:
 * _before_ applying this commit, change your language to one of
   the locales being renamed
 * apply the commit, but don't run the migration
 * ensure that your Canvas is still translated, both normal and
   JS translations
 * run the migration
 * you should still be translated, and in your user settings it shows
   the correct language translation

Change-Id: If02793fce1db57856895899804f1389076093d0a
Reviewed-on: https://gerrit.instructure.com/57111
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-09-16 21:36:58 +00:00