Commit Graph

19257 Commits

Author SHA1 Message Date
Nick Houle 6007235c9f Fixes over 30 character error for assignment names with symbols
Fixes: SIS-1641

Notes: Before if you had an assignment that had a name close to
30 characters and you had a symbol in the name, i.e. 'Buddy & Guy'
it would error on the assignment name validation for having a name
too long because the '&' would come in as '&' causing the name
to go over 30 characters. In this commit you can have a name with
any symbol be valid if it's under 30 characters.

Change-Id: Ia136edaf9eeee290ef458662d27d3aab0842f72e
Reviewed-on: https://gerrit.instructure.com/71361
Tested-by: Jenkins
Reviewed-by: Tyler Pickett <tpickett@instructure.com>
QA-Review: Kausty Saxena <kausty@instructure.com>
Product-Review: Ken Romney <kromney@instructure.com>
2016-02-04 00:07:54 +00:00
Jayce Higgins 48e1b8c2ea Validate empty assignment name and display error if empty
Test Plan:

- Set up assignment with an error(so that it stops on the error dialog)
- Open post grades dialog and fix errors then change name to blank
- Expect an error preventing you from having a blank name

Change-Id: I4de5e7f98dfe4fa95cc7291f63d7e03eb39a9ea4
Fixes: SIS-1701
Reviewed-on: https://gerrit.instructure.com/71319
Reviewed-by: Nick Houle <nhoule@instructure.com>
QA-Review: Kausty Saxena <kausty@instructure.com>
Tested-by: Jenkins
Product-Review: Ken Romney <kromney@instructure.com>
2016-02-04 00:05:20 +00:00
Deepeeca Soundarrajan fdc9cd7061 spec: Add test ids to assignments spec
Change-Id: I35b062d7d3447ed4e0916cdf92d96ce1e2d6b082
Reviewed-on: https://gerrit.instructure.com/71307
Tested-by: Jenkins
Reviewed-by: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
2016-02-03 22:45:27 +00:00
Jeremy Stanley fa73c13bbb use native <select> in ComboBox
to improve accessibility. also apply styleguide styles.

