Commit Graph

7763 Commits

Author SHA1 Message Date
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
Jeremy Stanley 01401eebd7 update terms-of-use and privacy-policy urls
test plan:
 - terms of use link should go to
   http://www.canvaslms.com/policies/terms-of-use
 - privacy policy link should go to
   http://www.canvaslms.com/policies/privacy-policy

refs CNVS-13942

Change-Id: I7b17e278d295ddc1b2a1508352b76aa7f2d30ace
Reviewed-on: https://gerrit.instructure.com/37450
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-07-10 22:32:53 +00:00
Nick Cloward a6304f2152 disable audit log searches
refs: CNVS-14114
refs: CNVS-13987

Test Plan:

  Audit Log in Admin tools should have a message saying they have been
  disabled.

  Try to hit an api call to the audit log search and it should return a
  503 with a message that they are disabled.

Change-Id: If3c46f16010d8fd9ace30de885d5572c7299c0ee
Reviewed-on: https://gerrit.instructure.com/37503
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-07-10 22:09:11 +00:00
Joel Hough 097ed299ca avoid messagleable user queries for conversation message show
fixes CNVS-13331

test plan
- have a user with many enrollments (150 ish?)
- send some conversation messages to the user
- as the user, view the message in the inbox
- ensure that loading the message is not as slow as before

Change-Id: I5f1b7febf03a620a5362ee3ac97b3f31320e2d87
Reviewed-on: https://gerrit.instructure.com/36953
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-07-10 21:03:42 +00:00
Mark Severson 6e3dfb3851 fix empty revisions display when restoring a page
test plan:
 * rename a wiki page several times
 * navigate to the revision history for the page
 * restore to a version with a different page name
 - the page should refresh, showing the newly restored name

fixes CNVS-13845

Change-Id: I56df4de17f25393e3d2ce585c777ef3d5a483e51
Reviewed-on: https://gerrit.instructure.com/37470
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-10 20:03:12 +00:00
Matt Wheeler 572c78146a Adds h4 to student mastery individual outcome
Fixes: CNVS-14010

Test plan:
1) create a course with a learner
2) Add an outcome group  and an outcome
2) Navigate to the grades for a student, then the learning mastery tab
3) Expand the outcome group and see that the individual outcome title
   is in an h4.

Change-Id: I506ed259eb3064bad69c69e8b7505105a9167e16
Reviewed-on: https://gerrit.instructure.com/37461
Reviewed-by: Jayce Higgins <jhiggins@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: David Josse <david@instructure.com>
Product-Review: Matthew Wheeler <mwheeler@instructure.com>
2014-07-10 17:40:02 +00:00
James Williams d3b57c922d fix rails 3 change password error
test plan:
* as an account admin, edit the password for a user's login
* the current user session should not be affected

fixes #CNVS-14016

Change-Id: I537a1b1826a09451270f00d8a51d66ba02f6a956
Reviewed-on: https://gerrit.instructure.com/37381
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-10 17:00:00 +00:00
Nick Cloward afe2c53ad6 ignore extra attributes from cas response
fixes: CNVS-13703

Adds a configuration to the rubycas-client gem to parse extra attributes
as a raw version since it defaults to parsing as yaml.

Test Plan:

- In a CAS response add some additional data that cannot be parsed as
  yaml.
- Without this fix it should throw an error that the extra attributes
  cannot be parsed as yaml.

Error: Failed to validate CAS ticket: #<ArgumentError: Error parsing extra
       attribute with value...

Change-Id: I464c296fcf129bc882420f5f4f3913ac37585b02
Reviewed-on: https://gerrit.instructure.com/37191
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-07-10 16:32:04 +00:00
Ryan Florence 065093e97c added React.JS
we aren’t using jsx (yet, anyway) bring it into a
module like anything else:

    define ['react'], (React) ->

There’s also a helper module to make building
your UI simpler at `compiled/withReactDOM`. It
safely moves everything from `React.DOM` to window
during a function call for convenience.

Change-Id: Ibf64f0b207411c31b92f30dddc6ce188d9462e11
Reviewed-on: https://gerrit.instructure.com/37376
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2014-07-10 15:25:35 +00:00
James Williams 574fb015e8 importer refactor: yield missing links instead of going through opts
test plan:
* nothing should have changed

Change-Id: I6e7e26dfff5c3239771f4321de91b7d0f28c9845
Reviewed-on: https://gerrit.instructure.com/36487
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-10 12:57:23 +00:00
Joel Hough c2ef077763 doesn't load so much context stuff on conversations inbox
fixes CNVS-13894

test plan
- regression test user note/faculty journal option in
 conversations compose dialog
 - be sure to try using the compose dialog as a student, an admin,
   and a teacher
 - watch for js errors in the browser developer console
- ensure that page loads faster for users with >100 enrollments

Change-Id: Ie147a3cea3e560ef8bb50adceaa6e820ef110125
Reviewed-on: https://gerrit.instructure.com/37297
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-07-09 16:47:01 +00:00
Jeremy Stanley 3fa2e9c3db give content_exports polymorphic context
test plan:
* content export regressions

closes #CNVS-13468

Change-Id: I44dcf077967d4273c0ae9056074b03853d66a5dc
Reviewed-on: https://gerrit.instructure.com/35745
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-09 16:34:39 +00:00
Mark Severson 8611d9ce09 add observees page to user profile
test plan:
 * navigate to /profile/observees
 * add new observees (specifying usernames & passwords)
 * new observees should appear in the list

notes:
 - the 'Observing' tab does not appear until at least one observee has
   been added for the user (and the page is refreshed)
 - the observing user should gain Observer enrollments for courses the
   observed user is enrolled in (both present and future)

closes CNVS-13356

Change-Id: Icda0f0d256fc73bcb554523db6436457941d8b58
Reviewed-on: https://gerrit.instructure.com/37283
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-09 16:30:20 +00:00
Cameron Matheson fa2e7613cc remove buggy default canvadoc base url
Test plan:
  * go to an account that has canvadocs configured
  * you should see the url you configured
  * go to another account that hasn't had canvadocs configured
  * there shouldn't be a base url filled in

Change-Id: I6889a02998f84a9ac7c6ac14d985beffea3a796c
Reviewed-on: https://gerrit.instructure.com/37412
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-07-09 06:13:35 +00:00
Rob Orton 2438a19c8c update verbiage on recent feedback
fixes CNVS-995

test plan
 - on dashboard recent feedback should read "past
   two weeks" instead of "next two weeks"

Change-Id: Ic31055ef02c323b4c3899a1eba853afccd542f0c
Reviewed-on: https://gerrit.instructure.com/37299
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: Rob Orton <rob@instructure.com>
2014-07-08 20:28:46 +00:00
Rob Orton 5ca1c280cf update string in SIS text
fixes CNVS-13991

test plan
 - specs should pass

