Commit Graph

539 Commits

Author SHA1 Message Date
James Williams 5ea6881b47 performance improvements for dashboard sidebar
and some other things too

test plan:
* regression test around the dashboard sidebar

closes #CNVS-22776

Change-Id: I46f1bd4476ca9aba27d41a4ce725c7dc2ee00dc5
Reviewed-on: https://gerrit.instructure.com/66056
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Ryan Allen <rallen@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-30 13:08:21 +00:00
Jacob Fugal da6bcd1019 include observer in ENV.current_user_roles
test-plan:
 - log into canvas as a user with an observer enrollment
 - check ENV.current_user_roles in the browser javascript console
 - should include 'observer'
 - log in as a user without an observer enrollment
 - ENV.current_user_roles should not include 'observer'

Change-Id: I80fa42153229a1e9c1debe9d5daf85bfa8c52254
Reviewed-on: https://gerrit.instructure.com/65954
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-10-28 16:15:22 +00:00
James Williams ce2043442a cache has_subset_of_account_permissions temporarily
will alleviate problems caused by users with too many
 account_users

closes #CNVS-24195

Change-Id: I2f91e126763e3ccdb5cb77c53c00f18b89e8ad1f
Reviewed-on: https://gerrit.instructure.com/65713
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-27 16:35:10 +00:00
Cody Cutrer ba9b9b301f fix several qualified names problems exposed by user_spec.rb
refs CNVS-21900

Change-Id: I6e94e5cb5e86fbd8bcd2846479db23ea06f91f50
Reviewed-on: https://gerrit.instructure.com/65784
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-10-27 14:55:59 +00:00
Jeremy Stanley 7d1a548bff course nicknames
test plan:
 0. enable New Styles
 1. go to the dashboard with the rectangle card things
 2. click the gear icon on a course card
 3. edit the course name in the box above the colors and
    click Apply
 4. notice the course name in the dashboard card has changed
    and the original name is visible if you hover over
    the nickname
 5. click the card to go to the course and notice your
    course nickname is used:
    - on the course home page (with 'recent activity'
      or 'syllabus' selected)
    - in the Courses menu
    - in "All Courses" under the Courses menu
    - in the UI navigation (breadcrumbs)
    - on the calendar (right side list)
    - in the Inbox (course dropdown)
 6. go back to the dashboard, click the gear menu on
    a course card, clear out the nickname, and click Apply.
    - the original course name should be restored
      and shown in the locations listed in step 5
 7. repeat steps 2-6 with a different student in the same
    course; ensure the first student's course nickname
    doesn't leak through to a second student
 8. regression test course color choosing functionality
    on both the dashboard and the calendar

closes CNVS-23201

Change-Id: I8dd714cad83dca5e17e65c6c463cdadc655db83c
Reviewed-on: https://gerrit.instructure.com/65052
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-10-21 23:03:51 +00:00
James Williams 500c5d4e12 let account admins with view_all_grades see all user grades
test plan:
* create an account admin role with "View all grades" enabled

* create a student in multiple courses
* as the admin, should be able to visit "/users/X/grades"
to see all the grades for that student

closes #CNVS-23973

Change-Id: I32d6ba76c4056a280ea0db2dbb40e544ee3a8c41
Reviewed-on: https://gerrit.instructure.com/65182
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-20 15:07:06 +00:00
James Williams 499a082ec2 only show moderation todo list items to moderators
test plan:
* enroll a ta in a course with a moderated assignment
 needing moderation
* the todo item list should not show up on their dashboard

Change-Id: Ifbe9d17f546b8fb8f205522d0f8ff59fd5e83e82
Reviewed-on: https://gerrit.instructure.com/64995
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-10-19 15:15:49 +00:00
Cody Cutrer bc1acb313d skip expensive empty query
fixes CNVS-23880

test plan:
 * go to the users page on an account, and search for an empty term
 * it should not error

Change-Id: I7140c7fd0f6944418801046f2ee5ab60c24d733e
Reviewed-on: https://gerrit.instructure.com/64724
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-10-08 19:02:52 +00:00
James Williams 6cf008fd48 moderated grading todo items for moderators
test plan:
* create a moderated assignment
* make a provisional grade
* the assignment should show up in the
todo list for the moderator
 to "Moderate X" and take them to the
 assignment moderation page
