Commit Graph

10961 Commits

Author SHA1 Message Date
Cody Cutrer 7e8a540900 apply ms office deep link fix to several more vectors
fixes CNVS-23333 (again)

test plan:
 * configure SAML auth on an acocunt
 * set up a link to say http://canvas.dev/, http://canvas.dev/login,
   http://canvas.dev/login/saml in a Word document
 * be not logged in to canvas yet in your browser
 * click the link
 * it should properly work sending you to the login page

Change-Id: Ic219220ede9a6e398fe361addf5089f5431d23cc
Reviewed-on: https://gerrit.instructure.com/66478
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-11-09 21:36:54 +00:00
James Williams 1c549bfc82 fix incorrect override caching through upcoming_events
test plan:
* make sure the dashboard sidebar has correct due dates
 for overridden assignments

closes #CNVS-23993

Change-Id: I09ab704768b51aebe294515aad1791340b51f67f
Reviewed-on: https://gerrit.instructure.com/66467
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-11-09 20:47:47 +00:00
Cameron Matheson e297f71f08 message students who: don't timeout
fixes CNVS-22822

Test plan:
  * (in a very large course)
  * use "message students who" in the gradebook to message everyone in
    the course
  * the messages should be delivered
  * there should be no errors

  * test other "message student who" features (just make sure they
    still work)

Change-Id: I776f151e8a4b521727c4b759f50a27c602e3c557
Reviewed-on: https://gerrit.instructure.com/62928
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-11-09 17:30:14 +00:00
Eric 1fe2a194ee Normalizes Capitilization of "Comments" on buttons
Fixes CNVS-19170

Normalizes Capitilization of "Comments" for "Open for Comments",
and "Close for Comments". I chose specifically go to a capital
because not only is that what the JIRA asked for, it's also
what appeard most elsewhere when I searched the projects.

Change-Id: Ie88a3b22188f0b4d1cd6d0717d5be5c727ba8d31
Reviewed-on: https://gerrit.instructure.com/64051
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Michael Hargiss <mhargiss@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-11-09 15:27:58 +00:00
Amber Taniuchi 7083996dfc add ids to student grades page
Many divs in the student grades page did
not contain specific identifiers which
made it difficult for institutions to
hide specific elements via CSS. Added
ids to divs in the right hand nav as
well as a few other elements that were
missing ids.

fixes CNVS-24731

Test Plan:
1. Have a course with several assignments,
some of which have a rubric.
2. Grade one of the assignments for a student
using a rubric.
3. Mute a different assignment.
4. Navigate to a student grade page as a
student.
5. Make sure nothing is broken, including
viewing a rubric, what-if scores, "Show All
Details" button and 'calculate based only on
graded assignments' check box, etc.

Change-Id: Idbb88405c76a2ef8fb50284fc017c29359a00aba
Reviewed-on: https://gerrit.instructure.com/66431
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Keith T. Garner <kgarner@instructure.com>
2015-11-06 20:49:18 +00:00
Dylan Ross 19c91f01b6 export selected grading period instead of current
this commit also adds support for the
'Display Totals for "All Grading Periods' feature
flag for exported gradebooks.

closes CNVS-24001

test plan:
  - navigate to a gradebook with multiple
    grading periods
  - select all grading periods via the
    grading period dropdown
  - export the gradebook
  - verify the exported gradebook has all
    the assignments

  - select the first grading period
  - export the gradebook
  - ensure only assignments in that
    grading period have been exported
  - ensure assignments without due dates
    have not been exported

  - select the last grading period
  - export the gradebook
  - ensure only assignments in that
    grading period have been exported
  - ensure assignments without due dates
    have been exported

  - create an assignment that is due after
    all the grading periods
  - ensure the assignment is not included when
    exporting all grading periods
  - ensure the assignment is not included when
    exporting an individual graidng period

  - export all grading periods and ensure the
    assignment group current and final columns
    as well as the total column is not included
    in the csv

  - enable 'Display Totals for "All Grading Periods'
    and export all grading periods again. ensure
    assignment group current and final, as well as
    the total column are exported
Change-Id: If9f6a41704f6cdb1cd09d08b5f467cd0ea395ed3
Reviewed-on: https://gerrit.instructure.com/65362
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-11-06 20:17:08 +00:00
Cody Cutrer 0415279fe6 expose installation uuid in health_check
refs CNVS-24699