Change-Id: Ie689f634e5ec51f85e07bdd4b1af21a311af97ad
Reviewed-on: https://gerrit.instructure.com/37328
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ken Romney <kromney@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Dana Danger <dana@instructure.com>
2014-07-08 20:28:05 +00:00
Cody Cutrer b408d65fae simplify can_do
adheres_to_policy has equivalent caching internally now, so no need
to bother with externally

also, OpenObjects went the way of the dodo a long time ago
(StreamItems always reconstitute the actual AR object)

Change-Id: I9f2e04700c8897d0fe539a58dcbd6ec829e6f023
Reviewed-on: https://gerrit.instructure.com/36310
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-08 20:23:52 +00:00
James Williams 09513aea4a run domain substitutions on module item and external tool urls
test plan:
* create a course with external link module items,
and external tools with links pointing to a given
domain (e.g. "http://www.example.com/somewhere")

* in the rails console, manually configure the account settings
as follows, (replacing COURSEID with the id of the course):
 a = Course.find(COURSEID).root_account
 h1 = {"http://www.example.com" => "https://www.not-example.com"}
 h2 = {:domain_substitution_map => h1}
 a.settings[:default_migration_settings] = h2
 a.save!

* copy the course
* the links should all be translated to the new domain
 (e.g. "https://www.not-example.com")

fixes #CNVS-13512

Change-Id: I4472fec4c2633827409967cc76652e7395fb8e0f
Reviewed-on: https://gerrit.instructure.com/37356
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-08 19:57:52 +00:00
Ahmad Amireh 0200972541 Quiz Submission Questions - fix serializer lookup
Closes CNVS-14021

TEST PLAN
---- ----

  - create a quiz with a question
  - try answering the quiz using the QSQ API (see docs)
  - verify that your answer is recorded

Change-Id: I667671f639ac0b5c6bc469477b638e70f90f37ff
Reviewed-on: https://gerrit.instructure.com/37372
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-07-08 19:55:22 +00:00
Cameron Matheson ed5b8ae452 get rid of weird before_quiz_submission_types attr
Test plan: specs pass

Change-Id: Ibfcaf313345277daa2a1f2f50741b7e3131fc9ec
Reviewed-on: https://gerrit.instructure.com/37365
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2014-07-08 17:58:06 +00:00
Cody Cutrer 42433fd79f bump switchman
Change-Id: I95163638f9db1fc3ec9447d94f2f86c1ed24468d
Reviewed-on: https://gerrit.instructure.com/37319
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-07-08 15:20:25 +00:00
James Williams 35436b3bb8 fix qti question bank selection
test plan:
* import a qti file into a course and select a question
 bank to import
* should import into the correct bank

closes #CNVS-1965

Change-Id: I4f4647cedf28b931225986b757688c8794dfa1d4
Reviewed-on: https://gerrit.instructure.com/37321
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-07 22:49:10 +00:00
James Williams 924a4cf832 fix date shifting for re-imported items
(also keep track of other imported items as well)

test plan:
* import a canvas export package (such as the one
referenced in the ticket) with assignments and graded
discussions
* import them into a course
* delete the assignments, etc. from the course
* re-import the package, while shifting the dates
* the re-imported (i.e. undeleted) assignments should
 have their dates shifted

fixes #CNVS-13252

Change-Id: I396059cdcf58fe3386f21cc7cffe62ac8951cd05
Reviewed-on: https://gerrit.instructure.com/36743
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-07 21:19:34 +00:00
Drew Bowman 4c0671ee6b add helper method for incomplete registration
fixes CNVS-13526

test plan:
- test along with the demo site changes
- this is needed to verify the demo site tracking pixel changes

Change-Id: Ice12d7248e75e24c3694d3df5cccda7e8ba18881
Reviewed-on: https://gerrit.instructure.com/36972
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Drew Bowman <dbowman@instructure.com>
Product-Review: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
2014-07-07 19:56:13 +00:00
Brad Horrocks aadff160fb Workaround for a chrome bug where active pseudo class stays on inactive elements
Chrome has a nice bug where clicking on block element
inside an inline element will force the inline element
to keep the :active pseudo class.
this causes tooltips to stay open since our tooltips
show if the tooltip element has the :active pseudo class
a bug has been filed at https://code.google.com/p/chromium/issues/detail?id=391254

fixes CNVS-10808

test plan:
- using chrome
- Click the attach file icon
- Make sure the tooltip disappears

Change-Id: I86ff3bc9b2d309382c63b8fa4183bfc9b9162af6
Reviewed-on: https://gerrit.instructure.com/37255
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2014-07-07 19:21:13 +00:00
James Williams fb1837de17 fix "add login" logout error in rails 3
test plan:
* logged in as an account admin, visit the user page for
 a given user other than yourself
* use the "Add Login" dialog to create a login and
password for the user
* should not log you out and login the edited user

fixes #CNVS-13883

Change-Id: I6104b64dfd9a9557b1f6943bad14e1dcba2168f3
Reviewed-on: https://gerrit.instructure.com/37290
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-07-07 19:05:27 +00:00
Sterling Cobb fb9769bfb0 turn add module item link to a button
fixes #CNVS-13548

When adding a module item the + link should have been a button with a
label. It now is a button with a label and works in JAWs and voice over.

Test Plan ------------
As a user that can create a module item
Given I'm using jaws and/or voice over
When I navigate to the modules page
I should be able to click on the add module items button
And it should be a button
And it should have a label
And it should work in Jaws
And it should work in voice over

Change-Id: I617dc3e37a9aeb2e54ee17a273f8284dbc7787f4
Reviewed-on: https://gerrit.instructure.com/36203
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-07 17:18:48 +00:00
Jeremy Stanley dd3ce0f911 don't re-invite student view student with "completed" enrollment
make the enrollment "active" instead of "invited", or else
User#can_masquerade? will fail because the "invited" enrollment
will not link the student view user to the course via the
courses association

test plan:
 1. have a teacher in an active course who is not an account admin
 2. enter student view
 3. leave student view
 4. conclude the course
 5. enter student view again. it should work this time.

fixes CNVS-13610

Change-Id: If59683a58ae2fcd425a50eccdab8ca74ac435e07
Reviewed-on: https://gerrit.instructure.com/37215
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-07-07 17:10:31 +00:00
Cody Cutrer c25317cb86 fix quiz question parsing for non-eager loading
fixes CNVS-13791

with non-eagerloading, the constants might not be present, so we just
have to try to get it, instead of checking if we have it

test plan:
 * in development mode, make sure cache_classes is false
 * create a quiz with a fill in multiple answers question
 * save it
 * preview the quiz
 * it should not page error

Change-Id: Iacdebd972e4b0d6f404e8f0a6a91a8adecb77ca8
Reviewed-on: https://gerrit.instructure.com/37172
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-07-07 16:55:23 +00:00
Ahmad Amireh 29bd44354a Draft-State Quizzes - "Save It Now" should work
Closes CNVS-13730

