Commit Graph

7763 Commits

Author SHA1 Message Date
Michael Nomitch 233aaf3837 DA - fix N+1 on visible_assignments
test plan:
  - with da off, with da on, as teacher, as student
    - assignment group index works
    - assignment group api wors
    - gradebooks works
    - grade summary page works

Change-Id: I73c26f7f754ab738f67e936dcddad7cdfa5b86b6
Reviewed-on: https://gerrit.instructure.com/38365
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-12 17:30:45 +00:00
Ryan Shaw 36324f7a4f allow editing file/folder name in react_files
closes: CNVS-14670

test plan:
click the cog to edit a file or folder name,
it should work

Change-Id: I25eedea8bd2270ded67e1156de61caf696931b18
Reviewed-on: https://gerrit.instructure.com/38922
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-12 15:54:26 +00:00
Ryan Shaw 445de1969a show Date Created for things in react files
closes: #CNVS-12640
closes: #CNVS-12713

test plan:
* make sure "Date Created" column shows up between
  "Name" and "Date Modified" when viewing a folder
  or search results

Change-Id: I8261eb30a5bb6e05e9cf9a3b2cccd4eba633d48c
Reviewed-on: https://gerrit.instructure.com/38921
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-12 15:54:21 +00:00
Ryan Shaw ef1ae3a6c7 add empty state messages for files
fixes: #CNVS-12665

test plan:
* browse to an empty folder, it should look like
  https://instructure.atlassian.net/secure/attachment/17936/empty-state.png
* type a search query that doesn't match anything.
  it should look like http://cl.ly/image/1W2F0u1h2b0G

Change-Id: Ia6a71b18bae3cd3584d83207ce1056f31410d988
Reviewed-on: https://gerrit.instructure.com/38920
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-12 15:53:33 +00:00
Ryan Shaw b227eb8f9f use builtin Redirect component of react-router
...now that it exits
closes: CNVS-14706

react-router introduced a Redirect component in 0.5.2, use that instead of the custom one we made in files

test plan:
going to courses/x/files/folder should redirect to courses/x/files

Change-Id: I97f552833859c114279a5a3fa9b39806ea243d81
Reviewed-on: https://gerrit.instructure.com/38919
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-12 15:53:11 +00:00
Ryan Shaw e8aa5512ad switch react_files to react-router
fixes: #CNVS-14388
this fixes some of the hacky routing stuff I was doing

Change-Id: I81c730c80f9100e41941fc2b3615cfef92b92fea
Reviewed-on: https://gerrit.instructure.com/38812
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-12 15:52:53 +00:00
Aaron Cannon b9f6905fb5 Accessibility: Fixed label for close button in conversations compose dialog
Fixes CNVS-14516

Test plan:
- Open a conversation
- Open the reply dialog.
- Using a screen reader, verify that the close button is properly read.

Change-Id: I4b5a01c4b2bdc8311d001938a90d1b195a03492a
Reviewed-on: https://gerrit.instructure.com/38888
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-08-12 15:44:40 +00:00
James Williams 75d21f8f84 migrate has_X context_external_tool columns to separate table
currently every extension type has its own boolean db column
while this isn't strictly a problem, it is a little sad, and
given the fact that we will be adding more extension types soon,
it's probably better to take care of this now

also i'm refactoring some of the methods in context_external_tool

test plan:
* external tool regressions

refs #CNVS-13815

Change-Id: I6caf7b0e3d0de054906e3530f085fbfa9e8e499f
Reviewed-on: https://gerrit.instructure.com/38923
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-08-12 12:13:42 +00:00
Paul Hinze d10f45651c move <noscript> from <head> into <body>
The <noscript> element is not allowed to contain an <h1> tag when it is in <head>. This was causing W3C validation to hard fail for every page, masking further validation errors.

Also add proper a11y, i18n, capitalization to the message.

See: http://www.w3.org/TR/html5/scripting-1.html#the-noscript-element

Test plan:

 - Disable JavaScript
 - Ensure the "You need to have JavaScript enabled..." message appears.
 - Run W3C HTML Validator on a Canvas page
 - Check that there are no errors referring to <noscript> or <h1> tags
   in the <head>

Change-Id: I2904b5ecdff11cd4722d3fee173c5ff1dedf0063
Reviewed-on: https://gerrit.instructure.com/38807
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Adam Phillipps <adam@instructure.com>
QA-Review: Adam Phillipps <adam@instructure.com>
2014-08-11 22:35:37 +00:00
Matt Wheeler 135e18a337 Make learning mastery gradebook more accessible
Fixes: CNVS-13520

Add label to "student learning master gradebook" "outcome group"
expand all and collapse all buttons, and
cause them to properly set the aria-expanded attribute on each
individual item. Also disable button when they are irrelevent.

Test Plan:
1) Create a course, add a student, and turn on the student learning
   mastery gradebook
2) Add at least two outcome groups, each with at least two outcomes
3) Assume the identity of the student, and visit the gradebook,
   learning mastery tab
4) With your screenreader, verify that the outcome group exapand and
   collapse all buttons are usable.
  * Validate that the Expand All button is reported as disabled for
    screen reader users if and only if all items are collapsed,
    regardless of whether they were expanded via the expand all button,
    or manually, one-at-a-time.
  * Verify the inverse of the previous for the Collapse All button.

Change-Id: I685dab01f93608c5a34204bf3403d3f6fd4aa793
Reviewed-on: https://gerrit.instructure.com/37927
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: David Josse <david@instructure.com>
2014-08-11 22:30:30 +00:00
Brad Horrocks 56f6ac3be0 Notification icons will now look pretty for admins
I found that only 2 icons were missing error & question. Calendar was
overly huge. I decided it would be best to use the icons that are
actually rendered on the dashboard where the announcement is visible
to users.

I also moved some business logic out of an erb template and into a
helper. The announcement layout in the admin area is now more inline
with how they are actually rendered on the dashboard.

Fixes CNVS-14421

Test Plan:

- Log in as an admin and go to an account's settings page.
- Click the Announcements tab and Click the blue "+ Add a New Announcement" button.
- Fill in all the details of the announcement, but leave the icon as the default, then click the Add Announcement button.
- Verify the announcement appears on the announcements list and the icon shows a Yellow warning sign with an exclamation mark.
- Now, create a new announcement and change the icon to something else, then click the Add Announcement button.
- Look at the icon on the announcement's icon on the announcement list. The icon should now show up.

Change-Id: Ie8c0ad64c5de5ab6ab76b90ff3e95712f71be8d6
Reviewed-on: https://gerrit.instructure.com/38609
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Janelle Seegmiller <jseegmiller@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-08-11 20:38:18 +00:00
Jeremy Stanley 6a5defd99f set student progression pagination container
test plan:
 - have a course with more than 50 students and only one module
 - go to /courses/X/modules/progressions in a full-screen
   browser window (the key here is that the page needs to fit
   in the window vertically so there is no scrollbar attached
   to the window)
 - scroll down through the list of students on the right side
 - the second page of students should load
 - also, test viewing this page as a student (you should still
   see your own progression on the left)

I suggest testing in Firefox because Chrome sends a Window
scroll event even when there is nowhere to scroll

fixes CNVS-14255

Change-Id: Ib12b44e9d047b35193913be5e91e1f9dee74fa43
Reviewed-on: https://gerrit.instructure.com/38749
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-08-11 19:05:09 +00:00
Brad Humphrey 2ba6efd19e use new lti views for rendering launches
Test Plan:
 - Verify that the following launches still work:
	sessionless, borderless, module item selection, and direct link

fixes PLAT-459

Change-Id: I2b5c4d448540292ff451dd3d77ba69610f0764ab
Reviewed-on: https://gerrit.instructure.com/38790
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2014-08-11 17:57:19 +00:00
Brad Humphrey 92b1e34e2f send the correct beta/test domains in LTI launches
test plan:
 - LTI launches should contain custom_canvas_api_domain
 - on beta the domain should contain .beta
 - on test the domain should contain .test
 - regression test all LTI launches to ensure they contain this custom variable

fixes PLAT-589

Change-Id: Ifb5b05d92633c97358166644978730b5af1ed062
Reviewed-on: https://gerrit.instructure.com/38902
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2014-08-11 17:56:37 +00:00
Bracken Mosbacker 31d5b36837 add api flag to not send notifications for content exports
Test Plan:
 * Create a ContentExport through the api setting the skip_notifications to false
 * When it finishes you shouldn't get an email

closes PLAT-591

Change-Id: I036c65012bec6fe7cb57f6b79b3684c3b9eadf3f
Reviewed-on: https://gerrit.instructure.com/39015
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-08-11 16:57:33 +00:00
Clay Diffrient 468faa4553 Adjusts course details to have rows aligned properly
Adds an extra style 'tall-row' to be added to td's that have more
than one row of text permitting these cells to line up with their
label counterparts.

fixes CNVS-4772

test plan:
   - Open up Settings > Course Details
   - Look at the "Ends" row
   - The Ends label should line up with the content.
   - Look at the "Language" row
   - The Language label should like up with the content.

Change-Id: I3dcaaade2c96e9870a750c242c737c4355b5e549
Reviewed-on: https://gerrit.instructure.com/38806
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-08-11 16:21:05 +00:00
Nathan Mills 3e484ceeba move opaque identifier to it's own class
fixes: PLAT-590

test-plan:
Passes Specs

Change-Id: I784221f4f33da7d561c5616bf587195461d4a04a
Reviewed-on: https://gerrit.instructure.com/38975
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
2014-08-11 15:40:06 +00:00
Cameron Sutter 555de288ff DA - srgb shows message if assignment is not visible
fixes CNVS-14136

test plan:
in a course with differentiated assignments enabled and set up
- view screenreader gradebook
- scroll through the assignment and student lists
- verify that a message appears indicating that an assignment is not visible
- verify that instructors can grade visible assignments

- grade an assignment for all students who can see it
- move a student with 1+ graded submissions from one section to another that does not have assignment visibility
- view screenreader gradebook
- verify that their previous graded submissions are visible (and still graded)
- verify that you can re-grade previously graded submissions

Change-Id: I55f93abe05a7aafac82001d5e3b4c88fa80d72cf
Reviewed-on: https://gerrit.instructure.com/38081
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
2014-08-11 14:11:43 +00:00
Clay Diffrient edd77d33ac Makes course settings info links always visible
fixes CNVS-14489

test plan:
   - Go to account settings (e.g. /accounts/1)
   - You should see that underneath a course the links show
     without needing to hover over.
   - Confirm they are accessible by navigating to them using a
     screenreader.
   - The screenreader should recognize they are there.

Change-Id: I4148a6861864f4234c3a067a51c73c0cd98279d6
Reviewed-on: https://gerrit.instructure.com/38897
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-08-08 22:40:15 +00:00
Bryan Madsen 2701ac31a6 replace "Rich Text Editor" with "Rich Content Editor"
Test Plan:
  - create or edit a quiz
  - switch editors by clicking on "HTML Editor"
  - Confirm that the editor switch text now reads 'Rich Content Editor'.
  Extra WYSIWYG locations:
  - Confirm that assignments, syllabus content, calendar events, eportfolios, and wiki rich text editors are also edited
  - confirm that locales are updated

Closes #CNVS-14658

Change-Id: I87348365706cd7a9d77932b805204879e521425d
Reviewed-on: https://gerrit.instructure.com/38885
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
2014-08-08 22:15:47 +00:00
Nick Cloward a2ea3f49aa allow GET request for SAML logout
fixes: CNVS-14491

Allows GET requests for logout only when a SAML request is sent.
Still only allows DELETE methods for all other authentication types.

Test Plan:

Initiate a SAML logout, Should work.
Any other authentications methods should only logout with DELETE methods.

Reference test plan for g/32723.

Change-Id: Ia9153927e1ec17189d0fa00084837d451a1281a3
Reviewed-on: https://gerrit.instructure.com/38837
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-08-08 20:49:29 +00:00
Nathan Mills 78091e43ca add lti2 launch endpoint
fixes: PLAT-578

test-plan
*install the example lti2 tool provider
*launch the message

Change-Id: Id6def4acfb972c5488fdf8190999b41fb3ebcbf5
Reviewed-on: https://gerrit.instructure.com/38752
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
2014-08-08 19:45:17 +00:00
Brad Humphrey 465fc70ab1 add layout for borderless LTI launches
Test Plan
 - Visit /courses/:course_id/external_tools/retrieve?url=:launch_url&borderless=1
 - There should be no insecure warning for an https launch

fixes PLAT-581

Change-Id: I050b93f5f4f1fc82f8039a29cde802addc734fcd
Reviewed-on: https://gerrit.instructure.com/38757
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-08-08 16:50:19 +00:00
Clay Diffrient 431e4771d9 Modifies the edit section name field to be accessible
Adds an aria-label for screenreaders and overrides the default id
to keep it from conflicting with the create section input. Localizes
the label as well as updates the tests.

fixes CNVS-14482

test plan:
   - Go to a course settings page and click on the sections tab
   - Add a section
   - Edit a section
   - This should work without problem
   - Use a screenreader to navigate to the added section
   - The screenreader should indicate to edit the section name
   - Navigate to the add section field
   - The screenreader should indicate this as adding a section.

Change-Id: I8eef887948fd728e3a104eb8c0b72d0a1a4e977c
Reviewed-on: https://gerrit.instructure.com/38875
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-08-08 16:34:13 +00:00
Drew Bowman 99f8b1d73d give more access to peer reviews
fixes CNVS-1455

test plan:

- create a graded discussion that requires peer review
- the discussion should have a peer review icon in listings
- assign peer reviews to students
- the students should have a peer review link in their
  activity stream

Change-Id: I416c876c9e21b5ce2a72c46fceb7a33bdfd3f96e
Reviewed-on: https://gerrit.instructure.com/36459
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: David Josse <david@instructure.com>
2014-08-08 16:18:45 +00:00
Ryan Taylor fd2b162e02 Unpublished quizzes do not show up in student JSON requests
Unpublished quizzes didn't show in JSON-API requests, but this extends
that feature to JSON requests as well.

Fixes CNVS-12272

Test plan:
  - Make two quizzes
  - Publish one
  - Confirm that api/v1/courses/:courseId/quizzes only returns a single
    quiz entry

Change-Id: If5440795d6e29121525425e85dd371f54c38b9e6
Reviewed-on: https://gerrit.instructure.com/38887
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-08-08 15:47:11 +00:00
Clay Diffrient a3e90bc7db Adjusts column width percentages for syllabus content
Changes the widths to allow proper resizing in Chrome, etc.
Removes the redundant 'Day' column. Changes the first column to
align left rather than center.

fixes CNVS-13924

test plan:
   - Go to a course syllabus in Chrome
   - Make sure several assignments are there with due dates
   - Resize the window to be small
   - Date and Day columns should not overlap but remain in their
     own columns.

Change-Id: I74a190d35ac9acacd1b179d520e8328b84ec34d5
Reviewed-on: https://gerrit.instructure.com/38802
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-08-08 15:26:16 +00:00
Nathan Mills dd48cb7046 add aria label and button role to external tool buttons
fixes PLAT-587

