Commit Graph

19023 Commits

Author SHA1 Message Date
Chris Hart 4d520a6b9a Add rem units instead of px units to /stylesheets/components
fixes CNVS-25278

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

Test Plan:
- CSS should compile without errors
- In Chrome, change the default size of your font from Medium to
  Large or Very Large. You will see that all Canvas buttons now
  respect the user preferences in terms of font-size:
  http://screencast.com/t/jIZr6CrT
- However, at Chrome's default font-size (Medium), you should see
  buttons appearing exactly as they currently do on production.

Notes:

- This is a direct conversion from px to rem, so nothing in the
  interface visually changes, just the unit type were are using

- We did start using the global variables set aside for consistent font
  sizing where they were matching, ie 12px = $ic-font-size--xsmall, etc.

- Looking at the Canvas buttons is the easiest example to see these
  changes in effect. There are other similar tweaks that happen
  globally, but if one is working and css is compiling we're good,
  since this is a 1 to 1 conversion.

Change-Id: I41054430509bc3b04377bc3b9da3c25bca625209
Reviewed-on: https://gerrit.instructure.com/70033
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-01-15 22:46:54 +00:00
Jon Jensen edd064b6b5 spec: fix broken spec
this broke with 8b3d1abc, but it passed jenkins because it's a P2 spec

Change-Id: I11771c70c6af2603bb239f82c56215035d1dc6ad
Reviewed-on: https://gerrit.instructure.com/70430
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
2016-01-15 22:41:19 +00:00
Cody Cutrer 1cb51d309b spec: fix spec susceptible to time race condition fragility
updated_at was off often off by 1s because we're re-serializing

Change-Id: I116cbfb042f43a63c770d3372821a59b4967c19a
Reviewed-on: https://gerrit.instructure.com/70299
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-15 22:04:31 +00:00
Jon Jensen da6a8fc5e0 spec: make selenium request handling more robust, refs SD-723
this should alleviate (fix?) the recent uptick in deadlocks/timeouts and
other spec brittleness

1. in a `get`, always wait for the page to load (ajax, etc), unless the
   only thing to change is the hash. this is consistent with webdriver/
   firefox behavior; even if you `get` the exact same url with no hash,
   the page will be refreshed. the previous behavior allowed some specs to
   finish before javascript had run (if subsquent specs `get` the same
   url), meaning some ajax requests could be fired and handled in no-man's
   land
2. don't allow requests anywhere outside the spec itself, including in
   before(:all) hooks; those requests would happen outside a transaction,
   potentially polluting the database for subsequent specs, and in some
   cases causing deadlocks

Change-Id: I9ef15215ca0171dea773283868c972c5fb69acbb
Reviewed-on: https://gerrit.instructure.com/70360
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-15 20:34:20 +00:00
Ethan Vizitei f43067f352 spec: stabilize speedgrader timing
refs CNVS-25916

speedgrader has variable load times, and in both builds
sometimes fails for the first dom check after load if everything
isn't loaded yet.  Instead of the sleeps that have been put in before
for the ones that fail most frequently, this adds an intelligent timeout
check to every speedgrader direct url load.  Stabilizes the passrate
of this spec for both require-js and webpack builds

TEST PLAN:
 1) speedgrader_spec should pass in webpack build

Change-Id: I8ccf8850f717ca6816e4f6e9fdcbf4a923398fc1
Reviewed-on: https://gerrit.instructure.com/70370
Tested-by: Jenkins
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-15 20:17:17 +00:00
Ethan Vizitei 61f668fb7d spec: fix webpack aux build
refs CNVS-25916

this file moved, and so was no longer buildable

TEST PLAN:
 1) webpack aux build should pass

Change-Id: Ib89abbcd4e21d0dd2abf957e695d20b914cffd2d
Reviewed-on: https://gerrit.instructure.com/70324
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-01-15 20:11:10 +00:00
Michael Hargiss 6cdb0a6492 spec: fix failing quiz specs
Test Plan:
- pass Jenkins
- check for errors

Change-Id: I9ce9c74704fa112bf45f0a3fd7aa345096d5e284
Reviewed-on: https://gerrit.instructure.com/70316
Tested-by: Jenkins
Reviewed-by: KC Naegle <knaegle@instructure.com>
Reviewed-by: Adam Phillipps <adam@instructure.com>
Reviewed-by: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Michael Hargiss <mhargiss@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
2016-01-15 19:17:07 +00:00
August Thornton d0c68246bc create admin level LTI report
closes PLAT-701

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

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