This patch enables the (re)publishing functionality in DS mode. The
issue was that the internals were relying on "workflow_state_changed?"
to be truthy in order to re-publish the quiz, which is not the usual
case in DS where the quiz's WState is always "available" and doesn't
really change between authoring updates.

A side change: Canvas::DraftStateValidations is now covered and
responsible for adding the required validations to classes that mix it
in.

TEST PLAN
---- ----

  - create a quiz with draft-state on
  - add a question
  - save the quiz, publish it
  - open a tab on the quiz show page and keep it
  - in another tab, edit the quiz, modify the question, hit "Update
    Question" and switch back to the show quiz tab
  - refresh the page, verify you get the "Save it Now" button
    - push the button
    - refresh again
    - verify that the button no longer re-appears, and that your changes
      were actually published (you can do this by taking the quiz as a
      student)

Change-Id: Idf3b4302b23d6abc483b80796fee753b0e6fba85
Reviewed-on: https://gerrit.instructure.com/37303
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-07 16:08:38 +00:00
Cody Cutrer 1277aaae90 stabby lambda scopes for rails4
Change-Id: I34f2527471cdb4d8cab5cde426ba959baa26189e
Reviewed-on: https://gerrit.instructure.com/37151
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-04 02:11:56 +00:00
Ahmad Amireh f47272f9a7 Ember Quiz Stats - a11y/color contrast
Closes CNVS-13078

TEST PLAN
---- ----

  - visit ember quiz stats
  - verify the colors are updated as requested in the jira ticket
  - verify that when you hover over a bar in the bar charts you no
    longer see the bars turn to the orange-red color

Change-Id: Ia0e6380dc1ee4ab5971edd4628d9ec75844a5b64
Reviewed-on: https://gerrit.instructure.com/36070
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-03 22:29:19 +00:00
Ahmad Amireh 7f49fc8ad1 Show FIMB responses in the correct boxes
The internal order of blanks (in question_data) is no longer relevant
when rendering the results but instead should follow the order of the
[blank] definitions found in the question text.

Closes CNVS-3544

TEST PLAN
---- ----

  - create a quiz with a FIMB question
  - create two blanks, call them "color" and "size", e.g:
    "My shirt is colored [color] and is [size] big."
    - take the quiz and verify that your answers are shown in the
      correct order per blank ([color] and then [size])
  - edit the quiz and do this:
    - edit the question
    - select the portion of the "is colored [color]" and drag it using
      your cursor to be somewhere after the "[size]" blank, e.g:
      "My shirt and is [size] big colored [color]" (yes, ignore the
      grammar this one time)
    - directly click on Update Question without pressing anywhere else
    - save quiz and republish
  - take the quiz again by the student, submit it and:
    - verify that the disabled input boxes still read in the correct,
      newly-adjusted order which is [size] and then [color]
    - verify that the result boxes look right overall

Change-Id: I497b15f5c0dfa863e39f4fd5856d56fb84581fde
Reviewed-on: https://gerrit.instructure.com/37251
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-07-03 20:34:58 +00:00
Aaron Cannon a2563b779c Accessibility: Labeled the attachment field for discussions
Fixes CNVS-13729

Test plan:
- Reply to a discussion.
- Using a screen reader, add an attachment, and verify that the
  attachment field is labeled.

Change-Id: I193b18a210e3255deb61f27f50349d74f395f6e8
Reviewed-on: https://gerrit.instructure.com/36863
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: David Josse <david@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-07-03 20:28:00 +00:00
Jon Willesen 9867c179c3 add new badge for course settings lti tool
Fixes RD-79

test plan:
 - add an lti app with the course_settings_sub_navigation
   extension (probably have to modify the xml for an existing
   app).
 - go to the course settings page and see the app shows up at
   the top of the right sidebar.
 - on the console, change the integration_type for the tool to
  'lor'.
 - refresh the course settings page and see the app now has a
   new badge.

Change-Id: I1d5ccc57e1ee3624abe91543c22793aa6dd0350a
Reviewed-on: https://gerrit.instructure.com/36853
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-07-03 19:15:02 +00:00
Cameron Matheson 9ccbccba4f make canvadocs work in public courses
fixes CNVS-13805

Test plan:
  * make a public course
  * upload a canvadocable file
  * visit the course in a new browser (without logging in)
  * you should be able to preview the file

Change-Id: I4ef0b0ba656f2aad734736178b09ad9a729ae3c9
Reviewed-on: https://gerrit.instructure.com/37245
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-07-03 19:14:01 +00:00
Brian Palmer f0dfbe69fa rails3: fix RequestContextGenerator middleware order
Make sure it comes before ActionDispatch's logging of the request start

fixes CNVS-13890

test plan: turn on 'log_context: true' in config/logging.yml, and make
sure that the `Started GET "/path"` lines have the correct request id of the
subsequent request, not the previous request.

Change-Id: Ie6a77993955296b9032e07f8536506b6816517b7
Reviewed-on: https://gerrit.instructure.com/37183
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-03 15:09:56 +00:00
Cody Cutrer 871d979f6b fix display of FIMB quiz questions on rails 3
fixes CNVS-13790

string manipulation just lost the html_safe flag on rails 3, but not
rails 2

test plan:
 * create a quiz with a fill in multiple blanks question
 * preview it
 * it should render the question correctly, not have a bunch
   of raw html

Change-Id: I399874707a880e55c3772e5a780ff595de9062d6
Reviewed-on: https://gerrit.instructure.com/37188
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-03 14:46:21 +00:00
Cody Cutrer 20737f3d74 fix quiz answer serializer loading for cache_classes=false
refs CNVS-13790

the serializers aren't all loaded in development mode, so you can't
rely on them auto-registering themselves. just constantize what the
class name should be.

also fix a module method not being in the correct file, also for
autoloading goodness

Change-Id: Id7da60757c1b7d816fe94e39d57b521e9efb730d
Reviewed-on: https://gerrit.instructure.com/37173
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-03 14:45:49 +00:00
Cody Cutrer dce3460382 fix rendering of multiple dropdowns question in rails 3
refs CNVS-13790

test plan:
 * create a quiz with a multiple drop downs question
 * preview it
 * it should render correctly

Change-Id: I8a37e0e7b8eee545252343927f8697b659726de0
Reviewed-on: https://gerrit.instructure.com/37193
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brian Palmer <brianp@instructure.com>
2014-07-03 14:45:17 +00:00
Brandon Broschinsky de0e126ad8 don't copy lti_context_id on course reset
fixes: CNVS-13662

**test plan
1. Add lti tool launch to course
2. launch lti tool in course
3. navigate to course settings and reset course content
4. course should reset, lti_context_id should not be set

