Commit Graph

30146 Commits

Author SHA1 Message Date
Simon Williams b4fde1f11b used ignored_columns instead of DROPPED_COLUMNS
closes CORE-1245

recent internal changes in rails (released in 5.1.6) make it more
difficult for our module prepend to work, because column information is
no longer referenced lazily when checking on attribute defaults (see
changes to model_schema.rb). this means that we would need to tie in at
a lower level so that _default_attributes excludes the dropped column,
but in looking at that, Rails 5 added support for ignoring columns,
which ties in at the right level and should solve the same use case we
have.

see http://api.rubyonrails.org/classes/ActiveRecord/ModelSchema/ClassMethods.html#method-i-ignored_columns-3D

Change-Id: I1f76e9d0894551f90232a36f5d48f27f8989c3a1
Reviewed-on: https://gerrit.instructure.com/145723
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2018-05-04 20:53:26 +00:00
Jeremy Stanley 29dbbf588d fix sorting files inside folders containing '?'
test plan:
 - have a folder with a question mark in its name
 - enter that folder in the files tab
 - attempt to use the column headers to sort the files
 - this should work (and the page shouldn't break)

fixes ADMIN-1004

Change-Id: Ibb4c7c046baabd1fcfaeeb0a651de601437143fd
Reviewed-on: https://gerrit.instructure.com/149006
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2018-05-04 19:35:31 +00:00
Ryan Shaw 850240b00e Have screenreader say “add people” not “+ People”
Fixes: CORE-1365

Test plan:
* When a screen reader user focuses the + People button,
  it should say “Add People"

Change-Id: I3d44ec698c09fcd95ee6fbbc71ca3292e941b146
Reviewed-on: https://gerrit.instructure.com/149141
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-05-04 19:15:41 +00:00
Clay Diffrient 27f41bed33 Convert SaveThemeButton to class syntax
closes CORE-1372

Test Plan:
  - Go to theme editor
  - Make a change
  - Preview the change
  - Save the theme
  - Celebrate it working

Change-Id: I1cc951c8b558a2a3aef02806fab7195b55127191
Reviewed-on: https://gerrit.instructure.com/149066
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2018-05-04 19:09:47 +00:00
Ed Schiebel 552f221d11 Merge 3 or more empty days
fixes ADMIN-199

test plan:
  - have a user with some items in the planner, in the past and the
    future
  - have a couple future items separated with 2 empty days between them
  - have a couple future items with 3 or more days between them
  - load the planner
  > expect only days in the past with items to be shown
  > expect yesterday, today, and tomorrow to always be shown, whether
    they have items or not
  > expect the stretch of 2 future empty days to be individual empty days
  > expect the stretch of 3 future empty days to have a single
    "start to end" grouping with a pretty picture saying "nothing planned"
  - create an item so it's the only one on a day, then delete it
  > expect it to be deleted (and the browser not to go into an infinite
    loop)

Change-Id: I4fbdc210501103396946f7b343e2ccbd488d9919
Reviewed-on: https://gerrit.instructure.com/147973
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Christi Wruck
2018-05-04 18:32:03 +00:00
Landon Gilbert-Bland 5fb17bced5 Fix blueprint lock/unlock button in slave course
Fixes COMMS-1096

Test Plan:
  * Enable the Blueprint Courses feature flag.
  * Enable Section specific discussions feature flag.
  * Create a new course.
  * In this course, go to the course settings page, and check the
    "Enable course as a Blueprint Course" setting. Make sure to scroll
    to the bottom of the page and click the "Update Course Settings"
    button to save this change.
  * Create a couple announcements and discussions in this course, and
    lock at least one announcement and discussion. There is a button to
    do this in the announcements and discussions index page.
  * On the index pages, make sure you can use the blueprint lock button
    with keyboard only navigation and a screen reader.
  * Create another new course.
  * On the original course you created, click the blueprint options pane
    on the very upper left side of the screen (looks like a blue tab).
    Click the associations button in there, and add the new course that
    you just created as an associated (slave) course to this master
    course.
  * Wait for the slave course to sync. You might need to have delayed
    jobs running for this to work? You can view the status in the same
    blueprint options pane we accessed in the last step.
  * Go to the slave course and make sure that the blueprint lock button
    shows up in both the announcements and discussions index pages. Make
    sure that you cannot focus or press that button with keyboard only
    navigation. Using a screen reader, make sure that it tells you what
    the button is, and that the button is dimmed (not clickable). The
    screen reader should announce the current locked state of the
    discussion topic, as well as title of the discussion topic this is
    for.

Change-Id: Iaa913b2f62215d753cf577129f0c3b30e2e32c6d
Reviewed-on: https://gerrit.instructure.com/149117
Tested-by: Jenkins
Reviewed-by: Venk Natarajan <vnatarajan@instructure.com>
Product-Review: Steven Burnett <sburnett@instructure.com>
QA-Review: Steven Burnett <sburnett@instructure.com>
2018-05-04 18:24:06 +00:00
Matt Sessions 2b201e7bb4 Make todo api work for past due todos
Refs MBL-10173

Test Plan:
 - Regression test the test plans from the
   following two commits
   https://gerrit.instructure.com/#/c/134699/
   https://gerrit.instructure.com/#/c/140671/
 - Create an assignment that is due in the future (less than 1 week) and requires submission
 - Create an assignment that is past due (less than 4 weeks)  and requires submission
 - Create an assignment in the future (less than 1 week) that does not requires submission
 - Create an assignment that is past due (less than 4 weeks)  and does not require submission
 - As a student in that course hit /api/v1/users/self/todo
 - The student should have 3 todos
    - the assignment due in the future that requires submission
    - the assignment due in the past that requires submission
    - the assignment due in the future that does not require submission
 - The student should not see a todo for the past due assignment not
   requiring submission

Change-Id: If097f4da041583e0a5a8b1ada8c4fadabed2bfa5
Reviewed-on: https://gerrit.instructure.com/147768
Reviewed-by: Mysti Sadler <mysti@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Matthew Sessions <msessions@instructure.com>
2018-05-04 17:17:46 +00:00
Jeremy Neander c2255eb0fd spec: restrict selector in spec
test plan:
 * verify Jenkins passes

Change-Id: Ie53db8979710563b3591a3a613b6dd8e9043c247
Reviewed-on: https://gerrit.instructure.com/149226
Reviewed-by: Adrian Packel <apackel@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Neander <jneander@instructure.com>
QA-Review: Jeremy Neander <jneander@instructure.com>
2018-05-04 17:04:59 +00:00
James Williams c45d0c2e96 re-queue sis blueprint association sync if one is in progress
test plan:
* specs, mostly because setting up a parallel sis
environment isn't worth it

closes #ADMIN-1012

Change-Id: I6e87a869a0b211b5cf8fe21e64bd43c151c3e735
Reviewed-on: https://gerrit.instructure.com/149075
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2018-05-04 16:38:42 +00:00
Jon Willesen d976d4506e remove old code from planner
the old code probably got reintroduced while resolving a merge conflict

fixes ADMIN-1014

test plan:
- open edit tray, then cancel
- should be no console error

Change-Id: I441c72731ef11c34c1139e7f165935099813a014
Reviewed-on: https://gerrit.instructure.com/149151
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-05-04 16:23:11 +00:00
Jon Willesen 2afef278bd center "load prior items" on planner dashboard
this keeps it from appearing under the new activity button and matches
the position of the load more button.

fixes ADMIN-1001

test plan:
- have new activity, tab to the load prior items button.
- it should appear centered instead of behind the new activity button

Change-Id: I7b7a95d3e128f2cf7dac60f66ab7da8ccb49f1c7
Reviewed-on: https://gerrit.instructure.com/149126
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-05-04 16:10:18 +00:00
Ryan Shaw e7fdd778e5 RTL: Fix user_list_boxes
Fixes: ADMIN-1008

Test plan:
Be logged in as an admin
Go to the 'Settings' page for the account
Click the 'Admins' tab
Click '+ Account Admins'
Enter a username that is currently in the account
Click 'Continue'
it should look right in both RTL and LTR

Change-Id: I656f254e22cd0a5e11a648b55928eea93024e021
Reviewed-on: https://gerrit.instructure.com/149153
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-04 15:29:19 +00:00
James Williams c252ba90b3 use consistent capitalization in modal title
closes #CORE-1370

Change-Id: Idc3f5ad5d80884b961ed237518ddee9094f6802d
Reviewed-on: https://gerrit.instructure.com/149132
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-04 15:28:11 +00:00
James Butters 20ff6b45d9 spec: add loading_locator to in_frame
fixes: GRADE-1007

Change-Id: I55dac6214b7275611524d4076126a8fa3cb77163
Reviewed-on: https://gerrit.instructure.com/149162
Tested-by: Jenkins
Reviewed-by: Robert Lamb <rlamb@instructure.com>
Product-Review: Robert Lamb <rlamb@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
2018-05-04 15:25:35 +00:00
Michael Hargiss 89f287444a add contract testing readme
refs QUIZ-4175

Test Plan:
  - qa-cr

Change-Id: I8713c0dd007000037e774136ee37770eb90c9970
Reviewed-on: https://gerrit.instructure.com/149118
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
QA-Review: John Corrigan <jcorrigan@instructure.com>
2018-05-04 15:13:29 +00:00
Steven Burnett 6c4ce74db4 fix sidebar names to match real navigation
Test Plan:
- Ensure the wiki side bar looks like the
  text found in the below link
https://community.canvaslms.com/ideas/7870-change-link-names-to-reflect-tool-names

Change-Id: If962fdfd89e03aceeb4cb24e1a21c536805c75cf
Reviewed-on: https://gerrit.instructure.com/148402
Product-Review: Christi Wruck
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Burnett <sburnett@instructure.com>
2018-05-04 13:19:51 +00:00
James Williams a5faa4e6cf don't send notifications to deleted account_users
test plan:
* create an account admin
* remove them as an admin
* create a new account admin
* it should not send a notification to the deleted admin

closes #COMMS-865

Change-Id: I22c57f6e448a9d9634dfd776d255c690273aae51
Reviewed-on: https://gerrit.instructure.com/148376
Reviewed-by: Steven Burnett <sburnett@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2018-05-04 13:01:28 +00:00
James Williams 21b0f1e167 don't cache blank image thumbnail
closes #CORE-1357

Change-Id: I4c911ece69aa7e17e74bc8f6a2307f9a00ff4ddc
Reviewed-on: https://gerrit.instructure.com/148916
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2018-05-04 12:24:45 +00:00
Transifreq 206fe775b1 update nb translation
Change-Id: Ie5c650a01ce134a373a16df0f112008ffc6928ac
2018-05-04 05:22:31 -06:00
Jeremy Stanley 86fe63bd13 fix quizzes2 exports with ungraded quizzes and post-to-SIS
also ensure a failed export leaves the job marked failed,
rather than stuck in "exporting"

test plan:
 - enable post to SIS in a course
 - create an ungraded (practice or survey) quiz
 - attempt to migrate it to quizzes2
 - it should not fail and leave content exports stuck

fixes ADMIN-990

Change-Id: I717153e62f03be8a5f3974bec925377e608c08df
Reviewed-on: https://gerrit.instructure.com/148254
Reviewed-by: Steve Kacsmark <skacsmark@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
Tested-by: Jenkins
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2018-05-04 01:44:48 +00:00
Frank Murphy a25e641603 Fix eslint
Change-Id: I6b3d0e18fcdbed89b3ce166729e3c61e4ad586d4
Reviewed-on: https://gerrit.instructure.com/149174
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-05-03 23:18:43 +00:00
Keith Garner 5f5c159fb0 make DDC calls more efficient if we can scope to specific users
This patchset changes calls of DueDateCacher.recompute_course to
DueDateCacher.recompute_users_for_course in places where we only have
specific enrollments or users we can work on and avoid doing the work
of the entire class.

fixes GRADE-1129

test plan:
 - specs pass

Change-Id: Ia6814e4584993bd9d0f2ba330eb33c3a635ca0e1
Reviewed-on: https://gerrit.instructure.com/148854
Tested-by: Jenkins
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2018-05-03 22:01:37 +00:00
wdransfield 6bfcac8e4f Allow setting developer key scopes via API
Closes PLAT-3313

Test Plan:
* Verify you can set scopes for developer keys in the
  create and update actions.
* Verify you can only specify valid scopes
* Verify developer key scopes are returned in JSON
  responses of API requests
* Verify the API token scoping FF must be enabled
  for these changes to work.

Change-Id: I2151c4ac98ae35287c5db6ea56887ba18a83d709
Reviewed-on: https://gerrit.instructure.com/148627
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2018-05-03 21:39:20 +00:00
Anju Reddy 43184480ab spec: add spec for moderation page permissions
fixes: GRADE-1093

Change-Id: I44cc6534310bbf1e22017d43b19624763fbec57c
Reviewed-on: https://gerrit.instructure.com/149122
Tested-by: Jenkins
Reviewed-by: Indira Pai <ipai@instructure.com>
Product-Review: Anju Reddy <areddy@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
2018-05-03 21:17:54 +00:00
Ryan Shaw 4393e1b7e6 a couple uglifyJS settings to make prod debugging easier
Test plan:
* run compile_assets in prod mode
* go to a page
* load a script in firefox/chorme devtools, 
* it shouldn’t kill the browser forever while it syntax highlights
  And each statement should be on its own line
* setting a breakpoint on any statement should be possible since they
  Are not all combined by commas

Change-Id: I978d93985c210afd8ab5a397af04a14e92847c5d
Reviewed-on: https://gerrit.instructure.com/149002
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-03 19:52:15 +00:00
Ryan Shaw 9219d2636f speed up font loading stuff a bit
closes: CORE-1329

See: https://www.zachleat.com/web/comprehensive-webfonts/#critical-foft-preload

Test plan:
* the lato font should load a little faster, especially for repeat
  page views

Change-Id: Ib070136ae02beb9e2f0213cc0247b2180de20666
Reviewed-on: https://gerrit.instructure.com/147704
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-03 19:44:27 +00:00
Jeremy Neander 0db6896f79 maintain precision of grades in grade input
fixes GRADE-1098

test plan:
 1. Create an Assignment
    a. with Display Grade as Percentage
    b. worth 9.5 points
 2. Open New Gradebook
 3. Grade a student on this assignment twice
    a. once with 55 (interpreted as percentage)
    b. again with 55% (explicit percentage)
 4. Verify grade is 55%
 5. Verify score is 5.225

Change-Id: Ie48ec7d5b787e864bfd3379e8dc6a4dbebebc2e5
Reviewed-on: https://gerrit.instructure.com/148848
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Matt Goodwin <mattg@instructure.com>
2018-05-03 18:36:03 +00:00
Mysti Sadler 632a5eee9a Remove remnants of Calendar 1
refs ADMIN-278

Test plan
- Specs pass
- /calendar and /calendar2 route both
  still work and calendar shows up as
  expected

Change-Id: Ic17a203417c354dbeaf7a5c68cc47e845c091850
Reviewed-on: https://gerrit.instructure.com/148061
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2018-05-03 16:31:21 +00:00
Jeremy Neander 1f7495b22c add @instructure/ui-a11y to canvas-planner dependencies
test plan:
 * ensure a successful build

Change-Id: Ia4a2bd8c84fc5325a9ed3f738a91cf89aa5f285c
Reviewed-on: https://gerrit.instructure.com/149060
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2018-05-03 16:04:03 +00:00
Jeremy Neander 7249fb0ac8 order grading period sets before pagination
fixes GRADE-1123

QA Notes:
  Ideally, this is a Dev-QA. Create content using the Rails console to
  save a ton of time.

test plan:
 1. Create 40 Grading Period Sets
 2. Visit the grading period sets api for each page

    /api/v1/accounts/1/grading_period_sets?page=1&per_page=10

 3. Document the ids for the grading period sets in the order they are
    returned
 4. Verify the ids are in ascending order
 5. Verify the ids have no duplicates
 6. Verify the ids include all active grading period sets

Change-Id: Ibedb6cb817c8ce23e0274c42a59f48be42726f02
Reviewed-on: https://gerrit.instructure.com/148985
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
2018-05-03 14:29:36 +00:00
Transifreq 1d10f9743a update tr translation
Change-Id: Ica282b34b3bd72c976047a8796059bbb4f8a7e53
2018-05-03 05:59:11 -06:00
Adrian Packel 11a73eaa3b spec: update moderated grading specs
refs GRADE-960

Change-Id: I498df3beee5845e33c9e1dd8649d5f24f14fc4f3
Reviewed-on: https://gerrit.instructure.com/148659
Tested-by: Jenkins
Reviewed-by: Indira Pai <ipai@instructure.com>
Product-Review: Adrian Packel <apackel@instructure.com>
QA-Review: Adrian Packel <apackel@instructure.com>
2018-05-03 11:00:13 +00:00
Adrian Packel 8029a889c4 Block non-moderators from editing assignments
If Anonymous Moderated Marking is on and an assignment is marked as
moderated and has a designated final grader, prevent teachers/TAs who
are not that final grader from editing the assignment's details (but
don't block admins).

closes GRADE-960

Test plan:

Setup:
- Enable Anonymous Moderated Marking on the root account.
- Create a course, and enroll two teachers (T1 and T2) and an admin.
- Create an assignment (A1).
- Using the Rails console, enable moderated grading for the assignment
  and assign T1 as the final grader (you'll also need to set the number
  of graders as shown below, but the specific value doesn't matter):

  > a = Assignment.find(<ID of A1>)
  > a.moderated_grading = true
  > a.grader_count = 3
  > a.final_grader_id = <ID of T1>
  > a.save!

- Create a second assignment (A2), and turn on moderated grading as
  above, but do *not* assign a final grader:

  > a2 = Assignment.find(<ID of A2>)
  > a2.moderated_grading = true
  > a2.grader_count = 3
  > a2.save!

Testing editability:
- Log in as T1:
  - You should be able to edit both assignments as usual
  - If you view the list of assignments for the course, the
    ellipsis menu at the right should have the Edit and Delete
    options enabled as normal
- Log in as T2:
  - When you view A1, the Edit button should be disabled.
  - Trying to edit A1 directly by appending /edit to the URL should
    result in an unauthorized access error.
  - If you view the list of assignments for the course, the Edit
    and Delete buttons for A1 should appear as disabled, and do
    nothing when clicked. For A1, they should work as normal.
  - You should be able to view and edit A2 as normal.
- Log in as an Admin:
  - As with T1, you should be able to edit all assignments as normal.

closes GRADE-960

Change-Id: Iccb33da1f08c98b88fd6f24665c9b0ba7772bd5e
Reviewed-on: https://gerrit.instructure.com/148161
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
QA-Review: Indira Pai <ipai@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-03 10:59:37 +00:00
Ubuntu b485de1d5d [i18n] update locales with new translations
Change-Id: I262c9dcf3ea5e7857dbb717de813a153409525e5
Reviewed-on: https://gerrit.instructure.com/149047
Tested-by: Jenkins
2018-05-03 07:42:39 +00:00
Mysti Sadler 2fe733666f Add calendar events to planner ui
closes ADMIN-971

Test plan
- Ensure calendar items from courses,
  groups, user and appointments show up
  on the planner with correct info
- Ensure all day events show up properly
- Ensure events group up with to do items
- Ensure item links to calendar and goes to
  the event (and opens it) when you click
  the link

Change-Id: I1a2ae654df785b0e2e8c010456ab6c666e0deabc
Reviewed-on: https://gerrit.instructure.com/148505
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Ed Schiebel <eschiebel@instructure.com>
Product-Review: Christi Wruck
2018-05-03 00:27:25 +00:00
Frank Murphy 956ba180ad Hide points in outcomes reports when necessary
Fixes OUT-2135

Test Plan:
- Create a course level outcome.
- In the course, create an assignment with a rubric containing the
  outcome as a criterion.
- In the rails console, set the hide attributes on the
  rubric association:
  > RubricAssociation.last.update(hide_points: true,
    hide_outcome_results: true)
- As a student, submit to the assignment.
- As a teacher, grade the assignment in speedgrader, giving points to
  the outcome in the rubrics.
- In account settings, run the "Outcome Export" report.
- Verify that the "outcome score", "learning outcome points possible",
  "learning outcome mastery score", and "learning outcome rating points"
  fields are all blank for the assignment you took.
- In account settings, run the "Student Competency" report.
- Verify that the "outcome score", "learning outcome points possible",
  "learning outcome mastery score", and "learning outcome rating points"
  fields are all blank for the outcome you created.

Change-Id: I5859552795dcdfd3420b034638529fe6bf1130e1
Reviewed-on: https://gerrit.instructure.com/148318
Tested-by: Jenkins
Reviewed-by: Augusto Callejas <acallejas@instructure.com>
QA-Review: Andrew Porter <hporter-c@instructure.com>
Product-Review: Sidharth Oberoi <soberoi@instructure.com>
2018-05-02 21:54:48 +00:00
Jeremy Stanley b4e52fff98 switch to uglifyjs-webpack-plugin
Closes: CORE-1361

Dev test plan: it should be possible to build production assets
without consuming 50GB of memory

QA test plan:
* run RAILS_ENV=production bundle exec rake canvas:compile_assets
* run app in prod mode eg: RAILS_ENV=production bundle exec rails s
  (Or however you do it with pow or whatever)
* look at the devtools and make sure you are seeing minified code and it
  no errors or 404s

Change-Id: I247080851c9df0c74b6c59432bc7086ea625df4b
Reviewed-on: https://gerrit.instructure.com/146336
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2018-05-02 21:36:55 +00:00
Ryan Shaw d9400fdeb0 ensure screenreader_gradebook can access ‘direction’
fixes: CORE-1328

This bundle includes it’s own copy of a bunch of the bootstrap css.
It should not do that in the first place since it is already included
In the common css bundle but it is, and some subtle styles depend on
It being loaded again in this bundle. So if it is going to do that,
It needs to have access to our ‘direction’ rtl sass helpers

Test plan:
* smoke test on screenreader gradebook page to make sure that styles
  still look the same as they did before

Change-Id: I96108b0f98dcddb1211aa21a4c0ed63125dda534
Reviewed-on: https://gerrit.instructure.com/147813
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2018-05-02 21:16:47 +00:00
Jon Willesen 03b0720194 load grades data into the planner grades tray
closes ADMIN-639

test plan:
- the course grades load in the grades tray
- course titles in the tray now link to the course
- if any course has multiple grading periods, it shows the "only
current grading period" caveat
- it displays a loading spinner and announces to screen readers when
grades are loading
- it announces to screen readers when grades have loaded
- it displays an error if there is an error while loading grades
- if you have many courses (more than 10), it still loads all the grades
data from all the courses (exhausts pagination)

Change-Id: Ic4ce71fd1ef222487873260ef25ba765d6e05680
Reviewed-on: https://gerrit.instructure.com/148170
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
2018-05-02 20:38:48 +00:00
Jon Willesen 524a1992a8 add initial grades tray to planner
this implementation displays the courses, but does not fetch the grades
yet. The grade values are just mocked for now.

closes ADMIN-638, ADMIN-640

test plan:
- check that the grades button and the grades tray match the design,
minus the header picture (which also isn't on the edit tray)
- it lists the courses you're enrolled in, but the grades are fake
for now.

Change-Id: Ieea58d70b91b013bf73df282e016db2bed57ecd9
Reviewed-on: https://gerrit.instructure.com/148022
Tested-by: Jenkins
Reviewed-by: Ed Schiebel <eschiebel@instructure.com>
Reviewed-by: Carl Kibler <ckibler@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Christi Wruck
2018-05-02 20:38:20 +00:00
Cody Cutrer 4e9e8a0b3f fix Attachment#url_ttl breaking when the account is missing
refs CORE-1359

Change-Id: Ia2f9a4726924fa0cd64eec0a7af10f55f9c3700a
Reviewed-on: https://gerrit.instructure.com/148939
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2018-05-02 19:27:41 +00:00
James Williams ea5dfb719f fix assignment duplication with rubric associations
closes #CNVS-42276

Change-Id: I1c980e750c44198001917ff89d3c9aad56827d56
Reviewed-on: https://gerrit.instructure.com/148903
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2018-05-02 19:18:32 +00:00
August Thornton bb5a83a431 spec: verify add dev key button only shows for account tab
closes PLAT-3316
refs PLAT-3307

test plan:
 * spec passes

Change-Id: I7d65bc50bcb402b3f4ca803dca268b81efd7608d
Reviewed-on: https://gerrit.instructure.com/148863
Tested-by: Jenkins
Reviewed-by: Weston Dransfield <wdransfield@instructure.com>
Product-Review: August Thornton <august@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2018-05-02 16:57:31 +00:00
Venk Natarajan 41ec03439a Rearrange discussion layout.
This takes the functionality in CourseItemRow and instead
implements the required parts in DiscussionRow.  This
amounts to a complete rewrite of CourseItemRow, and as
such will require thorough regression QA.

I made a bit of an effort to keep things shareable between
the two but it wasn't all working and I gave up to get this
out.  In time we should extract small shareable pieces
between this and announcements and then refactor
AnnouncementRow to no longer use CourseItemRow.  Also
leverage INSTUI better to not have so much manual CSS.

Closes COMMS-1059

Test Plan:
* Compare page to designs at [designs link] make sure the
  appearance matches.  Well some of it, since some of
  stuff they're asking for doesn't really make sense
  (i.e. having assignments with specific sections)
* Things should still work.  Since this was a substantial
  change and refactoring, please test this thoroughly.
* I didn't touch CourseItemRow or AnnouncementRow, but it
  wouldn't be a terrible idea to smoketest.

Change-Id: I86e2e4f9ab5deeb3a4fe51d63da199c94321b8c5
Reviewed-on: https://gerrit.instructure.com/148195
Tested-by: Jenkins
Reviewed-by: Landon Gilbert-Bland <lbland@instructure.com>
Reviewed-by: Aaron Kc Hsu <ahsu@instructure.com>
QA-Review: Aaron Kc Hsu <ahsu@instructure.com>
Product-Review: Kendall Chadwick <kchadwick@instructure.com>
2018-05-02 16:52:53 +00:00
Simon Williams aed929745b remove unused fixtures
Change-Id: I49b490ca807fb33b893592dba0b7ed898f1b87f8
Reviewed-on: https://gerrit.instructure.com/148905
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-05-02 16:36:17 +00:00
Simon Williams 1323109ba3 removed unused webpack code
Change-Id: Ice63f1cf2397c02c470af6ec6750de36efb61550
Reviewed-on: https://gerrit.instructure.com/148904
Tested-by: Jenkins
Reviewed-by: Brent Burgoyne <bburgoyne@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2018-05-02 16:36:12 +00:00
wdransfield 7c6ec63660 Check binding state when issueing and validating access tokens
closes: PLAT-3204, PLAT-3022

Test Plan:
* create a visible site admin dev key set to "allow."
  Set up a redirect URI for the key.
* Do a GET request to http://shard2.canvas.docker/
  login/oauth2/auth and send along the site admin key
  details as parameters.
* Verify you are denied a code.
* At the shard 2 root account turn the site admin key on.
* Repeat the get request and verify you receive a code.
* Verify this code can be exchanged for an access token.
* Set the key state at the shard 2 root accout level to 'off'
* Set the key state at the site admin level to 'on'
* Verify you can still get a code and access token.
* Set the key state at the shard 2 roota ccount level to 'on'
* Set the key state at the site admin level to 'off'
* Verify you cannot get a code.
* Create a root account level key and verify you can only
  retreive a code when the workflow state is 'on'
* Turn the site admin key state to 'allow' in the site admin account
  and 'on' on the shard 2 root account.
* Retrieve a code and an access token.
* Use the access token at an API endpoint and make sure it works.
* In the site admin level turn the developer key off.
* Verify the token no longer works.
* Turn the key on at the site admin level and verify
  the token works again.
* Turn the key off at the root account level and verify
  the token no longer works.
* Use a root account level developer key to retreive an
  access token. Verify the access token only works when the
  workflow state is 'on'

Change-Id: I124fbd9cb95926a038dc3bdb5078f0c5ad372264
Reviewed-on: https://gerrit.instructure.com/145546
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Karl Lloyd <karl@instructure.com>
2018-05-02 16:09:42 +00:00
Michael Hargiss 5f7d03b97f upgrade pact, allow native live events contract testing
refs QUIZ-4175

Test Plan:
  - in the quiz_pact_broker repo:

      bin/dev-setup

  - in the quiz_lti repo:

      bin/dev-setup && bin/contracts-generate

  - in this repo, spin up canvas natively (without docker), then:

      bin/contracts-verify-live-events

  - single spec should pass

Change-Id: I816c9925bd4d02c7372dd123de26798268bf88a3
Reviewed-on: https://gerrit.instructure.com/148889
Tested-by: Jenkins
Reviewed-by: Jeff Belser <jbelser@instructure.com>
Product-Review: Jeff Belser <jbelser@instructure.com>
QA-Review: Jeff Belser <jbelser@instructure.com>
2018-05-02 15:15:06 +00:00
James Williams 51c1491314 run account association callbacks after enrollment batch import
closes #CORE-1351

Change-Id: Ia474b59e6095ab9daf5311b03596b7b8e1598f47
Reviewed-on: https://gerrit.instructure.com/148622
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Tucker McKnight <tmcknight@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2018-05-02 12:17:57 +00:00
Ubuntu d385f2c513 [i18n] update locales with new translations
Change-Id: Id38b6d4572458728c3c2d6a7c8708df7df51e1bd
Reviewed-on: https://gerrit.instructure.com/148892
Tested-by: Jenkins
2018-05-02 07:42:39 +00:00