Change-Id: I24fd1cb4c542f70d967ef34cfd46df881d239ae8
Reviewed-on: https://gerrit.instructure.com/69622
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2016-01-15 19:11:53 +00:00
Michael Hargiss a8f31d9f0a spec: fix failing assignment specs
Test Plan:
- pass Jenkins
- check for errors

Change-Id: I0119887dd6f089fb6345a9d4d7c38ebfa518c88c
Reviewed-on: https://gerrit.instructure.com/70310
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-01-15 17:03:44 +00:00
Chris Hart 02b5caef5a Remove 16px font size from document root
Fixes: CNVS-26469

Putting a pixel value in the document root was
stopping our newly converted rem font-sizes from
scaling up when the changes his or her browser
font sizing preferences. This change removes the
pixel value, so the document root font-size is
100% again.

Test plan:

- In Chrome's advanced Settings/Preferences, set your
  default text size to Very Large.
- When you return to your Canvas tab, the primary
  nav's font and icon size should have scaled up,
  respecting the browser's font preferences:
  http://screencast.com/t/TNQNNvgsBv0

Change-Id: Ib7e410d582219670dcc4b43fe48355edc85a43dd
Reviewed-on: https://gerrit.instructure.com/70252
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-15 16:56:50 +00:00
Ethan Vizitei b972ae8346 spec: remove unit-test-style test from brandable_css_js_spec
refs CNVS-25916

This test case doesn't work with webpack (uses "require" dynamically in
a js console), and is actually covered by a unit test already anyway

spec/coffeescripts/util/brandableCssSpec.coffee:13

TEST PLAN:
 1) brandable_css_js_spec should pass on the webpack selenium build

Change-Id: Ied06954f4e52032e6fc427d080acc0892d74bb7a
Reviewed-on: https://gerrit.instructure.com/70315
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-15 16:46:50 +00:00
Cody Cutrer ea258aa523 try to catch misuse of find_in_batches_with_temp_table
in Canvas production, pgbouncer uses transaction isolation level
(except when running migrations), so temp tables don't work
(unless you're in a transaction)

Change-Id: Ib87ac3c68ce4c733ca668d26116f0b3bee3ffe7a
Reviewed-on: https://gerrit.instructure.com/69300
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-15 16:46:26 +00:00
Ethan Vizitei 334557aa25 spec: make quiz events selenium check run no custom JS
refs CNVS-25916

this is the same modification we previously made to the quiz
stats selenium check, because executing arbitrary javascript in
a full-stack test is a little wrong anyway.  This confirms the same
thing (that the app has loaded) the way a user would notice it,
and avoids the runtime console injected "require" statement that
crashes in webpack

TEST PLAN:
 1) spec/selenium/client_apps/canvas_quizzes_spec passes webpack
selenium

Change-Id: I9748fe7be5adf6a6df8bb12e411d55a976a8d09c
Reviewed-on: https://gerrit.instructure.com/70331
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-01-15 15:57:01 +00:00
Ethan Vizitei 088527af6b add consul entry for docker users
our docs say that you just copy over your config files and you're
ready to start docker-ing, so we should make sure there's a consul
config file entry

TEST PLAN:
  1) no production changes (does not touch app code)
  2) clean install, clean config directory
  3) copy docker-compose/config/ files to your config directory
  4) you shouldn't be missing any config files when you start your
     compose file up

Change-Id: I5c3fc2ec1e537355bd9a4c5a8b36640349b822cf
Reviewed-on: https://gerrit.instructure.com/70327
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-01-15 15:56:48 +00:00
Simon Williams f9285e3483 spec: fix aux build by pinning old rubocop version
This reverts commit 2073553507.
This reverts commit 56381d06b4.

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

Change-Id: Ib7587e5ff9f3c00817f920506208a0e20444d379
Reviewed-on: https://gerrit.instructure.com/70356
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-15 06:09:04 +00:00
Michael Nomitch 4837d03d5c RCS - load tinymce on outcomes page remotely
fixes CNVS-26185