Change-Id: I2e541e9c6919d996b13160f4e021baf273a4cd22
Reviewed-on: https://gerrit.instructure.com/36564
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brandon Broschinsky <brandonbr@instructure.com>
2014-07-03 02:00:33 +00:00
Jeremy Stanley 8321b1a884 fix student progression pagination
fixes CNVS-13811

test plan:
 - have a large browser window (15" full screen will do)
 - enroll 12 or more students in a course with draft state enabled
 - go to the modules page
 - click "View Progress"
 - there should be no blank space at the bottom of the
   "STUDENT PROGRESS" pane on the right
 - you should be able to scroll down and see the last few students

Change-Id: I79342288e4809d03f7c8bd07c7782310f841e8b6
Reviewed-on: https://gerrit.instructure.com/37089
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-07-02 21:53:07 +00:00
James Williams 5b2d0cb97f selective content export api
test plan:
* test the undocumented content_list api endpoint:

 api/v1/courses/:course_id/content_list

which returns the same content list that would be shown by the
selective_content endpoint of a pending course copy content migration

with no 'type' parameter, it should return a list of
exportable categories and urls for each expandable type

with a type parameter (e.g. content_list?type=context_modules), it
should send a list of items with their titles and ids (asset strings)

these ids can be used to select the content for the export

* use the content_exports_api create endpoint to create a
 common_cartridge export, but add an additional argument,
 "select" (equivalent to the "copy" parameters for
 the content_migration api)

e.g. api/v1/courses/:course_id/content_exports?
 select[all_wiki_pages]=1&
 select[context_modules][context_module_42]=1
(replacing :course_id and :module_id)

* also try using arrays of ids as a parameter

e.g. api/v1/courses/:course_id/content_exports?
 select[context_modules][]=42&
 select[context_modules][]=43

 this should create a package that only contains the
 specified content, and any course files referenced in
 html content (confirm by re-importing)

closes #CNVS-13502

Change-Id: I5bdcdc8255b30c5f78585dc335d25eb19bd5a7c0
Reviewed-on: https://gerrit.instructure.com/36655
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-07-02 19:39:57 +00:00
Braden Anderson 5bd46c8f39 conversations: fix recipient pagination caching
fixes CNVS-11199

test plan:
  * open conversations as a user who can message
      more than twenty other users
  * open compose dialog
  * open recipients browser
  * open context with many users and scroll down
  * verify that all users load
  * close and re-open recipients browser
  * verify that all users are still present

Change-Id: Ibeefddc92f49cc52195336eee50d7213e8717d12
Reviewed-on: https://gerrit.instructure.com/36381
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-07-02 19:39:36 +00:00
Rob Orton fe8e121ee3 move deleted enrollments when cross listing sections
fixes CNVS-13828

test plan
 - prior to checking out patch set
 - enroll a user in a section
 - delete the enrollment
 - cross list the section
 - attempt to add user to sections new course
 - it should fail
 - checkout patch set and run migration
 - attempt to add user to sections new course
 - it should succeed

 - enroll a user in a section
 - delete the enrollment
 - cross list the section
 - attempt to add user to sections new course
 - it should work (it will restore the old enrollment)

 - enroll a user in a cross listed section
 - delete the enrollment
 - uncross list the section
 - attempt to add the user to the sections current course
 - it should work (it will restore the old enrollment)

Change-Id: Ib397f96b0761d87bf6f9fb11ffc978012f0f5b39
Reviewed-on: https://gerrit.instructure.com/37036
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-07-02 18:45:04 +00:00
Aaron Cannon 17900ebd45 Accessibility: Added labels to add feeds dialog
Fixes CNVS-13727

Test plan:
- Visit the external feeds dialog on the announcements page.
- Using a screen reader, verify that all fields are labeled.

Change-Id: I3613744e279dddaa0d99d9c9b9ddf50122b07ec4
Reviewed-on: https://gerrit.instructure.com/37090
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-07-02 16:17:26 +00:00
Jon Jensen 256bb3ab0b spec: once-ler spec/models/[i-q]*
in rails3, reduce runtime by 60% (9:45 -> 3:50 locally)

Change-Id: Ibc584966b61d78894f48768cad511cd141c99d1b
Reviewed-on: https://gerrit.instructure.com/37175
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Product-Review: Dave Donahue <ddonahue@instructure.com>
QA-Review: Dave Donahue <ddonahue@instructure.com>
2014-07-02 15:57:40 +00:00
Cameron Matheson 553baa39d3 gradebook: better sorting for total columns
fixes CNVS-9300

Test plan:
  * make a course with 2 assignments:
    * one has 10 points possible
    * one has 100 points possible
  * give a student 10/10 on the first assignment (no score on the
    second)
  * give another student 20/100 on the second assignment
  * sort by total grade
  * it should sort by percent
  * switch the total grade to display as points
  * it should sort by points

Change-Id: Ie0651fcefb3c0880a017c438b40aa169158f34ba
Reviewed-on: https://gerrit.instructure.com/36664
Reviewed-by: Cameron Sutter <csutter@instructure.com>
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-07-02 15:52:37 +00:00
Eric Adams 8ff8e9550c return enrollment object by id through api
fixes SIS-331

TestPlan:
 - create a new enrollment object in a course
 - get the enrollment id of the object
 - return the object through the api
   - /api/v1/accounts/:account_id/enrollments/:id
 - enrollment should return if proper privileges are present

Change-Id: Ib8c83af6d53e5d048047a024aa37228cb5eab8f2
Reviewed-on: https://gerrit.instructure.com/36772
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
Tested-by: Tyler Pickett <tpickett+gerrit@instructure.com>
2014-07-02 14:07:29 +00:00
Brad Humphrey 60f1719f07 refactor lti variable substitutor
to allow for a wider range of variable substitutions

Test Plan: All current variable substitutions should still work

Change-Id: I8260b73d05bc90059b2317ddabce4c064940ecc4
Reviewed-on: https://gerrit.instructure.com/36804
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2014-07-01 21:29:30 +00:00
Sterling Cobb e729006b4e make module prereq more accessible
fixes CNVS-13550

-- Test Plan --

As a user that can edit module items
Given I'm using JAWS and/or voice over
When I edit a module
And I add a pre-req to the module
Then adding a pre-req should be accessible in JAWs
And the "remove" pre-req X should be a button
And the "remove" pre-req X should have a label on it

Change-Id: I421134cbf42f03bac9d7a9a9bc3d425937f7374b
Reviewed-on: https://gerrit.instructure.com/36290
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-01 19:21:16 +00:00
James Williams ea2e97833b always show "Courses" instead of "Home" in global nav tab
test plan:
* confirm that all users have "Courses" in the top global
navigation (instead of "Home")

fixes #CNVS-9701

Change-Id: Idc9200e5a55d8010b3cc7df61592c23b78056389
Reviewed-on: https://gerrit.instructure.com/36730
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-07-01 18:31:57 +00:00
Aaron Cannon 87bab24919 Accessibility: Labels the add users field
Fixes CNVS-13732

Test plan:
- Using a screen reader, visit the course roster.
- Open the add user dialog.
- Validate that the entry field for the email addresses is labeled.

Change-Id: I844152cedb452d0cb3030efbdb030196fc8c86b8
Reviewed-on: https://gerrit.instructure.com/36927
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-07-01 17:56:11 +00:00
Jeremy Stanley cb10625dcc export CC 1.3 assignment extension
test plan:
 - have an assignment in a course that has points possible
   and submission types
 - use the content exports API to export the course,
   supplying the currently undocumented parameter
   version=1.3
  a) examine the exported XML and verify that it follows
     the IMS standards
     http://www.imsglobal.org/cc/ccv1p3/AssignmentContentType.html
     http://www.imsglobal.org/cc/ccv1p3/CCv1p3Variantguidelines.pdf
  b) ensure the exported course re-imports correctly

