Commit Graph

7924 Commits

Author SHA1 Message Date
Cameron Sutter 248bdbe140 DA - gb csv modal
fixes CNVS-15487

test plan:
 - open the gb csv upload modal
 - click the link to learn more
 > it should open a new tab and take you to the guide pages

Change-Id: Ief4cffbdac0a59de8896ae8c17c2cde28d0d6311
Reviewed-on: https://gerrit.instructure.com/41175
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Product-Review: Cameron Sutter <csutter@instructure.com>
2014-09-18 15:49:19 +00:00
Ahmad Amireh aed232828e Always shuffle quiz matching question matches
Closes CNVS-4342

TEST PLAN
---- ----

  - create a quiz with:
    + a matching question and 3 pairs of answers/matches and a bunch of
      distractors
    + infinite multiple attempts
    + shuffle answers option turned OFF
  - take the quiz by a student:
    + look at the order of the matches
    + submit and re-take
      + verify that the order of the matches has changed (if not, you
        may just been hit by the RNG wand, try again)
  - turn on the option to shuffle answers and verify the matches still
    shuffle like they did without the option

Change-Id: I492fa15f168ff26c50b1300d79ff0c589e626fe2
Reviewed-on: https://gerrit.instructure.com/41237
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ahmad Amireh <ahmad@instructure.com>
2014-09-18 14:53:37 +00:00
Jeremy Stanley 9d3aa1004e ensure account nav tabs change in response to permissions
test plan:
 1. have a user in an account role that grants "manage outcomes"
 2. as this user, view the outcomes page
 3. modify the role to revoke the "manage outcomes" right
 4. wait one hour for various caches to expire
 5. ensure that:
   a) the Outcomes tab no longer appears in the account page
      left nav
   b) visiting the page manually (/accounts/X/outcomes)
      gives a flash message that the outcomes page can't be
      accessed and redirects to the main account page

fixes CNVS-15396
fixes CNVS-15608

Change-Id: Ie0a38c9663c0661cd32f3c35dad0e503063fb5f1
Reviewed-on: https://gerrit.instructure.com/41095
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-09-18 14:27:15 +00:00
Ryan Shaw a0cb52f56a polish for the header in new files.
fixes: CNVS-15375
refs: CNVS-14390

this implements the new multi-select workflow
and makes the header all responsive and nice

test plan:
* select multiple things and delete, move, download them
* the "preview" and "edit status" are buttons are
  their own tickets.
* resize the browser window, the header should resize
  nicely.

Change-Id: I00088e41169c595127ff01d0b672855c6b4c0bc0
Reviewed-on: https://gerrit.instructure.com/41074
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-09-18 02:14:24 +00:00
Ryan Shaw f44dcfe1c2 Implement fancy breadcrumbs in new files
closes: CNVS-15249 CNVS-15372

test plan:
go to new files and make sure the breadcrumbs look like blakes mockups
especially try it when you have a bunch of crumbs and a small screen
it should have a '...' that opens in a drop down.

Change-Id: I632e4278aec4ee2d7373a6864d7d7c50fd067abc
Reviewed-on: https://gerrit.instructure.com/41052
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-09-18 02:13:24 +00:00
Ryan Shaw 2f4acbb850 get rid of margin below edit name form:
should look like: http://cl.ly/image/1k1Z0S193r3t
not: http://cl.ly/image/2A3A0q3p0b1i

Change-Id: Ifa5b69b3d311b94ca1f294f7747514ee760ae4af
Reviewed-on: https://gerrit.instructure.com/41293
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-09-18 01:22:26 +00:00
Nick Cloward 7e2bd8c0dd unknown user url redirect loop
fixes: CNVS-15618

Checks for a blank unknown_user_url along with a nil before defaulting
to the login_url.

Test Plan:

  - Setup SAML or CAS with a user that does not exist in Canvas.
  - Make sure the unknown_user_url is an empty string for the accounts
    authorization config.
  - Attempt to login to the user with and it should show a Canvas login
    page with an error that the user does not exist.
  - Change the unknown_user_url to nil and it should behave the same as
    if it was an empty string.
  - Change the unknown_user_url to a custom url and it should redirect
    to that page instead of showing the Canvas login page with an error.

