Commit Graph

11229 Commits

Author SHA1 Message Date
Michael Nomitch f9dae39292 pass custom options to RCS loader
fixes CNVS-25489

also extracted some code from eportfolios
for easier use in other files

test plan:
  - load RCE normally
    - it works fine
    - also run the c/29651 test plan
      (minus the unsupported IE versions)
  - load RCE via service on eportfolios
    - it works fine

Change-Id: I4eaf0ac1e11ae249c92a2cd2f9e249bc117986cd
Reviewed-on: https://gerrit.instructure.com/68349
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-18 20:18:44 +00:00
Davis McClellan 8dd7f687e0 Fix title for assignment create page to match expected value
fixes CNVS-25668

test plan:
- Create new assignment
- Ensure title on tab is "Create Assignment"
- Save assignment
- Edit Assignment
- Ensure title on tab is "Edit Assignment"

Change-Id: Ic64cee244ff0da31299679108b72b3f488bb0c99
Reviewed-on: https://gerrit.instructure.com/68702
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-12-18 18:59:25 +00:00
Cody Cutrer 3fcdb21a68 reformulate expensive quiz submissions query with a constant table
fixes CNVS-25930

test plan:
 * visit the quizzes page of a course as a teacher
 * it should not asplode

Change-Id: Iea4f65fc2abce992a67a77aeda237051f7ddf0c2
Reviewed-on: https://gerrit.instructure.com/69038
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2015-12-18 18:17:29 +00:00
James Williams 2fce56b063 change :rails3 cache shim for future re-use
refs #CNVS-25593

Change-Id: I073e1c196d8ad50818dca0bbf350e79bcfc4153b
Reviewed-on: https://gerrit.instructure.com/68940
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-18 16:32:19 +00:00
Cody Cutrer 71e5504568 re-work discussion entries query for major optimization
fixes CNVS-25948

Change-Id: I456a823f78778fff2b0e7e3f7625a8f869e73f6a
Reviewed-on: https://gerrit.instructure.com/69039
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-12-18 15:27:37 +00:00
Chris Hart 8b923c3cbc Fix Learning Mastery Outcomes text-wrap
Fixes: CNVS-25394

Test plan:

- This bug affects both Firefox and IE Edge on
  Windows 10
- Follow the instructions in the JIRA to create
  an Outcome and view it in the Learning Mastery
  Gradebook. Make sure the description is really
  long.
- Ensure the description is being truncated by
  ellipses after one line and that the layout is
  no longer being blown out (see the JIRA ticket for
  screenshot of bug). The page should now look like
  this: http://screencast.com/t/b5Jt5RZO

Change-Id: Ida2510fe2207b7f4694cdc895aa2b022dbb428ff
Reviewed-on: https://gerrit.instructure.com/68981
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>
2015-12-18 13:50:10 +00:00
Sterling Cobb 7bfaa916dd fix canvas modals accessibility issues
fixes CNVS-25910

When ReactModal was upgraded, it introduced a new API and changes some
behavior with setAppElement. Now, react modal accepts a property,
appElement and needs to be set. By default, it attaches to body,
however in canvas this is really bad because it will aria-hide the
entire application whenever a modal opens. This commit makes the
default attachment #application with an option to pass in a different
element if you'd like.

Test Plan

Make sure opening modals do NOT attach aria-hidden to the <body>
element. There are many places where canvas modal is used. Here are a
few know places. If they work, then its safe to assume its working
everywhere else.

- File Rename Modal (on the files page)
- File Move Dialog (on the files page)
- File Zip/Unzip Dialog (on the files page)

Test thoses spots, ensure aria-hidden is not on the body, instead it
should be attached on the div with an id of #application.

Change-Id: I606e46524b385da85f8b9cce4f41fd7449c9dec2
Reviewed-on: https://gerrit.instructure.com/68964
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2015-12-18 03:36:37 +00:00
Nathan Mills 6e71321634 refactor lti2 resource_link_id
enable lti2 for everyone

