Commit Graph

1079 Commits

Author SHA1 Message Date
John Corrigan 1c456d640f EquationImagesController#show can support alternate latex service
refs CNVS-29513

- Replace `+` with `%2B` in params[:id]
- Update setting identifier and default value for service url so that
  service interface can be different between existing code cogs
  integration and future integrations.
- Add a predeploy migration to move existing
  `codecogs.equation_image_link` settings to `equation_image.url`, and
  update the values to include a trailing `?`.
- Add a postdeploy migration to remove `codecogs.equation_image_link`
  settings.

test plan:
- Navigate to form to create new assignment.
- Via TinyMCE, open the equation editor and add an equation / formula to
  the assignment description.
- Observe that upon submitting the form to insert the equation, it is
  displayed in the TinyMCE editor text area.
- Observe that upon creating the assignnment and viewing it, the
  equation is visible in the assignment description.

Change-Id: Ie4ffff640e51f9269a68fb3df81aae7d1f5ca33b
Reviewed-on: https://gerrit.instructure.com/80404
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2016-06-03 22:52:24 +00:00
Jeremy Neander f8af26d362 Merge branch 'master' into dev/grading-periods-update
Change-Id: Iab40dd53775d4f0932acb2f9f45a0e28ea688a86
2016-06-02 09:32:57 -05:00
James Williams 1d1cfdfec5 datafix for broken submission version yaml
there are some submission versions from mid-2015 that have
misconfigured cached_due_dates fields in their YAML and are
causing issues when `submission_history` is called

closes #CNVS-29704

Change-Id: Iede19c88b5ce5f5b71c11bbaf3ea4b874543500c
Reviewed-on: https://gerrit.instructure.com/81165
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-06-01 15:42:34 +00:00
Brandon Broschinsky ffe268b829 add default originality setting to turn it in accounts settings
fixes: PFS-4378

**Test Plan
1. Enable TII in root account
2. set default originality, and save
3. create new assignment, make sure it inherits default originality
4. repeat 1-3 for a subaccount, make sure correct originality
setting is inherited.

Change-Id: I66dd964b8faac7c69f2f37ce920a35e025f2ca66
Reviewed-on: https://gerrit.instructure.com/80213
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-06-01 13:56:55 +00:00
Derek Bender f8ce3f124d Merge branch 'master' into dev/grading-periods-update
Change-Id: I970764adb36880e3e29d49a38376a493cc0f0d31
2016-05-31 15:16:35 -05:00
Cody Cutrer 7db873f5eb configure SAML via metadata URI
fixes CNVS-28890, CNVS-28891

including auto-refresh, and optimizations for InCommon

test plan:
 * use a metadata URI to configure a SAML provider;
   everything should populate
 * have your IdP change their metadata, then wait a day
   for the periodic job, or manually run
   AccountAuthorizationConfig::SAML::MetadataRefresher.refresh_providers
 * it should be updated automatically
 * set the URI to urn:mace:incommon, and fill in a entity id
   of a school in InCommon
 * it should populate automatically

Change-Id: Ie508483da2ffa81dce3b98dbd5ae5c0b9e2ac878
Reviewed-on: https://gerrit.instructure.com/76989
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2016-05-27 18:31:08 +00:00
Cody Cutrer f71a829b47 partition versions
closes CNVS-29133

test plan:
 * run the migrations
 * inspect your database; there should be versions_0, versions_1,
   versions_2 tables.
 * drop versions_2 manually
 * run Versions::Partitioner.process
 * versions_2 should be created again, and have the proper indexes
 * use pieces of canvas that rely on versions; nothing should be broken

Change-Id: I3211fdd3fd1716b8a7e6c6f7553a6e49cc6e39bb
Reviewed-on: https://gerrit.instructure.com/80214
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-05-27 17:22:10 +00:00
Derek Bender 94f22f04ef Merge branch 'master' into dev/grading-periods-update
Change-Id: I5c9394e42358cd3aacfdd7eaccc7be199202e6b0
2016-05-26 15:38:27 -05:00
Rob Orton 44e1915c10 add user_observer to sis imports
closes CNVS-29218

test plan
 - test user_observer imports
 - test creation, deletion, diffing mode
 - check that deleting user_observers also removes
   observer enrollments for the observer/student
 - generate docs and check /doc/api/file.sis_csv.html

Change-Id: I1c6a5a5e231ea4deb1bd9d214651b2a851e56887
Reviewed-on: https://gerrit.instructure.com/79088
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
2016-05-25 15:26:13 +00:00
Jeremy Neander 3f0295412b add grading period set info to terms page
Enrollment Terms will now be associated with Grading Period
Sets. If a Term has a Grading Period Set, it will be displayed
on the Enrollment Terms page.

test plan:
 1. Create an account with a name
 2. Create three enrollment terms
     a. One named 'Spring 2016'
     b. One named 'Summer 2016'
     c. One named 'Fall 2016'
 3. Create two grading period sets
     a. One titled 'Quarters' for 'Spring 2016'
     b. One with no title for 'Summer 2016'
 4. Navigate to the Terms page
 5. Verify
     a. Spring 2016 shows
         * 'Grading Period Set: Quarters'
     b. Summer 2016 shows
         * 'Grading Period Set: Grading Period Set for [name]'
         * [name] is the name of the account
     c. Fall 2016 shows no grading period set info
 6. Delete the 'Quarters' grading period set
 7. Navigate to the Terms page
 8. Verify that Spring 2016 shows no grading period set info

closes CNVS-27103

Change-Id: I7798633785a5d920524758471dae2b6eeb698638
Reviewed-on: https://gerrit.instructure.com/79841
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Blake Simkins <bsimkins@instructure.com>
2016-05-23 20:30:36 +00:00
Stewie (Nicholas Stewart) 023701e3b9 Add sis_source_id to assignment_groups
WHY:  Provisioning and grade pass back with Pinnacle's OneRoster
implementation requires assignment groups to store an sis source id.

In a future changeset the assignment group api will be modified to
handle sis_source_id

Test Plan:
* Make sure migrations run smoothly
* Make sure you can still make assignment_groups in canvas UI