fixes CNVS-13503

Change-Id: Iad8a54e94696962d362cfdb48fe03e06a90937ff
Reviewed-on: https://gerrit.instructure.com/36283
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-07-01 14:41:37 +00:00
James Williams a8d02131c0 don't double-escape filenames for attachments with root attachment
fixes #CNVS-13710

Change-Id: Icf3fd3b81ae841343047cea51663d1eeceed0e8d
Reviewed-on: https://gerrit.instructure.com/36778
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-01 13:01:15 +00:00
Braden Anderson 8fa7127dd9 student learning mastery: fix truncation of non-paragraphs
test plan:
  * create an outcome
  * for the description, paste in a div of text from another page
  * view the outcome on the student learning mastery page
  * verify that the description is truncated

Change-Id: I6d89fb9e321e16edde2e7be5e65f7ec4af618e70
Reviewed-on: https://gerrit.instructure.com/36571
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-06-30 22:38:12 +00:00
Josh Simpson dadb210455 add submission inclusion for students in polling
fixes CNVS-13826
This commit embeds a student's own submission into the poll sessions
endpoints.

Test plan
1. As a teacher, create a poll with choices and an opened session.
2. As a student, submit a submission to the poll session.
3. As the student, request the poll sessions GET show endpoint.
- The student's submission should be available in the "poll_submissions"
  field.

Other considerations are privacy: a student shouldn't be able to see
others' submissions (unless the poll session has public results).

Change-Id: I6050d5597fd44c0c0e9672b8e69a38022a3ea22d
Reviewed-on: https://gerrit.instructure.com/37078
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-06-30 21:44:14 +00:00
Cody Cutrer c3b0df2474 restrict admins from creating or deleting more powerful admins
fixes CNVS-13351

test plan:
 * created an admin role that has permission to create other admins,
   but that's it
 * as an admin in that role, it should only show that role as one
   to choose for new admins
 * you should only be able to delete admins in that role
 * verify both of the above are enforced via the API

Change-Id: I11459567ab184d787ee02af55280e0f4f76d47e8
Reviewed-on: https://gerrit.instructure.com/35672
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-06-30 20:58:26 +00:00
Aaron Cannon 95b91a5088 Accessibility: Added label to criterion long description in rubrics
Fixes CNVS-13129

Test plan:
- Visit the rubrics page.
- Click add rubric.
- Click to show the long description.
- With a screen reader, verify that the long description field is labeled.
- Edit an existing rubric, and verify that the same field is also labeled.

Change-Id: Iccbda8a4b29676345e70b69bf5fee142a5d71aed
Reviewed-on: https://gerrit.instructure.com/36759
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-06-30 20:04:56 +00:00
Duane Johnson 9185310ebd hide Post Grades for non-SIS contexts
The "Post Grades" button should be hidden for courses and sections
that do not have an integration_id, and visible when they do.

Test Plan:
- Give a section an integration_id and it should show the
  Post Grades button when selected

Fixes SIS-333

Change-Id: I31fdc25db0ee58a528f5c4010fdab70f132a1998
Reviewed-on: https://gerrit.instructure.com/36768
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Reviewed-by: Eric Adams <eadams@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-06-30 18:36:30 +00:00
James Williams e2644bafe4 switch content migration select icon
fixes #CNVS-13640

Change-Id: If65ae0e3c49a2336cd0c1a47fc52721f6397e43e
Reviewed-on: https://gerrit.instructure.com/36589
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-06-30 16:27:40 +00:00
James Williams fc234fd2f1 fix user roster page scrolling
test plan:
* add more than 50 people to a course

 the easiest way to do this would probably be an sis import,
 or running the following in the console:

 c = Course.find(INSERT_COURSE_ID_HERE)
 60.times { c.enroll_user(User.create!) }

* confirm that the people page scrolls and
 paginates correctly

fixes #CNVS-13646

Change-Id: If84251963e5502dddb5fbdac54c98b9d64bfa128
Reviewed-on: https://gerrit.instructure.com/36790
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-06-30 16:06:19 +00:00
Cody Cutrer d0f628d7f4 use rails 3 method for setting table name
Change-Id: I137a3475ef1e0719150a0fd4eeddb5c0edd99cbb
Reviewed-on: https://gerrit.instructure.com/36942
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-06-27 18:49:52 +00:00
Josh Simpson ba19c18a63 escape quiz titles in ember show page
fixes CNVS-13699
this commit escapes any HTML present in a quiz's title when it's
rendered in the breadcrumbs.

Test plan
- As a teacher, create a quiz in the new Ember show design, with HTML in
  the title (e.g., "Unnamed Quiz <script>alert('Oh noes!');</script>")
- The HTML should be escaped in the breadcrumbs, and any script tags
  shouldn't execute.
- The same should apply when editing quizzes.

Change-Id: Ifc67063d053995b3f20d14b029fae2460f7de382
Reviewed-on: https://gerrit.instructure.com/36784
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Josh Simpson <jsimpson@instructure.com>
2014-06-27 18:48:35 +00:00
Simon Williams 321fef498d fix two speedgrader i18n issues
fixes CNVS-12953

test plan:
- create an assignment that needs submission and 4 students
- have 3 students submit, grade 2 of them, and have 1 of the graded ones
  resubmit
- check in the speedgrader dropdown, the help text that shows up underneath the
  student names when you hover over them
- there should be 1 each of 'graded', 'not graded', 'not submitted', and
  'graded, then resubmitted...'
- make sure they are localized (i18n)
- also make sure the link to speedgrader for teachers in the right sidebar of
  an assignment page is localized

Change-Id: I62388220f6bd2c0bdf71d79e9d2802ac51db112e
Reviewed-on: https://gerrit.instructure.com/36666
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Bryan Madsen <bryan@instructure.com>
2014-06-26 17:32:57 +00:00
James Williams 794b61783c fix page view controller and action logging in rails 3
test plan:
* enable page views in rails 3
* using the api, retrieve the page views for a user
* the 'controller' and 'action' fields should not be null