fixes PLAT-1244 PLAT-1239

test plan:

LTI2 UI feature flag should be gone

Everyone should be able to register an LTI2 tool

the lti2 resource_link_id param should be unique for every lti launch
placment

the lti2 resource_link_id param should be the same on every launch for
the same placement

Change-Id: I41d11faecd43d3b2878deb5d31e5595e2828e69c
Reviewed-on: https://gerrit.instructure.com/68882
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-12-18 00:07:52 +00:00
Cody Cutrer f79f9bce78 rework submissions query slightly to get index only scan
user_id is a NOT NULL column, so no need to check it

Change-Id: Id9df5a7fc1781ffba407ebb5980e43b0f851fd09
Reviewed-on: https://gerrit.instructure.com/69142
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-12-17 23:45:39 +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
Matthew Berns d84a396335 fix students seeing teacher/admin options for outcome groups
fixes CNVS-25372

test plan:
- as a student, go to the outcomes page
- you should not see any admin options (Move Outcome, etc)
  for outcomes or outcome groups
- as a teacher, go to the same page
- there should be no changes in appearance or functionality

Change-Id: I226605a184486e4478aeed62d42e4bee6fc738ca
Reviewed-on: https://gerrit.instructure.com/68450
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Tested-by: Jenkins
Product-Review: Matt Berns <mberns@instructure.com>
2015-12-17 23:02:01 +00:00
Colleen Palmer 7ebf3805c3 NUI - Unitless heights in Canvas
aka, the first path to better typography in Canvas

closes: CNVS-22189
fixes: CNVS-19894

This puts us on the road to using a unitless height in our line-heights on
Canvas. Here's the gist of what this commit covers:

- Affects both new UI and legacy. Will need a full-regression test.
Specifically we're looking for anything that looks extremely out of the
ordinary

- Line-height for <p> have changed from 20px to unitless ones set to 1.5
(yay #successibility) (note: there are probably areas where this is
explicitly being overwritten. we'll get there in other commits. globally
this has been set now though.)

- Font-sizes now show in rem sizing for better a11y and responsive
support. We are loading in our original 13px size, however, it is being
converted to rems

- Reworking bootstrap/scaffold & bootstrap/type & bootstrap_overwrites:
These will no longer be pulled into New UI css. They have been consolidated
into one file, components/ic-typography. These files were/are
controlling _most_ of the typographical styles in Canvas. Because of this,
we no longer need to load any of these into New UI in canvas.

This needs to be a very iterative amount of changing since these
fixes impact not only on a global scale, but can also hugely modify the
spacing and layout within a page in Canvas.

- Adding unitless variables & font variables: to match what Bootstrap was
pulling in, extra variables have been created in order to account for
things we eventually want to tweak in Canvas.

Test Plan:

UI devs - make sure you do a full re-compile and hard refresh

For New UI:
- These changes affect _all_ of Canvas and will need a full regression test
- For specific bug, CNVS-19894, go to an MCE area
- In edit mode, create list items and change sizes on the font (ie, one
line can be 12px, one 24px, one 36px, etc)
- In edit mode, they should no longer overlap each other
- Save edits
- In view mode, they should no longer overlap

For Old UI:
- The best way to know if this has change has leaked in from new UI is to
do the above plan with the edit mode in tinyMCE. If they function the same
then there are some issues with the css not compiling right
- Anything crazy out-of-the-ordinary. For the most part things should be
the same, or look slightly bigger/better

Change-Id: Id5a3ea22303f40e6685c6e2b93c607e2f3f03479
Reviewed-on: https://gerrit.instructure.com/65244
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>
2015-12-17 17:35:04 +00:00
James Williams 438541efeb fix login form through self-registration page
test plan:
* enable self-registration on the account in the console

Account.default.canvas_authentication_provider.tap do |aac|
 aac.self_registration = true
 aac.save!
end

* visit the self-registration page "/register"
* the login form in the upper-right corner should work

closes #CNVS-25585