test plan:
 * go to /health_check.json
 * it should include an installation_uuid

Change-Id: I4eedd51ccee7a5cdcd15df4af30443ff9fa01145
Reviewed-on: https://gerrit.instructure.com/66219
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
2015-11-06 04:37:36 +00:00
Michael Nomitch 84fb6a3890 dont treat fullcalendar css as url
fixes: CNVS-24780
fixes: CNVS-24765

test plan:
  - run `rm -rf public/dist`
  - recompile assets and start setver
  - fullcalendar renders properly

Change-Id: Ibf03b768fc638c7f88463e354e33f0ac0b765089
Reviewed-on: https://gerrit.instructure.com/66452
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-11-05 23:05:20 +00:00
Davis McClellan 09b18d7a8c make nil end_at value for section return true for restricted date
fixes CNVS-24694

test plan:
- Create a course that is attached to a term that has ended.
- Create a section in the course that has a start date and no end date.
- Select the "Users can only participate..." box for that section.
- Create a quiz.
- Masquerade as a student in the section and attempt to take the quiz

- note -
 Be sure to test CNVS-20857 and CNVS-18768 to be sure nothing is broken

Change-Id: I7148883494e135f737a4a722f44ed51c1b104b85
Reviewed-on: https://gerrit.instructure.com/66498
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins
QA-Review: Landon Holmstead <lholmstead@instructure.com>
Product-Review: Davis McClellan <dmcclellan@instructure.com>
2015-11-05 23:04:35 +00:00
Brad Horrocks 020e580830 Better error logs and responses for grade passback
This adds error reports for failed/unsupported outcomes

Fixes PLAT-1278

Test Plan:
TBD... Any sugestions

Change-Id: Ie29f5e92735d73268f9221bdba73d1ef7af87758
Reviewed-on: https://gerrit.instructure.com/66083
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-11-05 22:49:25 +00:00
Brad Horrocks ff5dd90527 Capture better errors for failed grade passback
This adds oauth info to captured error exceptions

Fixes PLAT-1256

Test Plan:
The error report should include all of the OAuth1 header information
If the Authorization Header is not OAuth1 it should not include it
The error report should also include the signature canvas generates
The error report should include where the authorization failed. i.e.
signature, nonce, expiration

The best way to test this is run the test :D
The best way to manually test this:
- Setup an LTI Tool (I used the example tool with all the checkboxes
  checked)
- Use post man stand alone
- create a new request to "/api/lti/v1/tools/<tool_id>/grade_passback"
- Use post man's Authorization tab to setup OAuth1
- Use the tools key and secret
- tweak settings for different failure tests
- select add params to header
- click update request
- send the request

You will need to manually change the auth header to get to some
failures. Let me know if you need help

Change-Id: If09882017eaae0ddff96d39b7f33c2da9c1a7fc8
Reviewed-on: https://gerrit.instructure.com/65944
Tested-by: Jenkins
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-11-05 22:49:16 +00:00
Davis McClellan 51e6c96786 make the question input box bigger
fixes CNVS-23375

test plan:
- see if the box for inputting a grade in speedgrader is bigger

Change-Id: Ia43d59dfccba22e0a6ef01acb25dd0d6e8934dc4
Reviewed-on: https://gerrit.instructure.com/66554
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Landon Holmstead <lholmstead@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-11-05 22:29:49 +00:00
Ryan Shaw a0b25e29b1 fix so script bundles load on pages that include plugin JS
fixes: CNVS-24821