fixes #CNVS-13769

Change-Id: I19748f0f4bb455c8932283adf2a04b2f7d445554
Reviewed-on: https://gerrit.instructure.com/36886
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2014-06-26 16:47:42 +00:00
Ahmad Amireh 39fa88ffd1 Quiz Submission Questions - Bulk-answering
This patch makes the QSQ API accept answers to more than one question in
the same API call.

Closes CNVS-13667

TEST PLAN
---- ----

  - create a quiz with two or more questions
  - generate a submission, don't turn it in just yet
  - hit the API with a request similar to the example shown below:
    [POST] /api/v1/quiz_submissions/:id/questions
    - verify that the answers get through by checking the response of
      the API (should include the answers) and by turning in the quiz to
      make sure
  - verify the API docs r updated
  - other things you may want to test but are already covered by specs:
    - try hitting the endpoint against another student's submission,
      shouldn't work
    - try hitting the endpoint anonymously, shouldn't work either

Example request:

{
  "validation_token": "foobar",
  "attempt": 1,
  "quiz_questions": [{
    "id": "QUESTION_ID",
    "answer": "ANSWER_ID",
  }, {
    "id": "2",
    "answer": 42
  }]
}

The validation token is what you get when you generate the submission
(or just hit the API to retrieve the submission and it will include it
in the output.)

Change-Id: Iecec247efc4389883e49265005ffe77eae421a5c
Reviewed-on: https://gerrit.instructure.com/36559
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-06-26 11:13:49 +00:00
Cody Cutrer f3e3920a0c fix message delivery in ruby 2
Change-Id: I9f087757431d69e9d0fb1c1890f05c89c141fb7a
Reviewed-on: https://gerrit.instructure.com/36845
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-06-25 16:32:29 +00:00
Cody Cutrer b1973ef688 fix thumbnail processing in ruby 2
Change-Id: I3826fe581d674e1f55b05823c8be3a6a4cee03ec
Reviewed-on: https://gerrit.instructure.com/36847
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-06-25 16:32:17 +00:00
Braden Anderson 59d33aef35 conversations: recompute unread count when opening inbox
test plan:
  * set your unread conversations count to an incorrect value:

u = User.find(X); u.unread_conversations_count = 20; u.save

  * open Canvas
  * open your inbox
  * verify that your unread count badge is correct

Change-Id: I11b504dd9ee78db105de88305827d39e9d8433d3
Reviewed-on: https://gerrit.instructure.com/36707
Product-Review: Braden Anderson <braden@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-06-25 03:19:36 +00:00
Braden Anderson 07cd3ca25c conversations: clear unread_conversations_count cache
test plan:
  * open Canvas as a user with unread conversations
  * POST to /api/v1/conversations/mark_all_as_read
  * refresh the page
  * verify that your unread conversations badge is gone
  * verify that receiving new conversations also
      immediately updates the badge

Change-Id: Ib0b629ba84a59af102810a415d5955f7a2f4e46a
Reviewed-on: https://gerrit.instructure.com/36698
Product-Review: Braden Anderson <braden@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-06-25 03:19:23 +00:00
Braden Anderson b9d8fbb4ca check unread conversation count periodically
fixes CNVS-10558

test plan:
  * open Canvas
  * send yourself a new conversation from another user
  * wait 30 seconds
  * verify that your unread conversation count is updated

Change-Id: I4e9bb2e06bbc862842fbf18e0d77f03afee1bd81
Reviewed-on: https://gerrit.instructure.com/36711
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-06-25 03:18:50 +00:00
Nick Cloward 28d5f8eb60 remove all_courses call in users set_policy
fixes: CNVS-3669

Changes the given blocks to look for the sought right in the
current courses first and if its not found look through the
concluded courses.  The current courses should catch the majority
of calls and fall back to the concluded courses if required.

* Note:  This will not check in other course states then completed and
         current.

Test Plan:

- Create a course with a student and admin/teacher.
- Enable user notes for the course.
- Check to make sure the teacher can read the students user notes.
  - Make sure the user notes button on the students profile is visible.
- Conclude the course.
- Ensure the teacher can still read the students user notes and the
  button is still visible.

- As an admin do the same as above but for manage user notes.

- Make sure the teacher/admin can run reports on the student for a
  concluded and current course.

Change-Id: I5eade42253c24c6ecad5e1d654695662ebb3afde
Reviewed-on: https://gerrit.instructure.com/36770
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-06-24 22:56:52 +00:00
Simon Williams a4d5e16a3d wrap long titles on assignment show page
fixes CNVS-13555

test plan:
- create assignments with very long titles both with and without spaces
- they should look okay on the assignment show page

Change-Id: Ia558c9f43e55ea5cf544716b0840ceceb964998f
Reviewed-on: https://gerrit.instructure.com/36660
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-06-24 22:55:48 +00:00
Tyler Pickett 30b3640197 Add Assignment created/updated_at to the API
closes CNVS-13682

Test Plan:
- Ensure there is a assignment in your test instance
- Request the assignment from the API
- The API response should include the created_at and updated_at elements
  in the returned JSON

Change-Id: Ib3067c9b204be95aa890d783de629162f4cc01f9
Reviewed-on: https://gerrit.instructure.com/36625
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
2014-06-24 17:28:02 +00:00
Jon Willesen 9b960aae30 add integration type to context external tools
Fixes RD-78

Test Plan:
 - specs pass

Change-Id: I4a53cdd71784ce9e2988cbfe9b6df7e7347a9d25
Reviewed-on: https://gerrit.instructure.com/34501
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
QA-Review: Jon Willesen <jonw@instructure.com>
2014-06-24 16:07:59 +00:00
Cody Cutrer b51d0898cd adheres_to_policy improvements
refs CNVS-11425

 * be more strict about the DSL
 * store policies so that we can avoid linear searches for
   an applicable condition block

Change-Id: I68f6414b396e1cb16d744d0719cdd6aa86085784
Reviewed-on: https://gerrit.instructure.com/36222
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-06-24 15:32:00 +00:00
Jon Willesen f19389f8a9 Add course settings sub navigation lti extension
fixes RD-76

test plan:
 - as a teacher, navigate to a course settings page. the right
   sidebar should look normal.
 - modify an lti app's xml to include the
   course_settings_sub_navigation extension
 - configure an lti app via modified xml.
 - navigate to a course settings page, where you should see a
   button for the configured tool at the top of the right
   sidebar.
 - clicking on the button should launch the tool.

Change-Id: Iec9e3337437295865bab66a499fe8fc096ad0ba5
Reviewed-on: https://gerrit.instructure.com/36471
Reviewed-by: Brad Humphrey <brad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2014-06-24 13:39:17 +00:00
Simon Williams 37a5952da1 Revert "tiny mce toobar now responsive"
This reverts commit f9f79bab06.

It's causing an issue with whitespace in the editor content that needs to be
addressed.