Change-Id: I3d8de694100e2849119adfc3b0dd08ead58a80ed
Reviewed-on: https://gerrit.instructure.com/41296
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-09-18 00:17:40 +00:00
Joel Hough e190910cfe fix cross-shard conversations
cross-shard conversations caused a error when configured to access a
master/slave database setup

test plan:
 * with two users, in separate shards
 * send a message from one user to the other
 * the second user should receive the message successfully

fixes CNVS-15084

Change-Id: If4bde0bf966d44cb94fa1fd23f09190b6fc1e88e
Reviewed-on: https://gerrit.instructure.com/41075
Reviewed-by: Mark Severson <markse@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-09-17 23:10:56 +00:00
Nathan Mills 60d48cc0fc add query scopes to message handler
fixes: PLAT-649

test-plan
*specs should pass

Change-Id: I1902a1e5ad516ee544d1981b2ba56b35cce45691
Reviewed-on: https://gerrit.instructure.com/41262
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
2014-09-17 22:51:20 +00:00
Matthew Berns 0491ae3211 updating h1 tags for accessibility
fixes CNVS-15104

test plan:
- visit edited pages from spreadsheet below
- test page headings with screenreader in safari
- pages should have level 1 headers for screenreader that proceed in order logically
- compare top level headers on assignments, modules, syllabus, and wiki pages
bewteen their actual pages, and their pages when called from home page selection
- headers for the above pages should be h1 on their respective pages, and h2
when called from home page, and stll proceed logically

Changes need to be tested on the following pages
default home page (/)
home page set to course modules
home page set to front page
home page set to assignments list
/courses/1
/courses/1/assignments
/courses/1/assignments/new
/courses/1/assignments/1/edit
/courses/1/discussion_topics/new
/courses/1/discussion_topics/1
/courses/1/discussion_topics/1/edit
/courses/1/gradebook#tab-assignment
/courses/1/gradebook/speed_grader(just pick any assignment w/ speedgrader)
/courses/1/groups
/courses/1/user_services
/courses/1/pages/(whatever page for course)
/courses/1/quizzes/1/edit
/courses/1/quizzes/1/take?preview=1
/courses/1/question_banks/2
/courses/1/quizzes/1/take
/courses/1/conferences
/courses/1/modules/progressions
/calendar2
/about/1
/profile/settings
/dashboard/eportfolios
/conversations?#filter=type=inbox
/accounts/1
/accounts/1/users
/accounts/1/sub_accounts
/accounts/1/account_authorization_configs
/accounts/1/groups
/accounts/1/users/2
/accounts/1/permissions
/accounts/1/avatars
/users/2/user_notes
/accounts/1/rubrics
/accounts/1/grading_standards
/accounts/1/user_notes
/accounts/1/admin_tools
/users/1/admin_merge
/users/1/teacher_activity/student/1
/users/1/masquerade

Change-Id: Ifdad341a22631c0d6773977743be741e74fecd88
Reviewed-on: https://gerrit.instructure.com/40370
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
2014-09-17 20:59:38 +00:00
Brad Horrocks a9d5a905c0 Fix overly large avatars in emails
Some avatars are insanley huge. This should fix that problem

Fixes CNVS-15478

Test Plan:

- Enable the Show email in notifications account preference
- Setup email servers
- Generate the folloowing notifications
	- Announcement Reply
		- Enable the notification preference
		- Create an Announcement
		- Reply to it
		- Check email
	- Conversation Message
		- Create a Conversation
		- Check email
	- New Discussion Entry
		- Create a discussion
		- Add a comment to it
		- Check email
	- Submission Comment
		- Not really sure??
	- Submission Comment for Teacher
		- Not really sure??

Change-Id: Iacb5059f06be1a4315be69cd9225504cae6267fb
Reviewed-on: https://gerrit.instructure.com/41183
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Product-Review: Vincent Gonzalez <vgonzalez@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-09-17 19:21:08 +00:00
Brad Horrocks bcc4b22ab3 E-mail address link in Notifications is now a mailto:
Notifications that show the author email will now be mailto links to
that email.