when the code to enable using webpack got submitted, 
a bug was introduced where we modified the "base_url" 
used for the JS bundles we load on the page. this 
meant that once you loaded one analytics javascript 
file, every other bundle after it would break 
(because it would try to look for that bundle in 
the plugin's directory)

test plan:
* go to a course that has analytics turned on:
  eg: /courses/x
* make sure the javascript for analytics gets loaded 
  as well as all the scripts for everything after it

Change-Id: If697b4fe3d1a00ef49fd94f0ffee8ffcdbb28b07
Reviewed-on: https://gerrit.instructure.com/66516
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2015-11-05 22:27:19 +00:00
Sterling Cobb 80fd9ebcb9 convert toolbar to jsx
refs CNVS-22335

This needs to be QA'd really well because we don't have any regular
test around this.

Test Plan
- Go to the files page
- Test everything around the top toolbar
- Everything should still be working

Change-Id: I4e3760e75d2e44c6d5f53bc60841294152f3edd2
Reviewed-on: https://gerrit.instructure.com/61667
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-11-05 22:23:42 +00:00
Jonathan Featherstone 879974c82f Fix date restricted course in CourseSelectionView
New date restricted course responses from the courses api break the
current CourseSelectionView.  CourseSelectionView assumes that course
responses have a valid "term" record associated with them.  This caused
"is_concluded" logic to break in the view.

Test Plan:
  * Restrict a student from viewing a course using course dates that
    are outside of current date range
  * As that student, create multiple conversations
    * Verify that conversations modal shows all courses that student has
      access to
    * Verify that conversations modal does not show courses that are
      time restricted

Previously, opening and reopening the new conversation modal would cause
the modal to be in an inconsistent state where the course selection view
would not populate correctly, and a message could be sent with no course
or recipient, resulting in the server error described in original
ticket.  See screen capture in CNVS-24710.

fixes CNVS-24710
refs CNVS-22905 (regression introduced in this commit)

Change-Id: Ia229b24691c5bf1d8f77ab35a8853a640b6073f6
Reviewed-on: https://gerrit.instructure.com/66536
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins
QA-Review: Gentry Beckmann <gbeckmann@instructure.com>
Product-Review: Jonathan Featherstone <jfeatherstone@instructure.com>
2015-11-05 21:28:12 +00:00
John Corrigan 8332c2b79a remove tmp files when creation of ePub export is successful
fixes CNVS-24574

...keep them around when there is an error.

test plan:
- Export an ePub.
- Note the file names for the attachments associated with the latest
  ePub: `EpubExport.last.attachments.map &:filename`.
- Note the root tmp directory used by the app: `Dir.tmpdir`.
- It gets a little tricky here: since the ePub generation itself runs
  out of process in a job, the tmp dir used reflects this. Look for a
  folder that looks something like this:
  `/var/folders/7g/w8y0n7_j18v65h93xhmm9z4hxzj3r2/T/job-8773-jcorrigan.lapto.corp.instructure.com.53602-20151026-53602-1bvz2e8/`
- Note that the job folder doesn't contain the file names noted above,
  or that the job folder doesn't even exist.

Change-Id: Ia346ebc8865945a6c6d6efab4a5d2bfc714c2884
Reviewed-on: https://gerrit.instructure.com/65821
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: John Corrigan <jcorrigan@instructure.com>
2015-11-05 20:59:32 +00:00
Jacob Fugal 977b96898e check account-granted perms on relevant shards
fixes CNVS-24194

when checking if any of the target's associated accounts grant a
permission to a seeker, don't only look at the target's associated
accounts on their home shard. but don't look at all associated shards,
either, as that may be overkill. just look on shards that the target and
the seeker share.

test-plan:
 - have a target user living on shard 1 but also somehow associated with
   an account in shard 2
 - have an admin in that account on shard 2 that should get permissions
   on the target user
 - try and exercise those permissions as the admin; should work
 - e.g. user from shard 1 in a course on shard 2. admin in that course's
   account should be able to view the user's page

Change-Id: I19a8db26740d4b061dad73d45f76e089c762acea
Reviewed-on: https://gerrit.instructure.com/66480
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-11-05 20:38:54 +00:00
Cameron Matheson a9dc5a5077 log when grades are recomputed because of Assignment#set_default_grade
Change-Id: If69eb289a7cf882d3be55200c38a9843226f2680
Reviewed-on: https://gerrit.instructure.com/50698
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
Product-Review: Josh Simpson <jsimpson@instructure.com>
QA-Review: Josh Simpson <jsimpson@instructure.com>
2015-11-05 18:49:17 +00:00
Cameron Matheson cd7bd26a79 associate c(anva|roco)docs with submissions
this is necessary to do permission checks for submissions with multiple
versions

closes CNVS-10734

Change-Id: Ifee6e35d851dc3953c5f3fe1086015bf51e469f1
Reviewed-on: https://gerrit.instructure.com/62648
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Keith T. Garner <kgarner@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-11-05 18:47:48 +00:00
Jeremy Stanley febae29172 limit folder names to 255 chars
also return error status when sending overlong names via the API

test plan:
 - you should not be able to enter a name longer than
   255 characters when creating a new folder
   on the files page
 - you should get a 400 Bad Request when trying to create
   a folder with a name longer than 255 characters via
   the API
   (this failed before, but returned status 200)

fixes CNVS-24261

Change-Id: I4be6725ecccca61073b27f1c1f48dd7f4ff586ad
Reviewed-on: https://gerrit.instructure.com/65785
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-11-05 17:51:26 +00:00
Sterling Cobb 016a8ee80f convert FolderChild to jsx
refs CNVS-22335

Converts FolderChild over to JSX

FolderChild is touched by pretty much verything in the filees section
so the QA has to be extensive, especially because there are no
automated test around this component.

Test Plan
- Go to the files section
- Make sure everything related to folders and files is still working
- Make sure you can see the publish buttons and edit folders etc.

Change-Id: I00929f9f0decb88a1d443e3c5a5a2849053b3ab0
Reviewed-on: https://gerrit.instructure.com/61746
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2015-11-05 17:50:31 +00:00
Spencer Olson 643700ae36 remove attendance column logic from react-gb
closes CNVS-23054

test plan:
 - verify the settings dropdown in the react
   gradebook did not break

Change-Id: I64c4b81204831817fb52f2ff00989a881730e63b
Reviewed-on: https://gerrit.instructure.com/66443
Tested-by: Jenkins
Reviewed-by: Cody Poll <cpoll@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-11-05 17:15:55 +00:00
Pam Hiett 6fcdcf6442 reference new ic-Table for gradebook/history view
Fixes: CNVS-24102

Test Plan:
- as a teacher using the new UI navigate to a course that has assignments
  that have been graded
- click on the left-hand sub-nav "Grades" [should put you in a location
  similar to /courses/#/gradebook] at the end of that url add /history
- from this view you will see a history of the grades by date
- hover over the assignment names and you will be able to click to see
  a table view (within the new UI the ic-Table class should be applied)
- in the old UI the table will still load the table class

Change-Id: If153f14cc01fd6449b90551d21f6fefb978c02e1
Reviewed-on: https://gerrit.instructure.com/65405
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-11-05 14:38:33 +00:00
Benjamin Porter 7c4fd55ce5 Rollup Score: Add helpful comment to decaying_average
There has been some confusion surrounding whether or not we do a true
decaying average in canvas, or a weighted average.  This should help
clarify that.

Fixes CNVS-24779

Test Plan:

    Full regression test over all of canvas

Change-Id: I757c803126e3c1e311bc524189d82246a741b8a4
Reviewed-on: https://gerrit.instructure.com/66451
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
Product-Review: Benjamin Porter <bporter@instructure.com>
QA-Review: Benjamin Porter <bporter@instructure.com>
2015-11-05 06:13:26 +00:00
Cameron Sutter eed863af18 due date in assignment created notification
fixes CNVS-23430

test plan:
- when a teacher gets an assignment created notification
  email on a DA'd assignment, it should not say:
  'due: No Due Date' when there is a due date

Change-Id: I010dfc7b04cd478793cf05b5205220a33dc0e3e5
Reviewed-on: https://gerrit.instructure.com/64654
Tested-by: Jenkins
Reviewed-by: Brian Finney <bfinney@instructure.com>
QA-Review: Landon Holmstead <lholmstead@instructure.com>
Product-Review: Jason Sparks <jsparks@instructure.com>
2015-11-05 04:02:56 +00:00
John Corrigan 0c55c060f0 enable inter-document ePub linking for canvas objects
closes CNVS-21803

- Adds CC::Exporter::Epub::Converters::ObjectPathConverter module.
- Adds #convert_placeholder_paths_from_string!, a convenience method
  that converts canvas object links & media links.

test plan:
- Have a course that has canvas object links from one type of canvas
  object to another. For example, assignments, discussion topics &
  quizzes with links to wiki pages (or each other).
- Generate an ePub for this course.
- Observe that links to other types of canvas objects work within the
  generated ePub.

Change-Id: Ia25c57a95d9383ab0cacbad9fea5439195472425
Reviewed-on: https://gerrit.instructure.com/63810
Tested-by: Jenkins
Reviewed-by: Matt Berns <mberns@instructure.com>
QA-Review: Deepeeca Soundarrajan <dsoundarrajan@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-11-04 21:33:34 +00:00
Amber Taniuchi ffed72a3fb add grouped parameter to SubmissionApiController#index
If an assignment is marked to be graded as a group,
speedgrader will group the assignments accordingly, but
in the API, submissions were being returned individually
rather than being grouped. This adds a check for a 'grouped'
param in the SubmissionApiController#index action so that
a single assignment/submission object is returned
per student group.

fixes CNVS-23203

Test Plan:
1. Have a course with a few students enrolled
2. Create user groups and put at least two students
in one group.
3. Create an assignment set to be graded as a group
4. Have a student from one of the groups submit
to the assignment on behalf of the group.
5. With a teacher or admin token, ping the
Submissions list API with params grouped = true
Verify just a single assignment object is returned

Change-Id: I3465b469533d6cff6b3b7c679d8868ceef3dee17
Reviewed-on: https://gerrit.instructure.com/65312
Reviewed-by: Spencer Olson <solson@instructure.com>
Tested-by: Jenkins
Product-Review: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
2015-11-04 20:52:42 +00:00
Colleen Palmer 2ecc8d1aea Add class for groups subpanel so spacing is better
closes: CNVS-24067

This adds a class so the spacing is more consistent
around any groups added to the list in the navigation subpanel.

Test Plan:
- Enable new UI and make sure you have groups
- In global navigation, click on groups to see the subpanel
- Any groups listed should have have consistent spacing around them for
better ux

Change-Id: Id6fab2a6166b335945778e83ea87e2fc8de84d43
Was:  http://cl.ly/image/1x0X2H3i1s0i
Now: http://cl.ly/image/0B342K0G1p0F
Reviewed-on: https://gerrit.instructure.com/65254
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Tested-by: Jenkins
QA-Review: Nathan Rogowski <nathan@instructure.com>
2015-11-04 20:39:13 +00:00
Dylan Ross 9c76ec7a9b fix grade display in react gradebook
test plan
  - ensure grades are displayed in
    the react gradebook

fixes CNVS-24755

Change-Id: Ib32bf511d0aa8c6db22b1364b470e17a8a9a9eca
Reviewed-on: https://gerrit.instructure.com/66456
Tested-by: Jenkins
Reviewed-by: Spencer Olson <solson@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Dylan Ross <dross@instructure.com>
2015-11-04 20:14:07 +00:00
Clay Diffrient 2822e90d61 [a11y] Make course wizard better for screenreaders
fixes CNVS-23059

Test Plan:
  - Load up the course wizard
  - Using a screenreader, the wizard modal should have a 'main'
    landmark when opened.
  - There should be a screenreader-only H2 above the list that
    says 'Setup Checklist'
  - The list should actually be list elements and navigable via
    the list shortcuts in the screenreader

Change-Id: Iff3c32f04cef1d2928efb4e3668479b9f1346135
Reviewed-on: https://gerrit.instructure.com/64874
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Tested-by: Jenkins
Product-Review: Aaron Cannon <acannon@instructure.com>
2015-11-04 18:00:19 +00:00
Pam Hiett 8d63ea0bc0 update gradebook assignment details tables within a course
Fixes: CNVS-24040

Notes:
old ui screencast = http://screencast.com/t/sCSdjQTD

new ui screencast = http://screencast.com/t/jRUJkVBSk

Test Plan:
- as a teacher using the new UI
- navigate to a course that has an assignment(s) and in which a
  student has been enrolled
- click into the grades link on the sub-nav
- make sure you are looking at the "Individual View"
- from here you will need to drill down into the content
  + select a section
  + select a student
  + select an assignment
- the tables that display under the "Student Information" and
  "Assignment Information" should be styled using the new
  styleguide table class (ic-Table)
- part two of this commit is to check the outcome table that
  displays on the Learning Mastery tab
  + on the "Content Selection" select a student and an outcome
  + the updated table will display within the "Outcome Information"
    area (the caveat is that you will have needed to have an
    outcome set-up and have at least two different students that
    have submitted answers towards that outcome two different times)
- as part of the test plan ensure the old styles show (table) when
  using the old UI

Change-Id: I1ba73ff28ac4699bd563a91b0236a3a5c698990c
Reviewed-on: https://gerrit.instructure.com/65189
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-11-04 14:52:37 +00:00
Chris Hart 002d2ee002 Updated styles needed for module/assignments pagination
Fixes: CNVS-24153

The new styles are only being applied to the new
UI; however, please test both the legacy and new
UIs.

Test plan:
- Open a course with a series of assignments, and
  go to the Assignments index page from the main nav

- Click on one assignment in the series and you
  will see the pagination animate up on page load.

  New UI: http://screencast.com/t/QSMomtGKqdj
  Legacy UI: http://screencast.com/t/OcpkHVk6nH

  Note that the animation is kind of stutter-y
  sometimes. I attemped to smooth it out in both
  UIs by changing it to animate the "transform"
  property instead of "height"; this helped a bit,
  but the animation still seems to fire twice on
  some page loads. Because this is an existing
  problem, I moved on...

- Make sure the controls work as expected, and
  repeat the test on the Modules index page.

Change-Id: I82128da30b6bf7962d9d25bebad37c5b91915459
Reviewed-on: https://gerrit.instructure.com/66312
Tested-by: Jenkins
Reviewed-by: Pam Hiett <phiett@instructure.com>
Product-Review: Pam Hiett <phiett@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-11-04 13:49:03 +00:00
James Williams 77555057d2 wordwrap submission links in speedgrader
test plan:
* submit a really long file for an assignment
* in speedgrader it should wrap the file name
 (instead of stretching past the edge)

closes #CNVS-24696

Change-Id: Ie84d7fb51b97654e9db5d005693651fcdbca0bfe
Reviewed-on: https://gerrit.instructure.com/66282
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-11-04 13:07:52 +00:00
Josh Orr d2925d4c58 Add courses for user endpoint
FIXES MBL-4841

New Endpoint:
  get api/v1/users/:user_id/courses/

Test Plan

1. Create student account with course enrollment on one shard.
2. Create an account to act as a parent on a different shard from student.
3. Add student as an observee of parent using the student's token to
create the association.
4. Call the new endpoint using the parent's auth token and the student's
id. Ensure that you can see the students courses on the student's shard.

Change-Id: Ie3fc15bc2c70a9e219d14c1a91e90eccfabc2559
Reviewed-on: https://gerrit.instructure.com/64943
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ben Kirato <benk@instructure.com>
Product-Review: Josh Orr <jgorr@instructure.com>
2015-11-03 22:48:07 +00:00
James Williams 2ff7194759 treat text files consistently when canvadocable
test plan:
* enable canvadocs
* in the console, add "text/plain" as a valid mime type by running
 the following

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

* upload misc code files (".rb", ".py", etc)
* link to them from html content (e.g. pages, assignments)
* should be able to preview them with canvadocs
* clicking on the links should download the files right away

closes #CNVS-17485

Change-Id: I704c96f15a194a50cb8e0dcdb47373c711c5ad04
Reviewed-on: https://gerrit.instructure.com/65829
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-11-03 21:17:22 +00:00
James Williams 3c37806937 send individual messages through scheduler for over 100 students
test plan:
* have over 100 students available to message through the
scheduler for an assignment group
 (or you can reduce the threshold in the console with

Setting.set("max_group_conversation_size", "X")

where X is a more reasonable number, like 5

* it should work

closes #CNVS-23190

Change-Id: I65eb65eb4f523706bc12886504b0827041ddbf5f
Reviewed-on: https://gerrit.instructure.com/66305
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-11-03 20:57:39 +00:00
Ethan Vizitei 5183710300 Add a JWT endpoint for generating services tokens
closes CNVS-24285

This token isn't consumed by anyone yet, ultimately it will be used
to be passed back to canvas from other trusted services to
prove the user is authorized to those services and assets.

TEST PLAN:
1) login as a user
2) visit /jwts/generate
3) you should see a token-like thing in the JSON