refs CNVS-4660
closes CNVS-13476

test plan:
- make sure tinymce works correctly, as it did before this commit was
  introduced

Change-Id: I988f5cb76ff205d4754e57faf296c10447dd1625
Reviewed-on: https://gerrit.instructure.com/36362
Reviewed-by: Liz Abinante <labinante@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-06-23 22:49:21 +00:00
Aaron Cannon fd327f6d6b Accessibility: assignment names and Total are read in Assignments Settings
Fixes CNVS-13099 CNVS-13100

Test plan:
- Using a screen reader, visit assignments, and open the settings cog.
- Check the "Weight final grade based on assignment groups" control.
- Verify that when navigating down the right column of the table with a screen
  reader, that the label for each field, the value in the left column, is read.

Change-Id: I528bf4a377e297cd4e683d25c50145ace6fce3d1
Reviewed-on: https://gerrit.instructure.com/36688
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-06-23 19:36:50 +00:00
Aaron Cannon 4cab3b575f Accessibility: Labeled the buttons for editing and deleting rubrics
Fixes CNVS-13127

Test plan:
- Using a screen reader, visit the Rubrics page.
- Verify that the edit and delete buttons are properly labeled and that those
  labels are read correctly by screen readers.
- Verify that screen reader users are able to successfully activate those
  controls.

Change-Id: Ic033b43f2ed296f63acdc3476973069d663d3ca4
Reviewed-on: https://gerrit.instructure.com/36697
Reviewed-by: Cameron Matheson <cameron@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-06-23 19:35:50 +00:00
Cody Cutrer 36de3c91e4 remove deprecation warning in ruby 2.1
Change-Id: I458ba8a1dc0d399d4a127712addf7f310994d098
Reviewed-on: https://gerrit.instructure.com/36726
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-06-23 19:33:08 +00:00
Mark Severson da9272fd91 ignore blank published parameters in pages api
test plan:
 - with draft state enabled
 - in a course with no page set as the front page
 * PUT to /courses/.../front_page
   * provide wiki_page[published] as a blank value, for example:
     ?wiki_page[published]=
 * a new, published front page should be created

fixes CNVS-11882

Change-Id: I8a050ca4028e73fbe0a9f0158f2bf11be92d0fae
Reviewed-on: https://gerrit.instructure.com/36408
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-06-21 06:31:25 +00:00
Mysti Sadler 65b4cd3648 allow using sis id in courses user fetch API
fixes CNVS-13657

test-plan:
- Have a user with a sis id
- Enroll user in a course in Canvas
- Fetch the course scoped user using the sis id (eg. <canvas>/api/v1/courses/<id>/users/sis_user_id:<sis_id>
- Verify that you receive the user's information

Change-Id: I7eeb2aaa17021a3a598f30279e7fb121b94f00ff
Reviewed-on: https://gerrit.instructure.com/36626
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-06-20 23:04:12 +00:00
Coraline Ehmke 83591f638e don't count test users in speedgrader graded count
Returns a separate JSON element consisting solely
of student with vanilla enrollments (not e.g.
student_view_enrollments) so that any test students
are excluded from grading counts.

fixes CNVS-3471

Test plan:
- Access an assignment whose class has a test
student enrolled.
- Go to SpeedGrader.
- Note the values of the  "x / y Graded" indicator
at the upper right of the page.
- Score the test user's assignment.
- The "x / y Graded" values should not have
changed.

Change-Id: I244f4463023bcf385aa609ed04e5b387ede1def9
Reviewed-on: https://gerrit.instructure.com/33684
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-06-20 21:10:06 +00:00
Nick Cloward 5091754e48 remove grants_rights? and cached_context_grants_rights?
refs: CNVS-11425
refs: CNVS-11197

Change-Id: I9df4d3c408be0a1aede6cc987a982b5e2f688ce0
Reviewed-on: https://gerrit.instructure.com/35829
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-06-20 20:23:04 +00:00
Sterling Cobb cf174a5b46 focus jump to today on first due date
fixes CNVS-12968

If you have multiple assignments in a syllabus that have the same
due date and you click on "Jump to Today" it focuses you on the last
item in the list. This fix makes it focus you on the first item in the
list.

--- Test Plan ---
As a user
Given I have multiple assignments that are on the same day and that day
is today
And I'm on the syllabus page
When I click on the "Jump to Today" link
Then I should be scrolled down to the assignments for that day
And I should be focused on the first assignment for that day

Change-Id: I514de278ed77567168e2b42c0cda96e673ba284e
Reviewed-on: https://gerrit.instructure.com/35994
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-06-20 19:19:42 +00:00
Derek DeVries b770e2dee2 add caching for quiz statistics json api endpoint
fixes CNVS-13648

test plan:
  - setup a quiz with students and a handful of submissions (the more the better)
    (maybe use quizard to throw in a couple hundred)
  - make a GET request to /api/v1/courses/{courseId}/quizzes/{id}/statistics
  - the first request will be fairly slow
  - subsequent requests should be significantly faster

  - we want to make sure that changes are reflected correctly in the results.
    cache is invalidated if things change with quiz submissions, and a good
    indication that the cache was invalidated was that we get that slow initial
    request again (and the new data is reflected in the refreshed stats)
  - things we should check to make sure they invalidate the cache (to make sure
    we don't see stale versions of things in the cached results)
    - different quizzes should get different results
    - when we edit the quiz we could potentially get different results
      (such as changing from keep highest to keep latest)
    - when we regrade
    - when a new submission is made

  - statistics should not have to be regenerated if a different teacher views
    the same quiz's statistics page.

Change-Id: I9888cccaf4d1e9480000af8cee1a4717350fc430
Reviewed-on: https://gerrit.instructure.com/36653
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-06-20 18:47:29 +00:00
Duane Johnson af0af85c1e add sis_app_url Setting to PostGradesDialog
The URL to the SIS app where grades can be posted
for SIS integrations was accidentally hard-coded
in a previous patch set. This adds a Setting that
can be configured per Canvas installation.

Test Plan:
- Changing Setting.set('sis_app_url') to various
  values should make Post Grades work when it is
  set correctly and not work when it is not set
  correctly.

Fixes SIS-249

Change-Id: Id5d5659ace289771cf7adaa62429362039f1dc7a
Reviewed-on: https://gerrit.instructure.com/36360
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-06-20 17:30:41 +00:00
Jeremy Stanley 3279012b9f fix incorrect published states for quizzes and assignments
test plan:
 0. BEFORE APPLYING THIS CHANGESET, reproduce the original bug:
   a) Have a course with draft state enabled
   b) Create a new module in the course, and do not publish it yet
   c) Add a new assignment to the course via the modules page
   d) Publish the module. This should publish the assignment.
      (refresh the modules page if you don't see that happen.)
   e) As a student, look for the assignment in the Assignments
      index page and the Syllabus page. You don't see it there.
      Because the modules page didn't publish it correctly.
 1. Apply the changeset and run migrations.
 2. (If production) wait for the datafix job to complete.
    It should complete almost immediately unless your job
    server is backed up. Look for the following in your log:
    DataFixup::FixIncorrectPublishedStatesOnQuizzesAndAssignments
 3. The assignment created in 0e should now be visible to
    students in the Assignments page and the Syllabus page.
 4. Repeat steps 0a-0e. This time, the published assignment
    should be visible to students in the assignments index
    and syllabus page right away.