Change-Id: I517be81049a7515da4b336adcc4d00440f8542d8
Fixes: SIS-2064
Reviewed-on: https://gerrit.instructure.com/80030
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Oxana
2016-05-20 22:08:16 +00:00
Ethan Vizitei e58218852d do not use 'first' for this migration
first was using "order by" to step through the
whole attachments table which can take 30s or so
per iteration of this inner loop. `take` applies the filter
first.

TEST PLAN:
 1) run migrations
 2) should not take forever on high-attachment shard

Change-Id: I450a0254195929a76bd5725e10ea56c02164437a
Reviewed-on: https://gerrit.instructure.com/79646
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-05-19 21:22:00 +00:00
Ryan Shaw 1bee29bc66 All of the stuff from the save_a_theme dev branch
this commit is the result of squashing a bunch of
others together.  this is everything that was
already on the dev/save_a_theme branch as well as
the "Add specs" commit.

I left the test plans from some of the squashed
commits in case they are helpful for QA

Test plan:
- Recompile assets, restart Canvas and clear browser
  cache
- Go to Admin > [Your school name]
- Click on Themes in the context menu
- You should now see a collections page with
  a theme card for all the themes you have in
  Theme Editor: http://screencast.com/t/lb5vozF7
- Note: it might be my database, but on my end,
  I don't see a theme card for my Canvas default
  theme. There are also some brand colors missing
  for my theme cards. I'll be interested to see
  if you hit the same thing. These are issues that
  we can resolve with Ryan when he is back.
- You should be able to click on the Apply and Delete
  buttons and see the confirm-overlays. We still need
  final copy for these.

Test plan:
- Go to your institution's Settings page and click
  Themes on the context menu.
- You should now see a page listing all the default
  and user-created themes in your Canvas installation.
- Clicking on each theme will open it inside theme
  editor.
- The current/active theme will be correctly styled
  with a green outline

change redirect targets and messages in theme editor

test plan:
exiting theme editor
should redirect you back to the /accounts/x/themes page
instead of /acounts/x

make room for footer in theme editor

test plan:
in theme editor, scroll the preview to the bottom
you should be able to scroll all the way, without
having the bottom cut off by the footer

remove "theme editor" button from account user/course search

this is not needed since "Themes" now shows up
in the left nav.

test plan:
turn on the 'Course and User Search' feature flag
go to accounts/x
you should not see a "theme editor" button on the right
aka, not like this: http://cl.ly/2G2C3p3s3n0C

fix "Exit" button in theme editor

we were warning "you will lose unsaved changes"
even when you hand not made any changes

add specs to "Save A theme" stuff

closes: CNVS-27961

test plan:
do a whole regression test on the theme editor

don't show both "k12 theme" and "canvas default" as options

fixes: CNVS-25495

description (and test plan):

if you are a k12 school, rather than seeing both
"Canvas Default" and "K12 Theme"
as options on the tiles of system themes to start from,
you should now just see "Canvas Default".
if you pick that, it should show the k12 theme.

Change-Id: I5c2512e576dcb2aedaa899e17080d9c106e159ca
Reviewed-on: https://gerrit.instructure.com/78163
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-05-18 22:01:25 +00:00
Spencer Olson 861015af49 migrate grading periods to enrollment terms
* associate enrollment terms with root account
  grading periods
* copy sub-account grading periods to the course
  level for courses that do not currently have
  grading periods
* delete all sub-account grading period groups and
  grading periods

closes CNVS-26724

test plan:

1) create an account, and make 3 grading periods
   and 3 enrollment terms
   (Root Account)
2) create a sub-account, and make 3 grading periods
   (Sub Account 1)
3) create a sub-account of Sub Account 1, and make
   3 grading periods
   (Sub Account 2)
4) create a sub-account of Sub Account 1, and do not
   make any grading periods
   (Sub Account 3)
4) create a course that belongs to Sub Account 2
   and make 3 grading periods
   (Course 1)
5) create another course that belongs to Sub Account
   2 and do not make any grading periods.
   (Course 2)
6) create a course that belongs to Sub Account 3 and
   make 3 grading periods
   (Course 3)
7) create a course that belongs to Sub Account 3 and
   do not make any grading periods
   (Course 4)
8) create a course that belongs to Sub Account 1 and
   make 3 grading periods
   (Course 5)
9) create a course that belongs to Sub Account 1 and
   do not make any grading periods
   (Course 6)
10)create a course that belongs to Root Account and
   do not make any grading periods
   (Course 7)
11)run the migration and verify it completes
   $ bundle exec rake db:migrate
12)verify the following:
  * Root Account
    - still has 3 grading periods
    - all of its enrollment terms have the same
      3 grading periods associated with them
  * Sub Account 1
    - no longer has any grading period groups
      or grading periods
  * Sub Account 2
    - no longer has any grading period groups
      or grading periods
  * Sub Account 3
    - still has no grading period groups or
      grading periods
  * Course 1
    - has the same 3 grading periods it had
      before running the migration
  * Course 2
    - now has 3 grading periods that match
      the grading periods Sub Account 2 had
      before the migration was run
  * Course 3
     - has the same 3 grading periods it had
       before running the migration
  * Course 4
     - now has 3 grading periods that match
       the grading periods Sub Account 1 had
       before the migration was run
  * Course 5
     - has the same 3 grading periods it had
       before running the migration
  * Course 6
     - now has 3 grading periods that match
       the grading periods Sub Account 1 had
       before the migration was run
  * Course 7
     - still has no grading period groups or
       grading periods

Change-Id: Idf94a04e51b965cbc51ee9de419da3ee4e255950
Reviewed-on: https://gerrit.instructure.com/79520
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-05-18 21:20:27 +00:00
Rob Orton e8ee04bdc1 drop sis_source_id from enrollment
refs CNVS-29138

test plan
 - specs should pass

Change-Id: I246725f13a5e08bc8bb81183261cf8e526419349
Reviewed-on: https://gerrit.instructure.com/78719
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-05-16 19:13:45 +00:00
Jeremy Stanley 8c2b1c38f5 disable transaction on submission context code for folders
Change-Id: Ifb39216af53c8400f753873ef46d42fbe1ab7756
Reviewed-on: https://gerrit.instructure.com/79674
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2016-05-16 19:03:38 +00:00
Jeremy Neander e996c877e6 add grading period group association to enrollment terms
This adds the assocations required by the referenced ticket. Remaining
requirements for this ticket will be resolved in subsequent commits.