test-plan:
the edit and delete tool buttons on the External tabs page should be readable by NVDA and screenreaders

Change-Id: I090c43137d49189ba20469ef54aad6b6833b7d2e
Reviewed-on: https://gerrit.instructure.com/38860
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-08-08 15:01:40 +00:00
Brad Humphrey 817f5429b4 change tool proxy root_account to context
also, clean up ims-lti usage with pluralized lti methods

test plan:
  - registrations should still work
  - registrations without resource handlers
    and using a default message handler should still work

fixes PLAT-566 PLAT-567

Change-Id: Icd9feca44ba9f5600d89a4943b0b93b34aeb78a5
Reviewed-on: https://gerrit.instructure.com/38182
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Brad Humphrey <brad@instructure.com>
2014-08-07 19:57:40 -06:00
Clay Diffrient d23a018a14 Adds type to cancel button to prevent default submit.
fixes CNVS-9975

test plan:
	- Go to a user's profile
	- Click edit
	- Change the user's name
	- Click cancel
	- The user's name should not update.

Change-Id: Iaa2bbeada63eaeb5521bbb1be627f530d6093563
Reviewed-on: https://gerrit.instructure.com/38758
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
2014-08-07 19:56:57 -06:00
Aaron Cannon 637648869a accessibility: improved conversations filters
Fixes CNVS-14505

Test plan:
- Visit the inbox
- Using a screen reader, verify that the currently selected item is read as
  the label of the button to open the message filter drop-downs
- Verify that screen reader users can navigateand select items from both lists
- Verify that the appearance remains unaltered.

Change-Id: I1e177ca0be0d6b0c0ad6094de477938dfd440868
2014-08-07 19:56:24 -06:00
Jeremy Stanley 0af9e0b59c add UI option to remove dates in content migration
also remove some code that accomplishes nothing but confusion

test plan: perform content migrations into a course via the web UI
  1. without adjusting dates
  2. shifting dates
  3. removing dates
and verify that the correct operation is performed for each migration.

test all of these workflows:
  1. Course Settings / Copy this Course
  2. Import Content / Copy a Canvas Course
  3. Import Content / course export package

fixes CNVS-14183

Change-Id: I965a8ba6e6b0971cd0b5561627716989191a9680
2014-08-07 19:55:51 -06:00
Aaron Cannon d72e094658 Accessibility: Caused screen readers to recognize cancel as a button.
Fixes CNVS-14126

Test plan:
- Visit  the Calendar
- Click Add New Event
- Click More Options
- Navigate to the cancel button
- Verify that it is recognized as a button by screen readers

Change-Id: Ice93078d7d728503bc4bda29a5894ae19583692c
2014-08-07 19:55:34 -06:00
Clay Diffrient f2c366be8a Adjusts external apps to account for long app names
Converts external_tools.sass -> scss while adding a few styles to
truncate the names properly.  The styles added convert the table
to render using the fixed style and the first column to have a width
of 500px and overflow the text using ellipsis.  A title attribute is
also added to the column to help with UX.

fixes CNVS-7223

test plan:
	- Go to Settings > Apps
	- Add an app with a long name around 160 characters
	- You should see that the name is truncated with an ellipsis
	- Hover over the name
	- A tooltip with the full name should appear

Change-Id: I24cc71a0073799e66efa57421b80b0b70bdbecdb
2014-08-07 19:54:45 -06:00
Ahmad Amireh 0b57ec37c1 [a11y] Quizzes RCE Keyboard Dialog
This patch adds a keyboard-accessible dialog that lists the available
TinyMCE keyboard shortcuts within quizzes.

Closes CNVS-9795

TEST PLAN
---- ----

  - go to the create or edit quiz page
    + verify you see a little "?" help icon next to the "HTML Editor"
      link in the editor action-bar
    + click it and verify that it launches a dialog
      - verify the dialog contents match those specified in the ticket
    + press ALT+0 and verify the dialog gets opened
      - you can try using the 0 on the numpad if you have one, it should
        work too
    + verify that you can get to the "?" icon using your keyboard by
      TABbing around

Change-Id: I18df7ce74d33369df2245e2fff4d9d0c7e1735a2
2014-08-07 19:54:22 -06:00
Paul Hinze c39bcc55bb Upgrade mediaelement.js to 2.15.0
Overall this is a relatively small release, but one with a few notable
changes for Canvas:

 - improvements to keyboard accessibility
 - playback speed support
 - video controls won't hide when they are being hovered over
 - improved play button image
 - proper source chooser support in flash fallback player

The full changelog is here:

3be710cc49/changelog.md

Test Plan:

We'll want to do a basic cross-browser regression test of the media
player to cover the upgrade.

 - On an account with "prefer HTML5 video" enabled:
   - Check a video player
   - Check an audio player
 - On an account with "prefer HTML5 video" disabled:
   - Check a video player
   - Check an audio player

Change-Id: I363e301506981185bb1a37fdd8975ad3e91d5180
2014-08-07 19:54:02 -06:00
Clay Diffrient 0a63bd7ca9 Sets autofetch to true on Student Module Progressions
Allows the first 10 to load, plus 500px past the viewport, then on
scroll gets another page.

fixes CNVS-14452

test plan:
	- Go to a course (in Firefox, because Chrome sends a scroll event
	  regardless)
	- Add 11+ modules to the course
	- Enroll 1 user in the course (as a student)
	- You should see the first ten load, then instantly the next
	  few with only a small delay.
	- If you've added 50+ you should see small delays as all the
	  modules load.

Change-Id: I040c00b8f0fdd5ff3b38d3fe7dbdb2d678567ce3
2014-08-07 19:53:09 -06:00
Sterling Cobb ac1385607a add restricted access dialog
The new files page needs a restricted access modal implemented in
ReactJS.

fixes #CNVS-14307

---- Test Plan ---
Given you have a course with the new files page access
And you're a use that can restrict access
When you go to the files page
And you click on the admin gear on a file or folder item
And you click on "restricted access" option
Then the restricted access modal should appear
And there should be two options
And selecting the second option will show date selection options
And clicking cancel should close the dialog
And it should be accessible
And everything should be translated

Change-Id: I646052ad385b3939937d6489729bec1fa738be1d
Reviewed-on: https://gerrit.instructure.com/38721
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2014-08-07 16:42:13 +00:00
Matthew Berns 4db2491d4a added tests for submission details partial
added tests and removed secondary speedgrader link that caused error

fixes CNVS-8868

test plan
- set large_roster flag to true for a course
- go to gradebook and click the text bubble on a submitted assignment
- link to speedgrader should not appear
- set large_roster flag to false
- only one link to speedgrader should appear

Change-Id: I0bfb5452a8adddb140fe80b0ee12b82b2249dc3c
Reviewed-on: https://gerrit.instructure.com/38503
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-07 16:37:16 +00:00
Ryan Taylor 34a524cd72 Ensure deleted questions aren't returned to API calls
Currently, API calls on lists of questions where some are deleted
return all of the questions.  We want it to only return deleted
questions.

Closes CNVS-12742

Test Plan:
  - Create a quiz with two questions
  - Delete one of the questions
  - Confirm that a visit to /api/v1/courses/1/quizzes/1/questions
    returns a single question

Change-Id: Ic501c6af3b812e4d795fd858012ee8647717789b
Reviewed-on: https://gerrit.instructure.com/38811
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-08-07 00:01:32 +00:00
Matt Wheeler 61fced4f3d Conversations inbox opt out
Closes CNVS-11854

Test Plan:
1) Restart  your server after checking out this code (there is new feature flag)
2) As a user, visit /profile/settings and see that there is no option
   for disabling the inbox
3) As an instructure employee viewing settings for the root account,
   turn "on" the inbox opt out feature flag. If the button says "allow"
   instead of "on", you are in the wrong place and want to be on the
   account's settings, not the site admin settings.
4) As a user, visit your settings again: /profile/settings
5) See that you can now disable the inbox.
6) Do so.
7) Check the that conversations notification settings no longer appear
   at /profile/communication
8) Check that when you have new conversation messages, the unread
   messages badging doesn't display on the inbox link in the main nav
9) Visit your settings a 3rd time, and un-disable the inbox
10) check that the inverse of 7 & 8 are now true

Change-Id: I061e2d3ab9052a7809fb43f80d8e2e92d99316ee
Reviewed-on: https://gerrit.instructure.com/38313
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: David Josse <david@instructure.com>
2014-08-06 23:12:26 +00:00
Nathan Mills 5c4491a35f make links more descriptive
fixes PLAT-583

test plan:
the links on the App Setting page for eduappcenter and Canvas community topics for lti tools should be more descriptive

Change-Id: I066a6181ee60daa6e4200b2737c799f7976f4bed
Reviewed-on: https://gerrit.instructure.com/38777
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-08-06 18:33:55 +00:00
Paul Hinze 10f2db26f8 Add playback speed selection to the HTML5 media player
Test plan:

 - Ensure the "Prefer HTML5 for video playback" feature is enabled
 - Navigate to a page with a Canvas video player
 - Observe the additional speed control present to the right of the
   subtitle selector
 - Selecting speeds should change the playback speed of the video
 - Test various combinations of interaction, changing the speed while
   the video is playing, paused, after it has completed - everything
   should behave according to reasonable expectations
 - Repeat the test for an audio player
 - Note that Firefox will often fall back to a Flash-based player, which
   does not support playback speed control. This Firefox behavior is a
   separate issue which will be addressed in other commits.
 - Ensure that multiple players on a page work properly together

Change-Id: I322368140fa362bcaf47b2e4d8236c25e148a91a
Reviewed-on: https://gerrit.instructure.com/38479
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ben Hutchings <benh@instructure.com>
2014-08-06 18:28:12 +00:00
James Williams 81558f728c remove rails 2 support
closes #CNVS-14261

Change-Id: I1b0e8a4438ab659ecd1ac8462bc3559d810989b3
Reviewed-on: https://gerrit.instructure.com/38744
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-08-06 18:16:19 +00:00
James Williams c0bb5197b2 fix query translation of imported external tools
test plan:
* import the package referenced in #CNVS-13144
* launch the external tool module item "title 1"
* inspect the form element on the launch page
* the url should have query parameters with
 "custom_" prepended to them

(e.g. "http://www.example.com/testlti?custom_resource_url=...")

closes #PLAT-584

Change-Id: I0d70244b78b6fc36ec188429a1ea7ccc4094bc70
Reviewed-on: https://gerrit.instructure.com/38799
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-08-06 16:54:04 +00:00
Nathan Mills 6a320701e6 move lti registration endpoint to new message controller
fixes PLAT-567

test-plan:
specs should pass

Change-Id: I1a38910ddb3cf52319f4d38a71c3d075da79693d
Reviewed-on: https://gerrit.instructure.com/38612
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
2014-08-06 16:27:19 +00:00
James Williams 29fba6ecb9 don't create an extra assignment on import in draft state
test plan:
* import the package referenced in the ticket into a
 draft-state enabled course
* should not have extra assignments created in the
 default "Assignments" group

closes #CNVS-13345

Change-Id: I7debc455014b5a44fe2026d85de8b58ad4ae89fb
Reviewed-on: https://gerrit.instructure.com/38673
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-08-06 16:04:12 +00:00
Colleen Palmer 5506a43106 Fixes default opacity on buttons
Testing procedure:

One of the areas we saw it most apparent is in the communications
area.

http://screencast.com/t/SYJYGKVuj

These should now be visible, but just look disabled.

fixes: CNVS-14572

Change-Id: I5bc9854c59b87ba539e69ff3e066243243197f10
Reviewed-on: https://gerrit.instructure.com/38652
Reviewed-by: Vincent Gonzalez <vgonzalez@instructure.com>
Product-Review: Vincent Gonzalez <vgonzalez@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-08-06 15:39:03 +00:00
Nathan Mills 77eb03f289 fix the tcp url in the tool consumer profile
refs PLAT-568

Test Plan:

the spec pass

Change-Id: I51d5de77b02e6c5167a86b74481e5aae016ccb5b
Reviewed-on: https://gerrit.instructure.com/38368
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-08-06 15:26:05 +00:00
Nathan Mills c3900c2b38 set focus when switching between app center and external apps views
fixes PLAT-582

test-plan:
when you click "View App configurations" it should set focus to the "View App Center" and visa versa

Change-Id: I6fc2b2b9b2a7435bb7853ecfb99d7ef4523e4a5b
Reviewed-on: https://gerrit.instructure.com/38776
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-08-06 15:24:47 +00:00
Jeremy Stanley c53ef57479 fix documentation error in context module items API
the content_id of an existing tag cannot be updated via PUT.

refs CNVS-14423

Change-Id: If97fbcc14b503a9771259e4d5e65a8e4c3b21113
Reviewed-on: https://gerrit.instructure.com/38540
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-08-06 13:57:47 +00:00
Cody Cutrer 55bc442f31 raise a distinct LoggedOutError when doing a forced-logged-out
refs CNVS-14595

instead of waiting for an InvalidAuthenticityToken to catch it