Change-Id: I95852758597606d4ee3f1d2c788fcb252e7c154a
Reviewed-on: https://gerrit.instructure.com/65983
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-03 19:32:45 +00:00
James Williams 67b81ccda5 remove enrollments_visible_to
refs #CNVS-23729

Change-Id: I0b8b6fb61533d0a61d9a302a5beaa3918b317d63
Reviewed-on: https://gerrit.instructure.com/66362
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-11-03 18:46:22 +00:00
James Williams a0ce9bff54 restrict external feed entry uuid length
closes #CNVS-24704

Change-Id: Ia33fd60332fdbedf0e88e3912d7c693ea1e7418d
Reviewed-on: https://gerrit.instructure.com/66283
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-11-03 15:52:36 +00:00
Andrew Butterfield f8220767c1 Fix icon accessibility issue in To Do list
fixes CNVS-23619

It will probably be a good idea to make sure that the color that is
being used now is not an accessibility issue with Nathan. The
green check icon next to recent feedback items will always be green
now and is not meant to convey additional information.

Previously, To Do and Coming Up items had check marks next to them that
were gray and because of this a correlation existed among the three
lists that allowed color to convery additional information that
screenreader users did not have access to.

Test plan:
* Ensure the following for both a student and a teacher
* Ensure that in the To Do and Coming Up lists if the assignment is:
  a quiz: a quiz icon is shown
  a graded discussion: a graded discusion icon is shown
  an assignment: an assignment icon is shown
