Commit Graph

23606 Commits

Author SHA1 Message Date
Landon Wilkins 65744119ca dry up linters
test plan:
* see test commit verifying linters still work

Change-Id: I406c218309e824618869c9b5f3841af8387bf836
Reviewed-on: https://gerrit.instructure.com/98329
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Reviewed-by: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
2017-01-10 19:44:48 +00:00
James Williams 04f0d46b08 strong params part D
refs #CNVS-32574

Change-Id: Iaac099efac4162bd060e2b8d5a9e6bc5170ce02d
Reviewed-on: https://gerrit.instructure.com/94593
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
2017-01-10 19:30:34 +00:00
John Corrigan b0008a343b better handle aria-valuetext output for SubmissionProgressBars
fixes FALCOR-58

test plan:
- Have an assignment with a pass / fail grading scheme.
- Complete the assignment for a student and grade it.
- As a teacher, trigger the context tray for the student (from the
  grades page, say).
- Observe that the `aria-valuetext` attribute for the corresponding
  progress bar is either `complete` or `incomplete`; it used to be
  `[object Object]`.

Change-Id: Ia780bea31e0085eaf636084218f123cbf8dd185a
Reviewed-on: https://gerrit.instructure.com/99139
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Dan Sasaki
2017-01-10 18:48:07 +00:00
Edward Schiebel ce821321c9 Replace avatar image cropper with keyboard accessible one
Fixes: CNVS-28306

Test Plan:
- ensure Admin > <your account> > Settings > Enable Profiles
  and User Avatars are checked