test plan:
  - with and without remote RCS flag
    - go to outcomes indes
    - you can edit the description
      of outcomes groups and outcomes
      like normal

Change-Id: Ifb294a2be5671938d4c42420bc7dfd6922689572
Reviewed-on: https://gerrit.instructure.com/69660
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 23:41:05 +00:00
Michael Nomitch a1821c8325 RCS - pass textarea height into tinyOptions
fixes CNVS-26395

test plan:
  - when creating an outcome using RCS
    or normal tinyMCE the sizes of the
    tinyMCE textareas are the same

Change-Id: I411d59af15a7b667d541ce04d253d83a4a771ef4
Reviewed-on: https://gerrit.instructure.com/70142
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2016-01-14 23:41:03 +00:00
Michael Nomitch bc2b578c48 RCS - admin announcements can load remotely
fixes CNVS-26161

test plan:
  - with an RCS set up
  - with remote RCS both on and off
    - go to accounts/:account_id/settings
    - go to the announcments tab
    - make an announcment
      - it works
    - make an announcement with missing message
      - the error message works
    - edit an assignment with a missing description
      - that error message works too

Change-Id: I4c3fc83fb59097f2ce5d4d0b868253c264ed477c
Reviewed-on: https://gerrit.instructure.com/69609
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 23:40:42 +00:00
Ethan Vizitei 26a4f89ab2 fix menu fail for admin links
refs CNVS-25916

mouseup is always accompanied by mousedown, but when it fires first
it messes up the kylemenu.  this fixes it.

TEST PLAN:
 1) groups_teacher_spec should pass webpack selenium build
Change-Id: I2978787feadd5b31ae5a7d258c5f27cc4f9536eb
Reviewed-on: https://gerrit.instructure.com/69417
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 23:38:38 +00:00
Ethan Vizitei 56381d06b4 spec: fix aux build
rubocop wasn't version pinned, so jenkins got a later version,
and the aux build started failing because of a config difference.
this fixes the config and pins the version of rubocop

Change-Id: I5d94b779a8d29dac66ad0e121737816459c62ba3
Reviewed-on: https://gerrit.instructure.com/70337
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 23:38:15 +00:00
Brian Palmer 75b1a5dec5 move request_throttle code to app/middleware
It is a middleware so it was in the wrong place. This solves class
reloading problems in dev.

test plan:

request throttling should still function (you can look for "request
throttling increment" log lines) and should no longer cause "A copy of
Canvas::RequestThrottle has been removed from the module tree but is
still active" errors.

Change-Id: Ied6aaa6de4ac64ddfb14c80c76463f253b988bd7
Reviewed-on: https://gerrit.instructure.com/70265
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2016-01-14 23:11:19 +00:00
Mysti Sadler 0fc95c39b8 Fix bug on survey stats
surveys w/ anon submissions and essay questions would get an error if anonymous and had an essay question.

Test Plan:
  * Create a new survey (graded or ungraded)
  * Turn on "Keep submissions anonymous" setting
  * Create an essay question for the survey
  * Publish the quiz
  * As at least one student, take the survey
  * As an instructor, view the survey statistics
  * Statistics for the quiz questions should appear

fixes CNVS-26408

Change-Id: Ic10f30a6045f75fc72ee482a6536c05bbf11a4e5
Reviewed-on: https://gerrit.instructure.com/70211
Reviewed-by: Marc Alan Phillips <mphillips@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2016-01-14 22:43:40 +00:00
Ethan Vizitei 2073553507 build: Fix aux build failure in script/rlint
Parser::CurrentRuby hadn't been loaded in some cases, requiring
explicitly makes sure it's always available here.

TEST PLAN:
 1) aux build should pass

Change-Id: Ic5d2ef0ebbd8673e9ccec0c6617be49ef451f617
Reviewed-on: https://gerrit.instructure.com/70305
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Rob Orton <rob@instructure.com>
2016-01-14 21:31:26 +00:00
Davis McClellan 8b3d1abcdb Make "Discrimination Index" Button on stats page KB accessible
fixes CNVS-25739

test plan:
- Go to a quiz's stats page
- Try to access a question's "Learn More About Discrimination Index"
  via the keyboard
- Test on all supported browsers (initially failed on IE)