test plan:
 * log in to one browser, and go to an assignment page
 * in another browser (or incognito) log in and log out as the same user
 * in browser 1, refresh. you should have to login again
 * watch your requests - pings should be happen periodically, and
   succeeding
 * log in/out in browser 2
 * back in browser 1, a ping should fail. check your logs or
   errorreports - it should be a LoggedOutError, and InvalidAccessToken
 * refresh and log back in
 * log in/out in browser 2
 * try to edit a rubric (or another AJAX request that's not API) -
   it should fail, again *not* with InvalidAccessToken

Change-Id: I04c72e12fbcee7dd0aa4ce7dafcb698167a82015
Reviewed-on: https://gerrit.instructure.com/38755
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-08-05 23:16:09 +00:00
Cody Cutrer 4b9d76bb92 improve handling of logout issues
refs CNVS-14595

quit pinging the server with requests that will fail after you've
been logged out

test plan:
 * enable page views
 * log in, and go to an assignment page. enable request monitoring
 * be constantly moving your mouse while on this page
 * notice a request to /ping every 3 minutes, and /page_views every
   5
 * stop your server
 * go back and continue moving your mouse
 * requests to /ping and /page_views should fail, but continue
 * restart your server
 * requests should now succeed
 * in another browser, or an incognito window, log in as the same
   user, then log out
 * in the first window, the request to /ping should fail with
   a 401, and the request to /page_views should fail with a 422
 * continue moving your mouse - requests should stop

note that it's easiest to reduce the 3/5 minute times by adjusting
them in app/coffeescripts/behaviors/ping.coffee and
public/javascripts/page_views.js

Change-Id: Id558504f940af51df8bb410d1d88668cd95fdb38
Reviewed-on: https://gerrit.instructure.com/38733
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-08-05 21:38:31 +00:00
Brad Humphrey 598be5460a add support for submitting URL content via LTI
Test Plan:
 - Create a homework assignment that accepts a website url
 - Add an external tool that supports homework submission
 - Submit a URL from the tool in a tab (not the more tab)
 - It should save the submission

Regression Test
 - File submissions via LTI should still work

fixes PLAT-579

Change-Id: I1a0ef11c0c4293d175c1e7604622922eadb8bf7f
Reviewed-on: https://gerrit.instructure.com/38707
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2014-08-05 20:47:15 +00:00
Ryan Taylor eaffb011f5 Change text field in quizzes to better conform to documentation.
Closes CNVS-11570

Test Plan:
  - create or edit a quiz
  - switch editors by clicking on "HTML Editor"
  - Confirm that the editor switch text now reads 'Rich Text Editor'.
  Extra WYSIWYG locations:
  - Confirm that assignments, syllabus content, calendar events, eportfolios, and wiki rich text editors are also edited
  - confirm that locales are updated

Change-Id: If110012fea46090dc2283bfba1170e82034e7ff5
Reviewed-on: https://gerrit.instructure.com/38729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-08-05 20:35:04 +00:00
Matthew Berns a110badc58 fixed display of nested arrays on API documentation
arrays found within arguments in documentation are converting to hyperlinks

fixes CNVS-8092

test plan:
- visit the following links
- doc/api/submissions.html#method.submissions_api.update
- should show rubric_assessment[criterion_id][comments]
- doc/api/users.html#method.users.update
- should show user [avatar] [url]
- doc/api/submissions.html#method.submissions.create
- should show submission [submission_type] and submission [url]
- doc/api/assignments.html#method.assignments_api.update
- should show assignment [assignment_overrides]
Change-Id: Ie5eea14821a5fb172e2a8d4ee62a1cc19ab72b60
Reviewed-on: https://gerrit.instructure.com/38392
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Matt Berns <mberns@instructure.com>
2014-08-05 20:27:56 +00:00
Nathan Mills 085e18d40b change the name for the add new app button, and update custom fields label
fixes PLAT-573

test-plan:
*The title of the Add New App modal should be "Add New App"
*Screen readers should read the extra help text for the Custom Fields text box

Change-Id: Icdd277542f8fddf9165f95f2add26bbab741c0ab
Reviewed-on: https://gerrit.instructure.com/38576
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-08-05 15:31:14 +00:00
Ahmad Amireh d016f08193 Quiz Stats - Account for fudge points
Fudge points were not considered because we were manually summing up the
points for each individual question. The patch makes it so that we use
the pre-calculated #score field for the submission.

Closes CNVS-13645

TEST PLAN
---- ----

  - create a quiz with 1 question with 2 points possible
  - take it by a student and answer it correctly
    - visit quiz stats, verify the numbers are now 2
  - add a -1 fudge point
    - visit quiz stats, verify that the low/high/avg scores are 1
  - manually grade the question up to 2.5 from 2
    - visit quiz stats, verify the numbers are now 1.5

Change-Id: I4341a6241b2c94b654b2ddce4439e4cbb71344e8
Reviewed-on: https://gerrit.instructure.com/38668
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-08-05 15:15:28 +00:00
Nathan Mills 55e433d9c0 fix accessability issues on edit external tool modal
fixes PLAT-574

test-plan:
*invalid fields be reported as invalid by the screenreader
*the first invalid field should recive focus

Change-Id: If647dd29c4faf0149a40b21cc897d8d35f9a72f7
Reviewed-on: https://gerrit.instructure.com/38599
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-08-05 14:43:42 +00:00
Ryan Florence eb09993f70 fix student groups from if-lazy-list upgrade
you now have to specify the data you pass down
from the controller

Change-Id: I7bc6f9557c43aeee5eeab10a9e6d460b0ca1f334
Reviewed-on: https://gerrit.instructure.com/38332
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2014-08-04 21:43:53 +00:00
Duane Johnson 40b45c4aef fix 'assignment_visibility' API doc type
Swagger fails to generate code for pandarus / live API docs
because assignment_visibility array does not specify a type.

This sets the type to 'integer'.

Fixes SIS-400

Change-Id: I0a675dc51907d1a64993a36bed94d022deae3dda
Reviewed-on: https://gerrit.instructure.com/38575
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-08-04 21:12:15 +00:00
Ryan Florence 6bdb32c01b modules next: added basic item editing modal
test plan:

1. click the item row cog
2. choose “edit”
3. change the title
4. click save
   - item indicates “saving..”
   - item’s title updates
5. refresh the page
   - changes persist
6. repeat 1-3
7. click cancel
   - title does not update 

Change-Id: Idcd52c580078ca60ec468a4c85832b385d63220c
Reviewed-on: https://gerrit.instructure.com/38487
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2014-08-04 20:45:38 +00:00
James Williams 852ac4730b fix copying of quiz questions imported from question banks
test plan:
* create a course with a question bank
* add a question to the bank
* create a quiz
* import the question from the bank into the quiz
* copy the course
* the copied course should have a question bank
 matching the original name with the question

fixes #CNVS-14495

Change-Id: I8e56c5c59e88be5213a004d276aadd14b89ca0cd
Reviewed-on: https://gerrit.instructure.com/38610
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-08-04 19:49:36 +00:00
Cameron Matheson 83cf8d9af9 clear out stale submission fields on resubmit
fixes CNVS-5604

Test plan:
  * set up an assignment that takes online_url and online_text_entry
    submissions
  * make a online_url submission for an assignment
  * have the same student make an online_text_entry submission
  * the api response should now *not* include the url anymore

Change-Id: I2389b0b3e8a565eed01f85ba2bed874c59585a2f
Reviewed-on: https://gerrit.instructure.com/37796
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-08-04 19:32:41 +00:00
Paul Hinze 70b38563df Remove manual hacks from mediaelement js/css
Rather than running our script that stitches together mediaelement js
and css files and _then_ manually editing in our hacks, enhance the
build script to be able to pull specific customizations from local
files.

Use this new facility to stitch in our "upload subtitle" feature in
more cleanly.

Also normalize the whitespace in our hacks to match me.js tab style to
reduce the diff between our code and upstream.

Note that the diff when ignoring whitespace on
public/javascripts/vendor/mediaelement-and-player.js is only comments.

On the CSS side, we pull out the full screen subtitle font-size bump
into a separate file. We also update the target location for the
vendored CSS file in the build script.

Now `rake build_media_element_js` should be idempotent.

Test plan:

 - Verify the media player works for video and audio.
 - Verify that captions in full screen videos show with a large font

Change-Id: I698b0c3454c12bfa4efffc2d98ab9056d351220c
Reviewed-on: https://gerrit.instructure.com/38455
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Zach Pendleton <zachp@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Paul Hinze <paulh@instructure.com>
2014-08-04 19:04:16 +00:00
Jeremy Stanley dc613caf6d zip content exports for course, group, user
test plan:
 1. use the content exports api with export_type=zip
    to export files from courses, groups, and users
   a. confirm only users who have permission to
      download files from these contexts can perform
      the export
   b. confirm that deleted files and folders do not show
      up in the downloaded archive
   c. confirm that students cannot download locked files
      or folders from courses this way
   d. check the progress endpoint and make sure
      it increments sanely
 2. perform selective content exports by passing an array
    of ids in select[folders] and/or select[attachments].
    for example,
      ?select[folders][]=123&select[folders][]=456
      ?select[attachments][]=345
      etc.
   a. any selected files, plus the full contents of any
      selected folders (that the caller has permission
      to see) should be included
      - that means locked files and subfolders should
        be excluded from the archive
   b. if all selected files and folders are descendants
      of the same subfolder X, the export should be named
      "X_export.zip" and all paths inside the zip should be
      relative to it. for example, if you are exporting A/B/1
      and A/C/2, you should get "A_export.zip" containing
      files "B/1" and "C/2".
 3. use the index and show endpoints to list and view
    content exports in courses, groups, and users
   a. confirm students cannot view non-zip course exports
      (such as common cartridge exports)
   b. confirm students cannot view other users' file (zip)
      exports, in course, group, and user context
   c. confirm teachers cannot view other users' file (zip)
      exports, in course, group, and user context
      (but can still view course [cc] exports initiated by
      other teachers)
  4. look at /courses/X/content_exports (web, not API)
   a. confirm teachers see file exports they performed
   b. confirm teachers do not see file exports performed by
      other teachers
   c. confirm teachers see all non-zip course exports
      (cc/qti) including those initiated by other teachers
  5. as a site admin user, perform a zip export of another
     user's files. then, as that other user, go to
     /dashboard/data_exports and confirm that the export
     performed by the site admin user is not shown.

fixes CNVS-12706

Change-Id: Ie9b58e44ac8006a9c9171b3ed23454bf135385b0
Reviewed-on: https://gerrit.instructure.com/34341
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-08-04 16:38:19 +00:00
Ryan Shaw 485b90a6f7 replace compass with node-sass
after many steps towards this moment, we're finally here

This yanks sass and compass out of canvas-lms
completely and instead uses the libsass based
node-sass to compile our SASS files.

wins:

It is WAYYY faster!
as in, < 10 seconds to recompile all css in canvas
(compared to the 5+ minutes it used to take)

It is all in JS, helping use move to a completely
nodeJS based fronted tooling workflow.

next steps:

remove jammit: we don't need an assets.yml file
since node-sass can output compressed css for us
and we use sass to do all of our @import'ing of other
files (@colleen calls those "compiler" sheets), this
would simplify and speed up fronted asset building
even more

use gulp/broccoli/whatev to do cached, incremental builds

test plan:

all outputted css should look exactly the
same as it used to.

run `npm run compile-sass`, make sure it works
and is way faster than `rake css:generate` used to be

Change-Id: I7d865ea6b3e374cdc27a883d2019a4c15746c0e2
Reviewed-on: https://gerrit.instructure.com/38416
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-08-04 15:28:29 +00:00
Ryan Shaw ba4d2db268 get all remaining sass files working with lib sass
to test, run:
https://gist.github.com/anonymous/bc9c74c7d2438c3f6375
from the /app/stylesheets directory
and see that it works

to re-render all sass in the app went from
294.39s user 21.77s system 273% cpu 1:55.41 total
to:
79.14s user 11.29s system 684% cpu 13.212 total

from 2 minutes down to thirteen seconds!!!

(with a bunch of stuff I can do to further optimize)

Change-Id: Ib239da39226f041d02cea4fb9d5e4f6fe3e18468
Reviewed-on: https://gerrit.instructure.com/38415
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-04 15:28:12 +00:00
Ryan Shaw 9f6efcf5b5 get c-common.scss parseable by node-sass
This is the hardest one, it was not too bad though.
Things I found you need to do:

1. You can't have a "//" comment on the same line in .sass syntax
so the following line:

.foo //a comment about foo

would need to be:
//a comment about #foo
.foo

2. in .sass, you have to use double quotes for @import
so:      @import 'foo'
becomes: @import "foo"

things you do NOT have to do:

1. don't have to add the extension or the underscore
in front of filename for @import.
e.g, DON'T have to convert:
@import "foo"
to:
@import "_foo.scss"

2: don't have to convert the leading colon syntax
   of super old sass to colon between syntax
e.g:
.foo
  :width 100%
is just fine

(Hallelujah on not having to do those 2, it
makes this a lot smaller of a change)

test plan:
`npm install node-sass` then
within the /app/stylesheets directory,
run this command and see that it works:

../../node_modules/.bin/node-sass --include-path variants/new_styles_high_contrast base/c-common.scss

Change-Id: I73e382560e3dcbf55c32e97bb245b5ec262d4cb0
Reviewed-on: https://gerrit.instructure.com/38414
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-04 15:27:58 +00:00
Ryan Shaw ade0ad9fcf relax warning on ensure-contrast
...so we don't get bugged by our input:placeholder
styles

the number 2 was just something arbitrary that I had picked

Change-Id: I256880f0c4e3b11084387dfabf1dffa3fdaf6688
Reviewed-on: https://gerrit.instructure.com/38484
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-08-04 13:48:16 +00:00
Aaron Cannon 69d209a141 Accessibility: Turned discussion edit button into button for SR users
Fixes CNVS-13971

Test plan:
- Visit a discussion with edit privileges
- Using a screen reader, verify that the edit button is reported as being a
  button

Change-Id: Ie89a3595d33f14fbb990dc2f8140216d5a08bfe2
Reviewed-on: https://gerrit.instructure.com/38469
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: David Josse <david@instructure.com>
2014-08-04 08:00:52 +00:00
Cody Cutrer 948a57a183 fix permission inheritance
fixes CNVS-14451

test plan:
 * create a role in a root account
 * grant a permission to that role, and add an admin to that role
 * in a sub-account, revoke that permission from that role
 * ensure that the admin still has the permission in both the root
   account and a sub account (the sub account can't revoke permissions
   that admins got from further up the chain)
 * add an admin in that role to the sub account
 * ensure this new admin does not have the permission

 * and, sadly, permissions regression, cause we're messing with
   low level permissions stuff again

Change-Id: I7ccc32f36e4476d5df77eaec765abcb1c7b89b3e
Reviewed-on: https://gerrit.instructure.com/38604
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-08-02 01:28:49 +00:00
Cameron Matheson abea42ae86 fix bulk_load_versioned_attachments bug
fixes CNVS-14509

previously it didn't include a submissions's attachment (used for
screenshots on url submissions)

Test plan:
  * make a url submission
  * use the submissions api (for_students endpoint) to get the submission
  * it should include an attachment for the screenshot of the submission

Change-Id: Ic4c2cfe693e0446bb48c811e8d2c5fd44e53d6a9
Reviewed-on: https://gerrit.instructure.com/37731
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-08-02 00:36:13 +00:00
Joel Hough 2f8880d2e2 Revert "conversations: fix last_authored_message_at"
fixes CNVS-14333

This reverts commit 4e83960eb4.

Change-Id: I4631088293abc5f2bcb281d60165f9710c7b6111
Reviewed-on: https://gerrit.instructure.com/38622
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-08-02 00:28:48 +00:00
Jon Jensen 8f7089a6fd fix external mathjax script, fixes CNVS-14540
cdn was giving 404s; this was causing a selenium spec failure and
preventing preview from working in the advanced editor. switch to
something more reliable.

from my limited testing, we can't easily host this ourselves, because it
dynamically loads other scripts.

test plan:
1. go to the equation editor
2. confirm there are no errors in the js console
3. confirm that the basic editor works
4. confirm that the advanced editor works (live preview too)

Change-Id: Id261740d848cdae8922c9cfd985c9c7e7f84236e
Reviewed-on: https://gerrit.instructure.com/38624
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
2014-08-01 21:14:07 +00:00
Matthew Berns 764a9fecac fixed typo on API, line was repeated.
fixes CNVS-14227

test plan:
- visit /doc/api/assignments.html
- should only see one instance of line 'API for accessing assignment information.'

Change-Id: Ia0c55d2aaea4f7eeaefd30ea0427be75b0719b6a
Reviewed-on: https://gerrit.instructure.com/38465
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-01 20:50:19 +00:00
Joel Hough 1c31aee79c stop stream items from unlinking discussion subentries
fixes CNVS-14383

test plan
- create a discussion with "post before seeing replies" checked
- create a reply to the discussion
- as a user in the course who has not replied to the topic,
 fetch the /api/v1/courses/:course_id/activity_stream/summary
- as the topic creator, edit the topic message (to queue a job
 to recreate the materialized view)
- ensure that the reply is still present (the materialized view
 must be regenerated before the bug would remove the entry)
- toggle the unread state on the entry, ensuring that no errors
 appear in the debug console

Change-Id: Iaf8d15195c5c6fef8f1b22bf7dfc9110b05394f2
Reviewed-on: https://gerrit.instructure.com/38564
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Reviewed-by: Mark Severson <markse@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-08-01 20:11:42 +00:00
Cameron Matheson 708328d18d don't let crocodoc blob/hmac be used for canvadoc
Test plan:
  make sure canvadocs/crocodoc still work in speedgrader

Change-Id: Ie5a7b8759206b0293757a2c2d820f0e7f5af164d
Reviewed-on: https://gerrit.instructure.com/36201
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-08-01 19:32:13 +00:00
Simon Williams 029d6a050d api: restore regular per_page defaults to assignment index action
closes CNVS-14424

test plan:
- in a course with >10 assignments, list them with the api
- you should get 10 back by default

Change-Id: If671da72e1f6f85bce57635460306123addcaeb2
Reviewed-on: https://gerrit.instructure.com/38232
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-01 17:56:24 +00:00
Michael Nomitch a8f91b248e DA - assignment and submission access for students and observers
fixes CNVS-14071

test plan:
  - set up differentiated assignments
    - as a student go directly to an assignment url
      (eg - courses/1/assignments/2)
      - students without visibility should get a flash
        message and get redirected to the assignment index
      - students with visibility should see the normal page
    - as a student go directly to a submission url
      (eg - courses/1/assignments/2/submissions/3)
      - students without visibility should get a flash
        message and get redirected to the assignment index
      - students with visibility should see the normal page
    - as a teacher and TA these pages should work fine
    - observers should have the same permissions as the
      students they are observing (try hard to break)

Change-Id: I063fbd5ab3664d69754f01f5bdc740fb79048804
Reviewed-on: https://gerrit.instructure.com/37704
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2014-08-01 15:29:20 +00:00
Simon Williams 8bb6fcdcc2 don't display account settings notification tab if empty
fixes CNVS-2684
fixes CNVS-2768

test plan:
- in the site admin account settings page:
  - the notification tab should be gone
  - updating settings should still work
- in the root account settings page:
  - the notifications tab should still be present and functional
- in a sub-account settings page:
  - the notification tab should be gone
  - updating settings should still work

Change-Id: Ic6b016be8d0b7a00f4153870220dbb34388a350b
Reviewed-on: https://gerrit.instructure.com/38367
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-08-01 15:20:25 +00:00
Matthew Berns 2bf7a7354e input type set to text instead of number if browser is Safari
Safari does not fully support built-in HTML5 validations, error message was being skipped.

fixes CNVS-14162

test plan:
- Click the edit cog for the assignment group cog
- Enter text into min/max score fields
- Chrome and FF should display default HTML5 validation text, box should contain arrow incrementers
- Safari should display our built validation text "you must use a number" and arrow incrementers should be disabled

Change-Id: I8a25372a11de14e56288d42f68b0353a0b745414
Reviewed-on: https://gerrit.instructure.com/38450
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-31 22:37:05 +00:00
Ryan Shaw 25536742c3 remove last remaining uses of compass mixins
...on our way to yanking compass & jammmit and
using lib sass

test plan:
the css this outputs is the same as before.
no changes

Change-Id: Icdf463d8e873eebd1bc6166c9356751f7c971f1b
Reviewed-on: https://gerrit.instructure.com/38413
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-07-31 20:08:43 +00:00
Michael Nomitch c08de52f68 DA - GB2 grade curving, message students, default grade, details
fixes CNVS-14083
fixes CNVS-14081

test plan:
  - with DA on and an assignment only assigned to some
    students
    - check that grade curving only curves students that
      can see the assignment (and curves correctly)
    - check that "message students who" wont ever message
      students who cant see the assignemtns
    - check that set default grade only sets the grade of
      those who can see the assignment
    - check that assignment details only factors in students
      that should see the assignment
  - with DA off
    - check that all of the above features work as expected

Change-Id: Iae23e8cfad8dd556e00c2fea21176157cbebff36
Reviewed-on: https://gerrit.instructure.com/37884
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-31 19:00:37 +00:00
Brian Palmer 3f2c894b4f rails3: fix our IE iframe upload workaround
In rails3, `render :text` was still returning a content-type of
application/json, presumably because of the request headers, which means
that IE was once again prompting users to download the api json response
when doing file uploads in a hidden iframe.

This commit forces the content-type to text/html to match the rails2
behavior, and adds a missing spec.

fixes CNVS-14412

test plan:

do a QTI course import using IE 10/11, and make sure you don't get
prompted to download a "create_success" file when the zip upload
finishes.

Change-Id: I5fce6885ab8bf321163439c8ed1c5e274c4f9d7a
Reviewed-on: https://gerrit.instructure.com/38506
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-31 18:47:14 +00:00
Ryan Shaw 6b4dabf385 disable custom override css while working on k12 and new_styles
fixes: CNVS-14438

at least while we are working on the new style and
k12 specific looks, let's not load customer account
css overrides.  because we are doing major changes
to the header and nav in these new features, we
don't wan't to be pulling in the css files that
people were loading before since they would probably
be all broken in undetermined ways now. However,
because all this work is behind a feature flag,
and these feature flags are marked as "in development"
and "beta", we are not removing anything for any
customers.

repeated:
This does not affect anyone that does not have
either the k12 or new_styles feature flags enabled.
so none of our current customers in production.

As we move closer to having the new_syles and k12
styles out of beta we'll work on a better story
for branding canvas to a school in a easier, more
manageable way. This may involve a GUI interface
to pick your colors instead of having to upload a
css file that overwrites things in an unsupported
and undocumented way. We don't want people to have
to worry about a new release breaking their branding.

test plan:

with k12 or new_styles feature flag turned on,
make sure the account's custom css file is not loaded

with neither the k12 or new_styles feature flag turned on
make sure that nothing changes, e.g. if they had custom
css it should still be loaded as before.

Change-Id: I4ec4bbac55d6e913d19fddface1232baf6d7ff89
Reviewed-on: https://gerrit.instructure.com/38294
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-07-31 18:07:57 +00:00
Ahmad Amireh 3a374af462 Ember Quiz Stats - Pre-activate answer set
FIMB, Matching, and Multiple-Dropdown question statistics should now
have the first answer-set pre-activated for you as soon as you visit the
stats page.

Closes CNVS-13614

TEST PLAN
---- ----

  - enable NQS
  - create a quiz with those question types
    + take it by one student for the stats to show
  - visit the stats page
    + verify that the question statistics sections for those question
      types have the first answer-set activated and the details expanded
    + verify you can still activate other sets
  - verify the page doesn't break with questions that have 0 sets

CR NOTES
-- -----

  - ajax fixture was outdated and causing jenkins to fail which is why
    the integration spec was modified

Change-Id: I46872f17ec267eaf7e8c32a32715a984f0ce3750
Reviewed-on: https://gerrit.instructure.com/38341
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-31 15:56:47 +00:00
Ahmad Amireh 197b329ad3 DS Quiz Moderate - Show proper extra allotted time
Closes CNVS-2143

TEST PLAN
---- ----

  - create a quiz with no questions, set a time limit
  - visit the moderate page (DS, not ember)
    + click the little pencil/edit icon next to a student row of your
      choice
      - give them like 3 extra minutes for each attempt
        + verify you see "gets 3 extra minutes on each attempt" in the
          block
    + do it again, give them 0 minutes
      - verify the message disappears
    + rinse and repeat with different inputs for different students,
      it should always update properly

Change-Id: I0f8724b95221f52d6eba94577fcbae1bfd47d1b8
Reviewed-on: https://gerrit.instructure.com/38418
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-31 15:48:52 +00:00
Ryan Florence 6323ea51c3 modules next: remove module items
test plan:

1. click the cog
2. pick “remove”
   - it should fade out
   - it should not show up after refresh

Change-Id: Ib8c9beaf71665dd321efaea3a69069813ca96b1d
Reviewed-on: https://gerrit.instructure.com/38466
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2014-07-31 03:47:20 +00:00
Cody Cutrer 8aa1ee2732 don't show add admins if you don't have permission to add any particular types
test plan:
 * create a role in site admin with only permission to create other roles
 * add a user to that role (and no other roles)
 * log in as that user, and go to a *different* root account's settings
 * it should not show an empty x, or even the ability to add admins
   (the only available roles are Account Admin, which the limited admin
   does not have permission to create)

Change-Id: I295c25bff8b3f7ec1c190a514e4ac95b96d0be91
Reviewed-on: https://gerrit.instructure.com/38349
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-30 23:05:36 +00:00
Jon Willesen 0061cb1b19 fix subaccount action links to support NVDA screenreader
fixes CNVS-14163

test plan:
 - visit the sub_accounts page for an account
 - navigate through the account action buttons via screen reader
   and make sure meaningful text is read
 - specifically with NVDA, navigate through the account action
   buttons via arrow keys and make sure meaningful text is read
 - when an account has courses in it, the delete account button
   should read the reason it is the account cannot be deleted
 - when an account does not have courses in it, the delete
   account button should read normally
 - make sure the page has not visually changed

Change-Id: Ic08070d333bd041fc120cd82183aea0fa1724c6a
Reviewed-on: https://gerrit.instructure.com/38338
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-07-30 19:59:08 +00:00
Simon Williams 5cebbfacf7 fix assignments_needing_x sharding issues
course_ids were being looked up on the currently active shard and then used on
the user shard

fixes CNVS-14449

test plan:
- create a teacher and two shards, each with a course
- enroll the teacher in both courses (so they are now a cross-shard user)
- in each course, create a student and have them submit an assignment
- load the dashboard on each shard
- both shards To Do lists should be the same -- they should both list
  2 assignments (one from each shard/course) as needing grading

Change-Id: Id34541f7d7144fa0ffb8b221a95aa9369118f50a
Reviewed-on: https://gerrit.instructure.com/38372
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-30 17:58:58 +00:00
Jacob Fugal daf6143e0b session_affects_permissions -> permissions_key
fixes CNVS-13711

test-plan:
 - regression tests of:
   * permissions of admin with pending invitation to a course
   * user that typically would not have access to a portfolio, but
     visited the portfolio with a verifier string earlier in the session
     (but has no verifier string now)
   * access to attachments on the safe file domain

Change-Id: Ie321c77655e6ba5e87fd35a079086a48608f5d0e
Reviewed-on: https://gerrit.instructure.com/38029
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-07-30 16:16:18 +00:00
Ryan Shaw ee62f82242 remove all uses of compass functions
the last remaining uses of compass functions were
image-width and image-height

this gets rid of the remaining usage of those

...on our way to not needing compass at all

test plan:
nothing should change since all I did was replace
the scss with what the compiled css was

Change-Id: I0cd21a2dc193d7e154fb38acf11b841c9b2baaf8
Reviewed-on: https://gerrit.instructure.com/38329
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-07-29 23:28:57 +00:00
Cameron Sutter 6d4a35b86c DA - gray out gb2 cells
fixes CNVS-9767

test plan:
 * with the differentiated assignments feature flag on
 * as a teacher
 * with assignments that have due dates for only some of the sections
 - view gb2
 > any cells whose student is not in a section that has a due date
   for that assignment should be grayed out
 * with the differentiated assignments feature flag is off
 - open gb2 and make sure things don't explode

Change-Id: I0906dc1dc53594e4c7cbc99a88acef2b50d0e325
Reviewed-on: https://gerrit.instructure.com/37229
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-29 21:50:51 +00:00
Ryan Shaw a6d00dc4ad WithGlobalDom is the same as withReactDOM, remove duplicate
...and put it in a more organized spot on filesystem.
...and copy over the improvement tweaks we did to it

Change-Id: I5b406c36efecc8e522ad6f7f95e7bf475fdd6171
Reviewed-on: https://gerrit.instructure.com/38088
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-07-29 21:41:13 +00:00
Jon Willesen 2fa96e245d add publish_final_grade feature to draft state modules
fixes CNVS-14416

test plan:
 - make sure the publish final grade feature works in draft
   state modules. Setting should be remembered and have the
   desired effect (see jira for details).

Change-Id: I6960edf74b0bb71fdda0a01944972c0d24e0783d
Reviewed-on: https://gerrit.instructure.com/38231
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-07-29 19:48:54 +00:00
Ahmad Amireh e621fa9170 Ember Quiz Stats - Show a loading spinner
This patch makes it so when you click the Statistics tab, and had not
already loaded its data, a dark overlay with a loading spinner will show
up to indicate that stuff is loading.

Closes CNVS-13737

TEST PLAN
---- ----

  - enable NQS
  - go to ember quizzes show
    + click the statistics tab
      - verify you see a dark overlay with a loading spinner
    + go back and forth between Overview and Statistics
      - verify you no longer see the overlay

Change-Id: I5d74e3093d222fe5ee9e5e037fb5fe64af464de3
Reviewed-on: https://gerrit.instructure.com/38346
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2014-07-29 17:33:31 +00:00
Ahmad Amireh add15643d6 Ember Quiz Stats - Fix progress bar in tooltips
Progress bars for the report-generation inside the tooltips should show
the progress updates no matter what!

Closes CNVS-13663

TEST PLAN
---- ----

  - enable NQS
  - go to ember quiz stats
    + click the Student or Item analysis buttons
      - verify the progress bar fills up periodically

Change-Id: If547481110a4a3217f5479ab171b281fe0120a0a
Reviewed-on: https://gerrit.instructure.com/38345
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-29 17:33:18 +00:00
Duane Johnson 00f35a58c5 add API docs for integration_id/data
API docs are missing integration_id/integration_data for
assignment 'update' API call.

Test Plan:
- Update Assignment API docs should include integration_id/data

Fixes SIS-374

Change-Id: I088796e2aac274ba90a048c55f9b53dcceb63be4
Reviewed-on: https://gerrit.instructure.com/37949
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-07-29 17:06:41 +00:00
Sterling Cobb 0bff69cf3b add reactjs modal to admin cog
fixes #CNVS-14256

One the new files page written in reactjs, the file and folder item
admin cog has a 'restricted access' option. When you click this, a
modal should appear. It now does.

Test Plan
Given you've enabled the new files page for a course
As a teacher
When you navigate to the files page
You should see an admin cog when you hover over a file or folder
Then clicking on the admin cog should show you a list of options
And when you click on 'Restrict Access"
Then it should show a modal
And clicking the modals x should close the modal
And clicking the modals cancel button should close the modal

Change-Id: Id8358a35ed0d7c23ff98227af655a88a459d9174
Reviewed-on: https://gerrit.instructure.com/37791
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-07-29 16:46:45 +00:00
Sterling Cobb 3db12c04f3 add basic admin cog to folder and file items
fixes #CNVS-12652

Pulled out the cog options in to their own component. Different options
are given for files vs a folder

Test Plan
Given you have the new feature flag enabled for the new files page
And you have files and folders uploaded in a course
And you navigate to the files page
As a user that can add files to the files page
When you hover over a file item in the files section you should see an admin
gear
And you click the admin gear
Then should show options to 'Edit Name', 'Restrict Access' and 'Delete'

When you hover over a folder item in the files section you should see an admin
gear
And you click the admin gear
Then should show options to 'Edit Name', 'Restrict Access', 'Delete'
and 'Download as Zip'

Change-Id: Ia592d975c09000cfe5ecd85da807093fc1c4e997
Reviewed-on: https://gerrit.instructure.com/37582
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2014-07-29 16:46:34 +00:00
Aaron Cannon f50c4f51bb Accessibility: Labeled remove external feed link
Fixes CNVS-13902

Test plan:
- Visit the announcements page.
- Add an external feed
- Using a screen reader, insure that the remove feed link has a meaningful
  label.

Change-Id: I54797e9d150e16e3edaad0a9869aeb1d7ffdf254
Reviewed-on: https://gerrit.instructure.com/37830
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: David Josse <david@instructure.com>
Tested-by: David Josse <david@instructure.com>
2014-07-29 16:37:05 +00:00
Jeremy Stanley c60f8cf3a3 add option to remove dates when importing/copying a course
test plan:
 - notice the date_shift_options[remove_dates] parameter in the
   content migrations API documentation
 - using the content migration api, import a course package
   specifying date_shift_options[remove_dates]=true
   * confirm dates are removed in the copied course, including
     - assignments: due, available, peer-review
     - announcements: post delay
     - quizzes: due, available, show-correct-answers
     - events: start, end
     - modules: unlock-at
 - also try a course copy content migration, and confirm that
   the dates are removed
 - specify both remove_dates and shift_dates, and confirm that
   you get a "bad request"

fixes CNVS-14180
fixes CNVS-14182

Change-Id: Ia07be2883ec4315d4a1e7fbcd61117a4531229d1
Reviewed-on: https://gerrit.instructure.com/38298
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-07-29 16:33:42 +00:00
Ahmad Amireh 7df6a55a34 Quiz Stats - don't count Student View submissions
QuizSubmission now supports a new scope "for_students" that will grab
all submissions that are:

  - not a teacher preview
  - not a teacher-initiated "Student View" one
  - submitted by students who really are rolled in a course

Closes CNVS-13694

TEST PLAN
---- ----

  - create a quiz with one question
  - enter Student View via the course settings
    + take the quiz
    + get out of Student View
  - visit the statistics page (or hit the API)
    + verify the attempt is not factored
  - generate the CSV of Item-Analysis to verify that IA does not factor
    these attempts either
  - test the change with Survey quizzes - need to make sure "logged out"
    users are still OK where applicable

Change-Id: Ic58569be31576734eb6e309d548a7415c07e08a7
Reviewed-on: https://gerrit.instructure.com/38174
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2014-07-29 16:13:44 +00:00
Jon Jensen 5480c8fecd spec: speed up api specs
liberal applicataion of once-ler and bulk_insert helpers, reduce runtime
from 50min -> 25min

Change-Id: I07c1952c4ead0a1c6caafc389de0b9586b27dc68
Reviewed-on: https://gerrit.instructure.com/37794
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-07-29 16:11:16 +00:00
Ahmad Amireh 2acbe015cf Ember Quiz Stats - Summary chart scrolling fix
Closes CNVS-12672

TEST PLAN
---- ----

  - enable NQS, create a quiz, take it by one student
  - go to ember quiz stats:
    + verify that the summary chart shows the 0 and 100 percentiles
  - make the window small enough to show a horizontal scroller for the
    rest of the page
    + verify that the chart scales down to stay visible
  - make the window too small:
    + verify that the chart can be fully viewed using the horizontal
      scroller
  - make the window too large:
    + verify that the chart scales up to a certain point (width of
      960px)

Change-Id: I2be601aaa6c98f574fe6fa944a3a57558e386e3f
Reviewed-on: https://gerrit.instructure.com/38342
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-29 16:00:03 +00:00
James Williams 2b3cfb34aa user submission export
test plan:
* as a student, visit /dashboard/data_exports
* should be able to export a zip file containing
 all of the student's submissions

refs #CNVS-14242

Change-Id: Iaab216e7411c27fa6d259f677e40a75d3de3f5a8
Reviewed-on: https://gerrit.instructure.com/36872
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-29 14:56:03 +00:00
James Williams 8162b8550a queue content migration through content-item launch
test plan:
* set up a course_home_sub_navigation enabled tool, as in
 the test plan for g/37834
* launch the tool from the course home page
* select the imscc file on the test tool content
 selection page
* should be redirected to the content_migration page
 and have a new migration queued for the course

closes #CNVS-13797

Change-Id: If94e65d2ba3c1f2ed53624b6a3b4c9a75d25c5ce
Reviewed-on: https://gerrit.instructure.com/38206
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-07-29 13:10:30 +00:00
Simon Williams 2c53ea32d3 change outcomes index headings to be sequential from h1
fixes CNVS-13123

test plan:
- go to the course outcomes page
- enable a screenreader and view the headings list
- it should now have sequential headings, starting at h1 (specifically for this
  page, it should have an h1 and an h2)

Change-Id: I616d212c343df7b8e277b505aa00e93697ddda7b
Reviewed-on: https://gerrit.instructure.com/38255
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-28 22:54:22 +00:00
Jeremy Stanley a2f61cf748 fix date shifting issues
due to rounding error, a customer's date that should have been
30 days from the new start of the course was placed at
29.999999999999996 days, which was truncated to 29, which was then
shifted back 6 days to fall on the correct day of the week.

also, announcement post delay dates were not getting shifted
at all.

test plan:
follow the scenarios in CNVS-14130 and ensure that
 * announcement post delay dates are shifted
 * some dates don't mysteriously end up a week earlier
   than they should

fixes CNVS-14130

Change-Id: Ice5bd3be0ddee0dec2af7b740c568750dd3c4ab8
Reviewed-on: https://gerrit.instructure.com/38223
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-07-28 22:22:58 +00:00
Michael Nomitch ede8dbf294 Revert "DA - assignments_needing_submitting"
fixes CNVS-14443

This reverts commit 57427343e3.

Change-Id: Ic70da7d96965d368773c2e16c2b49c59f57e5c18
Reviewed-on: https://gerrit.instructure.com/38314
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2014-07-28 22:17:35 +00:00
Cameron Sutter 228306d922 DA - gb2 visibility data
fixes CNVS-9872
refs CNVS-14074

test plan:
 * turn on the differentiated assignments feature flag
 * edit an assignment so that not all sections can see it
 * using assignment groups API
 - in the request make sure to include "assignments" and "assignment_visibility"
 > there should be an assignment_visibility object within each assignment object
 > the assignment_visibility object should be an array of unique ids
 > the ids should only be students in sections that can see the assignment
   or students whose submissions were graded
 * using the assignments API
 - in the request make sure to include "assignment_visibility"
 > there should be an assignment_visibility object
 > it should be an array of unique ids
 > the ids should only be students in sections that can see the assignment
   or students whose submissions were graded

Change-Id: I68e832c3dc1859e398f656fa77804b2733f0dcd3
Reviewed-on: https://gerrit.instructure.com/36811
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-28 22:17:20 +00:00
Ryan Florence 88afac883e [wip] magic modules
Change-Id: I68283129aa2fe8146ab804adbce1fb6699f2f5bb
Reviewed-on: https://gerrit.instructure.com/37213
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2014-07-28 21:24:37 +00:00
Colleen Palmer 5422219490 Changes the path for fontcustom compile
This recompiles the iconfont to have the correct path and
edits the styleguide path info

Testing:

- When you go to styleguide all the icons should appear

Change-Id: I1a300cd20b9965782771b7eabf8b475bd22f15c2
Reviewed-on: https://gerrit.instructure.com/38135
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-07-28 20:50:25 +00:00
Ryan Florence f4081e6d08 increase requirejs waitSeconds
occasionally users connections are very slow,
no need to error out on the page

fixes CNVS-13542

Change-Id: I49e0873b42bb7bb53c73d9b37d95dee00be0a733
Reviewed-on: https://gerrit.instructure.com/38233
QA-Review: August Thornton <august@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Matt Fairbourn <mfairbourn@instructure.com>
2014-07-25 23:15:07 +00:00
dave 7e6519d586 add api endpoint to post global annoucement
***test plan
  1.  Make a POST like /accounts/1/account_notifications
  2.  Required Parameters:
      1) account_notification[subject]
      2) account_notification[start_at]
      3) account_notification[end_at]
      4) account_notification[message]
  3.  Optional Parameters:
      1) account_notification[icon]
        'warning' | 'information' | 'question' | 'error' | 'calendar'
         note: defaults to warning
      2) account_notification_roles[]
        'StudentEnrollment', 'TeacherEnrollment' etc...
        this defaults to all roles
  4.  Only account admins should be able to make the api call
  5.  Should not be able to create an account notification with an
  end_at < start_at