- navigate to Account > Profile
- using keyboard:
  - TAB (displays "skip to main content")
  - ENTER (focuses on the main content of the profile page
  - TAB (focuses avatar image)
  - ENTER (displayes Select Profile Picture dialog)
  - TAB 4 times (focuses "choose a picture")
  - ENTER (displays system file open dialog)
  - Select a photo
  - The selected photo and crop-box are displayed and
    have focus
  - Use arrow keys to move the crop box around
  - Use shift-arrow keys to size the crop box
  - TAB twice to focus Save button
  - ENTER closes dialog
  - cropped image should be displayed on the profile page

change history
  - added js spec for the cropper
  - fix require_js config for react-crop

2016-12-13
  - changes needed after react-crop distribution changed
  - break CanvasCropper and CanvasCropperMaker into 2 files
    in response to code review
2016-12-16
  - update the react-crop version
  - set a min size on the cropper (so it can't go negative)
  - update css so image won't overflow its box
  - address eslint warnings
2016-12-21
  - fix merge conflict

note: the .rb file change supports the build. there is no need
      for a corresponding spec

Change-Id: I2b6dc165ed5dc2865f282c35018686dd820fea30
Reviewed-on: https://gerrit.instructure.com/97197
Reviewed-by: Steven Burnett <sburnett@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Tested-by: Jenkins
2017-01-10 18:47:01 +00:00
James Williams 031242d031 strong params part Q
refs #CNVS-32574

Change-Id: Ifd139bf1e8296370d1d793ceed7c8e2e50440059
Reviewed-on: https://gerrit.instructure.com/94684
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:20:03 +00:00
James Williams 6fc0f8c28b strong_params part all the rest
refs #CNVS-32574

Change-Id: If0a354295f9433fcf4dc2a776d93ae45833a44bd
Reviewed-on: https://gerrit.instructure.com/94683
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:19:55 +00:00
James Williams f0100085af strong params part M-O
refs #CNVS-32574

Change-Id: Ic42c1c7bcc85c99818386392b1a0ebb55229e43c
Reviewed-on: https://gerrit.instructure.com/94679
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:19:10 +00:00
James Williams 26ee38350a strong params part E-F
refs #CNVS-32574

Change-Id: Ib1fc9c81dbfa4ece200a15a23105dbfa6f84d0c6
Reviewed-on: https://gerrit.instructure.com/94677
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-10 18:16:54 +00:00
Michael Brewer-Davis 9cc28d4ceb add scores to select_mastery_path call
- helps cyoe process and assign synchronously
- correct link error in choose_mastery_path page

fixes: OUT-570

Test plan:

Test alongside CYOE g/97407

- As teacher, create mastery path that includes OR options
- Score student in range such that they are presented with
  these options
- As student, visit modules page and choose "Select assignment
  option"
- Choose one of the options
- Click on one of the assignments in the chosen option
- Ensure that you are able to view the assignment

Change-Id: I0d2a990b31cbd8205564ba704d4b38907abf98d9
Reviewed-on: https://gerrit.instructure.com/97427
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-01-10 17:59:48 +00:00
Keith Garner ac2382661a add runtime set failure percentage based mode to canvas_timeout
Using rolling counters in redis, build up data to go into timeout
protection when the percent of failures reaches a certain level.
Also, the existing timeout protection is tweaked to use redis keys
that won't overlap with the rolling counters redis keys.

The default values for failure rate cutoff is 20%, the default minimum
samples is 100, the default rolling counter time is 60 seconds. The
default protection time is the error_ttl time.

closes CNVS-34031

test plan:
 - Ensure canvas is configured to use redis
 - In the rails console do the following:
    Setting.set('service_qatesting_timeout', 1)
    Setting.set('service_qatesting_timeout_protection_method',
                'percentage')
    Setting.set('service_qatesting_min_samples', 10)
 - The following must be completed in the rails console in under a
   minute:
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { sleep 2 }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { sleep 2 }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.timeout_protection('qatesting') { }
    Canvas.redis.ttl("service:timeouts:qatesting:percent_counter:protection_activated")
 - Note that after each 'sleep' above that an error report of type
   'service_timeout' was generated
 - Note that after 10 samples, we went into timeout protection by
   the log message of "Skipping service call due to error count: qatesting 0.2"
 - Note that the Canvas.redis call returns a number between 0 and 60

Change-Id: Id14f2c86c11ded7bb8c18ecfcf51eed2faf4df33
Reviewed-on: https://gerrit.instructure.com/97247
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-10 17:36:31 +00:00
Jesse Poulos 4ec3f40825 Updates the variable expansion documentation
The variable expansion documentation has instances of information being
outright incorrect, or just confusing. Furthermore, there are no examples
of how to invoke custom fields via variable expansion. For everything
(except the `Canvas.file` type variables), I've documented what is actually
returned as well as an example of what the data might look like. I've also
added examples of how tools can be configured to use custom fields (via
API, UI, or XML).

Test Plan:
Test plan:
1) run localhost Canvas
2) build the API docs (docker-compose run --rm web bundle exec rake
doc:api)
3) navigate to the following:
<your host url>/doc/api/file.tools_variable_substitutions.html
4) check for spelling, grammar, accuracy of information and that any links
work

Fixes PLAT-2022

Change-Id: I754bc2c5e48d4cdd4738c6d03d4d7e3c12a621b1
Reviewed-on: https://gerrit.instructure.com/96801
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jesse Poulos <jpoulos@instructure.com>
2017-01-10 17:24:31 +00:00
Jeremy Stanley 9b9990f761 restrict files
test plan:
 - have a master course that locks a file
 - ensure the file can't be overwritten in a minion course

closes MC-25

Change-Id: I19f85bb003c401cd71f14d95b422da6fa0b2c0d7
Reviewed-on: https://gerrit.instructure.com/98596
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jeremy Stanley <jeremy@instructure.com>
2017-01-10 16:07:30 +00:00
Transifreq 2f0d1335c7 update nb translation
Change-Id: I6c400010d91d4300cdcb689e1bdced522e77b9cc
2017-01-10 05:23:42 -07:00
Transifreq d8b521d055 update da translation
Change-Id: Iff22b1c7cf67291e576390f5417f990ce4ab5ae9
2017-01-10 05:14:37 -07:00
Dan Minkevitch 21b00a76a7 Refactor policy check for discussion topics & course conclusion
Fixes CNVS-34218