Change-Id: I296976e58975c0c95337d7868c0c976085bc792a
Reviewed-on: https://gerrit.instructure.com/68887
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-17 14:55:54 +00:00
Jacob Fugal ae73993660 localize RCE loaded from service
fixes CNVS-25164

test-plan:
 - select a non-english locale for your user
 - load page that uses RCE from service (e.g. eportfolios)
 - the RCE should be localized

Change-Id: I6a324666e71f28d71a00dabfde5c1794e07d05a4
Reviewed-on: https://gerrit.instructure.com/68066
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2015-12-16 23:12:01 +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 fb18a410ca avoid .first.present?
it's ordered in Rails 4, so can cause far slower queries

Change-Id: Ifaee2b69aa95b4c406a02b053336ef171df9949f
Reviewed-on: https://gerrit.instructure.com/69032
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
2015-12-16 20:18:01 +00:00
Jeremy Stanley 8fa39bb5c3 fix fixDialogButtons
properly hide the original buttons rather than moving them
off the edge of the page but leaving them in the tab order,
which is terrible for accessibility.

test plan:
 - In the Add Module Item dialog and other places, there should
   not be two invisible tab stops before the cancel and submit
   buttons.

fixes CNVS-25731

Change-Id: I0fffa9530569470b8e01e430ebd0e0bc3f669f37
Reviewed-on: https://gerrit.instructure.com/68803
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-12-16 20:11:38 +00:00
Chris Hart 695c526fd4 Ensure a usable background/hover color in Canvas
Fixes: CNVS-25442

This commit adds a Sass function to ensure that
no matter what the user selects as $ic-brand-primary
in Theme Editor, the $ic-bg-light-primary variable
(which is generated from $ic-brand-primary) will not
look too dark or light.

Bug: http://screencast.com/t/rbvpiGiP
Fixed: http://screencast.com/t/S0B5lCjVzzMi

Test plan:
- This commit affects both legacy and new UI

  New UI:
  - Open Theme Editor. Change the Primary Color to
    #49181a
  - Click Preview Your Changes. In the Preview iframe,
    go to a course and go to Discussions index page.
  - Hover over a Discussion item. The background
    color should be #fbf3f4.

  Legacy UI
  - For legacy, $ic-brand-primary is always #0096db.
  - Go to the Assignments index page, hover over a
    list item and confirm that the background color
    is #f0faff.

Change-Id: Iacdaf5ec59ae1ea983166be71f2da892242755b6
Reviewed-on: https://gerrit.instructure.com/68946
Reviewed-by: Jennifer Stern <jstern@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2015-12-16 15:38:21 +00:00
Jeremy Stanley 1e355d8b90 spec: fix dashboard_url where @domain_root_account isn't set
test plan:
 CoursesController#enrollment_invitation
"should successfully reject invitation for logged-in user
 should pass on the first attempt

Change-Id: Iaf7bed92fb6a086f0b3def69c7b58970160e6231
Reviewed-on: https://gerrit.instructure.com/69007
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2015-12-16 14:49:16 +00:00
James Williams bbc6f7c238 direct to new mark when following link moderation page
test plan:
* create a moderated assignment
* submit to the assignment as a student
* as a ta, add a provisional grade
* visit the moderation page and add the
 student to the moderation set
 (so it shows a SpeedGrader link) in the
 2nd review column
* follow that link
* it should automatically open the "2nd Reviewer"
 tab (as though you add clicked "Add 2nd Review")

closes #CNVS-25723

Change-Id: Ia40ff3c47317f63df32b1142ff2f82ac574f71f6
Reviewed-on: https://gerrit.instructure.com/68965
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-16 14:02:19 +00:00
Matt Berns 29576815c3 Revert "address accessibility issues with quiz regrading options"
This reverts commit 8b7c771bfb.

Change-Id: I63a83ea82823b1442947d93d3251fe5e9c25843d
2015-12-15 22:02:58 -07:00
Cameron Matheson cff0ee2991 fix assignment groups api perf regression
closes CNVS-19971
closes CNVS-25776