* Ensure that in the Coming Up list if an event is there a calendar icon
  is shown
* Ensure that in the Recent Feedback list the icon shown next to every
  item is a green checkmark
* Ensure that for each calendar event, quiz, discussion, and assignment
  icon a screen reader reads that the assignment is of that type

Change-Id: I12c435a2694921c1ade775a935105cf813e08c3d
Reviewed-on: https://gerrit.instructure.com/65690
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Andrew Butterfield <abutterfield@instructure.com>
2015-11-03 15:17:30 +00:00
Alex Boyd d3ebff04a9 Link to reset bounce counts for communication channels
Fixes CNVS-20747

Test plan:
 - Create a user
 - Add an email address to the user
   - The address doesn't need to be able to actually receive
     messages, so put anything you want in here
 - Make note of the user's id
 - Assuming the user's id is 42, open a rails console and type:
     c = User.find(42).email_channel
     c.bounce_count = 3
     c.save!
 - Log in as the user (actually log in, don't just masquerade)
 - Visit the user's settings page
 - Verify you see the usual warning triangle next to the user's
   email address
 - Verify you don't see the reset icon (just a refresh-like icon,
   two arrows pointing in a circle)
 - Log in as a siteadmin
 - Masquerade as the user
 - Visit the user's settings page
 - Verify you see both the warning triangle and the reset icon
 - Click the reset icon
 - Verify that the reset icon and the warning triangle go away
 - Refresh the page and verify that they're still gone
 - Assuming the user's id is 42, open a rails console and type:
     c = User.find(42).email_channel
     c.bounce_count = 1
     c.save!
 - Log in as a siteadmin
 - Masquerade as the user
 - Visit the user's settings page
 - Verify you see only the reset icon and not the warning
   triangle
 - Click the reset icon
 - Verify that it goes away
 - Refresh the page and verify that it's still gone