* the todo item should be ignoreable
 (either permanently or until a mark is created/changes)

closes #CNVS-23307

Change-Id: I7007ba948e688ca5864a0d851c153a288bef4233
Reviewed-on: https://gerrit.instructure.com/64734
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-08 16:26:27 +00:00
Dan Minkevitch 731ee214da Allow admins to change users' default emails
fixes CNVS-23604

Test Plan:
1. As an Administrator, create a user (Users > Add a New User)
2. Add an email address and save the user
3. Edit the User (Users > click on name > click Edit link in Name and Email section
4. Administrator should be able to edit the email address field
5. Upon saving the updated email address, the change should be reflected in the UI

Change-Id: Iaba72fb5bd8bd75697f3d2e3c869a75b0686310f
Reviewed-on: https://gerrit.instructure.com/64466
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-10-07 21:30:37 +00:00
Cameron Matheson 189ce7e3f2 make Turnitin::Client#id shard aware
refs CNVS-17473
fixes CNVS-21075

Test plan:
  turnitin still works

Change-Id: I36c34b2a4be67e4d0348dba2de43880ce4a8520a
Reviewed-on: https://gerrit.instructure.com/56782
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
Tested-by: Jenkins
QA-Review: Jason Carter <jcarter@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-10-07 20:57:02 +00:00
Cody Cutrer 5fdfe00b88 improve name inference
* don't treat suffix-like-names as suffixes when they're more likely
   the given name
 * even more so when it should already be in last-name-first context

test plan:
 * have a user with the full name "Vi Duing", which should translate
   to a sortable name of "Duing, Vi"
 * do an LTI launch
 * first name should come through as Vi, last name as duing

Change-Id: I2d728614af8ff421a5e14e8c2d116d9f0d0a2499
Reviewed-on: https://gerrit.instructure.com/63139
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2015-09-29 05:33:42 +00:00
Derek Bender fcac48c8d1 add selection table for moderated grading
closes: CNVS-22001

test plan:
1. run migrations
2. the table moderated_grading_selection should exist with the following columns:
  - assignment_id
  - student_id
  - selected_provisional_grade_id
3. in rails console, the class (model) ModeratedGrading::Selection should exist.

Change-Id: I137ad648e044d00cc9ba426d327f6cc91982e2b8
Reviewed-on: https://gerrit.instructure.com/63027
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-16 15:52:28 +00:00
James Williams 7c39e14fb1 improve upcoming_events performance for large course number
instead of fetching permissions for every course before
making the calendar events db call to determine section
visibility, if there are a large number of courses
wait until after the events are retrieved
to filter the section specific events out

(up to 80% of the time on certain user dashboard calls
 was spent inside section_context_codes; this will put
 a dent in that, but the rest of the endpoint is still
 in need of other optimizations)

test plan:
* use the console to set
 Setting.set('filter_events_by_section_code_threshold', X)
 using some small number (like '5') in trigger after db
 filtering for users with more than X active courses
* regression test the upcoming events in the user
 dashboard sidebar (specifically events that are
 limited to specific sections)

refs #CNVS-22776

Change-Id: Ib6d52231a72b49a0c658c7008fc05108c93fbb75
Reviewed-on: https://gerrit.instructure.com/62029
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Adrian Russell <arussell@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-09-09 12:52:13 +00:00
Cody Cutrer 9bf7304917 use preload instead of include on associations
refs CNVS-21901

also got rid of some useless associations

Change-Id: I13e012e0ec755443fbed12ca0629c53a9c693f43
Reviewed-on: https://gerrit.instructure.com/62217
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-08 20:32:41 +00:00
Cody Cutrer 56ccea56d4 use preload/eager_load instead of includes
refs CNVS-21901

Change-Id: Ie9e1b2778b72f649392d8a1c47c0c86dae0ef19c
Reviewed-on: https://gerrit.instructure.com/58660
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-09-08 20:32:05 +00:00
Dan Minkevitch 9aadc4c543 Stubbing out Crocodoc filter for moderated_grading
closes CNVS-22009
closes CNVS-22012

Test Plan:
* Enable "Moderated Grading" Feature
* Create an assignment that takes file uploads
  as submissions and has Moderated Grading
  checked
* Submit a PDF as a student
* As a teacher, open the assignment in speed grader
  and make comments on the document preview in the
  left pane  (not to be confused with comments
  on the submission)
* As a TA, open the assignment in speed grader
  and make comments on the document preview (as above)
* As the student that submitted the assignment,
  go to your submission and make comments on the document preview
* As a teacher, you should be able to view all the comments
  made on the assignment
* As a TA, you should see the annotations that TA
  has made
* As a student, you should see the annotations that
  student has made

Change-Id: I3bbbade5a8bdfa1d0a7d2d1e16e667e95d1a7a9a
Reviewed-on: https://gerrit.instructure.com/61396
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-09-04 02:15:00 +00:00
James Williams ddf6184a94 other misc performance improvements
- cache folder locked status
- don't load html content unnecessarily for
 index page api calls
- preload enrollment terms for menu

refs #CNVS-21317

Change-Id: I43f7915edc8cb33049723a80970f7cc23df679ef
Reviewed-on: https://gerrit.instructure.com/61198
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-08-20 21:09:35 +00:00
James Williams 3e9b184dd3 improve section_context_codes performance
don't initialize AR records just to get asset_strings

refs #CNVS-21317

Change-Id: If6afb664807926936d6957cac6aed24cfadc74b4
Reviewed-on: https://gerrit.instructure.com/61251
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-08-20 20:39:07 +00:00
James Williams a60bd5ffe4 add more caching + performance improvements
refs #CNVS-21317

Change-Id: Id9bbb04a92abd835af69ba5ec0c21ef758a8a324
Reviewed-on: https://gerrit.instructure.com/61146
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
2015-08-18 16:01:33 +00:00
James Williams 11f6037ae9 rails4: various spec fixes
refs #CNVS-21596

Change-Id: Ia4eac582175dee362d0b8bbb3006bc8d400f1b07
Reviewed-on: https://gerrit.instructure.com/59502
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-31 16:28:24 +00:00
James Williams 600165e7b2 rails4: deprecate Relation#all in favor of Relation#to_a
refs #CNVS-21596

Change-Id: I5dedaab90a2abe6bf288ff30401c9b31629b45b2
Reviewed-on: https://gerrit.instructure.com/59220
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-24 21:28:14 +00:00
Cody Cutrer c472370223 use qualified table names in EXISTS subqueries
refs CNVS-21900

Change-Id: Ic49c570888ad8712d7ba93de632d952ddf2b53e1
Reviewed-on: https://gerrit.instructure.com/58629
Reviewed-by: Rob Orton <rob@instructure.com>
Tested-by: Jenkins
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-07-19 00:09:24 +00:00
James Williams 038cbb4585 rails4: remove Relation#with_each_shard
in rails 4, apparently relations no longer retain
 their proxy_association.owner when they're merged
 into another non-association relation

better to use Relation#shard explicitly

refs #CNVS-21596

Change-Id: Iad34bbf626c17a3f0b1fc57ac685506199cc5f3d
Reviewed-on: https://gerrit.instructure.com/58151
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-17 12:31:15 +00:00
Cody Cutrer a56e81bd9e get dashboard loading with use_qualified_names
refs CNVS-21900, CNVS-21901

test plan:
 * in database.yml, set
     use_qualified_names: true
     schema_search_path: pg_catalog
     shard_name: public
   (probably public; adjust as necessary)
 * you should be able to login and view your dashboard without
   any 500 errors

Change-Id: I6f5bc538dcae25a7f57425411648800fbc5bd259
Reviewed-on: https://gerrit.instructure.com/58528
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-07-16 16:37:24 +00:00
James Williams d447bbb9d4 rails4: even more models spec fixes
refs #CNVS-21596

Change-Id: I9adcbafc2d12398a49c779ea48ea2ee0bafbf3dc
Reviewed-on: https://gerrit.instructure.com/58246
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:25:18 +00:00
James Williams 417329b3b4 s/visibile/visible
lul

Change-Id: I303e168053ec058cdbf40acc6337b3d3404034ad
Reviewed-on: https://gerrit.instructure.com/58065
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-13 15:24:07 +00:00
James Williams cda5cc88e9 rails4: use unscoped instead of with_exclusive_scope
with_exclusive_scope is deprecated

refs #CNVS-21596

Change-Id: I5f7d2744f8084a032100b54cf0d34118373e59ce
Reviewed-on: https://gerrit.instructure.com/57812
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-07-08 13:02:57 +00:00
James Williams 429108fb38 performance improvements for enrollments and state_based_on_date
test plan:
* regression test enrollment dates and
 the course/account settings to restrict students
 to from viewing past and future courses

closes #CNVS-21602

Change-Id: Ifc2fd8f6fd279839bd8ba520442e2c0b9cc91da6
Reviewed-on: https://gerrit.instructure.com/57535
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-07-02 15:51:16 +00:00
James Williams eab9eea95f misc improvements for assignments, calendar events and modules
test plan:
* syllabus should work as before
* modules loading of assignment due dates should work
 as before
* assignments api should work as before

refs #CNVS-21476 #CNVS-21317

Change-Id: Iba183d6fda604acb29e9685f0f32be74ad27b898
Reviewed-on: https://gerrit.instructure.com/57215
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-06-29 15:45:27 +00:00
Ethan Vizitei e85ae442d2 pick sis pseudonym reliably
closes CNVS-15282

Previously for users that have multiple pseudonyms,
the "sis_pseudonym" might be selected differently depending
on whether the pseudonyms collection was already loaded or not
because no specific order clause was given.  This patchset
makes it so that all sis pseudonym selection strategies
order the data set the same way (by "unique id") so that
you can count on getting a deterministic result.

Also, user.rb is huge, so I took the opportunity to split out a
SisPsuedonym class.  There may be room to move more
functionality into it later liked deciding what pseudonym to
fall back to in cases where the current strategy finds
nothing, but this is a good first step.  I switched all the use
cases I could find of the old interface on user.rb, but left the
method in place for now in case other plugins or extensions make use of
it.  We can wait a while and let the deprecation warnings take effect
before removing it.

TEST PLAN:
 1) download a gradebook csv export for a course
 2) make sure the SIS Login ID is the same as the secondary
   ID for each user that you see in the gradebook view itself.