Test plan:
  * gradebook and srgb should load
  * srgb should never have a "download submissions" button for quizzes

Change-Id: I30e82ab6526e98a9506579d0b609f50ee7b63da1
Reviewed-on: https://gerrit.instructure.com/68716
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-12-16 04:28:48 +00:00
James Williams 68d2d21bef don't grant edit rights on pages without read rights
test plan:
* create and publish a wiki page that can be edited by "Anyone"
* in a new browser window, visit the link for the page directly
* it should be unauthorized

closes #CNVS-25784

Change-Id: I0b0792eca80468bcba992612562a686d1691b852
Reviewed-on: https://gerrit.instructure.com/68779
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-12-15 22:26:59 +00:00
Dan Minkevitch 655f6b90f1 Split SIS & Login ID on People page
Closes CNVS-24792

Test Plan:
* If a user has SIS ID viewing rights, show the following
  two columns on the People Page: Login ID & SIS ID.
* If a user does not have SIS ID viewing rights, only
  show one column: Login ID

Change-Id: I073ea2f5fb70f1b07036997f3e3d21aca47b5689
Reviewed-on: https://gerrit.instructure.com/68742
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-12-15 22:12:28 +00:00
Pam Hiett bd805f1488 Fix Firefox max-width images from breaking the parent container
Fixes: CNVS-25138
note: this is another option vs width: 100%

test plan:
- as an admin using new UI create a new assignment and/or page
- within that new creation add a very large image (for testing
  purposes set it to about 4000px wide)
- originally in Firefox the oversized image was breaking the
  parent container and pushing all of the content outside the
  width of the browser
- the very large image should now stay within the constraints
  of the browser image for both teacher and student

Change-Id: I5c2b3a092680ce269068ee8165d27aaabd84c1f7
Reviewed-on: https://gerrit.instructure.com/68475
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>
2015-12-15 22:01:16 +00:00
Sterling Cobb 8ab9e166f2 fix focus issues on edit module settings dialog
fixes CNVS-25728

Ensure focus halo shows up when tabbing to prerequisites and
requirements.

Test Plan

Given I'm on the modules page
And I have two modules set up
And I'm testing this in every browser (wooot)
And I'm using the keyboard to tab to links
When I tab to prerequisites
Then I should see a focus halo around the text
When I tab to requirements
Then I should see a focus halo around the text

Change-Id: I0a21933b377c45ca2465a7ab332ceb173ff8f8be
Reviewed-on: https://gerrit.instructure.com/68775
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2015-12-15 21:38:13 +00:00
Pam Hiett 100148b4af Show hamburger menu icon all the time, regardless of screen size
Fixes: CNVS-25179, CNVS-25180
Closes: CNVS-24113

test plan:
- as a user with new UI
- navigate to a course
- the hamburger menu icon should be visible which in turn
  shows the course sub-navigation by default
- user can collapse the sub-navigation as expected

Change-Id: I4ebc7ceee5a2ac1fd8d65ed5f023e9308f0a93d5
Reviewed-on: https://gerrit.instructure.com/67623
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Blake Simkins <bsimkins@instructure.com>
2015-12-15 21:36:22 +00:00
Clay Diffrient c7749438f1 [a11y] Remove aria progress bar information from files usage
This takes out the progress bar a11y stuff because the bar itself
is not an actual progress bar, but is rather a usage indicator.
It hides everything from screenreaders and provides them with an
explanatory bit of text instead.

closes CNVS-25695

Test Plan:
  - Go to Files
  - Using a screenreader go through the page to the files usage
    indicator.
  - The bar should not appear at all for the screenreader.
  - The screenreader should read "Files Quoata: XX% of XXX MB used"

Change-Id: Ibb84ffc3c154b4a81ca8d85bf446d546175909b3
Reviewed-on: https://gerrit.instructure.com/68618
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-12-15 21:20:10 +00:00
Sterling Cobb 99a8a115e1 fix file preview for react modal upgrade
fixes CNVS-25786

ReactModals different api put aria-hidden back on body.