Change-Id: Id18207cb85272ed3df05662285f2804a8f451624
Reviewed-on: https://gerrit.instructure.com/69817
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2016-01-14 21:17:48 +00:00
Davis McClellan 8603f9f2f0 Make elements accessible via keyboard on assignment edit page
fixes CNVS-25669

test plan:
- Go to assignment edit page
- Select "GPA Scale"/"Letter Grade" on "Display Grade as" dropdown menu
- Ensure that the '?' button and the "View Grading Sceme" are accessible
  Via keyboard (Note that the '?' button only appears on the "GPA Scale"
  type)
- Test on all supported browsers

Change-Id: I87f3ce143658c488793763391541a98cac6f4047
Reviewed-on: https://gerrit.instructure.com/69812
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2016-01-14 21:17:41 +00:00
Ethan Vizitei 4f797398d9 fix quizzes/quizzes_stats_spec.rb in selenium
refs CNVS-25916

the "app" directory as root is only present for docker users.
we can just remove it from the matchers for jsx loaders
and then these work on jenkins too.

TEST PLAN:
 1) spec/selenium/quizzes/quizzes_stats_spec should pass in selenium
    webpack build

Change-Id: I51f915452de5f4a3f98407d6e3b90a4b18a8671e
Reviewed-on: https://gerrit.instructure.com/70292
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 20:35:44 +00:00
Davis McClellan 775e5622ac Remove <span> within <i>
fixes CNVS-26029

test plan:
- Ensure that there are no <span> within <i> on the quiz taking page
  (specifically on the next and previous buttons on OQAAT quizzes and
  the "This is a preview of the draft version of the quiz" message
  icon after previewing a quiz).

Change-Id: Ic9ec6e92316711ea1cdc7188b0ef4c673204c325
Reviewed-on: https://gerrit.instructure.com/70050
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2016-01-14 20:16:36 +00:00
Davis McClellan 3ca6e6e58b Remove extra "next" and "previous" messages for screen readers
fixes CNVS-25450
fixes CNVS-25444

test plan:
- Take a OQAAT Quiz
- Ensure that the next and previous buttons are only read once
- Test on all screen reader combonations
  (note: in NVDA ensure that pressing down doesnt repeat the next
  or previous message.)

Change-Id: I49ae2adde4251b848196cfe4142097785a336091
Reviewed-on: https://gerrit.instructure.com/70048
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2016-01-14 19:56:58 +00:00
James Williams d880c25f1c reduce the number of calls to delayed_jobs_shard
Change-Id: I81c0710d8b1f9402af503ff69fb53d6b28347c86
Reviewed-on: https://gerrit.instructure.com/70250
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-14 18:16:36 +00:00
James Williams ea5edae0cc rails 4.2: remove format from api route set mapper
not needed, makes ".json" appear in url helpers

refs #CNVS-26056

Change-Id: I6287bff2c3bde465ef4ca2ca751e969eac55f91b
Reviewed-on: https://gerrit.instructure.com/70186
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-14 18:02:48 +00:00
James Williams 15a750b5d0 fix inlineable attachment rendering
test plan:
* enable canvadocs
* in the console, add "text/plain" as a valid mime type by running
 the following

Setting.set('canvadoc_mime_types',
 JSON.dump(Canvadoc.mime_types + ["text/plain"]))

* upload the html, image and css files from the course
 referenced in the ticket

* previewing the html should show the images

closes #CNVS-26287

Change-Id: Ica665d953d8a405a45ab0920e8a3b70ca71cedfd
Reviewed-on: https://gerrit.instructure.com/70109
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2016-01-14 16:54:53 +00:00
Transifreq 54b96e6ada update hy translation
Change-Id: Iabc163f991806856dd57e8d28875a52f0dde5ef4
2016-01-14 05:14:26 -07:00
Jon Jensen e5bc28b925 fix debugging timeout hooks
as of recent byebug versions, `Byebug.started?` isn't defined until you
call debugger (or otherwise require 'byebug/core')

test plan:
1. jenkins should pass (it did before, inexplicably)
2. `rspec ./spec/lib/cuty_capt_spec.rb:64` should pass

Change-Id: I86879dba46565f0b6a97206456fe34c3cd265f09
Reviewed-on: https://gerrit.instructure.com/70206
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-14 03:02:48 +00:00
Ethan Vizitei aa477b031c Fix webpack selenium specs for course/account searches
refs CNVS-25916