Test Plan:
* Create a course; do NOT publish it
* Create a new Discussion in the course and save
* As a teacher, see that you have a Reply button for the Discussion
* See that you are able to add replies to the Discussion
* Enter Student View mode from the course Settings page
* Navigate to the Discussion
* The reply button should be visible and interactive
* Exit Student View mode
* Publish the course
* Enter Student View mode again and navigate to the Discussion
* The reply button should still be visible and interactive

Change-Id: I001088747776d2534c090b1d26b7593115af8fad
Reviewed-on: https://gerrit.instructure.com/99086
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2017-01-10 02:52:18 +00:00
Rob Orton 4187cbd536 continue sis import if unique index error happens
test plan
 - run enrollment import
 - it should work
 - if unique index error happens it should continue

Change-Id: If128dbe34b2e41a8139f5afb8d87f9d424dd024a
Reviewed-on: https://gerrit.instructure.com/99088
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2017-01-10 01:19:20 +00:00
Jeremy Neander b25c84bd29 create total grade column header cell
This adds a drop down menu to the total grade column in Default Gradebook.

closes CNVS-31608

test plan:
 1. enable Gradezilla in Account Settings
 2. visit Gradezilla version of Gradebook
 3. verify the total grade column shows the text "Total"
 4. verify the "More" menu is present and functional

QA/Dev Notes:
 * For this feature to work properly with SlickGrid, the sorting
   functionality needed to be removed from the student column. This
   behavior will be restored in a subsequent commit as an option within
   this menu.
 * There are known issues with the InstUI PopoverMenu component, which
   are currently being worked on by the InstUI team.
   * clicking outside of the open menu will throw an error
   * opening/closing the menu will scroll the window
   * the first item is always highlighted when using the cursor
 * Menu Items are translated, but are placeholders without
   functionality. Clicking them will do nothing at this time.

Change-Id: I3b8d4591bd52735fc03b550d2929c7a54ed12cdb
Reviewed-on: https://gerrit.instructure.com/99078
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Product-Review: Christi Wruck
2017-01-10 00:22:57 +00:00
Ryan Shaw 582417ce0b get webpack to work if using symlinks
fixes: CNVS-34235

test plan:
* automated tests should pass
* make sure that you see that it picks up all 
  the plugin stuff in the jenkins webpack build
* mv gems/plugins ./moved_plugins
* ln -s ./moved_plugins gems/plugins
* run webpack with those plugins in the symlinked
  directory
* it should work

Change-Id: I97024d29d9dbf153147781af05c205fe766c0bd3
Reviewed-on: https://gerrit.instructure.com/99159
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-01-09 23:41:10 +00:00
Stewie (Nicholas Stewart) 6175cbc1e8 SIS-2666 Refactor assignment_groups_api_spec.rb 3
Fixes: SIS-2666

Test Plan: Jenkins passes

Change-Id: I2a9adfd121287ab403abc08983eaf7ca83e33af3
Reviewed-on: https://gerrit.instructure.com/98969
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2017-01-09 23:25:07 +00:00
Mysti Sadler a30ab6da39 Add real web zip exports to the downloads page
closes OFFW-47

test plan
- Load the Course Content Downloads page either via modules
  or going directly to /courses/:course_id/offline_web_exports
- Verify that there is a real list of downloads in oldest to
  newest order
- If there are any that are in process, they should not show up.
- A spinner should show up while loading the history
- If you can induce an error, you should get error text