test plan: specs. (this control isn't used by Canvas itself;
AFAICT it's only used by the analytics plugin.)

refs CNVS-25772

Change-Id: Id9d946b0a343d0e31c6218b78af35411971d3d66
Reviewed-on: https://gerrit.instructure.com/70887
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2016-02-03 22:42:38 +00:00
James Williams 4c588c6faf rails 4.2: fix general_model_spec for generated habtm models
refs #CNVS-26056

Change-Id: I38b68404ddd90b65bbc8effb3739fc2fedf42e52
Reviewed-on: https://gerrit.instructure.com/71376
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-02-03 21:46:20 +00:00
Spencer Olson f3c956c2dd add scope_assignments_to_student parameter
scope_assignments_to_student can now be passed
as an argument to assignment_groups_controller#
index. if this argument is passed in as true,
assignments will only be returned if they apply
to the requesting user in the given grading period.

in addition, when requesting multiple grading
periods data for these endpoints:

GET /api/v1/courses
GET /api/v1/courses/:course_id
GET /api/v1/users/:user_id/courses
GET /api/v1/users/self/favorites/courses

we now include the current_grading_period_id in the response.

closes CNVS-26847

test plan 1: test scope_assignments_to_student

- create a course, and enroll two students (
  i will refer to these as Student A and
  Student B).
- enable Multiple Grading Periods for the
  course.
- create a grading period that starts Feb 1
  and ends Feb 29.
- create a grading period that starts March 1
  and ends March 31.
- create an assignment. assign it to Student A
  on March 15. Assign it to Student B on Feb 15.
  i'll refer to this as Assignment 1.
- create another assignment. assign it to Student
  A on April 15. Assign it to Student B on March 15.
  i'll refer to this as Assigment 2.
- as Student A, make a GET request to
  /api/v1/courses/:course_id/assignment_groups
  (replace :course_id with the id of the course
  created in the first step). include the following
  params with the request:
  format: 'json'
  include[]: 'assignments'
  include[]: 'assignment_visibility'
  include[]: 'overrides'
  grading_period_id: 5 #don't actually put 5 here,
    put the id of the March grading period
- verify you get two assignments back (they will
  be nested in the response, under a key named
  "assignments"). the assignment IDs should match
  the ids of Assignment 1 and Assignment 2.
- now make another GET request with Student A with
  the same params, but this time also add the
  following param:

  scope_assignments_to_student: true

- verify you get only one assignment back. the
  assignment id should match the id of Assignment
  1.

test plan 2: verify current_grading_period_id in responses

- hit the api/v1/courses, api/v1/courses/:id,
   api/v1/users/:user_id/courses, and
   api/v1/users/self/favorites/courses endpoints
   and pass in 'current_grading_period_scores'
   as an include[] argument. verify you get a
   `current_grading_period_id` in the response.
 - ping me with any questions :D

Change-Id: I5f906a8cddbc63002cadf533c46c69de0d29830f
Reviewed-on: https://gerrit.instructure.com/71169
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2016-02-03 21:32:33 +00:00
Jeremy Putnam ed382125dd spec: add discussion author check after user merge
Change-Id: Ida0a2f8820b86951cca811fc6feee3e8da70a514
Reviewed-on: https://gerrit.instructure.com/71324
Tested-by: Jenkins
Reviewed-by: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2016-02-03 18:15:46 +00:00
Cameron Matheson 03d74a6981 use strings for crocodoc user ids
closes CNVS-26881

Change-Id: I4645503ff5cfc869d8dae0fec88aabe470fbb4d5
Reviewed-on: https://gerrit.instructure.com/71107
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Jenkins
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-02-03 18:02:23 +00:00
Spencer Olson db89f37bec fix 'needs grading' notifications
concluded and inactive teacheres will no longer
receive notifications that quiz submissions need
grading.

closes CNVS-16873

test plan - concluded teacher:
1. Go to a course.
2. Add at least 2 teachers.
3. Create a quiz with questions that require
   grading.
4. Take the quiz as a student.
5. Conclude one of the teacher's enrollments in the
   course.
6. As another student take the same quiz.
7. Look at the concluded teacher's notifications
8. Verify the teacher did not receive a
   notification for the submission from step 6
   needing grading.

test plan - inactive teacher:
1. Go to a course.
2. Add at least 2 teachers.
3. Create a quiz with questions that require
  grading.
4. Take the quiz as a student.
5. Open up a rails console (we are going to
   force the teacher's enrollment into an inactive
   state). In the console, do the following:

   **replace 5 with your course id**
   $ course = Course.find(5)

   **replace 2 with one of your teacher's IDs**
   $ teacher = User.find(2)
   $ enrollment = teacher.teacher_enrollments
       .where(course_id: course).first
   $ enrollment.inactivate

6. As another student take the same quiz.
7. Look at the inactive teacher's notifications
8. Verify the teacher did not receive a
   notification for the submission from step 6
   needing grading.

Change-Id: Idb864e3a401d9830561167d9a6f932a3f4ead823
Reviewed-on: https://gerrit.instructure.com/71353
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2016-02-03 17:05:40 +00:00
James Williams f89012e220 rails 4.2: couple more fixes
refs #CNVS-26056

Change-Id: I5fd18402b639d87c94ee9bafb52871ab31e52974
Reviewed-on: https://gerrit.instructure.com/71368
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-03 16:17:49 +00:00
Transifreq 5551e3be9b update nb translation
Change-Id: I1d2b85516b630bbad0ba1e9f7f51ac24b58fb20b
2016-02-03 05:19:01 -07:00
Transifreq 864c7dbb35 update mi translation
Change-Id: I011e025909fd2ba658f3dab6faed9faffb9608fa
2016-02-03 05:17:52 -07:00
Transifreq 57280e2e81 update fr translation
Change-Id: I9740e0b8665be111971cb6da56f67974f57cea70
2016-02-03 05:14:12 -07:00
Transifreq d98c22fa41 update fa-IR translation
Change-Id: Idb26de989071b4290f7794ee2d8ac952d4fe4641
2016-02-03 05:13:04 -07:00
Transifreq 651431b9f3 update da translation
Change-Id: I3e186be7ed295cb2ef7667c56ab978551c40e588
2016-02-03 05:08:30 -07:00
Ethan Vizitei 9c5586b573 stop quiz deadlocks at load
closes CNVS-27002

inconsistent ordering can lead to deadlocks
when many students try to take a quiz
derived from assessment question banks
at the same time when the quiz questions are out
of date.

TEST PLAN:
 1) make a quiz with questions from an assessment
    bank.
 2) update the assessment bank so the quiz questions
    are out of date.
 3) have many students try to start taking the quiz
    at the exact same time
 4) the db doesn't deadlock