refs CNVS-26725

test plan:
1. run all the specs
2. confirm that they all pass

Change-Id: I0832a080582b4b99f63e546b0f56792b559d2692
Reviewed-on: https://gerrit.instructure.com/79113
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-05-12 18:30:46 +00:00
Rob Orton fa8cabcca6 add timestamps to user_observer
refs CNVS-28959

test plan
 - run migrations
 - look at a user_observer in the console
 - it should have a created_at and updated_at field

Change-Id: I7ebed462e6cc1d2d6eb0a39caaab70dc2bc0d660
Reviewed-on: https://gerrit.instructure.com/78044
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-05-03 16:53:44 +00:00
James Williams 415b44c218 run post-psych migration per model
also low priority

Change-Id: Ib59b01ad545058cc418ab4690fbc0642bd741cb4
Reviewed-on: https://gerrit.instructure.com/78233
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-04-29 12:53:07 +00:00
Jeremy Stanley c6882e5938 read-only submissions folder
test plan:
 - create a folder in a user's files and put stuff in it
   including at least one file large enough to make a dent
   in the user's storage quota
 - in the console, turn it into a submissions folder via
   Folder.find(id).update_attribute(:submission_context_code, 'root')
 - ensure that:
   1. you cannot create new files in this folder
   2. you cannot delete existing files in there
   3. you cannot move files in
   4. you cannot move files out (copying out is okay)
 - ensure the files in this folder are not counted against
   the user's quota.
 - ensure that other folders (not marked as submission
   folders) continue to operate normally

NOTE: it is expected that you will see "Oops!" messages
   and failed AJAX requests when trying to manipulate
   the contents of a submissions folder.  this commit
   enforces the read-only state of submissions folders
   on the backend; future commit(s) will make the
   frontend deal with them gracefully.

fixes CNVS-28140
fixes CNVS-28554

Change-Id: I33f79671c3dd6bdba2fc00526f513186e8e93bf6
Reviewed-on: https://gerrit.instructure.com/77536
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-04-28 21:41:51 +00:00
Simon Williams de2df48f54 remove DeveloperKey#tool_id
fixes CNVS-28785

test plan: basic regression of creating/using developer keys

Change-Id: I64d76b559efe9b0a436f322271e0627ab7a6048e
Reviewed-on: https://gerrit.instructure.com/77391
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-04-28 21:28:09 +00:00
Jeremy Neander e017e4a46a record excused/un-excused submissions in grade change log
Previously, excused and un-excused submissions were not being recorded by
the grade change log. As a result, those logs were causing invalid states
to be displayed within Admin Tools. It now correctly tracks the excusing
and un-excusing of submissions.

test plan:
 1. Create an account, course, student, and assignment
 2. Ensure the assignment is assigned to the student
 3. Visit the Gradebook Individual View
 4. Select the given student and assignment
 5. Make the following grade changes:
    a. Grade the assignment with 10
    b. Grade the assignment with -
    c. Excuse the assignment
    d. Grade the assignment with -
    e. Excuse the assignment
    f. Grade the assignment with 1
    g. Excuse the assignment
 6. Visit the Admin Tools for the account
 7. Click the Logging tab
 8. Select the 'Grade Change Activity' log type
 9. Search for the assignment
10. Verify the following logged grade changes, top-to-bottom:
    a. before: 1;    after: 'EX'
    b. before: 'EX'; after: 1
    c. before: '-';  after: 'EX'
    d. before: 'EX'; after: '-'
    e. before: '-';  after: 'EX'
    f. before: 10;   after: '-'
    g. before: '-';  after: 10
11. Visit the SpeedGrader™ for the given assignment and student
12. Verify that the student has a grade of 'EX'
13. Verify the presence of a checkmark beside the student's name

closes CNVS-28313

Change-Id: I0bac427a4b4bfe282a78cbf04b74f828c5048dc0
Reviewed-on: https://gerrit.instructure.com/77280
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Christi Wruck
2016-04-28 16:52:56 +00:00
James Williams 6b3a375773 fix zip file import root attachment deletion
Change-Id: Ia35997ce9d7ec08d1bd6ea0a20b2e32ea250a14a
Reviewed-on: https://gerrit.instructure.com/77962
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-04-27 19:25:56 +00:00
James Williams 3d9a24db0d remove zip_file_import attachments after table is dropped
fixes foreign key problems

Change-Id: Icdfc445c2ca08b1fd3342d37217771294768dbf9
Reviewed-on: https://gerrit.instructure.com/77837
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-04-25 19:48:50 +00:00
Andrew Butterfield d86f28783b Add groups context route for membership service
fixes PLAT-1447

Test plan:
* Create a course with some students
* Regression test
  /api/lti/courses/:course_id/membership_service
* Create a group with some students
* Ensure that
  /api/lti/groups/:group_id/membership_service
  returns a properly formatted list of group members

Change-Id: Idc03c11728847258d621d365d87238465f739672
Reviewed-on: https://gerrit.instructure.com/77595
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2016-04-25 15:11:55 +00:00
James Williams 75f21c55b2 switch yaml engine to psych
closes #CNVS-27229

Change-Id: I257718e3e4603a0e8a25519ab10247f26d57394b
Reviewed-on: https://gerrit.instructure.com/77480
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-04-22 16:51:15 +00:00
Christian Prescott eaa52716da Add WikiPage assignment type
refs CYOE-67

Test Plan
0. `rake db:migrate` and compile assets. Enable the conditional release
   feature flag in course settings.
1. Create a published WikiPage, assignment-free. Ensure it is visible
   to errybody.
2. With the API, create an assignment with submission type 'wiki_page'.
   A new page will be created for the assignment.
```sh
curl "http://canvas.dev:3000/api/v1/courses/1/assignments" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X POST -d '{"assignment": {"name": "Page Asg", "published":true, \
"submission_types":["wiki_page"]}}'
```
3. Ensure the assignment is assigned to "Everyone" and the page is
   visible to all.
4. Assign the assignment to a specific student or section. Ensure the
   page is visible only to the assigned set.