Test Plan

In new files, open a file with the file preview window. Check the body
of the HTML in the dom. There should NOT be an 'aria-hidden=true'
attribute on the <body> element.

Open a file in the new files preview window with screen readers. It
should be accessible again.

Change-Id: I301cc08d1b2ecd6a8d01b8f4877af0bea671e0c1
Reviewed-on: https://gerrit.instructure.com/68722
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2015-12-15 20:56:52 +00:00
James Williams 0b07f8f115 update api and sis csv documentation for inactive enrollments
closes #CNVS-25906

Change-Id: I02512e4128de1b99aaf39461f52d5db16837923c
Reviewed-on: https://gerrit.instructure.com/68944
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 20:35:34 +00:00
John Corrigan 8b291e2b04 update learning outcome question request relation declaration on LORs
Learning outcome question results should be `dependent: :destroy` on
LearninOutcomeResults.

refs CNVS-24296
fixes CNVS-25725

test plan:
- Create a learning outcome result that has a learning outcome question
  result.
- Destroy the learning outcome result.
- Validate that the related learning outcome question result has also
  been destroyed.

Change-Id: Ib4455ee6a972c205e3eafa2bc996c9657776aa76
Reviewed-on: https://gerrit.instructure.com/67633
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2015-12-15 19:18:27 +00:00
Matthew Berns 8b7c771bfb address accessibility issues with quiz regrading options
fixes CNVS-15134

test plan:
- go to a quiz that some students have already taken
- change the correct answer on one of the questions, a dialog with
  regrading options should be presented
- you should not be able to change the correct answer until an option is
  selected and hitting 'update' on the dialog
- update the question, but do not save the quiz
- refresh the page and go back to that question, the option you selected
  should show text for its regrade option on the answer and reflect that
  it's the correct answer
- save the quiz and return to the question
- the regrade text should not appear on the newly updated correct answer
- create a new question
- you should not be prompted to choose a regrade method when changing
  the correct answer on the new question
- when closing the dialog box, via either cancel or update, focus should
  return to the triggering element and not get lost on the page

Change-Id: I500d018e6067436e6147e39c902af0002e61b7f7
Reviewed-on: https://gerrit.instructure.com/57090
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2015-12-15 19:07:41 +00:00
Clay Diffrient 0494955aab Merge branch 'localstor-name-dld-fix' from https://github.com/patchin/canvas-lms.git
Reviewed-on: https://gerrit.instructure.com/7549
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>

Change-Id: I55af00fbb0942f8b2604a12c5d9c647f78b59cd2
2015-12-15 12:04:54 -07:00
Sterling Cobb 08cb62f3ad fix new files cog menu tab order
fixes CNVS-25694

Tab order was getting messed up because the kyle menu was being
appended to the body.

Test Plan
Go to new files
Tab to the "Actions" menu (the one with download, rename etc)
Click/press space bar to open it
Then press tab or tab+control
Pressing tab should close the menu and take you to the next item
Pressing tab+ctrl should close the menu and take you to the previous
item

Change-Id: I5ef29734683f8efefa383fd6b298fd56b864b356
Reviewed-on: https://gerrit.instructure.com/68732
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2015-12-15 18:47:15 +00:00
Clay Diffrient 249ecf962d Merge branch 'ckhatri/master'
Change-Id: I8615d996823c2fc6ea9b3a346ba8c3863ce83490