Change-Id: Ibd9d2e04555be2ec3eae811fd93f2cba0645d870
Reviewed-on: https://gerrit.instructure.com/55139
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Allison Weiss <allison@instructure.com>
2015-11-03 00:43:35 +00:00
Pam Hiett 144621e640 convert wiki "pages" to use new tables with new UI turned on
Fixes: CNVS-23963

Test Plan:
- as a teacher using the new UI navigate to a course
- click the "Pages" link from the left-hand sub-nav
- if you do not have any pages created - create a couple so you can
  see the new table in action
- ensure the old table styles display when the new UI is turned off
- lastly ensure the view looks good for both old and new UI when you
  activate "Student View"

Notes:
- in order to get the new styles working for the new UI, table headings
  needed to added for the publish and manage settings icons (as for screen
  reader, not sure what is the best verbage so am open for feedback)

Change-Id: I5fa45e2c5d46e58dc37e8d25ccd5ebef7f9a96ca
Reviewed-on: https://gerrit.instructure.com/65059
Tested-by: Jenkins
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
QA-Review: Myller de Araujo <myller@instructure.com>
2015-11-02 23:00:52 +00:00
Pam Hiett 2432670dbc Fix High Contrast Button hover state
Fixes: CNVS-22000

test plan:
- as a user with the old AND then new UI using HIGH CONTRAST
- navigate to a course and click into the discussions link from the
  left-hand sub-nav