```sh
curl "http://canvas.dev:3000/api/v1/courses/1/assignments/13" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X PUT -d '{"assignment": {"only_visible_to_overrides": true }}'
curl "http://canvas.dev:3000/api/v1/courses/1/assignments/13/overrides" \
-H "Content-Type: application/json" -H "Authorization: Bearer <token>" \
-X POST -d '{"assignment_override": {"student_ids":[126]}}'
```
5. Ensure the DA behavior also applies to WikiPage#show and update and edit.
6. Ensure API behavior matches docs for Assignment and Page endpoints.
7. Ensure no regressions in non-page assignments, with and without CR
   feature flag. Ensure no regressions in discussion topics and
   announcements, including assigned discussions.

Change-Id: Ie53c6ffa4e4533cedd54f10aee3ba0b8a27aa4d5
Reviewed-on: https://gerrit.instructure.com/75139
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Christian Prescott <cprescott@instructure.com>
2016-04-21 17:25:15 +00:00
James Williams 08d7c397ae turn psych migration on for everywhere
closes #CNVS-28848

Change-Id: Ib571832616d0c08431eab95fe6e9a53bb4c016ec
Reviewed-on: https://gerrit.instructure.com/77519
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-04-21 12:52:22 +00:00
Rob Orton a2e86f6b26 remove sqlite support
we still need sqlite for some parts of canvas, but
canvas will not run with sqlite as the primary db

Change-Id: Iae4d5d2fca74efee8d0f289dd151f657248d2e95
Reviewed-on: https://gerrit.instructure.com/77422
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2016-04-20 16:34:45 +00:00
Cody Cutrer 40e1681f6d add route for /saml2 to get metadata
it's a SAML convention that metadata be returned from the URI of
then entity ID. also publicize this URL in authentication settings

Change-Id: If18eca61d2259cdac77c398cc957f7b77f5217d7
Reviewed-on: https://gerrit.instructure.com/76436
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-04-19 21:04:37 +00:00
Rob Orton d236166297 drop mysql support and gem
test plan
 - specs should pass

Change-Id: Ib3f102b53d947198625e3118820d22e77a005dd6
Reviewed-on: https://gerrit.instructure.com/77249
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2016-04-19 19:55:55 +00:00
Cody Cutrer b8663c4cd0 add index on submission comment participants
closes CNVS-28670

Change-Id: I3ae0ca77bb86cbb5533bd8d356134e24ea631bfe
Reviewed-on: https://gerrit.instructure.com/76994
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-04-19 04:32:24 +00:00
James Williams ec3dc5f199 fix old improperly serialized rubric assessment yaml
closes #CNVS-28412

Change-Id: If903f173a9ef8408b5b99a0f9ea6502d13f67c24
Reviewed-on: https://gerrit.instructure.com/76442
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-04-06 19:26:02 +00:00
James Williams f79a09e567 disable transaction for psych migration
closes #CNVS-28488

Change-Id: I5bd242ccaa14f508f97443c5063d46176e813ee0
Reviewed-on: https://gerrit.instructure.com/76387
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-04-06 16:17:41 +00:00
Alex Boyd 3fcec37017 Add bulk communication channel confirm endpoints
Fixes CNVS-28150

Test plan:
 - Add an unconfirmed communication channel
 - Hit /api/v1/accounts/.../unconfirmed_communication_channels.csv
   and ensure the channel shows up
 - Post to
   /api/v1/accounts/.../unconfirmed_communication_channels/confirm
 - Ensure the channel is now confirmed
 - Add an unconfirmed channel with an email address that doesn't
   contain an "@" sign
 - Hit /api/v1/accounts/...unconfirmed_communication_channels.csv
   and ensure the channel does not show up
 - Hit the above URL with ?with_invalid_paths=true appended and
   ensure the channel now shows up

Change-Id: Id7c3844e06e3fe997aed8baa363b5a9deababe97
Reviewed-on: https://gerrit.instructure.com/74926
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Alex Boyd <aboyd@instructure.com>
2016-04-04 22:26:04 +00:00
James Williams c24896df63 keep track of psych migration time
also make it runnable with ENV var

refs #CNVS-28417

Change-Id: Ic2c3cea224167dfb3b8bcfee4999b0d76540c1da
Reviewed-on: https://gerrit.instructure.com/76168
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-04-04 20:39:22 +00:00
James Williams 4f10ab526b drop zip_file_imports
nobody has used this since last year
deprecated by ContentMigration

refs #CNVS-27773

Change-Id: Ie3db513a0e347401005fd0f535674e539d53073b
Reviewed-on: https://gerrit.instructure.com/75100
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-04-04 16:50:49 +00:00
James Williams 39c7f4b46b pend psych migration in production for gradual rollout
closes #CNVS-28366

Change-Id: I4c4a559d31e82e4444950402e14972c05bab5456
Reviewed-on: https://gerrit.instructure.com/75862
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-03-31 18:20:14 +00:00
Rob Orton 3c919a28b7 add workflow_state to user_observer
fixes CNVS-27942

test plan
 - user observers should still work
 - destroy a user observer
 - it should still exist in the db
 - it should not be visible in the UI or API
 - if you create a new user observer it should
   restore the original record to active

Change-Id: Ia992f1d54a8f8530c3c933f44db48192b2c8d627
Reviewed-on: https://gerrit.instructure.com/74490
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-03-28 19:43:04 +00:00
James Williams 2fc9e8d82b remove reference to InboxItem
refs #CNVS-27773

Change-Id: I7365bd563c4dc7f287355e580ae8bbe32c55a406
Reviewed-on: https://gerrit.instructure.com/75178
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-03-24 03:22:58 +00:00
Cody Cutrer 4adf1524b5 move the queue migration much earlier
fixes gh-794

to ensure it happens before any other migrations that haven't run need to access queue

also fix it to not run DJ migrations that haven't been run in the other database. it can
deal with mismatched schema, but the currently running migrator would also try to
run them, forcing you to run migrations twice

Change-Id: I8cea6b98fbc92363beee9a673c3bd28078c8783a
Reviewed-on: https://gerrit.instructure.com/75084
Tested-by: Jenkins
QA-Review: Cody Cutrer <cody@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-03-23 16:33:25 +00:00
James Williams 2c1e9f0a0b drop inbox_items
refs #CNVS-27773