Change-Id: I210cfdfa023b521c7e93fd6a53969506159d9ae9
Reviewed-on: https://gerrit.instructure.com/71322
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-03 01:00:59 +00:00
Pam Hiett 53b9084406 address font-size 4px in stylesheets
Fixes: CNVS-26579

note:
- the font-size: 4px was specific to screen-reader-text class
  which has been replaced with screenreader-only

sample test plan:
- ensure the css compiles without errors
- as an admin using the old or new UI in safari
- navigate to a course and click on settings
- click into the "sections" tab ensure everything displays correctly
- turn on VO navigate down to the edit/delete icons and through VO
  you should hear the alert that shows as a popover for sighted
  users (example: http://www.screencast.com/t/bpNg0n1hFFX)

Change-Id: I0003b6fbd0a360cfe0c7e1faf4e038fc9b94bb8b
Reviewed-on: https://gerrit.instructure.com/70886
Tested-by: Jenkins
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Jennifer Stern <jstern@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-02-02 23:08:41 +00:00
Pam Hiett 6d4f3f18f0 fix focus indication on "Move Outcome" modal
Fixes: CNVS-26058

test plan:
- as an admin using the old or new ui
- navigate to the outcomes tab within a course
- click onto an outcome
- click the "move outcome" or "move outcome group" button
  that will launch the move outcome modal
- the outcome tree should now have the standard browser focus
  indicator (see example: http://screencast.com/t/I1SVK1URcz)
- switch ui version to ensure the same happens in the other ui

Change-Id: Ief1721f2dee3150c30dec28918eb9ebfcc692df9
Reviewed-on: https://gerrit.instructure.com/71243
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-02-02 22:44:57 +00:00
Matthew Berns 2996bc1ea1 improves error announcements on validated forms
fixes CNVS-25675

test plan:
- go to a page that uses validated forms, such as
  the assignment creation page
- attempt to submit the form with multiple errors
- all applicable form errors should be read out
- fix one error on the page and attempt to resubmit
- only applicable errors should be read

notes:
  there are issues with how this behaves with assignment
  overide fields (lock date, etc), specifically that
  they tend to be announced before other fields that
  might be listed prior to them on the form.

Change-Id: I133be259900416bd6038c24b58c854419e8692c5
Reviewed-on: https://gerrit.instructure.com/70702
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins
2016-02-02 21:48:08 +00:00
Michael Hargiss c2f20d99b3 spec: add refactored DA specs, fix setup bugs
Test Plan:
- pass Jenkins
- check for errors
- make sure new test_ids match up to existing test cases in TestRail

Change-Id: I944c395bab8310260c43b05d0b09a85f1746bfe2
Reviewed-on: https://gerrit.instructure.com/70636
Tested-by: Jenkins
Reviewed-by: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2016-02-02 20:44:41 +00:00
Jennifer Stern aeaf5b5039 Add href to Dashboard Card links
fixes CNVS-25424

Test plan:
- Verify that you can open a dashboard card link by cmd/ctl/right clicking
on the course title.
- Verify that you can still click anywhere in the "hero image" and course
  title section of the card to navigate to the course.

Change-Id: Ieea2aec3e57d755098a6e38a6ef0ff58699d4caf
Reviewed-on: https://gerrit.instructure.com/70686
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins
2016-02-02 19:25:36 +00:00
Jennifer Stern 337a882536 Add automated a11y testing helper for qunit tests
refs SD-743
fixes CNVS-26721

This adds a qunit assertion helper that wraps the aXe library. Rules can
be ignored by passing an array of rules in the options argument to the
helper.

e.g.
`assertions.isAccessible $html, done, { ignores: 'aria-valid-attr-value'}`

Test plan:

Undo the changes that I made to the DashboardCard.jsx component.
You should get a warning about invalid aria attributes because the
aria-controls attribute is referring to an element that doesn't exist.

To fix this, I modified the component to hide/show the color picker so that
the aria attribute value is valid.

If you add the ignores option as described above, the test should pass
without my changes.

To verify the dashboard card color picker changes:

- Verify that you can click or use the ENTER key on a dashboard card
cog button to bring up the color picker
- Verify that you can select a color and apply it to the card.
- Verify that you can click outside the color picker to close it
- Verify that you can hit the ESC key to close the color picker
- When the color picker is closed, focus should return to the the cog
button trigger
- After selecting a color you should be able to open the color picker again
and select a different color

The color picker in the Calendar should be regression tested as well.

Change-Id: I5d5bfdaf39df1e0cb8776144771baeb1ed31ff2a
Reviewed-on: https://gerrit.instructure.com/70638
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
Tested-by: Jenkins
2016-02-02 17:39:11 +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
Simon Williams ce46f96704 exclude Folio::InvalidPage from sentry
fixes CNVS-26890

test plan:
- pass an invalid page arg to a paginated endpoint
- the error should not show up in sentry
- you should get a 404

Change-Id: Ic354866bf14afe3f0bf654dc2cfe335e942596ef
Reviewed-on: https://gerrit.instructure.com/71125
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-02-02 16:34:52 +00:00
James Williams e88ee8c986 add account setting for restricting future enrollment listings
test plan:
* create a course in an account with term dates set to begin
 in the future
* enroll a student in the course

* in the account, enable "Restrict students from accessing
 courses before start date"
* as the student, on the Courses page ("/courses",
 or click on "Courses" in the nav), it should still list
 the future enrollment (but not be a link)

* after enabling the account setting, it should show
 another setting, "Restrict students from viewing future courses
 in enrollments list"
* enable that setting
* as the student again, the Courses list should no longer
 list the future enrollment

closes #CNVS-26896

Change-Id: I1fe4e05203b8db115a402919cda523c5b9973712
Reviewed-on: https://gerrit.instructure.com/71154
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2016-02-02 15:48:10 +00:00
James Williams 7bed7e2871 allow common cartridge sub-modules to be imported separately
previously, we imported nested modules together within
 one module, (using nesting to distinguish between submodules)
 possibly leading to very large modules

now, submodules can be broken up on import using the
"Select Content" dialog

test plan:
* import the Common Cartridge package referenced in the ticket
 using the "Select specific content" option
* use the dialog to navigate the module tree and select
 specific sub-modules
* if all sub-modules of a given module are selected, a
 radio toggle should appear to choose whether to import
 the module as one or to split them up

closes #CNVS-26696

Change-Id: Ia542cd7ec847e810a01d92c675c6cc92d1247345
Reviewed-on: https://gerrit.instructure.com/71099
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-02 15:48:03 +00:00
Transifreq 1a883dc20a update nb translation
Change-Id: I22f441e2c9175636c3068deb27098714ab047b38
2016-02-02 05:19:18 -07:00
Transifreq 9f5bb23878 update fa-IR translation
Change-Id: Ia91f2cb59afe6bac12f2f5810630aa2738d68a2b
2016-02-02 05:13:44 -07:00
Cody Cutrer 9597d237ca optimize cross-shard conversations query
don't bother querying if we know there won't be relevant data on that shard

Change-Id: I76ed81b0b6257dfa18c229bfff6d9812ee3e8710
Reviewed-on: https://gerrit.instructure.com/71260
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2016-02-02 03:35:09 +00:00
Cody Cutrer 9059e2efd8 update ffi-icu gem
closes gh-748

remove method that's now in the gem, and be more intelligent about adding
methods waiting pull requests

Change-Id: Ia304eca9cd53d1981e890de5dcb7e48fb2d4c460
Reviewed-on: https://gerrit.instructure.com/71140
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 01:57:36 +00:00
Cody Cutrer b94e223a81 spec: fix attribute protection spec
Change-Id: Id9acf608d10ab6caa12b485dd86671db996534ee
Reviewed-on: https://gerrit.instructure.com/57841
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 01:56:15 +00:00
Pam Hiett 519e62b9b8 Add rem units instead of px units to /stylesheets/bundles
Fixes: CNVS-26574

This converts our px unit font-sizing in the all the stylesheets in
/pages to use our mixin that converts them to rem units.

test plan:
- for starters - CSS should compile without errors

- as an admin/teacher navigate to a course and click on the "course
  setup checklist" button on the right-hand side
- go into chrome's settings and adjust the web content font-size
  to "very large" you should see all of the content adjust
  should look similar to http://screencast.com/t/NGALrht4T

- as an admin/teacher navigate to the account link
- click on the "notifications" link
- adjust chrome's settings from medium to very large you should see
  something similar to http://screencast.com/t/KrpYt3VCkRSt
  note: the larger font size does cause the table to misalign
  however all content is still visibile

- as an admin/teacher navigate to a courses link
- click an existing course
- click the + assignment button
- scroll down below the tinymc editor block where the "Group
  Assignment, Peer Reviews" etc appear - adjust the browser
  font from medium to very large and you should now see the
  content appear similar to http://screencast.com/t/qs4ZZUdasp

- lastly return your chrome font-size preferences to medium and
  click around a variety of canvas pages and you should see no
  difference from production as this is a 1-1 conversion

Change-Id: Ife3f95532ee379ce6d1f7555478e685fdb6bdda3
Reviewed-on: https://gerrit.instructure.com/70814
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2016-02-02 00:48:43 +00:00
Ethan Vizitei e3a00bac68 spec: stabilize conferences_spec
refs CNVS-25916

sometimes we try to find the end conference link just before it's
populated, this patchset makes sure it's there before we try
to click on it.

TEST PLAN:
 1) confereces_spec fragility rate should go down

Change-Id: I96a0466cbbff5ef787c2994354eb6c84318d575f
Reviewed-on: https://gerrit.instructure.com/71193
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-02 00:38:35 +00:00
Ethan Vizitei e44ade24b6 spec: make cdn spec reportable
we need this shared context in order to take screenshots
on selenium failures

Change-Id: Id4317c599ea2c064092f26d2def8ec0add5e6f1a
Reviewed-on: https://gerrit.instructure.com/71223
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-01 23:48:27 +00:00
Brad Horrocks 3fee901ac0 Remove Google Docs plugin
Google drive relevant code has been moved to the gems/google_drive
Actually test google drive with mocked api responses
cleaned up lots of code

Fixes PLAT-1301

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

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

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

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

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

As a site admin
  - Disable Google Drive
  - Then with your student
    - Make sure you can still do file upload submissions on the assignment
    - Collaborations should no longer show up (unless you have etherpad enabled)
  - Google drive should no longer show up in your profile settings as a registered service
Change-Id: I4dfaff6f5262743c044aadd12266fd0bd85a60e1
Reviewed-on: https://gerrit.instructure.com/69078
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2016-02-01 23:41:53 +00:00
Ethan Vizitei 3da893f521 spec: fix for fragility by better scoping assertion
DOM pollution causes this spec to be a common fragile offender

Change-Id: I8bef2cd1f61d4acce28b8ca28e25567b812ba097
Reviewed-on: https://gerrit.instructure.com/71232
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-01 22:43:10 +00:00
Cody Cutrer f80ad3fa51 fix loading ICU
test plan:
 * user_spec.rb:2085 should actually run, and pass, on ubuntu

Change-Id: I28b31cbc56d4225f83001c506e1fb752223a8843
Reviewed-on: https://gerrit.instructure.com/71072
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2016-02-01 22:26:06 +00:00
Brian Palmer 47557f7a16 avoid doing empty kaltura bulk uploads
refs sentry error 33018

It's very common for us to filter out the lone attachment passed in to
KalturaMediaFileHandler#add_media_files because the attachment already
has a media_object. In that situation, we've been posting a blank csv
upload to kaltura anyway, causing errors further down the processes.

test plan: this can happen on uploading a media file, but doesn't always
happen, so it might be difficult to intentionally trigger from the ui. From the
rails console you could attempt to re-upload an attachment that already
has a media_object, using something like
`KalturaMediaFileHandler.new.add_media_files([my_attachment], false)`
and verify that no exception is raised.

Change-Id: Ia89550df2883f240a2fbc287e0cd2a4086b5b6fb
Reviewed-on: https://gerrit.instructure.com/71214
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2016-02-01 21:54:02 +00:00
Brian Palmer 9315eadbd1 don't raise/record an error when a file link can't be found
refs sentry error 33094

This isn't an actionable error, it typically just means bad content was
imported. It's also extremely common due to content imports. Note that
the import warning "Missing links found in imported content" is still
recorded and displayed in the imports UI, this change just gets rid of
the error report.

test plan: import a common cartridge package that includes an assessment
question that has html pointing to a non-existent image file. no error
report should be generated, though you'll still see a warning in the ui
about a missing link.

Change-Id: Ic44ee446ed648388c87e022b80c695816f890e23
Reviewed-on: https://gerrit.instructure.com/71162
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2016-02-01 21:17:25 +00:00
Bryan Petty e046aac6b9 fix spelling of "assignment"
fixes CNVS-26208

Test Plan:
  1. Create a new assignment.
  2. Set points to a negative number like "-5", and click Save.
  3. Verify correct spelling of "assignment" in validation error.

Change-Id: I28617ed343097fefd15b9c826005da3b33ff1176
Reviewed-on: https://gerrit.instructure.com/71051
Reviewed-by: Davis McClellan <dmcclellan@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-02-01 21:08:03 +00:00
James Williams 53733b4743 rails 4.2: fix invalid assignment_override deletion
fixes problems with validates_associated

refs #CNVS-26056

Change-Id: I020a7c6905ee61a24520671a5faa472d2b791e45
Reviewed-on: https://gerrit.instructure.com/69787
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-01 21:03:26 +00:00
James Williams 48bc66317c rails 4.2: more spec fixes
refs #CNVS-26056

Change-Id: I7faaddf76130ef846364e2c5ead84e568e3bdac5
Reviewed-on: https://gerrit.instructure.com/71175
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-01 21:03:04 +00:00
James Williams 56e555543a rails 4.2: fix simply_verioned_spec
prevents Woozel from breaking sharding setup

refs #CNVS-26056

Change-Id: Iecc28589336e21c416df90e0a9cd7a2d3624b6f5
Reviewed-on: https://gerrit.instructure.com/71132
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-01 21:02:56 +00:00
James Williams ab0f9be30c rails 4.2: turn xss_safe mode on for json
refs #CNVS-26056

Change-Id: I1c5c8e0568d619dd7cadc20f6a3a34cab46b12fa
Reviewed-on: https://gerrit.instructure.com/71173
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2016-02-01 21:02:50 +00:00
Ethan Vizitei 4b1b4caf42 spec: stabilize quizzes_unpublish_quiz_teacher_spec
refs CNVS-25916

builds on top of c/71022.  this published link has it's text changed in stages (to
blank then to unpublished)
and if we start asserting things on it before it's been populated
we get intermittant breakages.  This makes sure the transition is
complete before continuing into the specs.