Change-Id: Ib18b40acbaf3a8f4352fd6ee8e0826897e3edf49
Reviewed-on: https://gerrit.instructure.com/57001
Tested-by: Jenkins
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Rob Orton <rob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2015-06-25 22:18:14 +00:00
James Williams 0f9870c7b0 improve cached_contexts performance
a lot of time was being spent running unnecessary
 permissions checks on a users' courses
up to ~75% of UsersController#dashboard_sidebar

refs #CNVS-21317

Change-Id: Ic3ecd1e6c357e8347133f10e027dc028c6b5cd83
Reviewed-on: https://gerrit.instructure.com/56880
Tested-by: Jenkins
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-06-24 19:11:38 +00:00
Joel Hough 9fee104a3b use case insensitive communication channel address queries
fixes CNVS-16978

test plan
- create a discussion topic
- cause a reply-to-able notification about the topic to be sent to
 a user
- lock the topic
- change the user's email address to some non-standard capitalization
 scheme (all uppercase works fine)
- reply to the notification
- ensure that the user receives a message indicating that the topic
 was locked

Change-Id: I78d53ce1f9affc76fd040c0e24e99bc1d4edb9e2
Reviewed-on: https://gerrit.instructure.com/54631
Tested-by: Jenkins
Reviewed-by: Andrew Butterfield <abutterfield@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-05-21 18:42:40 +00:00
Joel Hough f0d3a3d6d7 don't show todo item from soft concluded courses
fixes CNVS-19768
fixes CNVS-15371