Reviewed-on: https://gerrit.instructure.com/68340
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-12-15 11:42:48 -07:00
Jeremy Stanley 3b38815288 scope channel_id to calling user in notification preferences
test plan:
 1. identify a "victim" user's communication channel ID
    (for example, by creating a communication channel such as
     SMS as watching the id returned via the browser
     debugging tool network tab)
 2. as an "attacker" user, in Firefox, open the network
    tab in the browser debugging tools, and then go to
    Notification Preferences in Canvas and set a preference
    for a notification (for example, set Due Date to ASAP)
 3. in the network tab, click the "communication_update"
    AJAX request and click "Edit and Resend"
 4. change the channel_id to the victim's communication channel
    id from step 1 and click Send
 5. the edited AJAX call should fail with a 404 (because
    _you_ don't have a communication channel with that id)

fixes CNVS-25779

Change-Id: I1aa94f84ed2df6c3a3d97d16add169ac0fe44694
Reviewed-on: https://gerrit.instructure.com/68713
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-12-15 18:40:14 +00:00
Davis McClellan df114f40a8 Add an icon to quickly toggle post to SIS setting
fixes CNVS-25467
fixes CNVS-25468

test plan:
- Go to assignment and quiz page
- Ensure that "Post grade to SIS enabled" icon is attached to
  all assignments that have the option enabled and that
  "Post grade to SIS disabled" icon is on the rest.
- Click "Post grade to SIS enabled" icon and ensure that
  it toggles on the screen and that the option toggles for the
  assignment
- Ensure that the icon is accesible
- Check that tooltip on icon is correct on both toggle positions
- Disable post grades to SIS at the account level
- Check both quizzes and assignments to ensure that the icon is
  no longer there

Change-Id: Ib6682a7ca4d77dcc9a5e05095e33920eac981e9b
Reviewed-on: https://gerrit.instructure.com/68635
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Rajkumar Kethavath <rkethavath@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-12-15 18:17:59 +00:00
James Williams 097c0d9266 retrieve updated_at for Account#fast_all_users
rails 4 will error when trying to access a missing attribute,
 so cache_key will break for these users

closes #CNVS-25791

Change-Id: I318274b451c03bfce404f04b5942179f03c9dfb0
Reviewed-on: https://gerrit.instructure.com/68856
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-12-15 18:05:46 +00:00
Aaron Cannon 5432e2af8d A11y: Makes Dashcard/Activity toggle a button
Fixes CNVS-24962

Test plan:
- With a screen reader, examine the toggle.
- Verify it is read as a button.
- Verify the label changes when it is toggled.
- Verify that the toggle continues to function as it previously did for
  non-screen reader users.

Change-Id: I59d66c897ba9c9a2979699faea9c498d11cfc344
Reviewed-on: https://gerrit.instructure.com/67371
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>
2015-12-15 17:35:49 +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 b175ba3cf1 Update react-modals in Canvas
Fixes: CNVS-25178

React modal has changed in Github, causing style
regressions in the react-modals in Canvas, which
are laid out with flexbox.

Test plan:

List of modals fixed. They should function just
like they did before, but without the extra
scrollbars and spacing introduced by the regression
currently on beta.

- Theme Editor
- Styleguide
- External tool placement
- Add app
- Delete external tool
- Edit external tool
- Course checklist
- New files preview
- ZipFileOptionsForm (new files; upload a zip file
  to view)
- Move file (new files)
- Rename file (new files)
- Add external tool
- New user modal
- New course modal
- Teacher note modal (gradebook)

Change-Id: Id3f349bbfdc8660614208add3717e2574fb4c56a
Reviewed-on: https://gerrit.instructure.com/68392
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-12-15 13:52:34 +00:00
Spencer Olson 440933e3dd react-gb: fix pagination
previously, the react-gb would not
load for > 200 students. it should
now load for > 200 students.

closes CNVS-25483

test plan:
1. Turn on GB Performance
2. Enroll 201+ students in a course
3. Go to the gradebook and verify it loads

Change-Id: Id6275c1a18fa2e61353f580e298af6a57b7f9535
Reviewed-on: https://gerrit.instructure.com/68753
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-12-14 23:16:08 +00:00
Michael Nomitch d692a83efd RCS - allow instructure record call via event
refs CNVS-25536

test plan:
  - with MCE loaded on non eportfolio page
    - you can record a media comment like usual

  - eportfolios with tinyMCE loaded via service
    - it loads properly (though you wont be
      able to add a media comment)

Change-Id: I892eb6033a18d67d712bda2f1bf7528533cf3ff6
Reviewed-on: https://gerrit.instructure.com/68224
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-14 23:01:06 +00:00
Michael Nomitch 6fa581278d RCS - initialize external tool plugin via event
refs CNVS-25535

test plan:
  - with MCE loaded normally
    - external tools are added to the tinymce
      toolbar
    - they work like normal (test multiple
      external tools)

  - eportfolios with tinyMCE loaded via service
    - loads normally and works
      (external tools arent used on this page
       so cant test this remotely until we
       add remote RCS to a different page)

Change-Id: I1ce0f9dc644d567d56615a61d7788ce42044bb2f
Reviewed-on: https://gerrit.instructure.com/68195
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-12-14 23:01:04 +00:00
Joel Hough 084e6e6540 don't dispatch discussion notification before creating linked assignment
fixes CNVS-25321

test plan
- create a graded discussion that is invisible due to
 differentiated assignments (see ticket for repro steps)
- ensure that students who cannot see the discussion do not
 receive a notification about the new discussion

Change-Id: I309b221b3641910809f9f073c8820e8331664f6f
Reviewed-on: https://gerrit.instructure.com/68526
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-12-14 21:51:21 +00:00
Derek Bender 15f65755db fix regression on deleting readonly objects
fixes CNVS-25770

Rails 4 will no longer destroy readonly objects and
because these objects are built through a query
that uses attributes on a readonly object, they are
also marked readonly and therefore they cannot be
destroyed.

This fix separates the fetching of ids from building
the list of objects to be destroyed.

ref: rails/rails#a8b370f

Test plan:
  - have a group assignment submission in speedgrader
    with comments
  - delete a comment
  - the comment should delete without an error

Change-Id: Ic7957b037891863c7c52c3ff214c8741e928e173
Reviewed-on: https://gerrit.instructure.com/68829
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2015-12-12 14:17:21 +00:00
Strand McCutchen 69741dfbcf don't htmlEscape urls in assignment
fixes CNVS-25850

Test plan:
 0. Go to Gradebook in a Course with Assignments.
 1. Click on the name of the assignment.
 2. Verify that the assignment show page loads.

Change-Id: Id876d582b538eea175bb207fbba58a8a4832a699
Reviewed-on: https://gerrit.instructure.com/68825
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Pedro Fajardo <pfajardo@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2015-12-12 14:17:00 +00:00
Dan Minkevitch 2e2eaa58b4 Fix URL parsing for mediaCommentThumbnail
Fixes CNVS-25238

Test Plan:
* Upload a media file to the Files tab
* Unpublish or lock the media file
* Add the file to a page or other RCE-editable text area where
  previews are available
* View the page, etc. as a student
* The media previews should not be visible or playable in any browser,
  including IE 11 and Edge

Change-Id: I6487317273927bd66cd456027bc4c48048c86dad
Reviewed-on: https://gerrit.instructure.com/68737
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-12-12 00:43:20 +00:00
Jon Willesen 1dd8167084 Revert "add graded anonymously indicator to grade summary page"
This reverts commit 3442e94b46.

Adding a whole column to the top level list of this page put
too much attention on something that most institutions don't
use or care about. So we're removing it.

fixes CNVS-25718
refs CNVS-21538

test plan:
 - student grade summary page should no longer show "graded
   anonymously" column.
 - student grade page should still work and look good in all its various
   configurations.

Change-Id: I2933bb55c6839bfa01f09c3d403f103a6e95eb6c
Reviewed-on: https://gerrit.instructure.com/68504
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-12-11 22:57:20 +00:00
Dan Minkevitch d239d5a531 Fix edit assignment styles
Fixes CNVS-25014

Test Plan:
* As a teacher, edit any assignment
* The edit assignment page should appear, correctly formatted
  for all browsers, with new styles enabled as well as for the legacy
  styles

Change-Id: Ia14134497b5d6910942842634f08fbcdcd7ee844
Reviewed-on: https://gerrit.instructure.com/68233
Tested-by: Jenkins
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2015-12-11 22:46:03 +00:00