Fixes CNVS-15430

Test Plan:

- Enable the Show email in notifications account preference
- Generate the folloowing notifications
	- Announcement Reply
		- Enable the notification preference
		- Create an Announcement
		- Reply to it
		- Check /users/[user_id]/messages
	- Conversation Message
		- Create a Conversation
		- Check /users/[user_id]/messages
	- New Discussion Entry
		- Create a discussion
		- Add a comment to it
		- Check /users/[user_id]/messages
	- Submission Comment
		- Not really sure??
	- Submission Comment for Teacher
		- Not really sure??

Change-Id: Iafab62d7492f749a8021bdf57d43c93315285e2f
Reviewed-on: https://gerrit.instructure.com/41111
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2014-09-17 18:52:51 +00:00
Cody Cutrer d1bc9a700a use an inverse association instead of an include for Course#enrollments#course
Change-Id: Ief4e0423b3af846d235e35d566ea7cd6e32b0ab0
Reviewed-on: https://gerrit.instructure.com/40978
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-09-17 18:41:08 +00:00
Ryan Shaw 86a515b95a Speed up friendlyDatetime component in react files
the friendlyDatetime component was taking almost
all of the time in rendering newFiles.
I guess some of the tz, $.fudgeDate,
$.datetimestring, etc. functions inside of it were
super slow.

for the folder i was testing it went from ~8000ms
to ~200ms

test plan:

in new files,
in a folder with tons of files/folders load the page
it should be a lot faster than without this commit

another way to tell is to shift-click to select
a bunch of things, it should be fast. before it was
slow.

Change-Id: If8a0b99d0f11a1d2bf3a4e93303b9f510e8d23ef
Reviewed-on: https://gerrit.instructure.com/41020
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-09-17 18:38:03 +00:00
Jeremy Stanley 4219b7192a fix N+1 queries in AccountsController
fixes CNVS-15391

test plan: accounts api sanity check

Change-Id: I6c218ea92aec63bd3ef52072b5e9b687aeb0c886
Reviewed-on: https://gerrit.instructure.com/40840
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2014-09-17 18:13:34 +00:00
Chris Hart aeb652980f New Canvas header for K-12
Fixes: CNVS-14508

Adds new markup and styles for K-12 Canvas header.
Big change to application.html.erb - the #header
is split into 2 sets of markup: the new K-12
markup and the existing Canvas header.

To enable the K-12 feature flag:

- In Rails Console, enable the k12 feature flag
  as follows: Account.find(1).enable_feature!(:k12)

Note: Due to Canvas caching, the Courses link in
the primary nav will only update once every 15 mins.
To update the link, either wait out the cache or
temporarily remove the cache code around the list
item element.

Test plan:
- Make sure the K-12 feature flag is disabled.
  To disable: Account.find(1).disable_feature!(:k12)
- Click around the existing Canvas header. Make sure
  it is working as expected in both regular and
  high-contrast modes.
- Enable the K-12 feature:
  Account.find(1).enable_feature!(:k12)
- Click around the new header. It should look like
  this in regular mode...
  http://cl.ly/image/2b1V3e2g0C3z/k12-regular.png
  ...and this in high-contrast mode:
  http://cl.ly/image/3E0x3O2L3P2B/k12-high-contrast.png
- The new header is responsive down to tablet-size.
  When you reduce the screen width enough, the icons
  should stack on top of the link text in the primary
  navigation.
- The new header also features an Inbox link in the
  primary navigation (the existing header does not
  have this). Confirm this is working and that the
  user nav in the top-right no longer has an Inbox
  link.

Change-Id: I38cd0d215fe67000fba01204f208801f550df089
Reviewed-on: https://gerrit.instructure.com/38925
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <colleen@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
2014-09-17 17:04:12 +00:00
Ryan Shaw 5589a17d23 newfiles footer polish
closes: CNVS-15378 CNVS-15379

