Commit Graph

2467 Commits

Author SHA1 Message Date
Jeremy Neander 7337718d04 render comments with attachments in SpeedGrader
There is a bug in SpeedGrader where comments with attachments do
not render, due to an error being thrown during the render. This
fixes the issue.

fixes CNVS-34486

test plan:
 1. Visit SpeedGrader
 2. Create a comment with an attachment
 3. Verify the comment renders properly
 4. Verify no errors appear in the console
 5. Refresh the page
 6. Verify the comment renders properly
 7. Verify no errors appear in the console

Change-Id: Ibddc432f4b5edd4910879c6ce0303380abb826db
Reviewed-on: https://gerrit.instructure.com/100282
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-28 17:13:36 +00:00
Cody Cutrer 38ea07db0e add Haitian
fixes CNVS-33067

Change-Id: I5baed2dbf6e12e3d2812de3aaab429bebdb80503
Reviewed-on: https://gerrit.instructure.com/96028
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2017-01-27 23:53:17 +00:00
wdransfield 587ed9d984 Make similarity scores vendor agnostic
Fixes PLAT-2037

Test Plan:
- Scour speedgrader, gradebook, submission preview,
  and student grade page. Verify originality report
  labels are vendor agnostic.

Change-Id: Iae87cc01de97d3c631857ac02814bc7530d67804
Reviewed-on: https://gerrit.instructure.com/100127
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Weston Dransfield <wdransfield@instructure.com>
2017-01-26 20:45:51 +00:00
Clay Diffrient 8b8c6622b8 Replace react-select-box with InstUI Select
closes CNVS-34224

Test Plan:
  - Setting authentication providers at
    <canvas>/accounts/1/authentication_providers should
    work properly.

Change-Id: I44b137d3400e8fff1628cd64911cc50650ca59c1
Reviewed-on: https://gerrit.instructure.com/99105
Tested-by: Jenkins
Reviewed-by: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
QA-Review: David Tan <dtan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2017-01-25 17:20:54 +00:00
Sheldon Leibole 97472a213c grading history needs to display/accept i18n #s & dates/times
closes CNVS-30978

Test Plan

1. Get Canvas up and running
  a. Make sure you run: bundle exec rake canvas:compile_assets
  b. Make sure RAILS_LOAD_ALL_LOCALES is true and USE_OPTIMIZED_JS
     is true
2. Verify all fields listed in Jira description are internationalized.

Change-Id: I18022e99cb13d3936ecbf27b1503da5618e3c869
Reviewed-on: https://gerrit.instructure.com/100202
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-24 23:16:32 +00:00
Brian Park 4d390cf3d7 add i18n number support to srgb assignment information
fixes: CNVS-34070

Test Plan:
1. Go to Gradebook > Individual View
2. Select an individual
3. Observe Assignment Information section displayed with I18ned numbers
  - Graded Submissions count
  - Points Possible, Average, High, Low columns
  - Download All Submissions modal, progress % number
  - Set Default Grade modal, Default grade points label
  - Curve Grades modal
    - # Students vs Points graph base line numbers
    - Average Score input
    - Label to right of Average Score input
    - Alert with # of students updated on Curve Grades execution
  - Message Students Who dialog
    - 'Scored Less Than' points label
    - 'Scored More Than' points label
    - 'Scored Less Than' subject line text
    - 'Scored More Than' subject line text
4. Repeat with Gradezilla

Change-Id: I89f3b03211752b99a62402eb5cc186e009a7c985
Reviewed-on: https://gerrit.instructure.com/99917
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-24 22:11:39 +00:00
Sheldon Leibole 6292344794 make speedgrader accept and display i18n numbers
closes CNVS-29227

Test Plan

1. Get Canvas up and running
  a. Make sure you run: bundle exec rake canvas:compile_assets
  b. Make sure RAILS_LOAD_ALL_LOCALES is true and USE_OPTIMIZED_JS
     is true
2. Verify all fields listed in Jira description are internationalized.
  a. You will probably need to do things like set the points for an
      assignment to >= 1,000 for the internationalization to be
      noticeable.
  b. You'll need to add a TA to the course and submit a grade as the TA
     to test Moderation Tabs