Change-Id: I25aa94e212a02dfb324be56bd94be9a56702b104
Reviewed-on: https://gerrit.instructure.com/75131
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-03-23 16:02:17 +00:00
James Williams a49922c887 fix available_locales for locale changes
the old locales were being included in the
 locale drop-down boxes

test plan:
* view the course/account settings page
* inspect the locale dropdown element
* the <option> tags should have the proper locale values
 i.e. "fa", "zh-Hans", "zh-Hant"
 instead of "fa-IR", "zh", and "zh_Hant"

refs #CNVS-26357

Change-Id: I792f931e4b495ba278365ec6861f6cfcabbf43f2
Reviewed-on: https://gerrit.instructure.com/74723
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-23 13:39:03 +00:00
Simon Williams 8587ce1d39 fix cloned group set to not dup unique fields
wiki_id, uuid, and the sis ids should all be unique per group, and
should not be part of the metadata that gets duplicated. similarly, uuid
should be unique per group membership and should not be duped

fixes CNVS-23119

test plan:
- this commit includes a migration to fix groups with duplicated wiki
  pages.  it might be valuable to create some groups and use the
  "duplicate group" functionality before checking out this patchset so
  that you have some bad data for the migration to clean up
- create a group set with groups
- go create some wiki pages in the groups
- clone the group set
- groups in the cloned group set should not include the wiki pages, and
  should have it's own unique wiki separate from the original group
- also test group membership invitations with duplicated groups and make
  sure they work sanely

Change-Id: Ibe2082ede727f81316c3cf2f98c4146de55ec04d
Reviewed-on: https://gerrit.instructure.com/64691
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-21 13:00:39 +00:00
James Williams fef7ff0608 fix delayed_job max_concurrent trigger query
closes #CNVS-28107

Change-Id: I7606a4466d0d2898871a13b331e8756f44db1b91
Reviewed-on: https://gerrit.instructure.com/74780
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-03-18 15:19:34 +00:00
James Williams b7ab6aa88b drop a bunch of unused columns
like literally all NULL everywhere

refs #CNVS-27773

Change-Id: I1e5b61a6fd234ce668824e59df0d93a31ea6e76e
Reviewed-on: https://gerrit.instructure.com/74172
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-17 17:19:13 +00:00
Cody Cutrer 9db9a8591e fix qualified names in migration
refs CNVS-26480

this wasn't previously caught because the migration skips itself in test

Change-Id: I8ae2e479537966cb0b9cdf424a49267017569079
Reviewed-on: https://gerrit.instructure.com/74687
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-03-17 15:27:24 +00:00
Rob Orton e66c5435b5 enable new default report for all accounts
refs CNVS-26643

test plan
 - run migrations
 - new report should be enabled

Change-Id: Id36a8a61200239cbaf1fb9c1b7301abb7268eafe
Reviewed-on: https://gerrit.instructure.com/74287
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-03-14 05:08:15 +00:00
James Williams d708539a1b prevent users from double-joining groups
test plan:
* create a group set that allows student self-signup
* add a group
* as a student, visit the groups page
* should be able to click on the "JOIN" link to
 join the group (and then click on "LEAVE" to leave)
* should not be able to click on the links while
 they're submitting to the server

closes #CNVS-27851

Change-Id: Ib4944ff1561287604a3013065633e520fd923ed8
Reviewed-on: https://gerrit.instructure.com/74104
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-10 17:13:22 +00:00
James Williams 49882ecdae drop data_exports
refs #CNVS-27773

Change-Id: I1d39e3858f4ff72c186159186a4aa4b0e4faf89a
Reviewed-on: https://gerrit.instructure.com/74019
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-03-09 21:25:15 +00:00
Rob Orton 573a2b673b create user merge table
fixes CNVS-27291

test plan
 - merge users
 - data should be populated

Change-Id: I5720933484494f582bad4b294a7e6b4edea66b92
Reviewed-on: https://gerrit.instructure.com/72700
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-03-09 20:36:09 +00:00
James Williams 60e66140c0 remove integration_type from context_external_tools
was never used

refs #CNVS-27773

Change-Id: Ie436da27ebca1238db6def1ed4e3b9c40adb4a4d
Reviewed-on: https://gerrit.instructure.com/74049
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-03-09 17:29:48 +00:00
James Williams 347c699d40 drop authorization_codes
not used anymore

refs #CNVS-27773

Change-Id: I19c27754f67bc8a11c0c0cd628c5b427197779a1
Reviewed-on: https://gerrit.instructure.com/73799
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-03-07 16:30:26 +00:00
James Williams 39f8a9bdec prevent conversation participant caching problems
test plan:
* add recipients to a conversation through the api
* the "audience" should always be updated to show the new
 recipients

closes #CNVS-26732

Change-Id: I28924725339cf780d3b41cde05684a1282fa9c3d
Reviewed-on: https://gerrit.instructure.com/73648
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
2016-03-04 17:58:46 +00:00
Rob Orton fe6f31b258 make new import sis permission
fixes CNVS-27335

test plan 
 - users with just manage sis should not be able
   to import sis data.
 - users with just import sis permission should be
   able to import sis data
 - import sis permissions should only exist on
   root_accounts
 - manage sis users should still see the sis tab
   on the account, but should not see any import
   options

Change-Id: If965796a4b14630d6674f221805eff7d56da439f
Reviewed-on: https://gerrit.instructure.com/72411
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2016-03-01 23:22:53 +00:00
James Williams 7d753f502a fix :read_announcement role override population
closes #CNVS-27475

Change-Id: I68bbab410a0c2dbb867edceb424496155319f290
Reviewed-on: https://gerrit.instructure.com/73227
Reviewed-by: Alex Boyd <aboyd@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-29 16:38:28 +00:00
James Williams 85518dc397 migrate yaml in database into a psych compatible format
from now on dumps all yaml with psych and inserts a tag to
differentiate between syck and psych yaml on load

also runs through the database and converts all
incompatible yaml to psych format

after the migrations have run we will be able to switch
to psych fully and clean up the tags

test plan:
* the migrations should work

closes #CNVS-27229

Change-Id: I79ce0691dd455396ca39422051ff79b8fbaebef6
Reviewed-on: https://gerrit.instructure.com/72012
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
2016-02-25 20:07:15 +00:00
Cody Cutrer 4f9b4f1805 vastly simplify ActiveRecord::Migrator extensions
we no longer need to replace the entire Migrator#migrate method