closes:  PS-1730
closes: PS-1872

Change-Id: Ide86722598ae4a7ab565422f2996015b48cf8910
Reviewed-on: https://gerrit.instructure.com/37477
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
Reviewed-by: Brandon Broschinsky <brandonbr@instructure.com>
2014-07-25 22:16:18 +00:00
Simon Williams d7ed7a5911 don't set graded_at in the future for quiz submissions
fixes CNVS-14403

test plan:
- create a quiz with a due date far in the future (and no time limit)
- take the quiz as a student
- look at the grade_history api for that user
- the graded_at for the quiz assignment should be when it was submitted, not
  when it was due (in other words, it should be in the recent past, not the far
  future)

Change-Id: I37754b4be5238e240bbc6a9826ea9d7599c9a61f
Reviewed-on: https://gerrit.instructure.com/38154
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-25 20:12:09 +00:00
Colleen Palmer d972788bea This changes and reorganizes all of our css structure. It starts
to consolidate some of the stylesheets, but the majority of work
has just been to reorganize the files that we have so they can more
easily be found and edited. Not to mention a structure than can
organize any new features and styles we put into canvas!

7/23
* added correct path for compiled course_settings
* took out repeated variable sheet in publish_gradebook

7/22
* fixed css path for conversations styles

7/21
* changes from master rebase
* took out context_modules.sass because it was old and unused