fixes CNVS-13604

Change-Id: I657c90deb115a6d047abb81cbdabe014fd74778f
Reviewed-on: https://gerrit.instructure.com/36511
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-06-20 17:28:39 +00:00
Jacob Fugal 51a44b6c06 handle cross-domain account association check
fixes CNVS-13042

test-plan:
 - have multiple shards
 - have a course on shard A
 - have a two users on shard B
 - enroll one user in course as teacher
 - enroll other user in course as student
 - make a submission as the student, then grade that submission as the
   teacher
 - have an admin user on shard A view the grade change audit admin tool
 - search for events for the student user; should find them
 - repeat for the teacher (grader) user; should find them

Change-Id: Ia35aef892dae0825f721e37aafa0baed4a038f5a
Reviewed-on: https://gerrit.instructure.com/36570
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-06-20 17:11:53 +00:00
Simon Williams 5e22048cd5 Revert "set content container height to 100 percent"
This commit caused the browser vertical scrollbar to always be active, which in
places like gradebook2 could create a double scrollbar situation.

fixes CNVS-13668

This reverts commit bb45484387.

test plan:
- go to gradebook2 with enough students to scroll
- you should only have 1 scrollbar

Change-Id: I7e09b539db5752549cc61baacf97500e3ea980cd
Reviewed-on: https://gerrit.instructure.com/36648
Reviewed-by: Drew Bowman <dbowman@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-06-20 16:21:07 +00:00
Drew Bowman 59a6c694be hide un-needed items on print
fixes CNVS-13659

test plan:

- visit new student learning mastery outcomes
- print the page
- the tabs, buttons, and course select should not show on the page

Change-Id: If438f4821ae05d95927189de4ae47518b5c46286
Reviewed-on: https://gerrit.instructure.com/36587
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Braden Anderson <braden@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Drew Bowman <dbowman@instructure.com>
2014-06-19 22:20:07 +00:00
Derek DeVries cfd48dac4a fix documentation for enroll_me when creating a course via the api
fixes CNVS-13681

test plan:
  - generate the api documentation
  - view the documentation for creating a course
  - the enroll_me option should be just enroll_me instead of course[enroll_me]
  - confirm that creating a course via the endpoint works with the enroll_me
    param not being nested under the the course param

Change-Id: Ibe46869e6642b1eeb130899f1c35571ca26c6163
Reviewed-on: https://gerrit.instructure.com/36633
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-06-19 20:20:59 +00:00
Braden Anderson 04640c56a4 conversations: load multiple pages of inbox on tall screens
fixes CNVS-12613

test plan:
  * open Canvas on a tall screen and a small zoom level
  * open Conversations
  * verify that a second page of conversations loads to fill the space
  * scroll down
  * verify that further pages load on demand

Change-Id: I9fc03e96a90b2abe9aa8a244050dd0edd797b973
Reviewed-on: https://gerrit.instructure.com/36401
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-06-19 18:55:09 +00:00
Derek DeVries 6370b4fd50 add caching for the quizzes#index api endpoint
fixes CNVS-13647

test plan:
  - make a GET request to the /api/v1/courses/{courseId}/quizzes endpoint
  - the first request will take a couple seconds
  - subsequent requests should be about 8x-10x as fast (around 200-250ms range)
  - try this out with different per_page options such as
    - api/v1/courses/1/quizzes?per_page=50
  - once again it will be slow the first request, but then all subsequent
    requests are faster

  - we want to make sure that changes are reflected correctly in the results.
    cache is invalidated if things change in the quizzes, and a good indication
    that the cache was invalidated was that we get that slow initial request
    again
  - things we should check to make sure they invalidate the cache (to make sure
    we don't see stale versions of things in the cached quiz results)
    - if the course id changes, we should get different results
    - if we edit details on a quiz
    - if we add a quiz
    - if we delete a quiz
    - if we send a jsonapi style request vs a non-jsonapi style request
    - if we add a search term to the params
      - api/v1/courses/1/quizzes?search_term=title
    - if we get a different page of the quiz results
      - api/v1/courses/1/quizzes?page=2
    - if we change the per_page value for returning quiz results
      - api/v1/courses/1/quizzes?per_page=50
    - if we visit the quiz results as a different user

  - make sure results for students and teachers are different and respect
    the correct permissions

Change-Id: I26f76ff9ace99ac168d3dd7a0cdaeb8550c8e655
Reviewed-on: https://gerrit.instructure.com/36596
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-06-19 18:31:52 +00:00
Jeremy Stanley 16779e604f change text for "Choose Home Page" in new course wizard
fixes CNVS-12747

test plan:
 - create a new course in a draft-state-enabled account
 - click "Choose a Course Home Page" in the bottom panel
 - the description on the right should match the button in the
   right sidebar ("Choose Home Page" instead of "Set Course Layout")

Change-Id: I0178fe369c89e58923e25fc4249b480813e3ec3c
Reviewed-on: https://gerrit.instructure.com/36560
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-06-19 18:20:56 +00:00
Nick Cloward eea4718d6b clean up calls to cached_context_grants_right?
refs: CNVS-11425

Change-Id: I0487d98b839d33a339592d312ed8ed2134c4b62e
Reviewed-on: https://gerrit.instructure.com/35528
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-06-19 18:10:51 +00:00
Nick Cloward e9595976c1 clean up permission calls for grants_rights?
refs: CNVS-11425

Change-Id: Ia0145e4b4d1da9e0f83a1845647ce203b3586057
Reviewed-on: https://gerrit.instructure.com/34280
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-06-19 18:10:30 +00:00
Braden Anderson 6eaa3bcfec student learning mastery: afford clicks on groups
test plan:
  * open student learning mastery view
  * hover over an outcome group
  * verify that you want to click it

Change-Id: I3273167f7bc621b30a067184a849c6b5baf47af5
Reviewed-on: https://gerrit.instructure.com/36562
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-06-19 15:50:20 +00:00
Braden Anderson 573e6d04b2 conversations: fix auto-linking of www. in messages
fixes CNVS-2630

test plan:
  * open conversations
  * send a message containing a URL with no protocol
      starting with www.
  * confirm that the URL becomes a link which works correctly

Change-Id: I028e4eb386eed3307d10fc60884f0de008f2601c
Reviewed-on: https://gerrit.instructure.com/36444
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <braden@instructure.com>
2014-06-19 15:46:51 +00:00