test plan:
 * check your pending migrations; they should make sense
 * revert a postdeploy migration
 * it should ask you to confirm the revert
 * run db:migrate:predeploy; it shouldn't re-run the postdeploy
 * run db:migrate; it should run it now

Change-Id: Ia78ad21d10f4e89786b8c4751828fe9f264caecc
Reviewed-on: https://gerrit.instructure.com/72853
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-02-24 23:48:40 +00:00
Cody Cutrer 9be76589e9 remove support for queue db
fixes CNVS-274522

includes a migration to detect if you were using it, and fold it into
the main database

Change-Id: I1afbbf5f91c4fb4165a3e6dc484d318edc390255
Reviewed-on: https://gerrit.instructure.com/72811
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-02-24 22:40:43 +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
Cody Cutrer 3ed62e1b0c add index for media objects
fixes CNVS-27288

Change-Id: I6042f62a40b2374216484d8ad715ce522b7a0941
Reviewed-on: https://gerrit.instructure.com/72238
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-23 21:55:55 +00:00
Cody Cutrer 5b08dd84c5 fix role override nullness migration
have to leave back-compats in for rows that still have enabled=null, because
it accidentally meant to inherit (instead of always being interpreted as false)

Change-Id: I8877fbac208d638582b975497e66fe8ffa3db420
Reviewed-on: https://gerrit.instructure.com/72696
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-02-23 00:30:43 +00:00
Alex Boyd adac968389 Add new permission for viewing announcements
Fixes CNVS-26824

Test plan:
 - Go to an account's permissions page
 - Ensure that a permission titled "View Announcements" shows up
 - Ensure that all course roles have it by default

Change-Id: Icfd19b4a218fcdadf43fd571a5362b76545cfabc
Reviewed-on: https://gerrit.instructure.com/71725
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-02-18 21:41:59 +00:00
James Williams ab75744a6f fix folders with leading spaces as well as trailing ones
closes #CNVS-27257

Change-Id: I21f88c87400cda576f233c57b88026995bf391b5
Reviewed-on: https://gerrit.instructure.com/72224
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-17 16:18:27 +00:00
James Williams c0afe0ad7d add n_strand to graded discussion attachment datafixup
refs #CNVS-27114

Change-Id: I77ab25440570d079f7887851ecda99c38363140b
Reviewed-on: https://gerrit.instructure.com/72277
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
2016-02-16 21:24:40 +00:00
James Williams 4fbb52d681 prevent stream item instance duplicates
test plan:
* basic regressions on dashboard stream items

closes #CNVS-27239

Change-Id: Id173d9c8e117941dabb7b79f681bad6a1d1b2f67
Reviewed-on: https://gerrit.instructure.com/72153
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-02-16 19:50:52 +00:00
Cody Cutrer ac8d12d4d3 spec: ensure temporary models protect attributes
Change-Id: Ib31e29d329b2319109affca2904a7da0a0346a21
Reviewed-on: https://gerrit.instructure.com/72136
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-15 16:35:32 +00:00
Cody Cutrer d8f3e7cdf8 remove locking_account_id from feature flags
it's never used

keep it in the API response for back-compat reasons

test plan:
 * regression test feature flags; nothing should be broken

Change-Id: I6b023c04148dc6bdb686199d1891e13fcdc8ffa8
Reviewed-on: https://gerrit.instructure.com/70442
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2016-02-10 21:15:06 +00:00
Cody Cutrer a9e90bc626 fix enrollment role id nullness migration for qualified names
refs CNVS-26480

Change-Id: I7287da9f4caf2ccd63b71e005ad2e1ee44a14205
Reviewed-on: https://gerrit.instructure.com/71854
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-02-10 19:56:28 +00:00
Michael Nomitch 7dc3c90aaf DA - support student groups
fixes CNVS-22360

Test Plan:
  - create a course with multiple course
    sections, multiple group sets (each with
    many groups), and students in these
  - create an assignment with overrides
    for groups
    - they work as expected
    - adhoc and section overrides continue
      to work as expected
  - ditto for graded discussions
    - check that discussion
      alerts go out properly
    - check that individually graded
      group discussions work as intended
      as well
    - note: child discussions will still
      be made for groups that dont have
      overrides (this is unfortunate
      but known)
  - note: quizzes not included
    in this PS

  - when editing an assignment try to
    assign a due date to a group not
    in the assigned group set
    - you cannot
  - when editing an assignment that
    is not a group assignment
    - confirm that you cannot
      assign a group override

  - if an assignment override for a group
    exists (and nobody else is assigned)
    - check that a student not in that group
      - does not have a spot in the GB
      - gets redirected away from that assignment
        if they go to the show page
      - does not have that assignment factored
        into their individual grade
      - does not have that assignment show
        up on their assignment index
    - if the student is then added to that group
      - all of the above conditions are reversed
    NOTE: if a student has a grade already, they
    will not 'lose visibility' until their grade is
    taken away (so removing a student from a group
    will reverse the above conditions only if they
    are gradeless)

  - check that the calendar accurately
    reflects the due dates for group
    overrides

  - with MGP on
    - test that group overrides act in the
      same way as course_section overrides
      in regards to grading period

Change-Id: Ia32f57feabbc719568901e0763130b3c2304c7ce
Reviewed-on: https://gerrit.instructure.com/69060
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-02-10 19:20:52 +00:00
James Williams 6274d438c8 don't count student attachments in graded discussions for quota
test plan:
* create and publish a course with a graded discussion topic
* enroll a student in the course
* as the student, post a reply to the topic and attach a file
* it should not count toward the quota

closes #CNVS-27114

Change-Id: I6fb847a61a7a10a69dc035d5f5e1f15dda107a04
Reviewed-on: https://gerrit.instructure.com/71691
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2016-02-10 15:39:52 +00:00
Cody Cutrer 5b152b060e fix AddRoleIdColumns migration for qualified names
refs CNVS-26480