7/17
* brought back legacy sass files and changed to right paths
* taking out ComboBox to move to analytics plugin
* moved tinymce file to correct place, fixed js file paths to point
to it correctly
* brought tinymce sass file to stylesheets root to see if
jenkins passes
* rebased master, took out onneeded _environment.sass

fixes DES-83
* regression fixes from master rebase

fixes DES-83
* fixes compile error on jst/UserObservees.sass pulling in environment

fixes DES-83
* brings back in calendar.css so we can separate that deletion out
  on a separate occasion

fixes DES-83
* take out user_observees since it's a handlebars sheet

fixes DES-83
* stylesheets/pages/ now has compiler sheets
  and a /shared/ partials folder
* consolidation for assets_real.yml - we've knocked this down
  to each page having one sheet that is compiling
* moved anything in /public/stylesheets that wasn't
  in our /app/stylesheets/ into there for better organization
* we've purged a few files that weren't being used or have been
  updated elsewhere

fixes DES-83
* takes out unneeded _newheader file
* removes redundant @import base/environment in _g component files
* renames app_common to c-common
* moves static css from /public into assets/stylesheets and modifies assets_real.yml to reflect new paths

fixes DES-83
* added _ prefix to g_ components in /components so they won't compile to stylesheets

fixes DES-83
reworking the way that we're overriding bootstrap
* deleted bootstrap-parts directory
* moved bootstrap-parts scss to /base
* renamed _main.scss to _custom_bootstrap.scss
* renamed _overrides.scss to _bootstrap_overrides.scss
* deleted empty and unused popover.scss file

fixes DES-83
moved /mixins into /base since they were only being called into _environment.sass

fixes DES-83
consolidated /bootstrap into /vendor

fixes DES-83
consolidated utilities into components

fixes DES-83
initial folder structure added
* reorganized existing css files for better structure

fixes DES-83
got rid of unneeded dump file

Change-Id: Id6f1409d478087a6cf9ebaa19ffa3a10b50891ca
Reviewed-on: https://gerrit.instructure.com/37280
QA-Review: Adam Phillipps <adam@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-07-25 19:58:40 +00:00
Jayce Higgins f3f8b0c428 Adds peer review notification for assigning peer reviewers
Fixes: CNVS-3771

Adds a peer review notification to go out after
a peer reviewer is added to the discussion. This
also resolves the issue with a notification not
being sent if a rubric is not attached.

Test-Plan:
1.) Run bundle exec rake db:migrate in the console
	before doing anything else -- (This sets up your
	db by using notification_types.yml to populate
	notification types in the DB.)
2.) Create a graded discussion with at least 2
     students
3.) Make sure both students have everything
     in their notifications set to ASAP.
4.) Edit the assignment settings and select the
     'Require Peer Reviews' - Choose to manually
     select peer reviewers.
5.) Navigate to discussions as an admin
6.) Select the cog and go to peer reviews.
7.) Assign a peer reviewer and verify that the
     notification was sent out.

Change-Id: I78212cb8043de0fcf809a9ffa56ffca327ffcacc
Reviewed-on: https://gerrit.instructure.com/36646
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-25 19:56:57 +00:00
Brian Palmer 8faaf9bca5 fix autoloading of the Importers module
It wasn't following the rails file naming convention

fixes CNVS-14360

Test plan: imports, such as state standards imports, should work even
without class caching

Change-Id: I99ac8448844b7ac852203a5b8127d6fa35ea5f12
Reviewed-on: https://gerrit.instructure.com/38090
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-25 19:14:12 +00:00
Simon Williams 40b8bafa9a api: paginate the course assignments endpoint
closes CNVS-13475

test plan:
- create 10 assignments in a course
- call the 'list course assignments' endpoint with per_page=2 as a query
  parameter
- it should only return 2 assignments and have pagination links to go to the
  next page
- make sure those links work
- also try passing other allowed parameters like 'include[]', 'search_term' and
  'override_assignment_dates', and make sure they are maintained in the
  pagination links. in other words, make sure that if you are including
  submissions in the first call with the include[] parameters, subsequent calls
  to later pages also return the submission

Change-Id: Ib637eb95186a2d3c586aaca64ef3efe2d937b142
Reviewed-on: https://gerrit.instructure.com/37640
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-25 17:18:39 +00:00
Ryan Shaw 41ba4aa3b2 create k12 specific stylesheets
closes: #CNVS-10113

this is the start of creating a new k12 specific
look-and-feel.  To start using this, turn on the
'k12' feature flag for an account.

test plan:
this should do nothing for existing users
but to test that this is working you can
do:
Account.find(<id of your account>).enable_feature!(:k12)
and then make sure that the stylesheets being loaded
on the page are coming from either:
/stylesheets_compiled/k12_normal_contrast/
or
/stylesheets_compiled/k12_high_contrast/
(depending on if you have turned on high contrast
for yourself)
if everything looks just like it did before, this works.

Change-Id: I9355d1498ab4f6587faf137b129a998044a3bbeb
Reviewed-on: https://gerrit.instructure.com/37926
Reviewed-by: Colleen Palmer <colleen@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-07-25 16:46:39 +00:00
Sterling Cobb 4dda4961aa read error message screen readers when adding user
fixes CNVS-14078