- hover over the various buttons on the page and the hover state
  should now be black with white text
- hop around in various areas to ensure the buttons have this new
  hover state
- ensure the buttons and hover are not affected when high contrast
  is turned off

Change-Id: Id2016f7f9b0e6b25bf0657d0ad9767e4f6f93dbb
Reviewed-on: https://gerrit.instructure.com/65740
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Chris Hart <chart@instructure.com>
Tested-by: Jenkins
QA-Review: Myller de Araujo <myller@instructure.com>
2015-11-02 22:29:28 +00:00
Ethan Vizitei 7f37f56885 Encourage users to submit an email
refs #CNVS-11466

Users who aren't logged in should submit
an email, otherwise we can't get back to them.
This adds some front-end validation to require
an email address if the user isn't logged in.

If they are, we leave it alone, we can identify
them from their session.

This also removes the 404.html page, I can't find
anywhere where we actually use it (and it is
exactly duplicated in the error_form and such)

Change-Id: I0aaa322aa25f4c3f316cb2ce15573c2ac288035c
Reviewed-on: https://gerrit.instructure.com/63715
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-11-02 22:05:49 +00:00
Clay Diffrient 2a104c9f10 Disable folder previews
This essentially reverts the behavior in e8eefad3.

fixes CNVS-23838