test plan
- follow the repro steps in the jira tickets (note that instead of
 waiting for changes to appear, you can just clear the cache from
 the rails console)
- ensure that the todo items do not appear

Change-Id: I3cdee5300a8991ee20aed99bd37d6e92dccf36c4
Reviewed-on: https://gerrit.instructure.com/53714
Tested-by: Jenkins
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-05-14 21:50:12 +00:00
Clay Diffrient ccaf8754a5 Adds a calendar color picker to canvas
closes CNVS-19780

Test Plan:
  - Go to the calendar
  - Click on the three dots to the right of the calendar name
    on the list of calendars
  - A popover should appear, click a color and that should change
    that calendar to that color.
  - Refresh, all chosen colors should remain.
  - Perform the same actions again, this time enter a hexcode
    in the input box.
  - The preview box to the left should update when the color is valid
  - Click on the apply button to the right of the input to update the
    color..
  - The same behavior should occur.

Change-Id: Id2942cca21afc3a2e89c0dc92d5cc2d8b2b93b59
Reviewed-on: https://gerrit.instructure.com/51996
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
Tested-by: Jenkins
2015-05-08 22:13:34 +00:00
Dylan Ross 9ce06fb25e gradebook export process is now async
exporting the gradebook as a csv is now
done in a delayed job. when the user
clicks export, the export button will
be disabled. when the export has
completed, it will download the report
automatically. the csv generated previously
will be stored on the course, so it can
be downloaded again at a later time,
if a user leaves the page