Change-Id: I13c37e1feb29e9d135bc7e0c7b72ae5641a45089
Reviewed-on: https://gerrit.instructure.com/71834
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
2016-02-10 06:56:39 +00:00
Cody Cutrer d689552647 add index for improving grade summary query
Change-Id: I5bdb44935d8d4eb97cd13b7972279cba44a6e41d
Reviewed-on: https://gerrit.instructure.com/71808
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-02-10 05:18:58 +00:00
Cody Cutrer e4ff84bb79 fix external tool placements migrations for qualified names
refs CNVS-26480

Change-Id: Ia80d7ca0d87762a996f4b53af6ea768c08c74105
Reviewed-on: https://gerrit.instructure.com/71853
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-02-10 05:18:37 +00:00
Cody Cutrer de98b8896e add comment reminder to cache clearing migration
Change-Id: Ibd9ad824bbf64223651b75768b026bd9e033019f
Reviewed-on: https://gerrit.instructure.com/71585
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-02-08 19:29:30 +00:00
Cody Cutrer fef0719315 do a bit of cleanup in a migration to fix old duplicate data
Change-Id: Ice5664856010abbe014e8e4b5bc046f12da61e10
Reviewed-on: https://gerrit.instructure.com/71270
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-02-02 17:33:50 +00:00
Cody Cutrer 4585fdedb2 enforce not-null on role overrides.enabled and locked
Change-Id: Iba5cffd103ccd15aedfd996403057967dd60be62
Reviewed-on: https://gerrit.instructure.com/25895
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-01 17:11:50 +00:00
James Williams 1a9fb4ceea rails 4.2: remove not-null constraint on brand config variables
since it defaults to an empty hash, it doesn't bother
serializing one when it isn't needed

refs #CNVS-26056

Change-Id: I2515257c8c58aabd26c50c18330361e49cd8b0b1
Reviewed-on: https://gerrit.instructure.com/71133
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-29 17:51:24 +00:00
James Williams cd7fde127e remove course_imports table frd
refs #CNVS-25860

Change-Id: I7b82860481e56b1d27647dd5a3d63c950558e2c2
Reviewed-on: https://gerrit.instructure.com/70862
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-01-26 18:41:11 +00:00
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
James Williams ae670bc460 add final provisional grade marks
moderators should eventually be able to see and
edit the same provisional grade mark

closes #CNVS-23200

Change-Id: I7dde803439efac7287b225bd2d60c468f90cdec0
Reviewed-on: https://gerrit.instructure.com/63230
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-09-16 19:03:13 +00:00
Brad Horrocks 1aff77fe8b allow deactivating developer keys
Fixes PLAT-1232

test plan:
* go to developer keys UI
* you should be to deactive and reactivate keys
* deactivate a key that you have a token for
* the token should no longer work, even though it's not expired

Change-Id: I7388226c710ab0841692902886a49146a037e615
Reviewed-on: https://gerrit.instructure.com/50008
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-16 18:31:33 +00:00
Derek Bender fcac48c8d1 add selection table for moderated grading
closes: CNVS-22001

test plan:
1. run migrations
2. the table moderated_grading_selection should exist with the following columns:
  - assignment_id
  - student_id
  - selected_provisional_grade_id
3. in rails console, the class (model) ModeratedGrading::Selection should exist.