test plan:
load new files
footer should look like this:
http://cl.ly/image/2y0s2j3D241Y

Change-Id: Ic521c89a00401348646fa755647dd869e3ae1fd2
Reviewed-on: https://gerrit.instructure.com/41079
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-09-17 15:58:11 +00:00
Ryan Shaw e329b1e348 fix for files showing up on the bottom in new files
fixes: CNVS-15263

test plan:
load new files in a folder that has just a couple
children.

they should be on the top, not on the bottom of
the screen

Change-Id: If4b8da9295db8b1cda82f2d9bc32d1ff1f170579
Reviewed-on: https://gerrit.instructure.com/41073
Reviewed-by: Sterling Cobb <sterling@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-09-17 15:57:47 +00:00
Ryan Shaw ffc72e4a77 Implement new-style breadcrumbs
closes: CNVS-15494

test plan:
browse to a few pages in canvas and make sure the
breadcrumbs look good.

examples: speed grader, gb2, cal2, files, discussions, pages

Change-Id: Ibdd435a0146f47d3a87ac2f3701b34c86dd4ef52
Reviewed-on: https://gerrit.instructure.com/41051
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-09-17 15:56:21 +00:00
Ryan Shaw 87b1dac236 A bunch of style/polish for newfiles
fixes: CNVS-15244 CNVS-15261 CNVS-15374

changes:
handles overflow by scrolling
matches blake's mockup

test plan:
try the folder tree in both new files and by pressing
the "add image" icon in the tinyMCE toolbar and going
to the "From Canvas" tab.

TODO: 'active' style

it should look good and work well.

Change-Id: I6219da771758fd00d6ed3005ed459097a83fcd7e
Reviewed-on: https://gerrit.instructure.com/40922
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-09-17 15:55:35 +00:00
Brad Humphrey 54d78fa663 show roles for cross shard users
test plan
 - do an lti launch
 - roles should show up for cross shard users
 - the following substitutions should still work
   * $Canvas.user.id
   * $Canvas.user.sisSourceId
   * $Canvas.user.loginId
   * $Canvas.enrollment.enrollmentState
   * $Canvas.membership.concludedRoles
   * $Canvas.membership.roles

fixes PLAT-648

Change-Id: Ic4c3639a95b4528628f8dd2d205cd8250c1b7d11
Reviewed-on: https://gerrit.instructure.com/41214
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
2014-09-17 15:36:56 +00:00
Ben Young c3edccbf07 Remove SIS attributes from manually recreated enrollments
This also improves consistency with SIS batch imports, as prior SIS
enrollments recreated manually behave the same as first time manual
enrollments.

Fixes CNVS-12983

Test plan:
- Add a user to a course via SIS enrollment
- Remove said user with another SIS enrollment
- Add the user to the same course, but manually
- The enrollment should no longer have SIS attributes,
allowing it to be removed normally through the UI.

Change-Id: I13a56d27fa33c47dc147664010789665daab658e
Reviewed-on: https://gerrit.instructure.com/40540
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2014-09-17 14:41:37 +00:00
Nathan Mills 5af52334f6 move not_selected from external tools settings to it's own column
fixes: PLAT-646

Test Plan:
 * Install an external tool with the property "not_selectable" as true
 * when you look in the asmnt/module item external tool list the tool
   should not be listed

Change-Id: If66e09b83373fad83274d0120cb464e7caf60c83
Reviewed-on: https://gerrit.instructure.com/41205
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-09-17 14:32:37 +00:00
Cody Cutrer 1522718bfb no more dynamic finders (controllers)
refs CNVS-15126

Change-Id: Icdea762c810c541d99c30922ee92d6c36686e1fa
Reviewed-on: https://gerrit.instructure.com/39670
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-17 02:42:30 +00:00
James Williams 73d4020f34 link to discussion topic and quiz menu tools on assignment index
test plan:
* enable the lor feature flag
* create an external tool with quiz_menu and
discussion_topic_menu configured
* should show external tool links specific to each type
on the assignments index page for graded discussion topics
and quiz assignments