Change-Id: Ic97d5f705cb2a1144beb1467fec14a45841a0a7d
Reviewed-on: https://gerrit.instructure.com/99284
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Spencer Olson <solson@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-24 22:09:51 +00:00
Ryan Shaw e9c83d18e7 don’t try to load quiz web worker from a different origin
in webpack, it would try to load the web worker from the
cdn configured in canvas_cdn.yml. it is against browser
security rules to open a web worker on a different origin,
so in production/beta it would not load and the page to take a quiz
would not load at all. It worked in requireJS because
it didn’t actually know to load the worker from the con
and since it just loaded it from the same domain the page
was served from, it did not have that problem.

this fix just inlines the web worker into a blob and
loads it itself, so there is no cross-origin problems
and we don’t have to have a requireJS or webpack plugin
to load web workers. 

also, fix bug where webpack looked for compiled 
version of quiz_taking_police

fixes: CNVS-34349
fixes: CNVS-34386

test plan:

using the CDN setup for dev/testing

in both webpack and requireJS
go to take a quiz,
the stopwatch should tick every second

Change-Id: I31e6ea0cd22d8dff8c8cb46c68e78d3f5c1989c0
Reviewed-on: https://gerrit.instructure.com/99521
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
2017-01-24 00:51:32 +00:00
Brian Park 581c81d702 add i18n number support to gradebook assignment table
fixes: CNVS-34072

Test Plan:
1. Launch gradebook and select a user to view
2. Observe that comment count is i18ned for the locale
  - May be difficult, need 1000+ comments for most locales
3. Observe that score details Mean/High/Low values are i18ned
4. Observe that score details whisker graph tooltips are i18ned
5. Observe that Rubric points/total/ratings are i18ned
6. Observe that Score, Out Of values are i18ned
7. Observe that Group Score, Group Score Tooltip, Group Weight are i18ned
8. Observe that total score is i18ned

Change-Id: Ifb900e9880a87aab383103896b647a3e7c244551
Reviewed-on: https://gerrit.instructure.com/99327
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2017-01-23 21:54:46 +00:00
James Williams 9bc1747eb9 master courses: add icons for restricted items on modules page
closes #MC-66

Change-Id: I3e1b47f64886e113d12b7dad9582412b0e96dbed
Reviewed-on: https://gerrit.instructure.com/100141
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2017-01-23 17:27:16 +00:00
Michael Brewer-Davis 2582f8b7c3 improve a11y titles for mastery paths
closes: OUT-483

Test plan:
1.  Visit the assignments, quizzes, discussions, and
    modules pages when some of that type are released
    by one and by many mastery paths.
2.  Verify that a11y label is more helpful than it was
    as described in the bug.

Change-Id: I66a78294360a74c4f1d0aa25f2de7351e9174430
Reviewed-on: https://gerrit.instructure.com/98929
Reviewed-by: Christian Prescott <cprescott@instructure.com>
QA-Review: Cemal Aktas <caktas@instructure.com>
Tested-by: Jenkins
Product-Review: Nathan Rogowski <nathan@instructure.com>
2017-01-18 20:55:52 +00:00
Pam Hiett c83cb91405 fix add button for all tabs within wiki sidebar
Fixes: CNVS-34356

test plan:
- as an admin/teacher
- navigate to an existing course... click the edit button
- within the "insert content"... within the right sidebar
- under the "each tab" the add button should now be updated
  from the ugly green add button to the udpated icons
  example: https://screencast.com/t/1GUBUn6RpKJS

Change-Id: I736042dbfdcb46ad95750e3444fc38b5bb9d05b0
Reviewed-on: https://gerrit.instructure.com/99550
Tested-by: Jenkins
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
QA-Review: Dan Sasaki
Product-Review: Kyle Follett <kfollett@instructure.com>
2017-01-17 18:53:06 +00:00
Simon Williams b54ed68943 focus on admin type for new admin form
fixes CNVS-33225

test plan:
- go to the account admin page, admins tab
- click the button to add a new admin
- focus should be on the admin type select field