Change-Id: I21cb0d0196fdd3fda93ee0680ff076e79b798780
Reviewed-on: https://gerrit.instructure.com/98236
Tested-by: Jenkins
Reviewed-by: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Mysti Sadler <mysti@instructure.com>
2017-01-09 21:16:09 +00:00
Brent Burgoyne e1bf79985c make input for numberHelper parse more forgiving
when input is null or undefined it will return NaN, when input is a
number returns original input, when input is an object it is
converted to a string before parsing.

refs CNVS-34225

test plan:
- code review new tests

Change-Id: I1b57df02c6f2221a882ed84ad9d3ad1562167201
Reviewed-on: https://gerrit.instructure.com/99112
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Neil Gupta <ngupta@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2017-01-09 20:41:29 +00:00
Pam Hiett f38c6bedb0 fix user alignments page icons
Fixes: CNVS-33917

test plan:
- as an admin open outcomes
- click the ... button on the upper right then "manage rubrics"
- either open an existing rubric or add a new rubric
- find an outcome and add to rubric (click the edit button on an existing
  rubric ... then the "find outcome" link at the bottom of the rubric table)
- save the rubric
- now... use the rubric you just created or edited for at least one student
  assignment... as a student submit the assignment so as the teacher you can
  enter a score that earns mastery for said student
- back in the course sub-nav click "outcomes"
- click the name of the outcome you created and used... click the title
  again and you will be taken to the alignments page
- original view: http://www.screencast.com/t/rNg2r9NEWb
- new view: http://www.screencast.com/t/CsMXAouuLjg