closes #CNVS-15520

Change-Id: I020ab9cbc583d7940b0051056d27acb557ab152c
Reviewed-on: https://gerrit.instructure.com/41172
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-09-16 22:36:21 +00:00
Jayce Higgins 6e72ae6216 Add accessibility warning to discussions
fixes: CNVS-14748

Adds an accessibility warning to the discussion
field headers so that SR and Keyboard users know
to navigate to the manage menu to emulate "drag n
drop" behavior.

Test-Plan:
1.) Navigate to discussions
2.) Make sure there are 2 or more pinned discussions
3.) Tab until you're just past the header
4.) Verify that a warning message has appeared
5.) Remove a pinned discussion so you have 1 or less
6.) Repeat steps 2-3
7.) Verify that no message appears, and that it takes
	a single tab to move from the header to the content

Change-Id: I71503a511b627dc6fadb696ca25b5fb6637c898d
Reviewed-on: https://gerrit.instructure.com/40429
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Dana Danger <dana@instructure.com>
2014-09-16 21:45:25 +00:00
Simon Williams 19842cebd2 deal with read errors from s3 while inferring encoding
we sometimes get errors reading from s3 trying to infer encoding.
specifically, 'content-length does not match' errors from the aws-sdk
gem.  we're trying to upgrade the gem to improve those cases, but we
can at least not crash the job.

fixes CNVS-15442

test plan:
- attachment uploads to s3 should still work

Change-Id: Ie9dcc98098d9a5b3555398859476276fcacad79b
Reviewed-on: https://gerrit.instructure.com/40938
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Sean Lewis <slewis@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-09-16 21:09:43 +00:00
Clay Diffrient 1bc27171f4 Modifies the translation keys for course statistics
fixes CNVS-15576

Test Plan:
  - Transifex should not fail on importing.

Change-Id: I70a9b453b1209389888e347e552ac9843c9acb40
Reviewed-on: https://gerrit.instructure.com/41200
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clay Diffrient <cdiffrient@instructure.com>
2014-09-16 20:42:23 +00:00
Jeremy Stanley 8b3967e1f0 fix 400 error setting hidden user feature flag in API
test plan:
 - as a user with site admin privileges, enable the "LOR External
   Tools feature in /profile/settings.

fixes CNVS-15393

Change-Id: I918bdff059b4ef3b5590aa67b0991198699196fa
Reviewed-on: https://gerrit.instructure.com/40850
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>
2014-09-16 20:34:54 +00:00
Clay Diffrient 6e8f80218c Modifies subscription_hold to return nil if user is nil
fixes CNVS-15356

Test Plan:
  - Add a discussion to a course that has the following options:
    * Group discussion
    * Allow threaded replies
    * Graded
    * Set a due date of sometime in the future
  - Make the course syllabus publicly available
  - In another window (incognito) go to the syllabus
  - The syllabus should load without problems.

Change-Id: I177555c6e0ac87554360361a95b1ff0a26d35883
Reviewed-on: https://gerrit.instructure.com/41176
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-09-16 19:54:17 +00:00
Ryan Taylor 1c76ff61a9 Quizzes only autosubmit when they hit the lock date
When a quiz is in progress, it should be marked late if the student is
still taking the quiz when the due date is reached.  If the lock date
comes up, the quiz should autosubmit at that point.  If there is a quiz
timer and a lock date, the lock date overrules the quiz timer.

Closes CNVS-13689

Test Plan:
  - Create 4 types of quiz scenarios:
    - Lock date only
      - submits at lock date
      - never marked late
    - Lock date and due date
      - autosubmits at lock date
      - late if submitted after due date
    - No due date
      - Never late
      - Autosubmits at course completion
    - Lock date and timer which runs beyond lock date
      - Gives the student time until lock, not normal timer
      - autosubmits at lock date
  - Monitor all these for sane prompts and alerts
    - deadline approaching flash messages for LATENESS (occur at T-30
      minutes, T-5 minutes, and T-1 minute)
    - autosubmission flash prompts (and popup @ T-10 seconds)