Change-Id: Id1f9135579fe2e67bcfa04595a2b12ca55cbeb2e
Reviewed-on: https://gerrit.instructure.com/98834
Tested-by: Jenkins
QA-Review: Dan Sasaki
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-01-16 21:42:14 +00:00
Simon Williams 25a6a5705a allow toggling account report descriptions multiple times
fixes CNVS-33226

test plan:
- go to the account settings page, reports tab
- click a question mark
- close the dialog
- click the same question mark again
- it should open again

Change-Id: Ic65bc901d887b7604993330dc4ca9afd8083ac16
Reviewed-on: https://gerrit.instructure.com/98824
Tested-by: Jenkins
QA-Review: Dan Sasaki
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-01-16 21:34:27 +00:00
Simon Williams 4e4b807175 remove EditorConfig hack for account announcements
fixes CNVS-34186

test plan:
- try various combinations of adding and editing account global
announcements
- try in various browsers
- the tinymce editor should be configured with two rows of buttons, not
three

Change-Id: I09acee9a233f15707301ec5afa899cda4de78169
Reviewed-on: https://gerrit.instructure.com/99025
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2017-01-14 21:03:10 +00:00
Brad Horrocks c0fa1ffd8e Submission auto submit to canvadocs
Non auto submitted submissions will set annotation true when loaded in speed grader
Cloud Assignment submissions will auto submit to canvadocs

refs: RD-3449

Test plan:

Create a cloud assignment
As a student submit the cloud assignment
As a teacher open the assignment in speed grader
Observe the ability to annotate the cloud assignment

Change-Id: I6ddff84a4a97d920d17dcb26933fcc02c5e59026
Reviewed-on: https://gerrit.instructure.com/99196
Reviewed-by: Josh Orr <jgorr@instructure.com>
Tested-by: Jenkins
Product-Review: Caleb Guanzon <cguanzon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2017-01-10 23:42:09 +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
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
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
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
Nick Houle 8f3189ba25 New Post to SIS toggle icon
Fixes: SIS-2673

Test plan:
- Compile assets
- Navigate to an existing course
- Navigate to the assignments page in the course
- Confirm the new "Post to SIS" icon is shown and toggles
  appropriately between the 2 new ones depending on the state
  of posting or not posting to SIS

Change-Id: Ia1d2baa6a8218cd57a8fa9e179eb8c5d2909cd1e
Reviewed-on: https://gerrit.instructure.com/98634
Tested-by: Jenkins
Reviewed-by: Stewie aka Nicholas Stewart <nstewart@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-01-05 22:59:15 +00:00
Brian Park d57c867431 Close ExternalToolModalLauncher when iframe posts a message
Test Plan:
1. Launch an external tool via ExternalToolModalLauncher
  - Install fake LTI tool via config file at:
    spec/fixtures/lti/config.course_assignments_menu.xml
  - Launch LTI at course assignments index page
2. Observe LTI launch params and note param launch_presentation_return_url
3. Open js console in context of LTI launch iframe and execute:
  - `window.location.href = ${launch_presentation_return_url}`
4. Observe that window was closed
5. Repeat steps 1-4, but in step 2, add params to URL:
  - ?lti_msg=<some_message>
  - ?lti_errormsg=<some_message>
6. Observe that success and error styled messages are displayed

Change-Id: I8c3c2132e9fa11b76de22832d28becd03fc26461
refs: SIS-2657
Reviewed-on: https://gerrit.instructure.com/97937
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2017-01-05 18:19:57 +00:00
Clay Diffrient 0ca6f62cb2 Add enzyme testing to Canvas
closes CNVS-33623

Test Plan:
  - Automated tests pass

Change-Id: I0e76082e8dfc2f695717c94819de3999dd23000a
Reviewed-on: https://gerrit.instructure.com/96510
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
2017-01-04 20:21:36 +00:00
wdransfield 8c324ab847 Add OriginalityReport URL to Speed Grader
Fixes PLAT-2041

Test Plan
- Create an assignment submission with an OriginalityReport
- View the submission in speedgrader and verify
  clicking on the report score icon navigates
  to the /originality_report/asset_id endpoint.

Change-Id: I8369a5083b222ded4e2292e5efecb494585709a1
Reviewed-on: https://gerrit.instructure.com/97646
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-04 19:38:39 +00:00
Ryan Shaw 3e3024b06e [eslint] add eslint-plugin-promise
closes: CNVS-34124