alias case-sensitive file names so they build
the same on Linux as OS-X

Change-Id: Ib36193d7f7a6c3f77e4eac6e5650ea549747b957
Reviewed-on: https://gerrit.instructure.com/70203
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:34:06 +00:00
Ethan Vizitei b271b5d694 build quiz log auditing w/ web pack
refs CNVS-25916

Use an AMD-rewritten version of old react-router
and expose some of reacts internals that
react-router depends on (named AMD across files
is something web pack does not support), and leave
the other version for the require-js build for now.

Also, add gulp rev as a web pack post build action.

TEST PLAN:
  1) regression check QLA and Quiz Stats
     to make sure reworking their dependencies didn't
     crash everything

Change-Id: Id2b448a334494ebd3d353678742bf07c1b7833eb
Reviewed-on: https://gerrit.instructure.com/69837
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:33:38 +00:00
Ethan Vizitei 81561784e0 web pack port of quiz statistics
refs CNVS-25916

remove dynamic requirements for env configs,
use separate jsx loader for client apps,
update client app plugin to use old react version,
rewrite selenium spec to be an integration test
rather than executing arbitrary javascript,
and MAJORLY refactor loading patterns of client apps
to avoid sharing code with differences delineated
by opaque require re-writes.

Also moved some code that was in "common" client
app but only used by one actual client app down
into the app that uses it (simplifies dependency
tracing).

TEST PLAN:
 1) make sure quiz statistics still works ok under
    require js build, no behavior should have changed
 2) also make sure quiz log auding works under require-js

Change-Id: I0e5ee3eda9da16e0ad48cf858761735c71df801c
Reviewed-on: https://gerrit.instructure.com/69804
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-14 00:33:19 +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
Colleen Palmer 6491cfbc10 Add fix for h4 font size regression
fixes: CNVS-26346

This addresses a regression pertaining to new ui <h4> tags displaying
at a small font size.

Issue was caused by selector tags being turned into classes. Fix is to
revert them back to tags in the css.

Test Plan:
- Go into Canvas legacy UI and on a page that uses tiny mce, add an h4
header
- Switch to new UI, h4 header size should remain the same

Screenshot comparisons:

What is was: http://cl.ly/061g3T0k3f1u
What it should be: http://cl.ly/1x1M0M2W2n42