If you're using VoiceOver or NVDA and trying to add a user to your
course but don't add a correct email, it won't read the error message.
This is now fixed.

Test Plan
Given I'm on the People page
And I'm using NVDA in FireFox
And I'm a Teacher
When I click the '+ People button
And I enter an email address that is not formatted correctly
And I press the "Next" button
Then I should see an error message explaining why the email didn't work
And the error message should have focus
And the error message should be read to the user automatically

Change-Id: Ic644bc9b5f93123bb9305a0d7c11e232d0c6620f
Reviewed-on: https://gerrit.instructure.com/38079
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Sterling Cobb <sterling@instructure.com>
2014-07-25 16:26:32 +00:00
James Williams fc4553d0cb add screenreader text to unenroll link on user page
test plan:
* as an admin, visit the page of a user with an enrollment
* with a screenreader, the link with an "X" icon should
have descriptive text

closes #CNVS-13996

Change-Id: I2bb29fc10803028246f1fde121e5a0dba9f36452
Reviewed-on: https://gerrit.instructure.com/37932
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-25 12:19:21 +00:00
Duane Johnson a519383c79 save assignments on Post Grades
Saves assignment names and due dates when modified in the SIS Post
Grades dialog.

Test Plan:
- for assignments that are missing names or duplicated, fix the
  name
- for assignments that are missing due dates, add a due date
- once all assignments are fixed, the assignments should auto-
  matically be saved to Canvas
- the user is sent to the next page in the dialog where they
  can click "Post" button

Fixes SIS-250

Change-Id: I0bbcf6f4eea1c4bf645cbd09a123bf0ac37fd1cd
Reviewed-on: https://gerrit.instructure.com/37248
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-07-24 21:09:49 +00:00
Duane Johnson 07d438d563 sync error visuals w/ Post Grades assignment form
Shows red circles next to form elements that are missing or
incorrect (due_at, name).

Test Plan:
- press "Post Grades" button
- assignments with missing due dates or names should have
  a red circle next to them
- choosing a date or typing a name should remove the red
  circle after removing focus from the element

Fixes SIS-335

Change-Id: I9b01f4f322e20180211285bc02ed027d3aebf31d
Reviewed-on: https://gerrit.instructure.com/37211
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-07-24 19:24:47 +00:00
Cameron Sutter 4bcbd7e236 clean up discussion edit page
fixes CNVS-12770

I just cleaned up some uneccessary code from simon's suggestions.
There are no functionality changes from g/34272

Change-Id: I5cec7c44b31663de5fb945afb8b9557aad2e282c
Reviewed-on: https://gerrit.instructure.com/37931
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-24 17:21:15 +00:00
Cody Cutrer 77c14d79b6 move rescue_responses to app config
fixes CNVS-14289

Change-Id: Icadcbee1c31436322fb53a4b5263c30f3381c3a3
Reviewed-on: https://gerrit.instructure.com/38016
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-23 20:02:28 +00:00
James Williams 2e0d9e635e add screenreader text to account setting report description links
test plan:
* using a screen-reader, confirm that the question mark buttons
on the Account settings/Reports tab have descriptive text

closes #CNVS-13913

Change-Id: I8c453cb60e27156d8c6b2da9f98d2940c203320d
Reviewed-on: https://gerrit.instructure.com/37977
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-23 19:21:44 +00:00
Brian Finney d170bf1adc Accessibility for delete on file upload question
Fixes CNVS-12798

test plan
- Setup a quiz with a file upload question
- Take the quiz
- Upload a file
- The delete (X) button in the file upload space should have proper
accessibility

Change-Id: Ib8dfe02cf020422609258c44ca9b3156148d8025
Reviewed-on: https://gerrit.instructure.com/37793
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
2014-07-23 16:33:32 +00:00
Cameron Sutter 79f45f569d DA - quiz edit page
fixes CNVS-9766

test plan:
 * turn on the Differentiated Assignments feature flag
 * from the quiz edit page
  - add a due date for some of the sections, but not all
  - save (update quiz)
  > the only_visible_to_overrides flag on the quiz should be true
  > edit the quiz again and there should not be an
    empty due date row for 'Everyone else'
  - add a due date for all the sections
  - update the quiz
  > the only_visible_to_overrides flag should not be there
  - edit the quiz so that there are only due dates
    for some sections but not all
 * on the normal quiz show page and
 * on the new Quiz Statistics show page
  > there should not be a row in the due date area
    for 'Everyone else'
 - turn off the DA flag and make sure the quiz show page works
   with the 'New Quiz Stats page' flag and without it
 - make sure the edit page works with the DA flag off as well

Change-Id: Ifb090a195ff3283d963df12ae7a9eb503f32ee86
Reviewed-on: https://gerrit.instructure.com/34085
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2014-07-23 14:41:24 +00:00
James Williams 67835ce809 fix new module IE 10 dialog form submit on enter
test plan:

* in a course that already has one or more modules,
 use IE 10 toopen the "create module" dialog to add a module
 to a course
* with keyboard focus on the module name text field,
 press enter
* should submit the module as in other browsers

fixes #CNVS-14224

Change-Id: I1952c3d60e1ad05dfd4ea5962218f09dd2d21d5f
Reviewed-on: https://gerrit.instructure.com/37979
Reviewed-by: Ryan Shaw <ryan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-23 14:32:08 +00:00
Brian Palmer 1c1455185b log auditor events to the rails log
closes CNVS-14174

test plan: Generate some audit events, such as login/logout and grade
changes. grep your canvas log for AUDITOR lines, which should contain
a json object with the attributes of the audit event.

Change-Id: Icbf67b94120e2e22ba656e673edc04ab30de5945
Reviewed-on: https://gerrit.instructure.com/37572
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-23 14:26:25 +00:00
Michael Nomitch 57427343e3 DA - assignments_needing_submitting
fixes CNVS-14137

test plan:
  - In one course with DA off
    - make sure that the To Turn In
      section shows an assignment that is
      due in 1 day and not turned in
  - In one course with DA on
    - make sure that a similar assignment
      that a student cannot see due to
      differentiated assignments doesnt
      show up in that column
  - NOTE: don't use the same course/user
    because there is a cache that only updates
    every 15 minutes

Change-Id: I6cc93b01ba41335ae0c7f6f8682b8798e0604c3e
Reviewed-on: https://gerrit.instructure.com/37020
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2014-07-23 14:06:34 +00:00
James Williams 7e4749e3f8 use require_dependency instead in importers
Change-Id: Iaa1c085b5ec30d0e9e1d4dd698ceff935c9f604d
Reviewed-on: https://gerrit.instructure.com/37971
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-07-23 13:24:00 +00:00
James Williams 5cc99e6a9f remove space in page revisions title
closes #CNVS-14351

Change-Id: Id4e04b90577b1651ba4d3bab9546b3743b38499a
Reviewed-on: https://gerrit.instructure.com/37936
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-07-23 12:12:32 +00:00
Braden Anderson d510f0e811 conversations: only poll unread count on inbox page
fixes CNVS-14355

test plan:
  * open conversations
  * mark a conversation read or unread
  * wait 30 seconds
  * verify that your unread message count is updated

  * open your browser's network monitor
  * switch to another tab
  * wait 30 seconds
  * verify that /api/v1/conversations/unread_count was not hit

  * open a different canvas page
  * wait 30 seconds
  * verify that /api/v1/conversations/unread_count was not hit

Change-Id: Ib33ac1fda7e16717508cfb34bf360d8b917468d1
Reviewed-on: https://gerrit.instructure.com/37954
Reviewed-by: Brian Palmer <brianp@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-22 22:17:05 +00:00
Ryan Shaw 6034184ee4 add search to files and convert to react
closes: CNVS-12642
closes: CNVS-11221

test plan:

nothing should have changed for courses/accounts that
have the feature flag 'better_file_browsing' turned off
but I guess make sure.

with it turned on, you should be able to browse the
files in your course, search for things, and re-sort.

it should paginate, download files you click on,
show thumbnails of files (where it has one) and you
and see the files usage in the bottom left.

things that I know dont work:
* the folder tree thing on the left is still
  just static html, not the actual files in your course.
* it does full page reloads when you go from
  looking at one folder to another or when you
  search for something. I am going to fix that.

I know there is still work to be done here to consider
the entire files section complete, but this is a solid
foundation so that sterling and I can collaborate and
work forward.

Change-Id: Ia79ddba4318b7d6e52b38a87e91f615552da250b
Reviewed-on: https://gerrit.instructure.com/37491
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-07-22 22:07:52 +00:00
Jacob Fugal 399f732b82 handle corrupted tombstone auditor events
refs CNVS-13987

after data fixup for CNVS-13987, the audit logs will contain tombstone
records for events that had been lost/corrupted by overwrites. these
records are essentially empty outside of ids, created_ats, and the index
entries pointing at them.

these adaptations prevent these bare events from causing errors during
the API response, and also some display indication in the admin tools
UI.

test-plan:
 - revert a6304f2 to reenable audit logs

 - generate tombstone events (with index entries, so they get found) in
   each of the three audit logs (authentication, grade change, course
   change):

     # user for authentication events, course for the other two
     target_course = Course.find(...)
     target_user = User.find(...)

     streams = [
       [Auditors::Authentication::Stream, :user_index, target_user],
       [Auditors::GradeChange::Stream, :course_index, target_course],
       [Auditors::Course::Stream, :course_index, target_course]
     ]

     streams.each do |stream, index, target|
       index = stream.send(index)

       database = stream.database
       id = CanvasUUID.generate
       created_at = Time.now

       key = index.create_key(index.bucket_for_time(created_at), target.global_id)
       ordered_id = "#{created_at.to_i}/#{id.to_s[0, 8]}"
       ttl_seconds = stream.ttl_seconds(created_at)

       database.batch do
         database.insert_record(stream.table, {stream.id_column => id}, {
           'created_at' => created_at,
           'event_type' => 'corrupted'
         }, ttl_seconds)
         database.update(index.insert_cql, key, ordered_id, id, ttl_seconds)
       end
     end

 - query each of the audit logs for the appropriate target through the
   admin tools UI. the tombstones should show up in the results with the
   correct created_at and an indication that the record was
   corrupted/lost

Change-Id: I690c8a5469228b7815a644010bb4b744c8ea2e9c
Reviewed-on: https://gerrit.instructure.com/37603
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-07-22 16:16:06 +00:00
Aaron Cannon 02da89e801 Accessibility: Labeled the available from and until fields on discussions
Fixes CNVS-13935

Test plan:
- Using a screen reader, create a new discussion topic.
- Navigate to the Available From and Until fields
- Validate that the screen reader reads the field labels correctly.
- Validate that the fields still opporate as expected.

Change-Id: I3f81dd13d8e4b04bb3034681e9fb17015e4fd9c5
Reviewed-on: https://gerrit.instructure.com/37842
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-07-22 15:41:53 +00:00
Aaron Cannon cf33943b4c Accessibility: Made expand/collapse controls accessible to keyboard users
Fixes CNVS-13584

test plan:
  - as both a teacher and a student:
    - navigate to assignments index page
      - using the keyboard verify:
        - you are able to navigate to the expand/collapse controls
        - expand/collapse appears visually focused
        - you are able to toggle the expland/collapse controls
    - enable :quiz_stats feature flag on a course
      - navigate to quiz index
      - verify the above for quiz index

Change-Id: Ia9486464289d122c41d1790202b1b5e81d1a67a8
Reviewed-on: https://gerrit.instructure.com/36785
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2014-07-22 15:40:52 +00:00
Brad Humphrey 25cc14c224 remove canvas frame from borderless lti launches
test plan
  - install a tool
  - launch the tool using /courses/1/external_tools/retrieve?url=http://lti-tool-provider.herokuapp.com/lti_tool&borderless=1
  - it should launch within a canvas frame
  - launch the tool using /courses/1/external_tools/retrieve?url=http://lti-tool-provider.herokuapp.com/lti_tool&borderless=1
  - it should launch in full screen without first loading the canvas frame

fixes PLAT-550

Change-Id: I83d6d024c7c574138a0863dc74dedaac749a0b26
Reviewed-on: https://gerrit.instructure.com/37893
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-07-21 20:42:47 +00:00
James Williams 63c380d8ac fix typo in extend_time controller
Change-Id: I2d0ab394b80a4b098339b45a8ae3afe59d575e68
Reviewed-on: https://gerrit.instructure.com/37911
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-07-21 19:00:32 +00:00
James Williams 9989eaa9a1 retain unpublished state for discussion topics on copy
test plan:
* create an unpublished discussion topic and a
 published one
* copy the course (or export/import it)
* should retain their respective states

closes #CNVS-14201

Change-Id: If7702b67701b50ce4e2a027d1d4b5ab441d86003
Reviewed-on: https://gerrit.instructure.com/37900
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-07-21 17:25:10 +00:00
James Williams e3bb29a0a2 fix content importers without class caching
Change-Id: Ifad2fdbaac327cdaac985a0a10afd09e7c136208
Reviewed-on: https://gerrit.instructure.com/37910
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-07-21 16:58:25 +00:00
Cody Cutrer b7a7cd4951 fix permission checks for available roles
fixes CNVS-13848

test plan:
 * create a role that only has permission to create admins
 * in a subaccount, grant that role an additional permission
 * in the root account, add an admin to the role
 * log in as that admin
 * in both the root account and the subaccount, attempt to create
   an admin - it should only list your role in both cases

Change-Id: If9a2dd4952e432700c59a0d4ad5e76ffa822dd0f
Reviewed-on: https://gerrit.instructure.com/37408
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-21 16:32:23 +00:00
Cody Cutrer 17044dfb94 i18n fixes for content_exports/index.html
fixes gh-476

Change-Id: I73481c0c0571184e2656bd0d9a23bfdaf84c330c
Reviewed-on: https://gerrit.instructure.com/37858
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-21 14:55:08 +00:00
Cody Cutrer 5d2e9c7704 fix overrides in subaccounts changing permissions for parent accounts
refs CNVS-13848

test plan:
 * create a role in a root account that has no permissions
 * create a subaccount
 * grant permission to add new admins to that role in the subaccount
 * add an admin to that role in the root account
 * log in as the admin
 * he should not have permission to add admins to the root account,
   but should be able to in the sub account

ALSO - general permissions regression test

specs still pass, but it's kind of a scary change to the core of
how permissions work

Change-Id: I74fd72d71e9922431e134af94da41815196a2234
Reviewed-on: https://gerrit.instructure.com/37407
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-19 00:42:32 +00:00
Nathan Mills 737c5ccdd4 add aria selected for canvas app center filters
fixes PLAT-556

test plan:

screen readers should be able to tell which filter is selected
you can tab through the apps now, and select one with space

Change-Id: Idf96f9418420dfe79ebe6d4451901cf2766589ab
Reviewed-on: https://gerrit.instructure.com/37767
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-07-18 17:12:42 +00:00
Nathan Mills a91d9c09d0 add lti2 models and registration endpoints
fixes PLAT-522 PLAT-429 PLAT-545 PLAT-540 PLAT-498