These are it’s default rules:
    "rules": {
        "promise/always-return": "error",
        "promise/no-return-wrap": "error",
        "promise/param-names": "error",
        "promise/catch-or-return": "error",
        "promise/no-native": "off",
        "promise/no-nesting": "warn",
        "promise/no-promise-in-callback": "warn",
        "promise/no-callback-in-promise": "warn",
        "promise/avoid-new": "warn"
    }

the only one I changed was set avoid-new to ignore
because I have noticed that there was a few times
where I really did need/want to make my own promise.
I am open to debate on what others think though

Test Plan:
* the eslint errors on your code that uses promises
  should have the warnings you expect

Change-Id: I46e5f2d1d2ded2dba1e5aeb2ebcf303bcd4c5981
Reviewed-on: https://gerrit.instructure.com/98201
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2017-01-04 18:21:04 +00:00
Pam Hiett 9329ed9fe7 replace background image icon for bookmarked banks button
Fixes: CNVS-33869

test plan:
- as an admin navigate our main account (not site admin)
- click the "question banks" link from the sub-nav
- the right side "See My Bookmarked Banks" button should
  now have our inst-icon vs the background image
  example: http://www.screencast.com/t/JWZtvXAc0Iu

- if you don't have a question bank... create one so the
  list item view shows the updated bookmark icon there
  as well

note:
- *** this commit also ups the inst-icons version being pulled
  into canvas so i have access to the new remove-bookmark
  icon ***

Change-Id: Icf521299a5bbd9256dabffde08cf5021a9fb4b38
Reviewed-on: https://gerrit.instructure.com/97600
Reviewed-by: Stephen Jensen <sejensen@instructure.com>
Product-Review: Stephen Jensen <sejensen@instructure.com>
Tested-by: Jenkins
QA-Review: Dan Sasaki
2017-01-04 16:51:13 +00:00
Ryan Shaw e116bb0d90 Webpack: better handling of chunks and cdn stuff
fixes: CNVS-31779 [webpack] bundle file size
test plan:
* using webpack, look at the network panel in
  the chrome developer console.
* the total ammount of javascript loaded for any
  given page should be much less than before this commit
  and about on par with what requireJS loads for the same page.
* use chrome network panel to throttle to "Regular 3G"
* from both a clean cache and a primed cache:
* make sure that the total time to render the page
  is about on par with requireJS

first change: load webpack chunks from CDN

fixes: CNVS-32261

test plan:
* run `npm run webpack-production`
* check your page, it should load js files and chunks
  from the same hostname the page is served from.