Change-Id: I137ad648e044d00cc9ba426d327f6cc91982e2b8
Reviewed-on: https://gerrit.instructure.com/63027
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-16 15:52:28 +00:00
James Williams 51552fa9ec fix reevaluate_incomplete_progressions infinite loop in dev
Change-Id: I6c7d16cc48a88829cc453138a0e4e9a371c8649d
Reviewed-on: https://gerrit.instructure.com/62748
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-09-15 14:34:05 +00:00
Cody Cutrer fb08dd4499 convert Canvas login to a real authentication provider
test plan:
 * before applying this change
   * configure one account with canvas auth, one without (on account settings)
   * configure another account with canvas auth and 3rd party auth
 * check that /login still works on the above accounts, as well as
   /login?authentication_provider=canvas
 * run migration
 * Canvas auth should properly show up or not in authentication providers,
   and below any pre-existing providers
 * delete all auth providers; Canvas should automatically show up after you
   delete the last one
 * Canvas auth should be respected for logging in when it is enabled/not
   enabled (i.e. not enabled you can't login with a canvas password)

Change-Id: I873a4fe3e217f84384da6e5afbf5c280ae368c0b
Reviewed-on: https://gerrit.instructure.com/61814
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-14 21:13:38 +00:00
Cody Cutrer 56ccea56d4 use preload/eager_load instead of includes
refs CNVS-21901

Change-Id: Ie9e1b2778b72f649392d8a1c47c0c86dae0ef19c
Reviewed-on: https://gerrit.instructure.com/58660
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-09-08 20:32:05 +00:00
Michael Nomitch 8a6819e85d subaccount branding (creation and trickle down)
fixes CNVS-21426

changes theme_editor routes to nest under accounts
show correct brand_config for subaccount
be able to theme subaccounts
parent account changes trickle down to subs
theme editor default values are that of parent account
add not in preview text that subaccounts dont show

test plan:
  simple creation
  - create a sub-account
  - brand it differently from parent
  - if you go to courses belonging to
    this subaccount, it gets their css
  - if you go to courses belonging to
    the parent you get the parent css
  - if you go to a user dashboard
    you get the parent branding
    (maybe we can add smarts to this
     later in case you only are in
     the subaccount?)

  trickle down
  - rebrand two values on the parent
    - one that the subaccount explicitly sets
    - and one that doesnt
  - apply this config on the parent
  - wait a little and go to the child account
    - its theme inherits values for the parent,
      but... if it explicitly sets those values
      itself then it doesnt inherit it
  - go to the editor for the subaccount
    - the placeholder values are those
      of the parent account (or the canvas
      default if the parent hasnt set it)

  - test trickle down with a sub-account and
  a sub-sub-account

still to do on different patch sets:
  - account settings to allow subaccount branding
  - show the progress of all the child compilation

Change-Id: Iaddba7036f564965427807c2fd8b0a6a5d524366
Reviewed-on: https://gerrit.instructure.com/61285
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2015-09-08 20:30:22 +00:00
Cameron Matheson 2a1b1ccbe0 canvadocs annotations
closes CNVS-20189
closes CNVS-19902

Test plan:
  * enable canvadocs and crocodoc
    * enable annotations for canvadocs
  * homework submissions should be submitted to canvadocs (not crocodoc)
    (you can tell the difference by the unicycling panda)
  * disable crocodoc
  * annotations should still work (through canvadocs)
  * annotations should work the same as they did through crocodoc (but
    now more doc types are supported)

Change-Id: I041b40d2545545c7766b57f98ea194b777fdef30
Reviewed-on: https://gerrit.instructure.com/59697
Tested-by: Jenkins
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-09-04 16:42:17 +00:00
James Williams 1aeda6b604 track incomplete requirements in module progressions
also move progressions to 'started' when any submission
has been made toward a "Must score at least" requirement

NOTE: while this is a prerequisite for NC-OR, this is
 going to affect all current students because we may
 as well (it makes more sense this way)

test plan:
* create a module with a "Must score at least" requirement
* as a student, submit an assignment
* the module should be marked as "in progress" for the student now

* basic regression test of backend module progressions

closes #CNVS-22914

Change-Id: Ie240c61e7a70dca0d45fe49f81224a16eb690783
Reviewed-on: https://gerrit.instructure.com/62416
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-03 19:36:18 +00:00
Steven Burnett e12c380518 fixed title creation of assignment overrides
fixes CNVS-22796

Test-plan:
1. create a course with multiple users and observers attached
2. create an assignment and assign it to only a couple users
3. masquerade as one of the observers and notice that you can't see all the student's names that are assigned to it
4. as any student assigned

Change-Id: I2b45bc2ab262994cba2f97716386085e8c881169
Reviewed-on: https://gerrit.instructure.com/62021
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-09-03 16:22:41 +00:00
Jeremy Stanley 4b24600080 publish provisional grades endpoint
test plan:
0. create a moderated grading assignment
   (enable feature in course, enable setting on assignment)
1. as multiple students, submit the assignment
2. as a ta, go to speedgrader and assign (provisional) grades
   and submission comments for these students
3. verify that the grades do not show up in the gradebook yet
4. verify that the students did not receive notifications for
   the grades or comments yet
5. call the endpoint to publish provisional grades

   POST /api/v1/courses/X/assignments/Y/publish_provisional_grades

6. confirm that the grades now appear in the gradebook
7. confirm that the students received notifications about
   assigned grades and submission comments
8. confirm that further changes made in speedgrader are
   reflected in the gradebook (grades are no longer provisional)

closes CNVS-22741

Change-Id: I1e3a475fb80900a75c6bd672e7f06c251c353c75
Reviewed-on: https://gerrit.instructure.com/62146
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-03 14:19:59 +00:00
James Williams 19e16ce43a don't unresolve links in quiz data when shifting dates
test plan:
* create a quiz with a question with a link to a file
 (or anything, really)
* copy the course with date shifting
* the link should work when taking the quiz as a student

closes #CNVS-22615

Change-Id: I5eaf1026d74473e14ffbcbd166b71b245cc2f731
Reviewed-on: https://gerrit.instructure.com/62360
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-03 02:55:10 +00:00
Cody Cutrer f03665734a more quoted_table_name in migrations
refs CNVS-21900

Change-Id: I42610b7a1892cc9d4d83caac9a8f478782d0fb32
Reviewed-on: https://gerrit.instructure.com/62152
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-08-31 21:37:10 +00:00
Cody Cutrer 61c3d1bd61 don't use raw SQL unnecessarily
Change-Id: I47154e3a8e679fe966f08431f89c2694f51b376e
Reviewed-on: https://gerrit.instructure.com/62136
Reviewed-by: Rob Orton <rob@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-08-31 20:19:58 +00:00
James Williams e2f64145a9 drop comments from rubric_assessments
Change-Id: I653ebae164ea588756b16091af9033bda988e35e
Reviewed-on: https://gerrit.instructure.com/62005
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-08-28 15:15:23 +00:00
Jeremy Stanley e66c287d42 remove ProvisionalGrade#position
index provisional grades by scorer instead, which simplifies
creation of multiple provisional grades in speedgrader

test plan: specs pass

refs CNVS-22010

Change-Id: I5ee3dd65174549cd251ad6e3c137d89780024043
Reviewed-on: https://gerrit.instructure.com/61279
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-08-20 17:54:56 +00:00
Nick Houle debb304d02 Set sis_app url as canvas account setting
Fixes: SIS-700
Change-Id: I95e475f00c1e00a00a4e04e099f7734c94604cad
Reviewed-on: https://gerrit.instructure.com/60592
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
Product-Review: Tyler Pickett <tpickett@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2015-08-19 21:51:03 +00:00
Brad Horrocks 79c7848895 Add account to access_token
We now pull the account from the developer key

Fixes PLAT-1200

Test Plan:
Run the tests?
not much really changed
none of is really exposed/used

Change-Id: I88b3b9b907ae7b15145ac8e2e6fc1a18527b40d5
Reviewed-on: https://gerrit.instructure.com/60544
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2015-08-19 15:44:39 +00:00
Rob Orton 5d81879d41 drop unused columns from groups
fixes CNVS-22555

test plan
 - db:migrate should work

Change-Id: I6259abacf508195cbaca04e06bfed7ec202f5c8b
Reviewed-on: https://gerrit.instructure.com/61133
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2015-08-18 15:08:37 +00:00
Weston Dransfield c93dac757a read and write resource_placements to/from message_handler
fixes PLAT-1174

Test Plan
~ make sure resource_handler_id from the lti_resource_placements table
~ make sure installing a tool via lti tool registration URL works correctly as
  well as any other task that uses the Lti::ResourcePlacement model.

Change-Id: I058ae01cb43366342754e3fa9cdabf1c408cce0e
Reviewed-on: https://gerrit.instructure.com/60494
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: August Thornton <august@instructure.com>
2015-08-17 16:47:43 +00:00
Jeremy Stanley 5853e6d728 provisional submission comments
test plan:
 - specs should pass
 - a quick regression test on comments on submissions in SpeedGrader
   would probably be a good idea

fixes CNVS-22008

Change-Id: I26e9dc5bd2e3dd1a074b5625613a3b32744b6b50
Reviewed-on: https://gerrit.instructure.com/60196
Reviewed-by: Derek Bender <dbender@instructure.com>
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-08-13 22:04:14 +00:00