- side note: the icon that appears alongside the outcome name was also
  updated from icon-note-light to the new icon-outcomes as was the uggo
  yellow flag that appeared next to the outcome name within the rubric
  table (example: http://www.screencast.com/t/9gNg1ZLPt)

Change-Id: I76694fa6bc55cdbb6a5ecf64d05e1eae70babd99
Reviewed-on: https://gerrit.instructure.com/98733
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2017-01-09 20:36:21 +00:00
Neil Gupta 993ff42ae3 Handle NaN in GradeCalculator
Fixes CNVS-32980

Test plan: smoke test grade calculator
* As a teacher, create an assignment
* As a student, submit something for that assignment
* As a teacher, grade the submission
* Make sure the grade saved properly and is viewable by teacher
  and student.

Change-Id: Ie789492c3966be660bb726079dc2191cc1cbf8fe
Reviewed-on: https://gerrit.instructure.com/99065
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2017-01-09 20:05:26 +00:00
Simon Williams bf7456da8c refactor Twitter::Connection
cleaner interface, with the bonus of making it easier to avoid mocking
`any_instance` on this class.

closes CNVS-33854

test plan:
- register twitter as a user service
- it should work

Change-Id: I9dd2c7b85dd9937ebe2653a5e1309757812b6bf2
Reviewed-on: https://gerrit.instructure.com/97537
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-01-09 19:09:21 +00:00
Augusto Callejas e4badb2694 Add columns for Academic Benchmarks GUID update
refs OUT-450

test plan:
  - enable Academic Benchmarks using v1 credentials
  - import any set of standards
  - confirm that only vendor_guid and migration_id
    columns in learning_outcomes and learning_outcome_groups
    are populated
  - clear out all outcomes and outcome groups
  - configure Academic Benchmarks using v3 credentials
  - enable the use of the new GUID columns by running the following
    in a Rails console:
    * plugin = Canvas::Plugin.find('academic_benchmark_importer')
    * pluginSettings = PluginSetting.find_by_name(plugin.id)
    * pluginSettings.settings[:new_guid_columns]=true
    * pluginSettings.save!
  - import any set of standards
  - confirm that only vendor_guid_2 and migration_id_2
    columns in learning_outcomes and learning_outcome_groups
    are populated
  - restore the use of the current GUID columns by running
    the following in the previous Rails console:
    * pluginSettings.settings.delete(:new_guid_columns)
    * pluginSettings.save!

Change-Id: I77e5d578a55a0967310208029f1c5225188c3455
Reviewed-on: https://gerrit.instructure.com/98347
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Michael Brewer-Davis <mbd@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2017-01-09 18:59:38 +00:00
wdransfield 5927a24c98 Fix LTI launch modals don't contain focus.
Fixes PLAT-1781

Test Plan:
- Launch the LTI 2 registration modal and
  verify the modal contains focus when
  content is tabbed through.
- Navigate to the assignment creation page
- Launch a tool from the RCE and verify
  that focus is contained in the modal
  when tabbing through content.
- Choose submission type 'external tool',
  click 'find', and launch a tool. Verify
  that focus is contained in the modal when
  tabbing through the content.
- Repeat the test for module selection
  placement.
- Repeat the test for the assignment
  submission placement modal.

Change-Id: I8afc232987c2f60fd57ab2c722e1e3b4c9db0757
Reviewed-on: https://gerrit.instructure.com/98818
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-01-09 17:47:21 +00:00
Brad Horrocks b2a72c2ed2 Fix iframeception when skipping to content
no longer hash change when skipping to content
This specifically fixes lti_collaborations iframeception
but will also prevent other push state change watchers from rerenderering

Ref: RD-3385

t# On branch master

Change-Id: I2ff8c95b442df48f1575601fd1f47add32c76076
Reviewed-on: https://gerrit.instructure.com/98890
Tested-by: Jenkins
Reviewed-by: Daniel Nehring <dnehring@instructure.com>
Reviewed-by: Josh Orr <jgorr@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
2017-01-09 17:19:13 +00:00
Simon Williams b01a58840b spec: fix a spec to wait for an animation
Change-Id: Icb882728dc0ed2388c0614cc082cd229d4831578
Reviewed-on: https://gerrit.instructure.com/99083
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2017-01-09 16:19:32 +00:00
Michael Brewer-Davis a7151f79d9 add description to choose mastery path
closes: OUT-792

Test plan:
- As teacher, create a mastery paths rule that includes OR
- For some/all of the assignments included in the OR, give
  the assignment a description.  Include rich content.
- As student, trigger the mastery paths rule.
- Go to modules and see "Select assignment set" link
- Go to select assignment set page
- Verify that the descriptions are shown with each assignment,
  and the rich content is rendered correctly

Change-Id: I5e732e6e3976b38375f322e3f09a266159abaf46
Reviewed-on: https://gerrit.instructure.com/97064
Reviewed-by: Christian Prescott <cprescott@instructure.com>
Tested-by: Jenkins
QA-Review: Cemal Aktas <caktas@instructure.com>
Product-Review: McCall Smith <mcsmith@instructure.com>
2017-01-09 16:15:04 +00:00
James Williams e8c701c5a5 fix typo in tabs api documentation
closes #CNVS-34198

Change-Id: Icae803f040cee1999dfd9bc4c92f10c7f3494f97
Reviewed-on: https://gerrit.instructure.com/99097
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-09 15:26:34 +00:00
Transifreq fd6d6a4a88 update en-GB translation
Change-Id: I3920271e0f88e98abebb20f40e88478b8dde43b4
2017-01-08 05:17:12 -07:00
Transifreq d6e3aa6391 update zh-Hant translation
Change-Id: Iaf20155f650bcc72d3f66547f6cd7a4d497e9921
2017-01-07 05:30:29 -07:00
Dan Minkevitch 43429e68f3 Fix issue with file previews hidden with "Institution" visibility
Fixes CNVS-33763

Test Plan:
* Prerequisite: Kaltura/Notorious plugin enabled for generating
  file previews
* Create a course with "Institution" visibility.
* Upload a media file to the course.
* Create a content page and link the media file using the sidebar.
* Log in or masquerade as a non-enrolled user.
* Access the page and see that the file link appears along
  with its preview.

Change-Id: If5590abaded4d74a1f5d737fe84de42bb60c6ffe
Reviewed-on: https://gerrit.instructure.com/97790
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
2017-01-07 00:52:54 +00:00
Cameron Matheson 88a326c3b4 add masquerade link to student context cards
closes FALCOR-51

Test plan:
  When viewing student context cards, users that have masquerade
  permissions should see a link to masquerade on the context card

Change-Id: Id052bad1f218b46af14c8688a03add6050765009
Reviewed-on: https://gerrit.instructure.com/98960
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
Product-Review: Christi Wruck
2017-01-06 23:47:36 +00:00
Derek Bender 506e00d00a remove non-input grading els from KO nav
fixes: CNVS-33198

test plan:
 - given a grading scheme
 - the name of the scheme should not be focusable when tabbing through
   elements or using any other keyboard-only nav inputs.
 - given a grading period
 - the names and dates are not focusable when tabbing through input
   elements

Change-Id: Iea2166f26d855e3b060a35b7b5fe2915534164ac
Reviewed-on: https://gerrit.instructure.com/98945
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-06 22:48:00 +00:00
Nathan Mills dd21d79e95 add support helper to update tii attachments
fixes PLAT-1857

test plan:
- submit a file through the TII lti tool
- once you get a score back, pull up the Attachment model in a
rails console and change the uploaded_data using a StringIO object
- hit
api/v1/support_helpers/turnitin/refresh_lti_attachment?attachment_id=:attacment_id&submission_id=:submission_id
-once the fixer completes the attachment in canvas should be refreshed
with the correct data

Change-Id: Ife04efd952d615a44114894bca2a6d816740948d
Reviewed-on: https://gerrit.instructure.com/98729
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Mills <nathanm@instructure.com>
2017-01-06 22:36:40 +00:00
Nick Houle 64f596cfe3 SIS Setting: Assignment Name Length
Fixes: SIS-2575

Notes: The gergich warning about adding tests is
       being ignored because we are only adding a setting
       to accounts which is tested else where i.e. the UI
       where it is actually used and tested thoroughly.
       This has been the pattern of the other account
       settings we've added in the past.

Test plan:
- Confirm the new setting 'Limit assignment names lengths' is there
- Confirm the name length input box appears when the setting is
  checked
- Confirm the value you set on the input persists on save

Change-Id: I34e7d09a23fb2350ad16f37c372a7355fde2686c
Reviewed-on: https://gerrit.instructure.com/96853
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-01-06 22:29:39 +00:00
Shahbaz Javeed 06ddfef3d3 bring back shoulda-matchers and associated specs
The monkey-patch is necessary to allow shoulda-matchers > 3.0.1
to work with active_model-better_errors.  This essentially
provides a working grep implementation to ErrorMessageSet

test plan:
* Ensure specs pass

Change-Id: I1e4b490e98803a62293702fa38951f3dce5fcde4
Reviewed-on: https://gerrit.instructure.com/98513
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
QA-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
2017-01-06 22:28:27 +00:00
Jeremy Neander 2bbd3bff4f consider muted assignments with what-if grades
When a student uses What-If grades on muted assignments, those
assignments will be included in the grade calculation, rather than
ignored.

closes CNVS-27403

test plan:
 A. select or create
    1. a course
    2. a teacher for the course
    3. a student enrolled in the course
    4. at least two assignments
 B. as the teacher
    1. mute one assignment
    2. grade the assignments
 C. as the student
    1. visit the grade summary page
    2. verify that the muted assignment
       a. is not visibly graded
       b. does not count in the displayed grade calculation
    3. apply a What-If grade to the muted assignment
    4. verify that the What-If grade is used in the grade calculation
    5. remove the What-If grade
    6. re-verify step 2

Change-Id: I6bafc25b26506ae4137dc5b1142babc2d49ca7b1
Reviewed-on: https://gerrit.instructure.com/98985
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-06 21:43:44 +00:00
Transifreq 95afb79384 update zh-Hant translation
Change-Id: Ib1f03035e09137d27262999944d031d8b018b8d5
2017-01-06 14:29:28 -07:00
Transifreq d4c97be6a4 update zh-Hans translation
Change-Id: I116c34682c3a34030f7f1cb1246a1b873afb6b0d
2017-01-06 14:28:03 -07:00
Transifreq 23fe987d25 update sv translation
Change-Id: Iad70824165982d5d894a7be0e2c3a4e2e38b6004
2017-01-06 14:26:41 -07:00
Transifreq 6888f3cb4e update nl translation
Change-Id: I7b1d24819bbc464c54f81314538777ef70e7895e
2017-01-06 14:20:55 -07:00
Transifreq ff74230a6c update nb translation
Change-Id: I09c45655b5b676d98d6824f7e70611d1fa34dc83
2017-01-06 14:19:32 -07:00
Transifreq 699e6249ff update fr-CA translation
Change-Id: Ia36b9c9eee371beff430d5ad930e239a02d89e09
2017-01-06 14:15:57 -07:00
Nathan Mills e961d7db54 refactor the tii lti methods
refs: PLAT-1857

test plan:

-regression test the tii lti tool

Change-Id: I68713caa52c8f1defd275415bcedc68601604d32
Reviewed-on: https://gerrit.instructure.com/98147
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
2017-01-06 20:59:32 +00:00
Keith Garner 340fc0a6ca add ability to enable turnitin to site admins
Adding a flag to the Account.settings that determines if turnitin is
enabled. The ability to set or remove this flag has been changed to
only be available to site admins. Once the flag is set to on, the
account admins will have the ability to configure the turnitin
settings. Turning this flag off will disable turnitin for the
account.

closes CNVS-33937

test plan:
 - As an account admin, visit the account settings page and note there
   is no turnitin checkbox nor the turnitin settings dialog.
 - As a site admin, visit the account settings page and note the
   turnitin checkbox.
 - As the site admin, check the turnitin checkbox and save the
   settings.
 - Note on page reload the turniting settings dialog appeared.
 - As an account admin, visit the account settings page and note the
   settings dialog is present.
 - As an account admin, fill in the settings dialog and save the
   settings.
 - As a site admin, visit the account settings page and uncheck the
   turnitin checkbox and save the settings.
 - Note on page reload the turnitin dialog is gone.
 - As a site admin, check the turnitin checkbox and save the settings.
 - Note the turnitin settings dialog appears and contains the previous
   info.

Change-Id: I06e0add066794d56be27cb13250ccfa79d095e26
Reviewed-on: https://gerrit.instructure.com/98765
Reviewed-by: Spencer Olson <solson@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Christi Wruck
2017-01-06 20:23:39 +00:00
Jon Jensen cfc2ef675f remove i18nema and syck
fixes CNVS-34164

test plan:
 * basic smoke test that translations still work

Change-Id: Ia88fc88de8b52aeaa92b65ea43b93eef5adb1dcc
Reviewed-on: https://gerrit.instructure.com/95065
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-01-06 19:34:55 +00:00
Landon Wilkins bf93f5e050 spec: unskip timebombs
Change-Id: I364589dfebff0df6d03c5a769836fe81935fb77b
Reviewed-on: https://gerrit.instructure.com/98977
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Product-Review: Landon Wilkins <lwilkins@instructure.com>
QA-Review: Landon Wilkins <lwilkins@instructure.com>
2017-01-06 18:50:03 +00:00
Stewie (Nicholas Stewart) 1cee4ead45 SIS-2666 Refactor assignment_groups_api_spec.rb 2
Refs: SIS-2666

Test Plan:  Jenkins passes

Change-Id: I18faeadf77253fdff9bb573bdeacf658543345d7
Reviewed-on: https://gerrit.instructure.com/98259
Reviewed-by: Ken Romney <kromney@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Stewie aka Nicholas Stewart <nstewart@instructure.com>
2017-01-06 18:20:31 +00:00