test-plan
you can register an lti2 tool

Change-Id: If045b694213e1019f8a595b63a7e33ea4ac28e64
Reviewed-on: https://gerrit.instructure.com/37095
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
2014-07-18 16:42:10 +00:00
Colleen Palmer 0212b59646 Support for fontcustom for canvas icons
This uses the fontcustom gem to compile our icons from svgs in the
public/fonts/ folder. No more complicated workflow for adding/editing
icons!

Way to test:
  * Add your new svg to public/font/icons/
  * Important!! Edit template file to update
    stylesheet in public/font/_canvas-icons.scss
  * Run the rake task to compile: bundle exec rake icons:compile
  * Check the styleguide to make sure they're pulling in
  * Done!

Update
fixes DES-101
-takes our core_en.js file (unneeded)

fixes DES-101
- Changes font directories
- Tweaked documentation

fixes DES-101
- Tweaked documentation
- Changed directories for font icon
- Added unique hash to font name

fixes DES-101
- Changed rake task to perform bundle exec
- Updated documentation
- Added missing config file

fixes DES-101
Takes out the default [date-icon] css fontcustom puts in

fixes DES-101

Take out all the icomoon comments in the svgs

fixes DES-101

Added missing icons to font

fixes DES-101

Adds the fontcustom gem to a different gemfile

Change-Id: I9860cb074baaf4518548c9d87c1177a14d96a44c
Reviewed-on: https://gerrit.instructure.com/36974
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-07-18 15:47:45 +00:00
Joel Hough 0c80487238 use absolute url for avatar in notifications
fixes CNVS-14251

test plan
- cause a notification with an avatar to be sent (discussion,
 conversation, or submission comment)
- ensure that the avatar image src attribute is an absolute url

Change-Id: I6992de1f4b83ecfdf838725a42e09feb1ca5e1c9
Reviewed-on: https://gerrit.instructure.com/37729
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-18 14:18:25 +00:00
Jon Willesen ddcd5403ed add content parameters to course_home_sub_navigation lti launch
fixes CNVS-13798

test plan:
 - copy the xml configuration for the lti-tool-provider example
   lti app to a local file.
 - modify the xml by duplicating the migration_selection
   extension, changing the extension name to
   course_home_sub_navigation
 - configure the lti app on a course by pasting the modified xml
 - navigate to the course home page and open the network tab on
   the web inspector
 - launch the tool by clicking on its button on the right
   sidebar
 - inspect the POST request to the lti app and verify that 4
   "ext_content_" parameters are present:
   - intended_use
   - return_types
   - file_extensions
   - return_url
 - click on one of the supported links
 - should be redirected to the "tool use finished" page.

Change-Id: If5df5657c64377fdb2badca1d890c73e95548fbc
Reviewed-on: https://gerrit.instructure.com/37834
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-07-17 22:41:23 +00:00
Michael Nomitch b4840c75cc DA - grade calculation works on backend
fixes CNVS-13715

test plan:
  - create a student who is in one group and not another
  - create an assignment only visible to each group
  - grade the student for both assignments
  - turn DA on
    - as the student and teacher, go to the student grades page
      - both of the assignments should be visible
      - final grade should be correct (factoring in both)
        * final grade = ungraded assignments count too
    - delete one of the grades and return
      - only one of the assignments should be visible
      - final grade should be correct (using just one assignment)
  - turn DA off
    - as the student and teacher, go to the student grades page
      - both assignments are visible
      - final grade should factor in both assignments
  - with DA on and off, ensure that the following work:
    - drop rules
    - never drop rules
    - assignment stats (mean median etc)
    - what if scores

Change-Id: I727aff943b14c91089ccffa6d3b63ba026abbeec
Reviewed-on: https://gerrit.instructure.com/36762
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2014-07-17 21:27:59 +00:00
Cameron Sutter 54d567f62f DA - discussion edit page
fixes CNVS-12770

test plan:
 * turn on the Differentiated Assignments feature flag
 * from the discussion edit page
  - add a due date for some of the sections, but not all
  - save (update discussion)
  > the only_visible_to_overrides flag on the discussion's assignment
    should be true
    (you'll need to check the discussion's assignment with the API)
  > edit the discussion again and there should not be an
    empty due date row for 'Everyone else'
  - add a due date for all the sections
  - update the discussion
  > the only_visible_to_overrides flag should be false
 * on the discussion show page
  - edit the discussion so that there are only due dates
    for some sections but not all
  > there should not be a row in the due date area
    for 'Everyone else'

Change-Id: I4a998c65b1f0459ad93789672bf586473545a61c
Reviewed-on: https://gerrit.instructure.com/34272
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2014-07-17 20:35:37 +00:00
Jayce Higgins 601196c0e2 Makes new student groups accessible
Fixes: CNVS-13350

The new groups page was not accessible. Specifically
the keystrokes were not expanding the group details.
Groups can now be expanded via the keyboard and
focus is explicitly set afterwards in order to
make the screenreader read the expansion.

Test-Plan:
1.) Create a group and add a user to it
2.) Masquerade as user
3.) Navigate to new groups page
4.) Turn on screen-reader
5.) Navigate using keyboard to the group-name
    and verify that it expands and reads the details

Change-Id: I3fe5c62e59e2f7d3053af46685c57f40dcf33d00
Reviewed-on: https://gerrit.instructure.com/37379
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-17 20:28:26 +00:00
Rob Orton 5cddb83461 make drop down for admins limit to active accounts
fixes CNVS-13839

test plan
 - create an account
 - create an admin
 - delete the account
 - the admin role should not show in the drop down

Change-Id: I12c3f6cc615deb0646d3b4f2af60bb191f070edc
Reviewed-on: https://gerrit.instructure.com/37076
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-17 18:33:16 +00:00
Michael Nomitch 9c8c42b952 DA - assignment indices
fixes CNVS-13708

test plan:
  - create a student who is in one section and not another
  - create an assignment only visible to each section
    (1 section => 1 assignment)
  - grade the student for both assignments
  - turn DA on
    - as the student, go to the assignment index page
      - both assignments should be visible initially
      - delete the grades for both assignments and return
        - only the overridden assignment should be visible
      - only one of the assignments should be visible
    - as the student, go to the grades page
      - only the overridden assignment should be visible
      - regrade the assignment whose grade you had deleted
        - both assignments should be visible now
      - (fyi: final grade wont be correct)
  - turn DA off
    - as the student, go to the assignment index page
      - both assignments are visible
    - as the student, go to the grades page
      - both assignments are visible
      - final grade should factor in both assignments

Change-Id: I32e3fea4d6fd3db9a512e0d170779b48418f90cf
Reviewed-on: https://gerrit.instructure.com/36728
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Mike Nomitch <mnomitch@instructure.com>
2014-07-17 18:23:25 +00:00
Matt Wheeler 379acad0f7 Make student mastery outcome groups accessible
Fixes CNVS-14008

Test Plan:

1) Create a course and add a student
2) Turn on the Student Mastery Gradebook feature
3) Add at least 2 outcome groups each with at least 2 outcomes
4) Masquerade as the student, and visit the Learning Mastery grades tab
5) Verify with screenreader that outcome groups are clearly clickable

Change-Id: Ib9773d8275c7adb13783ee6b0acac551b59fc09b
Reviewed-on: https://gerrit.instructure.com/37702
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
2014-07-17 18:08:07 +00:00
Ryan Florence 7058e24e9d remove property name collision on js strings
fixes CNVS-14258, CNVS-14237, CNVS-13700

Change-Id: I6d298c2729c302ad1aac245a9a0cdde5d3835e98
Reviewed-on: https://gerrit.instructure.com/37776
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
2014-07-17 18:01:50 +00:00
Nathan Mills b0350368e4 update link on canvas app page
fixes PLAT-534

test-plan:

the link in Canvas Apps page should go to eduappcenter.com instead of edu-apps.org

Change-Id: I65ea243e017573e6ad97398c56815ba62dc1a8fb
Reviewed-on: https://gerrit.instructure.com/37781
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-07-17 15:43:16 +00:00
Joel Hough c2fdad1b87 add subject to conversation html email notification
fixes CNVS-14220

test plan
- cause a conversation message notification to be sent
- check the html email notification that was sent
- ensure that the conversation subject appears in the message

Change-Id: Ie2e1c7cb2865e2cb9a1ac1763ade2eebd88dc373
Reviewed-on: https://gerrit.instructure.com/37716
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-16 20:27:15 +00:00
Simon Williams cb551459e4 i18n developer key index and external tool edit
fixes GH-471
fixes GH-472

test plan:
- make sure "Add Developer Key" and table headers are localized on the
  developer keys page in site admin
- make sure "Name", "Consumer Key", "Shared Secret", "Configuration Type" are
  localized when editing an external tool configuration

Change-Id: I6ab2cc981fe296ba33f96589f805a2985d22da7d
Reviewed-on: https://gerrit.instructure.com/37551
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
2014-07-15 23:29:39 +00:00
Ryan Shaw efdf072610 create ensure-contrast sass func for easier text color picking
whenever you are setting the color of text that will be
on top of some background, you should use this new
`ensure-contrast` function.