Test Plan:
  - Got to the files page with at least one folder
  - The toolbar preview button should be disabled
    when you have the folder selected
  - When you have a file preview open, it should
    navigate to all the files and not show folders
    at all

Change-Id: I2dc411d5c81970cba1986abae7b5f0c73af6cfc6
Reviewed-on: https://gerrit.instructure.com/66138
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-11-02 21:42:58 +00:00
Joel Hough 361f0a2c6e don't toggle calendar sidebar lists with hidden button
fixes CNVS-23326

test plan
- see repro steps on the jira ticket

Change-Id: Idf175a9afed061e7cb367ffc1a2357aca26bb881
Reviewed-on: https://gerrit.instructure.com/66229
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-11-02 20:40:56 +00:00
Strand McCutchen 0e84683ec3 disable SRGB's assignment editing for past grading periods
Fixes CNVS-22398

CNVS-22398 was previously fixed with c428f832, however,
that commit created issues in Continious Integration, with
failures which only happened when the tests were run in
parallel. c428f832 was reverted in f566717b.

This commit differs from the c428f832 by avoiding
using fakeENV to manage creating an ENV for testing
purposes. The function isInPastGradingPeriodAndNotAdmin
is not as well tested as it was in c428f832, but this is
preferable to having intermittent spec failures in CI.

Test Plan:

1. As an admin, create an account-level grading period
    which ends in the past.
2. Create an assignment that is due within that grading
    period.
3. As a teacher, go to Gradebook, click on the grades for
    that assignment.
4. Observe that they are not editable.
5. Navigate to Individual View. Select the past grading
    period.
6. Select the assignment and a student in the Content
    Selection section.
7. Verify that you are unable to edit this grade.
8. Click "Submission Details."
9. Verify that you are unable to edit this grade.

Change-Id: I381c3d3c78f00eabc7a685ef3a0e8fea0f886ac2
Reviewed-on: https://gerrit.instructure.com/65417
Tested-by: Jenkins
Reviewed-by: Derek Bender <djbender@instructure.com>
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Christi Wruck
2015-11-02 19:30:23 +00:00
Joel Hough 23aef7cbd4 more accurate contextless send permission in conversations ui
fixes CNVS-23104

test plan
- as an account admin (not site admin), ensure that you can send
 a conversation message without specifying a context
- disable the "See the list of users" permission for the Account
 Admin role on the user's root account
- as the account admin, ensure that you now cannot send a
 conversation message without specifying a context

Change-Id: I25d6bacae1b213d6fa5caf7813de6d979282411b
Reviewed-on: https://gerrit.instructure.com/66155
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-11-02 18:44:08 +00:00
Sterling Cobb 251a6fcd81 convert SearchResults over to jsx
refs CNVS-24234

This needs a lot of QA There are not automated test written for the
file so everything its manual.

Test Plan
- go to new files
- start using all of the search features
- nothing should be broken

Change-Id: I359100463352175b8c684d9e58117ee78d2ad60f
Reviewed-on: https://gerrit.instructure.com/61558
Tested-by: Jenkins
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2015-11-02 17:44:02 +00:00
James Williams f467e07aec fix media object names not appearing for conversation media
test plan:
* send a conversation message to another user with a media
 comment, either uploaded or recorded
* on the receiving end, the media link should have a name

closes #CNVS-20036

Change-Id: I8fbc1b377883de5d8b83f30e53990e79cfd87414
Reviewed-on: https://gerrit.instructure.com/66172
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-11-02 16:55:52 +00:00