* now set a host: in config/canvas_cdn.yml
  (for testing locally, I just set it to http://127.0.0.1:3000,
* restart rails and reload the page, now the scripts and
  chucks should come from that new hostname

second change:include fingerprints in webpack bundle and chunk filenames

closes: CNVS-28628

with this change we don't need to run `gulp rev`
after running webpack and we can load both the bundle
and chunk files safely from the cdn, since they will
have content-based fingerprints so we can tell
browsers to cache them forever. (we set those
http caching headers in lib/canvas/cdn/s3_uploader.rb:53)

test plan:
* for both dev and production
* run `npm run webpack` (or `npm run wepack-production`)
* with a cdn configured in canvas_cdn.yml, run:
  RAILS_ENV=<dev or prod> bundle exec rake canvas:cdn:upload_to_s3
* check to make sure that the page loads the webpack js,
  that there are no errors, and it all came from the cdn

third change: properly handle moment locale & timezone in webpack

test plan:
 (see application_helper_spec.rb)
 * set a non-default user timezone, context timezone
   and locale
* dates should show up in your timezone and and
  the date helper strings should be in your language

better handling of moment custom locales

closes: CNVS-33811

since we now have hatian and maori, we need to do this in
a way that is not just a one-off for maori

test plan:
* set your locale to maori
* in webpack & requireJS make sure dates show up right

Change-Id: I34dbff7d46a1047f9b459d5e1c0d141f435d42fb
Reviewed-on: https://gerrit.instructure.com/95737
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2017-01-03 22:50:31 +00:00
Pam Hiett 29a73c9667 replace straggler background image icons with updated icons
Fixes: CNVS-33656

test plan:

*peer review icons*
- the set-up for this one is as an admin have an assignment
  that has the “Require Peer Reviews” checked within the edit
  portion of the assignment (http://www.screencast.com/t/sL4jDThnj5A)
  as well as students enrolled that can act as peer reviewers
  once set-up…
- navigate to the “Assignments” link from the course sub-nav
  select the assignment that has the peer review enabled
- from the right-hand side-bar select the “Peer Reviews” link
  the screen should look something like this
  http://www.screencast.com/t/GOB1TxSu0xz

*user settings/approved integrations*
- as an admin click the account > settings link from the sub-nav
- scroll down the page to the “Approved Integrations” area below
  “Web Services” section… if you do not currently have any integrations
  click the “+ New Access Token” button to create one for the sake of
  testing (example: http://www.screencast.com/t/ga93V2vVkKf)

*account profile picture*
- the set-up for this one is to ensure your admin/account has
  users that have avatars… then as one of said users you need to
  flag another users avatar as inappropriate (so you can see that
  on the admin side) once you have the set-up complete navigate to
  your main account under the “Admin” sub-nav
- click the “users” link … then from there the “manage profile pictures”
  from the right-hand side-bar
- there you will have options of viewing all | approved,
  re-reported | reported | etc…
- example: http://www.screencast.com/t/jNnQA1LtQDp

*assignments in locked modules*
- the set-up for this one is to have modules created within a
  course that have assignments within them - the key is to have
  a module that requires a previous module to be completed before
  it can be accessed
- once this set-up is complete… navigate to the first assignment
  as a user (not the admin)
- example: http://www.screencast.com/t/n98QznZaC

*profiles user sidebar*
- the set-up for this one is as an admin ensure “Enable Profile Settings”
  is checked within the account/settings
- navigate to a course that has users enrolled
- click the “People” link from the left-hand sub-nav
- select one of the users by clicking on their name
- the view should look similar to this
  example: http://www.screencast.com/t/pep4xiH1BWzy

Change-Id: I5c897dd6d55b4050b3be78a8b6ff706af70674fc
Reviewed-on: https://gerrit.instructure.com/97269
Tested-by: Jenkins
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Dan Sasaki
2016-12-27 21:30:05 +00:00
Pam Hiett 704f74718d remove "by" in the footer login/dashboard instructure svg
Fixes: CNVS-33718

test plan:
- as a user navigate to the canvas login screen
- the insturcture logo should no longer have the word "by" in
  front of it
  example: http://www.screencast.com/t/eOjkx6w6I8w
- same goes for the footer on the dashboard

Change-Id: I24c1df11175089e794c27517b3163a2eb04fba84
Reviewed-on: https://gerrit.instructure.com/97776
Tested-by: Jenkins
QA-Review: Dan Sasaki
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2016-12-27 20:18:10 +00:00
Neil Gupta 23aa80c0c3 Use 100vw and 100vh instead of 100% for better browser support
Refs CNVS-5498

Test plan:
* As a student, submit a large image file to an assignment
* As a teacher, view that submission in Speed Grader

The image should automatically resize to fit within your browser window
in both Chrome and Safari.

Change-Id: I1cff5b99ab0aad805457b7fea8420c19ad6b7542
Reviewed-on: https://gerrit.instructure.com/98384
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Neil Gupta <ngupta@instructure.com>
2016-12-22 22:43:01 +00:00
Neil Gupta ae5e08e927 Resize large images in speed grader
Fixes CNVS-5498

Test plan:
* As a student, submit a large image file to an assignment
* As a teacher, view that submission in Speed Grader

The image should automatically resize to fit within your browser window.

Change-Id: I81e90fba878d644092c2fed93752745590cedf75
Reviewed-on: https://gerrit.instructure.com/98241
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Tested-by: Jenkins
Product-Review: Keith T. Garner <kgarner@instructure.com>
2016-12-22 20:10:55 +00:00
Shahbaz Javeed 4bff2318c0 add comment text to submit and delete comment buttons for VO
closes CNVS-31561

test plan:
* Create an assignment and open it in speedgrader
* Submit a comment
* Create a draft comment
* Navigate through the comments with VO
* Each delete and submit button should include the comment text

Change-Id: I5d6af7a0f2cdb0fc5379d83246eca5046ceaecf4
Reviewed-on: https://gerrit.instructure.com/97859
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
2016-12-22 18:18:50 +00:00
Clay Diffrient 1a09008098 [eslint] Make ENV show as a global everywhere
Test Plan:
  - Using ENV should not show as a problem anywhere

Change-Id: I4b37a95606755e21716df0dfb61f26a85e295fe9
Reviewed-on: https://gerrit.instructure.com/98198
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-12-20 21:39:47 +00:00
Jon Willesen 5255d49a1b fix linting in public/javascripts
Change-Id: If58a756f28f040c0778cd759d36ac1aba9ff3253
Reviewed-on: https://gerrit.instructure.com/98185
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Willesen <jonw+gerrit@instructure.com>
QA-Review: Jon Willesen <jonw+gerrit@instructure.com>
2016-12-20 20:26:52 +00:00
Pam Hiett 8ea51f046c Replace lock icon within an assignment when a file is unpublished
Fixes: CNVS-33867

test plan:
- as an admin/teacher add an image to your files within a course
- next create an assignment and embed that image you just
  uploaded within the assignment (use the right-hand sidebar
  image tab)... save assignment
- go back into your files and click the above image to change from
  "published" to "unpublished"
- from another browser/incognito window... login as a student
  that has access to the above course/assignment
- the student used to see http://www.screencast.com/t/EnSTotbSm8y
- the student should now see http://www.screencast.com/t/Ya8gmDgX5f

Change-Id: I2c8227dfa8329199782ee66bac63b457601b7f6b
Reviewed-on: https://gerrit.instructure.com/97718
Tested-by: Jenkins
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
QA-Review: Dan Sasaki
2016-12-20 19:02:43 +00:00
Jeremy Stanley 5b837c8b8c make assignments/discussions use new group set dialog
and remove a ton of legacy cruft

test plan:
 - create/edit an assignment or discussion topic
 - check the "This is a group <thing>" box
 - click the "New Group Category" button
 - the same "New Group Set" dialog that appears on the People page
   should appear, and should be fully functional
 - if you save the new group set, it should be selected in
   the dropdown box in the assignment or discussion edit page

also:
 - sanity check the course and account groups pages to ensure
   I didn't delete something that's still needed

fixes CNVS-33593

Change-Id: Ieadc720ed6bce5cc35e6dd5dd7dbee7cca1545ca
Reviewed-on: https://gerrit.instructure.com/97402
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Chris Ward <cward@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
2016-12-20 14:48:48 +00:00
Clay Diffrient 77501e2688 [eslint] Improve setup for different JS levels
This makes it so eslint handles situations where we don't have
ES2015+ available, while still allowing us to have our own common
rules.

Change-Id: I86b49a32433970afbcc48ef0f6fcdd7301795b63
Reviewed-on: https://gerrit.instructure.com/97872
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clay Diffrient <cdiffrient@instructure.com>
2016-12-16 23:33:40 +00:00
Brent Burgoyne 8efd2ff9bc add I18n.n method for formating numbers locale
also includes a `n` handlebars helper, and propery formats the count
in pluralized strings.

closes CNVS-33190

test plan:
- NA (qa example implementation in future commit)

Change-Id: Ic199b334a263afe0463fa3efd0797e5c9eeb3d93
Reviewed-on: https://gerrit.instructure.com/96839
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2016-12-15 19:57:31 +00:00
Derek Bender b619833d12 flip bucketting rules for grading periods
closes: CNVS-33153

this changes the boundaries for how dates are bucketed
into grading periods.

Previously:
  period_start_date <= date &&
    date < period_end_date

Now behavior:
  period_start_date < date &&
    date <= period_end_date

Test Plan:
 - Given a course with multiple grading periods enabled
 - Given a grading period set with grading periods (note the time
   and date of one of the grading period's end date)
 - Given an assignment due at the same time and date as the grading
   period's end date
 - When navigating to the gradebook and selecting the grading period
 - Then the assignment id visible for the grading period

Change-Id: Iaf4a278ec670eb8575336c57be0354be9aad2441
Reviewed-on: https://gerrit.instructure.com/97018
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Tested-by: Jenkins
QA-Review: Anju Reddy <areddy@instructure.com>
Product-Review: Christi Wruck
2016-12-15 18:58:01 +00:00
Jeremy Neander a6d83ee28f refactor front end grade calculator and increase spec coverage
This is purely a refactor of the existing grade calculator. It does not
alter existing behavior, but bolsters its spec coverage to protect
against unexpected grade calculation changes.

Ensuring that calculated grades are unchanged before and after this
refactor will be sufficient for QA.

closes CNVS-33841
refs CNVS-33572

test plan:
A. select or create:
  1. a course
  2. a teacher for the course
  3. a student for the course
  4. an assignment group for the course
  5. an assignment in the assignment group
  6. a graded student submission
B. ensure scores are calculated and visible for:
  1. Default (grid) Gradebook
  2. Individual Gradebook (SRGB)
  3. SpeedGrader
  4. Student Grades Page

Change-Id: I1e87949dc690d4ebee4e3960f2adb141bc5a5e0d
Reviewed-on: https://gerrit.instructure.com/96780
Reviewed-by: Shahbaz Javeed <sjaveed@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: KC Naegle <knaegle@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
Tested-by: Jenkins
2016-12-15 18:31:35 +00:00
Brent Burgoyne c64dded173 add js helper to parse number string for locale
also includes a helper to validate number strings for current locale

closes CNVS-33191

test plan:
- NA (a future commit demonstrating the use of the helper with be
  qa-able)

Change-Id: I1722aad263e611d127317b2f1a3832537742c3fb
Reviewed-on: https://gerrit.instructure.com/96677
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Brent Burgoyne <bburgoyne@instructure.com>
2016-12-13 22:42:18 +00:00
Shahbaz Javeed 065f687ee4 what-if grades now have screenreader docs and notifications
closes CNVS-31550

test plan:
* As a teacher, create a course with a couple of assignments
* As a student, login to Canvas (or masquerade)
* With VoiceOver or other screen reading tech enabled, go to the
  grades summary
* Tab over to the grades table
* The first time you enter the table the instructions about the
  what-if tool that are displayed in the bottom right corner
  of the screen will be read out by VoiceOver
* Change any of the grades to setup what-if scenarios and notice
  that VoiceOver will read out the new grade as you change it.

Change-Id: I9070d210d7d2280c2b5e5c948e5ec8d1261ee2a5
Reviewed-on: https://gerrit.instructure.com/97406
Tested-by: Jenkins
Reviewed-by: Jeremy Neander <jneander@instructure.com>
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Alex Morris <amorris@instructure.com>
Product-Review: Christi Wruck
2016-12-13 22:36:14 +00:00
Ryan Shaw db17a9feab fix a case where dateJS could get into infinite loop
basically, it thought it was calling back to the 
native date.prototype.toString but it was really
just calling itself, so it would keep doing that 
infinitely.

test plan:
this didn’t happen very often but sometimes the
calendar page would throw an error on load because
the it ran out of js stack size. so it is pretty
hard to think of a definitive test of where it didn’t
work before but if you 
open calendar page and files page and they work,
this should be good

Change-Id: I1beec8347b46582761912a2137640bfd3fe6b9e2
Reviewed-on: https://gerrit.instructure.com/95845
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2016-12-13 16:39:36 +00:00
Ryan Shaw 612637531a fix ie11-polyfill so Promise.all works in IE11
fixes: CNVS-33769

the file we were building with core-js was
not including an array iterator polyfill
so if you were using this polyfill in IE 11
and did `Promise.all([1,2])` it would fail
saying ‘1,2 is not iterable!’

test plan:
in IE11,
load a page in canvas
open the developer tools and type:
Promise.all([1,2]).then(function(o,t){console.log(‘it worked’, o, t)})
it should log:
“it worked 1 2”
and not throw an error

Change-Id: I49a6cd439c151b7703d77a7400856f438937443d
Reviewed-on: https://gerrit.instructure.com/97219
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-12-12 21:31:28 +00:00
Ryan Shaw a47fa57810 make quiz-taking-police web worker work with webpack2
closes: CNVS-33717

test plan: 

in take-quiz, we had this one require for:
'worker!compiled/workers/quizzes/quiz_taking_police'

that worked because requireJS would look for a plugin
at public/javascripts/worker.js and webpack1 understood
‘worker’ to mean ‘worker-loader’ (I don’t know
if we even meant it to work in webpack before or if
we just got lucky that it did) but in webpack2:
“It's no longer allowed to omit the '-loader' prefix when using loaders.
You need to specify 'worker-loader' instead of 'worker’.”

so to make it work out of the box for webpack2,
I just renamed the requireJS plugin file to worker-loader
so they would both work like before.

test plan:

in requireJS & webpack
* go to take a quiz
* it should register a web worker and the stopwatch
  should tick

Change-Id: I8ad55530b6cef00f674afead5a53db52959f4a03
Reviewed-on: https://gerrit.instructure.com/97038
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Benjamin Christian Nelson <bcnelson@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2016-12-12 20:33:21 +00:00
Cameron Matheson ec33793771 student context card on course sections page
refs FALCOR-8
closes FALCOR-31

Test plan:
  clicking student names on the course section page
  (/courses/NN/sections/MM) should show a
  student context card when the feature flag is on

Change-Id: Iacf8e4f778376531e8becbc97d056b32834180f7
Reviewed-on: https://gerrit.instructure.com/96294
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2016-12-09 20:49:33 +00:00
Michael Brewer-Davis 03834314fb eportfolios a11y for reorder pages/sections
closes OUT-4

Test plan:
On eportfolios page,
- verify that pages and sections
  can both be reordered using the mouse (drag and drop)
  and the new move to dialog.
- verify screen reader a11y for move to dialog
- verify moved edit/delete functionality still works
  as expected

Change-Id: I342fcb0a4ac7e995f0566687cd1daceb2be4f1f3
Reviewed-on: https://gerrit.instructure.com/96188
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Nathan Rogowski <nathan@instructure.com>
Tested-by: Jenkins
2016-12-08 21:40:38 +00:00
Nick Houle ef1c96ecbe Add 'require assignment due date' option under SIS syncing
Fixes: SIS-2574

Test plan:
- Create a sub-account
- Test that SIS syncing controls can all be set for the root account
- Test that SIS syncing controls are all disabled in the sub-account
  when "locked for sub-accounts" is set in the root account
- Test that SIS syncing controls are all enabled in the sub-account
  when "locked for sub-accounts" is unset in the root account

Change-Id: If933ec866d2788ba067e735b987af402012c934e
Reviewed-on: https://gerrit.instructure.com/96040
Reviewed-by: Ken Romney <kromney@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Phillipps <adam@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2016-12-08 16:49:39 +00:00
Michael Brewer-Davis 3e88f8109d build correct mastery paths url for course home page
closes: CYOE-388

Test plan:
1.  Make the modules page the course home page.
2.  Visit the course home page.  Verify that mastery
    paths links (both inline and in the menu) are
    correct.
3.  Make the assignments page the course home page.
    Verify that mastery paths links are correct
4.  Visit the assignments, modules, quizzes, and
    discussions pages.  Verify that mastery path links
    are correct.

Change-Id: If0623a7e4d324523993f334a854919e43ab40508
Reviewed-on: https://gerrit.instructure.com/95315
Reviewed-by: Christian Prescott <cprescott@instructure.com>
Tested-by: Jenkins
QA-Review: Alex Ortiz-Rosado <aortiz@instructure.com>
Product-Review: Michael Brewer-Davis <mbd@instructure.com>
2016-12-02 15:52:44 +00:00
Felix Milea-Ciobanu 631b339259 fix dragging module items to last module
fixes CNVS-32266

test plan:
- create some modules and module items
- have module items in the first module
- drag one of the items to the last module
- the drag and drop should work as with any other module
- it should always work without using any workarounds

Change-Id: Ibfbe4a2d6a9d488ec9389744630ef1b7c84f5699
Reviewed-on: https://gerrit.instructure.com/95928
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Heath Hales <hhales@instructure.com>
Product-Review: Felix Milea-Ciobanu <fmileaciobanu@instructure.com>
2016-11-30 18:26:57 +00:00