example usage:
.simple-example {
  // will output '#eee' in normal contrast, but will output '#686868' for people that
  // $use_high_contrast so that it meets the 4.5:1 contrast requirement
  color: ensure-contrast(#eee, #fff)
}

// more thorough example showing how you should be doing it with variables:
$page-bg-color: white;
$primary-brand: blue;
$link-color: ensure-contrast($primary-brand, $page-bg-color);
a { color: $link-color }

this also goes through and updates some of the places
where we were doing explicit overrides for high-contrast
to use this new function, which also provides examples
of how to use it

test plan:

* nothing should change in normal contrast
* with high contrast turned on, the text of these
  things should be at least a 4.5:1 contrast ratio.
* one particular thing to check is the placeholder on
  input elements (fixes: CNVS-13725)

closes: #CNVS-14022

Change-Id: Ic16ab84c2dfac1d600ea705abf134522762b398e
Reviewed-on: https://gerrit.instructure.com/37375
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-07-15 20:16:42 +00:00
Michael Nomitch a60802d00e DA - sql view and shared methods
fixes CNVS-13649

test plan:
  - go to a few pages and make sure no errors occur
    - GB2
    - assignment index
    - student grades page
  - do same with and without DA on

Change-Id: I72f303cf54c36420a57dfbd23635f319f9827bd0
Reviewed-on: https://gerrit.instructure.com/36675
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
2014-07-15 18:03:57 +00:00
Simon Williams 1f63fa894c add label to "Message Students Who..." select box
fixes CNVS-13733

test plan:
- go to individual gradebook view and turn on a screenreader
- select an assignment
- go down and click on the "Message Students Who" button
- it should read the first select box as "Message Type"

Change-Id: Ib3aa136457dd03f4da6dba934e6e05ced0ea0a81
Reviewed-on: https://gerrit.instructure.com/37682
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
2014-07-15 17:59:56 +00:00
Jake Sorce 2a1426b3bb update user profile api to return user locale
refs PS-1725

test plan:
  1. make the user profile api call
  2. validate the new locale key and values are returned
  3. go to your settings and change your locale
  4. make sure the new locale is returned via api
Change-Id: I0a0ebae6c227b74e1f8c149dcd638aa735edbea8
Reviewed-on: https://gerrit.instructure.com/37099
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
Product-Review: Jake Sorce <jake@instructure.com>
QA-Review: Jake Sorce <jake@instructure.com>
Tested-by: Jake Sorce <jake@instructure.com>
2014-07-15 17:58:36 +00:00
Ryan Shaw dc728060ba Add a11y title to delete quiz ip filter icon
fixes: #CNVS-13908

test plan:
go to "/accounts/{id}/settings"
add some quiz ip filter ranges.
using NVDA, make sure the delete 'x' says 'Remove Filter'

Change-Id: I8e2c4421ec7f04e3bd0b957fa50a0df8e0aa1813
Reviewed-on: https://gerrit.instructure.com/37643
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-07-15 16:43:04 +00:00
Brad Horrocks 14d1c60e9f Safari on iOS devices can now scroll submissions in speedgrader
desc

fixes CNVS-2468

test plan:
As a student
	Turn in a long submission

As Teacher on an iOS device
	Open up the submission in speedgrader
	attempt to scroll the submission text
	it should work....

-

Change-Id: I2f82e34a297cb696160420a71a7833fd6f8962d4
Reviewed-on: https://gerrit.instructure.com/37555
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2014-07-15 16:10:47 +00:00
Ahmad Amireh 8cf0000fa0 Stop counting teacher previews in results
The scope QuizSubmission#logged_out now excludes teacher previews. This
should solve all occurrences of logged-out users mixing up with teacher
preview submissions.

Closes CNVS-7851

TEST PLAN
---- ----

  - create a quiz
  - preview it, submit your attempt
    - click on the "Show Student Quiz Results" and verify that your
      preview attempt does not show up
  - create a survey quiz and verify that we still get to see the
    "Logged Out User" submissions correctly
  - verify we don't have any regressions on quiz stats with teacher
    previews (a simple API should suffice, they're now configured to
    share the same code, so it should work in both places)

Change-Id: I9803a127dd0be6975504e4fe55ccb2acea13d9af
Reviewed-on: https://gerrit.instructure.com/37622
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-15 14:54:18 +00:00
Cameron Sutter d36db868b1 DA - fix course home page
fixes CNVS-13626

test plan:
 * with the Differentiated Assignments feature on
 * as a teacher
 - navigate to a course home page
 > it should load without an error
 - create an assignment with an online submission
 * as a student
 - submit something for that assignment
 * as a teacher again
 - navigate to the course home page
 > it should load without an error

Change-Id: I912f3898b518fff693c5252879e78135ef4d62a7
Reviewed-on: https://gerrit.instructure.com/36426
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2014-07-15 14:41:58 +00:00
Brad Horrocks b7f6f52723 Display unique courses on the Grade page
when teaching 2 sections within the same course, we shouldn't display 2 links for one course.
Added a test to cover unique courses

fixes CNVS-6682

test plan:
1. Enroll a teacher to more than one section in a course
2. Click on Grades in the top nav
3. Make sure only one link is displayed for the course with multipled section enrollments
-

Change-Id: I22ef5f437b405a8a33c48c182d51adf231ab75c4
Reviewed-on: https://gerrit.instructure.com/37318
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2014-07-15 12:20:38 +00:00
Ahmad Amireh ab0c410b49 Quizzes - Lock down results after first view
Adds an option to Quiz that prevents the students from seeing their
results more than once after their submission.

Closes CNVS-13877

CHANGES
-------

  - New option in quiz settings:
    "Let Student See Their Responses" => "Only Once After Each Attempt"
  - Teacher can always see the student's results
  - Moderate dialog allows teacher to manually reset the result-locking
    flag, allowing the student one more glimpse
  - The flag is reset whenever a new attempt is taken

TEST PLAN
---- ----

  - create a quiz
  - toggle the new option: "Let Student See Their Responses" then "Only
    Once After Each Attempt"

Turn off Ember/quiz stats:

  - take the quiz by a student, turn it in:
    - verify that you see your results
    - reload the page
      - verify that you no longer see the results
  - take the quiz again:
    - verify you see the results once, then not
  - go to the moderate page as the teacher
    - open the moderate dialog for that student
      - check the new option "Let the student see the results one more
        time"
      - click Save
        - reload the page as the student, verify that you see the
          results

Turn on Ember/quiz stats:

  - repeat the process

Other things to test:

  - verify the new field "has_seen_results" is visible in the
    submissions API and is documented
  - verify the new field "one_time_results" is visible in the quizzes
    API and is documented properly
  - verify that the new option has no effect if the Quiz option is not
    set
  - verify that you can always see the student's results as a teacher
    (the setting should not affect teachers)

Change-Id: I6eb4909f777e038acf6afc9ef2823352f5ea78be
Reviewed-on: https://gerrit.instructure.com/37544
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-15 09:47:56 +00:00
Simon Williams d62f73cc07 api: simplify assignment permissions and add tests
closes CNVS-13941

test plan:
- as a teacher, create an unpublished assignment and a published assignment,
  and make sure you can see both in the assignment show api
- as a student, repeate the test and make sure you cannot see the unpublished
  assignment.
- as a teacher, create an assignment, note it's id, delete it, and then try to
  edit it with the assignment edit api. you should not be allowed to.

Change-Id: I760290dc23ab0787fbcdda0570b71f57e0248e73
Reviewed-on: https://gerrit.instructure.com/37631
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-15 01:47:41 +00:00
Joel Hough 506b53702f remove submission comment mark as read notification preference
fixes CNVS-14178

test plan
- view notification preference page
- ensure that checkbox for submission comment 'mark as read'
 setting is not visible
- ensure that submission comment tooltip does not mention the
 checkbox

Change-Id: Ib859aea0fcf5a4e1672e02665725ffa31d99349e
Reviewed-on: https://gerrit.instructure.com/37579
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-07-14 22:21:01 +00:00
Cody Cutrer 00c5302221 avoid deadlocks creating submissions
on postgres < 3, lock users before referencing them to
avoid a deadlock

Change-Id: I4dc13c3a0b4d925fa30cbdad4447c4d62d3f75f3
Reviewed-on: https://gerrit.instructure.com/37390
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ben Chobot <bench@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-14 22:17:55 +00:00
Joel Hough ad9f531302 remove &nbsp; from notification preference tooltip
fixes CNVS-14179

note that the &nbsp; in the submission comment tooltip
is being removed by a different commit

test plan
- view 'Grading' tooltip in notification preferences
- ensure that '&nbsp;' does not appear

Change-Id: Id6c571b2f6abe170a4249c729f3af5a91a8b0ba5
Reviewed-on: https://gerrit.instructure.com/37580
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-07-14 21:30:31 +00:00
Braden Anderson c6014471f4 discussions: prevent creation of new group graded discussions
test plan:
  * create a graded discussion
  * using the Assignments API, try to set group_category_id
      on the discussion's linked assignment
  * verify that you get an error message
  * using the Discussion Topics API, set a group_category_id
      on the discussion
  * verify that the discussion becomes a group discussion

Change-Id: Ida1bae1f370a5d5f13a5002b9cdeb40c24dba0b2
Reviewed-on: https://gerrit.instructure.com/35084
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-07-14 19:30:13 +00:00
Ryan Shaw a221235aa4 Remove remaining unused collections stuff
cameron removed most of the controller/model stuff in:
3c434e8aff

but this removes the remaining view/coffeescript/stuff

Test plan:
  canvas should still work
  (sorry, this looks big but none of it was ever actually loaded)

Change-Id: Ie4e31fcdf5bc2820c9eafaef6e8b25332aaea4bc
Reviewed-on: https://gerrit.instructure.com/37508
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-07-14 18:24:18 +00:00
Duane Johnson 32965c3bd7 fix pseudonyms API doc optional fields
- pseudonyms "List" API has a redundant user[id]
- pseudonyms "Create" API needs 'password' and 'sis_user_id' marked Optional
- pseudonyms "Edit" API needs 'unique_id', 'password', 'sis_user_id' marked Optional

Fixes SIS-354

Change-Id: Id03f1a813d43a9a2f75b7f1ea4d44e87931f84ec
Reviewed-on: https://gerrit.instructure.com/37595
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-07-14 17:21:47 +00:00
Brad Humphrey 503ecb71c1 add custom role variable substitution
Test Plan:
 - custom variable $Canvas.membership.roles should return all roles
   including custom roles

Change-Id: Ib761d0f034de5431a51fa284401686e3269861e9
Reviewed-on: https://gerrit.instructure.com/37432
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2014-07-14 16:04:17 +00:00
Cody Cutrer 9761d56d53 improve AR::all_models for non-eager-loading
include namespaced models, and move two models to where
they actually belong

Change-Id: I8f5940d927e4d1fb2b05fceeca121c04d4de47d5
Reviewed-on: https://gerrit.instructure.com/37447
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-14 15:56:49 +00:00
Matt Wheeler d1f0effee9 Add ARIA attrs to outcome alignment modal link
Fixes CNVS-14009

Test Plan:
- create a course with a learner
- Turn on the Student Learning Mastery Gradebook
- Add an outcome group and an outcome
- Navigate to the grades for a student, then the learning mastery tab
- Expand outcome group and verify the alignments link has 2 ARIA attrs
  - aria-owns="outcome_detail"
  - aria-hasspopup="true"
- Click the alignments link and verify the modal has an id of
  "outcome_detail"

Change-Id: I6e78b177530b3150e82ed3d126b3cd80762b4473
Reviewed-on: https://gerrit.instructure.com/37512
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-07-14 15:20:28 +00:00
Nathan Mills 363d977bd9 add alt tag to app center images
fixes: PLAT-549

test-plan:
*the thumbnail images for apps in the canvas app center should have an alt tag

Change-Id: I87f1f73a88230fe6a0b1db7555cea3f613ac3618
Reviewed-on: https://gerrit.instructure.com/37092
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Reviewed-by: Eric Berry <ericb@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-07-14 14:45:09 +00:00
James Williams cd96f8408e don't show recent feedback for other students to former admins
test plan:
* create a course
* add two teachers (I'll refer to them as
 "New Teacher" and "Old Teacher")
* also enroll a student

* create an assignment requiring submissions
* as the student, make a submission
* now, as the "New Teacher", comment on the submission
* remove the "Old Teacher" from the course as a teacher,
and instead add them again as a student
* confirm that the "Old Teacher"'s recent feedback does not
show the feedback for the other student

fixes #CNVS-13215

Change-Id: Ie03c9036b65c0de93c869818ebc60b059e9a4260
Reviewed-on: https://gerrit.instructure.com/37465
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-14 12:38:14 +00:00
Simon Williams 7b6fc467b6 bump a translation key on course homepage
we changed the name of the interpolation argument without updating the key, so
translations that weren't updated in time are broken.

fixes CNVS-14193

test plan:
- go to the course homepage in a language that does not have an updated
  translation for this key
- it should not error

Change-Id: Ideeceacdc6fcf3178c4e6bc94844b9cf3d2004b3
Reviewed-on: https://gerrit.instructure.com/37604
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Matt Fairbourn <mfairbourn@instructure.com>
2014-07-12 18:59:51 +00:00
Cameron Matheson 13dbb09bd4 fix canvadoc locked-files issue
fixes CNVS-14192

Test plan:
  * Make a course with a canvadocable file
  * Add the file to a wiki page
  * Lock the file
  * Students viewing the wiki page should not be able to preview the file

Change-Id: Ic706085492b07db24dfd48469bcb3e76e1e7e609
Reviewed-on: https://gerrit.instructure.com/37602
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Hannah Bottalla <hannah@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2014-07-12 01:26:27 +00:00
Michael Nomitch ddc6face6f srgb - fix total grade rendering logic and i18n issue
fixes CNVS-14153

test plan:
  - go to srgb with weighted assignment groups
    - final grade points ratio should never
      show up (e.g. "90/100 points")
  - go to srgb with unweighted assignment groups
    - final grade points ration should
      show up (e.g. "90/100 points")
      if the student has a grade
    - changing a grade should update the ratio
    - changing students shouldn't break the ratio
    - students without graded assingmnets
      don't break the ratio

Change-Id: I052f8ba54360e501422cdc354f9760306e457dbe
Reviewed-on: https://gerrit.instructure.com/37524
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-07-11 22:54:13 +00:00
Cody Cutrer adf5629772 remove broken conditional in discussion entry replies
fixes CNVS-14139

test plan:
 * run rails 3
 * create a discussion associated with an assignment
 * in the database, change the created_at for the discussion_topic
   to over two weeks ago
 * post multiple replies to a discussion
 * it should not fail or log an error_report

Change-Id: I1e8960b7277f373c818fdcb95a37dba9933f7188
Reviewed-on: https://gerrit.instructure.com/37485
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-11 22:06:26 +00:00
Joel Hough 208c50bfb2 use linked assignment for discussion regrouping check
fixes CNVS-14003

test plan
- create a graded group discussion
- make the topic like a pre group assignment/graded group
 discussion separation commit by doing the following in a console
 - set the linked assignment's group_category_id to the topic's
  group_category_id
 - set the discussion's group_category_id to nil
- edit the discussion from the web ui
- ensure that the discussion can be edited

Change-Id: I7fc385e0ce2236f5986cf601b46a057708c81079
Reviewed-on: https://gerrit.instructure.com/37469
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: David Josse <david@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-07-11 20:58:38 +00:00
Ryan Shaw 6a85ce3d34 remove 2 unused files that were causing compass issues
because these 2 files don't have a '_' in front of
their filenames, compass was trying to compile them
as their own stylesheets.  We don't use bootstrap
that way, it gets included into another main stylesheet
by boostrap_parts.  so their existence was just causing
us to do more work every time we css:generate as well
as creating errors.

test plan:
nothing should change

Change-Id: Ia93ba9dd9382dabe7a2a33312f574462b45d642e
Reviewed-on: https://gerrit.instructure.com/37374
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
2014-07-11 19:16:17 +00:00
Sterling Cobb 25b8943a65 fix style issues on wiki pages
fixes CNVS-14113

The css prefix compiler was getting messed up by existing prefixes in
the code base. This commit simply removes those vendor prefixes so our
css attributes work correctly.

Test Plan

Given you are using IE10+, Safari and Chrome to browse
As a user than can edit a wiki page
When you navigate to a wiki front page
Then the edit  button should be right aligned
And the admin cog button should be right aligned
And you should be able to see the title of the wiki page

Change-Id: Ic621a07020d6cbc12219eb6ee16a10902ac02d8e
Reviewed-on: https://gerrit.instructure.com/37514
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-07-11 19:14:56 +00:00
Brad Humphrey 43210117bd add a domain suffix to newly generated lti tool_consumer_instance_guid
Change-Id: I243f56083e0e66fe0a21e415e02d573b9fc8bd76
Reviewed-on: https://gerrit.instructure.com/35148
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-07-11 18:45:21 +00:00
Drew Bowman 470967f241 new groups: fix student invites and leaving student led groups
fixes CNVS-13585
fixes CNVS-13588

test plan:

 - make sure new groups is enabled
 - as a student
 - create a new group and invite (student|students)
 - they should be the only students added to the group
 - the student should be able to leave and join that group

Change-Id: I8a62a6cb33b4774207d064d27a3b4471ad4dfb62
Reviewed-on: https://gerrit.instructure.com/36394
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: David Josse <david@instructure.com>
Product-Review: Drew Bowman <dbowman@instructure.com>
2014-07-11 17:27:25 +00:00
James Williams 85136aca96 fix 'everyone' tab link
test plan:
* add a group to a course
* visit the 'People' page
* cliking on the 'Everyone' tab should not take you to
/courses/1/users

refs #CNVS-14011

Change-Id: Icc8d662d6165b6f746c623fa24e867f44c6a536c
Reviewed-on: https://gerrit.instructure.com/37488
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-11 17:04:35 +00:00
Jacob Fugal d9c6e2a0cd clarify Slug vs. UUID and fix event stream
refs CNVS-13987

what was called CanvasUuid was *not* generating UUIDs. it was generating
slugs. by default, its generate method only creates 4 character slugs.
these should obviously not be used as UUIDs. the misnomer already caused
a bug in EventStream where it used these slugs as UUIDs, causing
collisions. to fix:

 (1) rename canvas_uuid gem to canvas_slug, and rename it's primary
     class CanvasUuid to CanvasSlug
 (2) create new canvas_uuid gem, with class CanvasUUID, extracted from
     lib/uuid_singleton for actual UUID generation
 (3) fix event stream use CanvasUUID, rather than following the rename
     of CanvasUuid to CanvasSlug

test-plan:
 - have cassandra set up for audit logs
 - create an audit log entry (e.g. change a grade)
 - look at the generated audit log entry's id field; it should be a UUID
   value, not a 4 character slug

Change-Id: I19758fff4433cd6cb2e21219217dced19ee05c5a
Reviewed-on: https://gerrit.instructure.com/37506
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-11 16:58:42 +00:00
Cody Cutrer ba00b0154a avoid temp tables in sis batch batch mode
we don't want them in a transaction, and they don't work
through pgbouncer without a transaction

Change-Id: Ia1845085db6cda1d039a91588fff2cb4fd93012f
Reviewed-on: https://gerrit.instructure.com/37554
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-11 16:35:15 +00:00
Jeremy Stanley 0ce96f4808 fix current/past/future course list
test plan:
 on /courses (the "view all courses" link in the menu)
 1. ensure hard-concluded and soft-concluded courses show up
    in the "Past Enrollments" section
 2. ensure rejected enrollments show up in the "Past Enrollments"
    section
 3. ensure courses with no dates, or with a current date range
    (either from the term, or from the course settings with
    "restrict enrollment to these dates" checked) show up
    in "My Courses", regardless of course published status
    or acceptance of invitation
 4. ensure courses whose start date is in the future (whether
    via course settings or enrollment term) show up under
    "Future Enrollments", regardless of published status of the course
    (again, course settings only apply if the restrict-dates
    setting is checked)
   * Yes, students should see the names of unpublished courses
     they are enrolled in, but the links should not be clickable.
     This is the major complaint of the ticket; we want to
     forestall "Dude, where's my course?" support questions.
 5. ensure "Future Enrollments" is empty when the viewer is a student
    or observer and the account settings checks "Restrict students
    from viewing courses before start date"
 6. ensure all three lists are sorted by course name
    with invitations before active courses
    (previously only the current list was sorted; the others were
    in arbitrary database order)

fixes CNVS-13583

Change-Id: I49d36dd32dc04ea507d0a379a2e3491a837fd160
Reviewed-on: https://gerrit.instructure.com/37294
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-11 16:34:37 +00:00
Cody Cutrer 17c5895ac6 i18n public course checkbox on create course form
fixes GH-470

Change-Id: I684a0d65e7423ea6c4e11b12de9639ff071540a5
Reviewed-on: https://gerrit.instructure.com/37516
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-11 15:13:12 +00:00