Change-Id: I5766cdb1d18f86d092562a23429b7af4d36a0e69
Reviewed-on: https://gerrit.instructure.com/70034
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2016-01-13 23:40:40 +00:00
Jon Jensen 0b5593e4d8 spec: retry thin server startup (within reason), fixes SD-692
* retry once immediately if we get `no acceptor` (e.g. maybe socket from
  setup_host_and_port isn't completely closed)
* if that fails, retry w/ different port a few times

test plan:
1. find a build w/ this commit where thin server startup fails (~5% of
   builds)
2. confirm the retry works

Change-Id: I4b0f58e34117512f3936921fe2c788a19933631f
Reviewed-on: https://gerrit.instructure.com/70022
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2016-01-13 23:18:59 +00:00
Cody Cutrer 82a712b741 require at least bundler 1.8.0
so we can rip out an old monkeypatched bugfix

Change-Id: Idbad934ac0f1e96a3e5e4883fc6b6fd92642756a
Reviewed-on: https://gerrit.instructure.com/70154
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2016-01-13 23:18:48 +00:00
Amber Taniuchi 4b03ff7d8e add aria-expand attribute to gb history toggle
The gradebook history page (/courses/x/gradebook/history)
has toggles that allow a user to expand/collapse a chart
that displays grades history. The toggle did not have
any aria labels, so added aria-controls, aria-expand, aria-label
and additional id's to make the toggle accessible.

fixes CNVS-25746

Test Plan:
In a course with students, assignments and submissions that have
been graded a few times:
1. Go to the Gradebook history page(/courses/x/gradebook/history).
2. Using a screenreader, use the assignment name link to toggle the 
grading history.
3. Ensure that screenreader reads a label for the toggle that is
descriptive and allows you to expand/collapse the chart.

Change-Id: I321424388ee0402ed4726faadd3b9e79fffc1d8b
Reviewed-on: https://gerrit.instructure.com/69994
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
2016-01-13 22:42:13 +00:00
Simon Williams 2258c53eaf link to specific group in new group notification
fixes gh-709

test plan:
- update a user's notification preferences to receive group
  notifications immediately
- add them to an account level group
- click on the link in the email
- it should take them to the group

Change-Id: I171c0a0d367d87dd274b4bd41d3fa15b890c7315
Reviewed-on: https://gerrit.instructure.com/65764
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2016-01-13 21:58:09 +00:00
Jonathan Featherstone b40f2b83cd Fix focus issue on discussion attachment remove
Test Plan:
  * Create a new discussion
  * Attach a file to discussion, and save
  * Edit discussion, notice that "x" appears to remove attachment
  * Using keyboard, remove attachment by tabbing to x button, and
    pressing return
  * "choose file" field should reappear and be focused

closes CNVS-22071

Change-Id: Ifddc44aa8b607260a3b91fd707934b1d490bd9fc
Reviewed-on: https://gerrit.instructure.com/63968
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2016-01-13 21:37:07 +00:00
Spencer Olson 02d7fcc16c spec: fix sad spec in groups_teacher_spec
Change-Id: I8a8efb18ec370aa9c4f8c25c49aaeeaab2f8eb23
Reviewed-on: https://gerrit.instructure.com/70179
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
Product-Review: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
2016-01-13 21:19:38 +00:00
Benjamin Porter 0a4256c0f3 OutcomesImports: make validation regex case-insensitive
With the newest GUIDs that AB rolled out, there are now some case
insensitive ones that need to be accepted.

Fixes CNVS-26378

Test Plan:

    * Attempt to schedule an import of outcomes that have lower-case
      letters in their guids and verify that you do not get an error
      returned saying it is an invalid GUID.  Suggested example:

      - curl -H 'Authorization: Bearer <your-token>'
        http://ab-vm:3000/api/v1/global/outcomes_import --data
        "guid=9426dcae-734c-40d5-abf6-fb748cd8be65"

Change-Id: I84e1b850e0e0b36e26b35c832d50fdb15c27bab8
Reviewed-on: https://gerrit.instructure.com/70163
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
2016-01-13 21:11:14 +00:00
Deepeeca Soundarrajan b325f9cd03 spec: Add shared examples for offline contents
Change-Id: Ib52d328d8d81a80764776fbe9c92870b2c4a6ec7
Reviewed-on: https://gerrit.instructure.com/69466
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2016-01-13 20:52:41 +00:00
Ryan Shaw 4fc0717207 show keyboard focus indicator for color picker in tinyMCE
fixes: CNVS-25689

test plan:
* in an RCE, open the "text color" or "background color"
  menu options using a keyboard.
* as you tab through the different colors, it should
  show a visual focus indicator of which item you have
  selected.

Change-Id: I2e17255f2681095b0514b669b295eba6bca70539
Reviewed-on: https://gerrit.instructure.com/69250
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-01-13 20:44:34 +00:00
Ethan Vizitei 3c6a09f25b stop dying on access tokens that base64 decode to JWT looking things
closes CNVS-26405

Some access tokens were generated which, when base64 decoded, happened
to have the right number of dot-delimited segments to look like a JWT,
and then the decoding library would choke parsing what it thought
was a JSON segment.  This catches that parse error, and lets
access_token processing continue.

TEST PLAN:
  1) create an access token for your user, and then overwrite it's token
     value to be the same token as is in the specs accompanying this
      patch set
  2) you should be able to use the APi with that token ok

Change-Id: I7d6ee4e2d40f1fef08bd223e90fdd8dca3bb5779
Reviewed-on: https://gerrit.instructure.com/70160
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2016-01-13 20:44:23 +00:00
Derek Bender 9d7932c36c Add guidelines section to CONTRIBUTING.md
Change-Id: If88ec199abc041ecb7022f260957003f00a4e967
Reviewed-on: https://gerrit.instructure.com/70187
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Derek Bender <djbender@instructure.com>
QA-Review: Derek Bender <djbender@instructure.com>
2016-01-13 19:50:06 +00:00
Jon Jensen dfff1c06bd spec: ensure changes to test gems trigger a full run
Change-Id: Ic770eba54f21682479042f9a3d3155fa11f2885b
Reviewed-on: https://gerrit.instructure.com/70177
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2016-01-13 18:59:28 +00:00