Change-Id: I5af9eb360a5f13527b32e7f84c205149bea1935b
Reviewed-on: https://gerrit.instructure.com/40609
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Derek DeVries <ddevries@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-09-16 19:50:40 +00:00
Clay Diffrient d3bd5d0671 Gives the edit/add module form a better focus target
Because of the way the events are done/handled by the form
a submit occurs on the form whenever a form element has focus.
When the form dialog opens the first focusable item is given
focus.  This provides a empty non-interactive element to receive
focus when the form dialog opens preventing an automatic
submit from triggering.  While not ideal, it works.

fixes CNVS-14966

Test Plan:
  - Go to the modules page (/courses/##/modules)
  - Use the keyboard to navigate to the edit option in the cog
    menu.
  - Press "Enter" on the "Edit" option.
  - The form should not close automatically.
  - Do the same with module items.

Change-Id: Icf22c23b502b66a7678111224bf0907876bc72f8
Reviewed-on: https://gerrit.instructure.com/41031
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Aaron Cannon <acannon@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-09-16 19:39:26 +00:00
Brad Humphrey 005acbfa73 fix error methods
test plan:
 - specs should pass

fixes PLAT-643

Change-Id: Ib9135256013ec1b00059cbb7334b568608f7c79b
Reviewed-on: https://gerrit.instructure.com/41149
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Product-Review: Brad Humphrey <brad@instructure.com>
QA-Review: Brad Humphrey <brad@instructure.com>
2014-09-16 16:28:38 +00:00
Ryan Taylor a50d334754 Model features for outstanding quiz detection
When quiz submissions are overdue and unsubmitted, we need to provide a
teacher with the means to find and fix those problems. Here we've built
the model access features to enable finding and grading of these
submissions, by quiz_id.
Closes CNVS-15274
Test Plan:
  - Confirm passing specs
    - No real QA testable features here
      - Confirm normal quiz submission behavior
Change-Id: I72c6bd2fc740c31c901e29d26eba9fe87a6baba2
Reviewed-on: https://gerrit.instructure.com/40821
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2014-09-16 15:45:21 +00:00
Ryan Shaw 64aae05d94 fix gear menu placement in new files
fixes: CNVS-15264

test plan:
open new files,
click the gear menu on the file/folder at the bottom
of the list.
it should not appear above the cog like this
http://screencast.com/t/baNGQo4ma5tw

Change-Id: I59d1716994cfd3337ab9554a44513bdd9ac01d98
Reviewed-on: https://gerrit.instructure.com/40793
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Sterling Cobb <sterling@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
2014-09-16 15:24:28 +00:00
Bracken Mosbacker 6656a06c47 add new ext_roles lti param for all the roles user has
this is a list of all the roles the user has in canvas
not just the ones for the current context.

This is how it should have been all along, but we can't
make the normal roles parameter do it this way because
tools depend on our current format. So send a new one
and tell people to  migrate over as they can

Test Plan:
 * do an lti launch, ext_roles should always have "user"
   and any of learner, instructure, administrator as appropriate

refs RD-518
closes PLAT-641

Change-Id: I8cf7e96ac88e1b17528cd3d717834762cc9b575b
Reviewed-on: https://gerrit.instructure.com/40875
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Bracken Mosbacker <bracken@instructure.com>
2014-09-16 13:13:54 +00:00
Cody Cutrer bd5a9950d5 use RecordNotUnique, not UniqueConstraintViolation
since it's built into Rails 3

Change-Id: I55fba469a963538305f50b473bb05215ab5184d8
Reviewed-on: https://gerrit.instructure.com/40975
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-09-15 23:24:52 +00:00
Rob Orton b0c81e9961 improve user search speed
this optimizes the query to use a union and
reduces speed from ~5s to ~0.2s

fixes CNVS-15212

test plan
 - go to /accounts/self
 - search for a user
 - it should work and be faster

Change-Id: I46fd32c4850c7e56e7ccf24eade6b63a1b2ba8ad
Reviewed-on: https://gerrit.instructure.com/40825
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
2014-09-15 23:13:49 +00:00
Ryan Taylor ec397e3f75 Partially graded quizzes don't show score in gradebook or grade summary
Quizzes which are only partially graded are no longer shown as if they
were fully graded.  Now, the behavior is to show a quiz grading in
progress icon in the gradebook.

Closes CNVS-15073

Test Plan:
  - Create a quiz which contains both autograded and manually graded
    question types (M/C and essay)
  - Take quiz as student
  - Confirm that quiz grades as follows:
    - Student views:
      - Student grade summary view shows quiz icon
    - Teacher view:
      - Teacher gradebook view shows quiz icon

Change-Id: I8261a11f0ffddfb34947ad5f9089aa503b274cb1
Reviewed-on: https://gerrit.instructure.com/40501
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-09-15 21:53:34 +00:00
Colleen Palmer 477a095f7e Color contrast on announcement summary text
fixes CNVS-13723
fixes CNVS-13724

Testing plan:

- Make sure you have an announcement
- Go to Announcements
- The summary text and date will now pass Webaim contrast ratios
for both normal UI and High Contrast UI
Normal UI Change: http://cl.ly/image/0h103W2G2a0U
High Contrast Change: http://cl.ly/image/3F3Y2U26313F

Change-Id: If51498ead1cb7cc2315f59d56bc1381425da5b7d
Reviewed-on: https://gerrit.instructure.com/41068
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Chris Hart <chart@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Colleen Palmer <colleen@instructure.com>
2014-09-15 21:40:33 +00:00
Nathan Mills 910ad0ca7d create method to find active tool_proxies for a context
fixes PLAT-640

test-plan:
specs should pass

Change-Id: Ia958982b1ff786dbafbaa88e3c080a4b61627d04
Reviewed-on: https://gerrit.instructure.com/40969
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: Nathan Mills <nathanm@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2014-09-15 21:04:20 +00:00
Liz Abinante fb5ae7db75 fix sad sad 'available' typo
fixes CNVS-15533

test plan
- it should be spelled right 👍

Change-Id: I9d4d769c4d09301a102befd644bd54e7368b4bb3
Reviewed-on: https://gerrit.instructure.com/41117
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
2014-09-15 20:37:22 +00:00
Duane Johnson 31845b4691 copy discussion 'create' API docs to 'update'
Since YARD doesn't know about arguments in other methods, we need
to copy them over. Provides access for autogenerated Canvas API
tools such as Pandarus.

Fixes SIS-551

Change-Id: I31080057c4c955ed08e94523e2ff0f5461114212
Reviewed-on: https://gerrit.instructure.com/40989
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-09-15 20:12:47 +00:00
Simon Williams f154fb1226 fix delayed message validation for alerts
fixes CNVS-15426

test plan:
- enable account alerts in account settings
- enroll a teacher in a course
- make sure the teacher has a verified email address
- visit the teacher's notification preferences page to make sure there is
  a notification policy set up for the alert notification.  confusingly, this
  is not the same as the "Alert" section on the page, this notification policy
  actually cannot be customized, but visiting the page will create it if it
  doesn't already exist.
- the annoying thing about this alert notification policy is setup is that it
  is set up to be a 'daily' policy, and it can't be customized.  this means
  that even after the job runs and creates the message successfully, it won't
  actually be sent until the following daily batch. to fix this for testing,
  you can make the notification policy immediate by running the following in
  a rails console:
    ```
    NotificationPolicy.
      where(:notification_id => Notification.by_name("Alert")).
      update_all(:frequency => "immediately")
    ```
- now set up an alert and trigger the conditions for the alert
- alert messages are only computed once per day at 11:30 utc. since this is an
  inconvenient time to have a patchset checked out, the easiest way to make
  this happen manually is to run the following in a rails conosle:
    `Alerts::DelayedAlertSender.process`
  however, be aware that this job sets a redis key after it runs to make sure
  notifications don't get sent twice to the same person, so if you do need to run
  it twice in one day for some reason, clear redis between runs.
- the alert message should actually be sent.  if you set up a real email
  address you should receive the message, or you can check that it was sent by
  using the "View Notifications" tab in the admin tools section of the account.

Change-Id: Ia3ca030da1896539c6ca193b87c1ce9d3b936ef9
Reviewed-on: https://gerrit.instructure.com/40919
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-09-15 19:49:16 +00:00
Cody Cutrer 44cccdb7d8 normalize account chain usage
refs CNVS-15408

 * add/improve (Course|Account)#account_chain to not have to load
   a single account first, separately (it uses a recursive query to
   load them all at once)
 * change ContextExternalTool.contexts_to_search to use account_chain
   to get the benefits of the recursive query
 * remove #account_chain_ids - it loaded all the accounts anyway, so
   didn't have any optimization, and turns out in all cases it was
   used it either didn't matter, or was actually better to not use it

test plan:
 * use some LTI tools. that should exercise everything changed here

Change-Id: Ie9e89c2566db5c82fb424b41dc21c06be7d0b112
Reviewed-on: https://gerrit.instructure.com/40878
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Nick Cloward <ncloward@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-09-15 18:19:57 +00:00
Clay Diffrient 775a08987a Corrects term styling on the courses page
fixes CNVS-15492

Test Plan:
  - Go to the courses page (/courses)
  - Any terms should be displayed in a italicized light gray
    color next to the course title.

Change-Id: Ie1bb9040a8d03c551f02ce0e8171178532136ee0
Reviewed-on: https://gerrit.instructure.com/41043
Product-Review: Hilary Scharton <hilary@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-09-15 15:46:39 +00:00
Duane Johnson c4483239fe fix Assignment model in API Docs
An 'array' was specified without giving an 'items' key with type.
As a result, Pandarus can't build.

Fixes SIS-550

Change-Id: Id8cf296810ffc10da0ecab18af88af10f76bf05e
Reviewed-on: https://gerrit.instructure.com/40984
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Duane Johnson <duane@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-09-12 19:24:20 +00:00
Jason Madsen 7ae92835eb refactor progress bar to be reuable elsewhere
pass in a progress property to a progress bar component that has no
dependencies on any models, etc, just props

closes CNVS-15457

test plan:
  - enable new files
  - upload select file(s) to upload
  - progress bar should still:
    - update with upload progress
    - change to a green color when complete

Change-Id: I9d2e8bf1eb1c9a8286815a6aff82b2bd833c9e50
Reviewed-on: https://gerrit.instructure.com/40992
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
QA-Review: Jason Madsen <jmadsen@instructure.com>
2014-09-12 18:55:31 +00:00
Jason Madsen 90217a2774 implement new upload styles in new files
closes CNVS-15365

until OPS-442 goes through this will need to be tested locally using local
uploads, or on an S3 instance that accepts 'content-type' headers

also makes naming conflict dialog focus the primary button, and if not
there, falls back to the close button

test plan:
  - enable new files
  - navigate to the course files
  - select the 'Upload' button on the toolbar
  - select one or more files to upload
    - files should upload successfully
    - naming conflict window (if needed) should continue to work
    - upload progress should be displayed

Change-Id: I997a7619190efa8f5601475cdacd3f5fd849bb71
Reviewed-on: https://gerrit.instructure.com/40809
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Clay Diffrient <cdiffrient@instructure.com>
Product-Review: Jason Madsen <jmadsen@instructure.com>
QA-Review: Jason Madsen <jmadsen@instructure.com>
2014-09-12 18:55:08 +00:00
Nick Cloward d109585a3b account statistics accessibility
fixes: CNVS-15344

Added a scope to the row headers in the table.

Test Plan:

- Using a screen reader, visit the first table on the page.
- Use the screen reader navigation keys to navigate through the table,
  and verify that as you move up and down in the second and third
  column, the screen reader reads the row heading from the left column.

Change-Id: I3bbe277c1bc19145df6b8922ccb6d67f89f9389a
Reviewed-on: https://gerrit.instructure.com/40845
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Aaron Cannon <acannon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-09-12 18:50:50 +00:00