fixes CNVS-17200

test plan
  ensure the data is consistent with the
  synchronously exported gradebook

  ensure the teacher can see the exported
  gradebook csv in the user's files page

Change-Id: I3d1e800326d82fe5cbca5a57ed7f60fad64daad5
Reviewed-on: https://gerrit.instructure.com/52689
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: Robert Lamb <rlamb@instructure.com>
Tested-by: Jenkins
Product-Review: Christi Wruck
2015-05-05 17:54:49 +00:00
Strand McCutchen d6597c107c fix Style/EmptyLineBetweenDefs issue
Change-Id: Ib7b824043a7ac9196f06020e2ca42fe983565f0d
fixes: CNVS-20009
Reviewed-on: https://gerrit.instructure.com/52919
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
Product-Review: Strand McCutchen <smccutchen@instructure.com>
QA-Review: Strand McCutchen <smccutchen@instructure.com>
2015-04-29 16:28:39 +00:00
James Williams c3c5cbdfba don't save user on profile settings view if unnecessary
closes #CNVS-20039

Change-Id: Iab52b0ad1c2e8e9b02596976e5a129838dd239f1
Reviewed-on: https://gerrit.instructure.com/53012
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
QA-Review: James Williams  <jamesw@instructure.com>
2015-04-28 19:14:45 +00:00
James Williams f15110f61f don't include test students in peer reviews
test plan:
* create an assignment with manual peer reviews
* within student view, submit to the assignment
* visit the peer reviews page
* should not include the test student in the page
* should not automatically assign peer reviews
 to or for the test student

refs #CNVS-20040

Change-Id: I42ddd0fcf306b686469046ab10e153b9b608225e
Reviewed-on: https://gerrit.instructure.com/52988
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
2015-04-28 16:47:29 +00:00
James Williams 678135fc06 optimize User#preload_conversation_context_codes
skips instantiating AR objects when
we just want the ids

refs #CNVS-15747

Change-Id: I66a3c86044606eda2337b1a2beb6763eb132fc81
Reviewed-on: https://gerrit.instructure.com/52815
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins
Product-Review: James Williams  <jamesw@instructure.com>
2015-04-27 22:23:04 +00:00
Cody Cutrer 9834937c8c don't autorequire a bunch of gems that are rarely used
Change-Id: I09ed3686629b62849d392684d587f30cb2047013
Reviewed-on: https://gerrit.instructure.com/51853
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-04-09 18:47:50 +00:00
Joel Hough 5041a8d5fd hide course stream items from non-participating users
fixes CNVS-18202

test plan
- have a student in an active course
- get some course content on the user's dashboard (discussion post
 is good)
- conclude the user's section by editing its availability date
- clear the recent stream item cache (editing a discussion works)
- ensure that the course content no longer appears on the dashboard

Change-Id: I6b7690bc1010472d446a8041b0ced1f67bb704d3
Reviewed-on: https://gerrit.instructure.com/50745
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-03-30 23:46:02 +00:00
Joel Hough 439e119492 delete facebook integration
fixes CNVS-18978

test plan
- regression test canvas, particularly:
notifications, and their preferences
communication channels
messages
user ouath (like linkedin and google docs use)
avatars
profile page
user services (like twitter)
feature settings
context roster