TEST PLAN:
 1) quizzes_unpublish_quiz_teacher_spec fail rate should fall
significantly

Change-Id: Ib3898782d7f7a80f930ca8da5e65f8061bd404f1
Reviewed-on: https://gerrit.instructure.com/71183
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-01 20:55:11 +00:00
Ethan Vizitei 07c0a58fba spec: stabilize groups_shared_examples
refs CNVS-25916

this link doesn't always exist right when the page loads,
so sometimes we try to click on it before it's there.
This awaits the correct behavior.

TEST PLAN:
 1) groups_shared_Examples should become less fragile in jenkins runs

Change-Id: I3e57f12a93510ba1dd2a323855cc6b86e859ed49
Reviewed-on: https://gerrit.instructure.com/71186
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-01 20:51:26 +00:00
Ethan Vizitei fae0cfd3e3 spec: make cdn_spec webpack friendly
refs CNVS-25916

CDN spec made some assumptions about require_js base bundles,
this adds a conditional to check if we're using webpack
in this context first and fixes the js paths and bundles expected
if so.

TEST PLAN:
 1) selenium webpack pass rate should go through the roof

Change-Id: I07c4b4fec5c91d9ebe21a6375b1add03b3041015
Reviewed-on: https://gerrit.instructure.com/71218
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-02-01 20:51:13 +00:00
Cody Cutrer aa627e50a6 bump switchman
Change-Id: I46a608cf4e3dfd1c981d585dd2d057322691172e
Reviewed-on: https://gerrit.instructure.com/71192
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-02-01 20:43:40 +00:00
Simon Williams 00f622e928 fix course api for logged out users
fixes CNVS-26840

test plan:
- in a public course, as a logged out user,
- hit the /api/v1/courses/X api
- it should work

Change-Id: Ibfa1b04ee0c7599d56df6d16c37c4aa615160708
Reviewed-on: https://gerrit.instructure.com/71014
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2016-02-01 20:29:19 +00:00
Brian Palmer 74c5beba22 restore cache store logging in rails 4.0
fixes CNVS-26757

It turns out this code is still necessary in rails 4.0, it's the rails
4.2 branch where it is deprecated and always true.

test plan: do some redis cache reads and writes, verify the "CacheStore"
lines appear in the debug logs.

Change-Id: I51a2696f3e7104c8d54f0b5bb5ca61fac0e20656
Reviewed-on: https://gerrit.instructure.com/71155
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Brian Palmer <brianp@instructure.com>
2016-02-01 19:41:53 +00:00