Change-Id: I2d53125f76c9daf912fdeabc621c90ac1bd070df
Reviewed-on: https://gerrit.instructure.com/49267
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-03-30 20:21:58 +00:00
James Williams 9df3934f02 fix user enrollment create permissions
- should not allow users to create students
 without :manage_students permission

- should allow users with :manage_admin_users
 *or* :manage_students permission to create observers

test plan:
* create two account admin roles, one with only "Add/remove
 Students" enabled and the other with only "Add/remove teachers,
 etc." enabled
* as the user with only student management rights,
 should only be able to add people to a course as
 a student or observer
* as the user with only admin management rights,
 should only be able to add people to a course as
 an observer, designer, ta or teacher

closes #CNVS-19437

Change-Id: Ibde02330201434cfc1fd667cc6476dd351d2c2ec
Reviewed-on: https://gerrit.instructure.com/50803
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-03-24 19:31:25 +00:00
Ethan Vizitei a9512faebf remove dead "highest_role" method
refs CNVS-18529

found this while migrating the salesforce plugin
and digging into how roles work.  It's never called. removing it.

TEST PLAN:
 - nothing should change, this method is never used

Change-Id: Ibae6d4de5cc42e5c6dcfb2746d8241b2a71257a8
Reviewed-on: https://gerrit.instructure.com/50777
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2015-03-23 20:42:37 +00:00
James Williams d8bfdc0e9b show assignments needing to be graded only to instructors
also a touch of refactoring

test plan:
* create a course with a student, teacher and designer
* also create an assignment

* as the student, submit to the assignment
* as the teacher, should be able to see the assignment in
 the "To Do" list on the right-hand side of the dashboard
* as the designer, should *not* be able to see it

closes #CNVS-8059

Change-Id: I97b61bf857a1cf84c71597ffdd3c816023b84dd5
Reviewed-on: https://gerrit.instructure.com/50063
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-03-11 13:51:59 +00:00
James Williams ac49b20db4 fix and add avatar reporting links
test plan:
* enable avatars on the root account,
* create a course with multiple students
* a student should be able to look at the
 course profile of another user in the course
 and report their avatar
* when reported, should be able to be seen by
 account admins at "/accounts/X/avatars"
* should work with profiles enabled or disabled

closes #CNVS-13849 #CNVS-4781

Change-Id: I97f62ca709321233c8a57cd6f1bd9870dc50d215
Reviewed-on: https://gerrit.instructure.com/49781
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Cosme Salazar <cosme@instructure.com>
2015-03-04 15:46:57 +00:00
Brad Horrocks 7a9efc2cba Domain restrictions work for google drive
user.gmail will look for a google drive service

Fixes: PLAT-913

Test plan:

enable domain restrictions
make sure you can only submit submissions from the allowed domain

Change-Id: Iaf7e8e15101340d9cd4a37e71874ff77bad8e691
Reviewed-on: https://gerrit.instructure.com/49050
Tested-by: Jenkins
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
2015-02-24 16:26:20 +00:00
James Williams ba72d5538e fix module visibilities with DA for teachers without update access
test plan:
* create a course with differentiated assignments enabled
* create a module and an assignment item
* give the course a term from the past so teachers have
 read-only access
* enroll a teacher
* as the teacher, view the modules page
* should be able to see the assignment item

closes #CNVS-17938

Change-Id: I5b988dd84ff8c69daed8e413bdc27c90372fe5e8
Reviewed-on: https://gerrit.instructure.com/48790
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
2015-02-13 18:25:07 +00:00
James Williams ae35f8b84d only show available assignments in to-do and coming up lists
test plan:
* create a course with an upcoming assignment
* enroll a student in the course
* soft-conclude the course (set the end at date in the past)
* as the student, the assignment should not show up in the
 to-do and upcoming assignments lists on the dashboard

closes #CNVS-17857

Change-Id: I47600888a50dc30d7c91efbef9b7fb1f3dbd5808
Reviewed-on: https://gerrit.instructure.com/48448
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
QA-Review: Clare Strong <clare@instructure.com>
2015-02-09 21:03:38 +00:00