Commit Graph

3611 Commits

Author SHA1 Message Date
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 63c511b717 don't send group membership notifications for unpublished courses
test plan:
* create a course, leave it unpublished
* enroll a student
* as the student, set notifications for "Group" -
 "Membership Update" to ASAP
* create a group in the unpublished course
 and add the student
* the student should not receive a notification

closes #CNVS-6008

Change-Id: I38f3009222a50ac0cf016d18f6daf39add33f3a0
Reviewed-on: https://gerrit.instructure.com/50055
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:22 +00:00
Matthew Berns 4a5ddb8cd9 ensure proper sorting if submitted_at times exist on any decaying avg results
fixes CNVS-19114

test plan:
- create a decaying average outcome and attach it to several assignments
- give outcome scores to students without them submitting anything, noting the
  time when scoring
- math should properly reflect assessed_at time from most recent to oldest
- outcome result scores should be consistent on the student and teacher lmgbs
- create two new assignments and attach the outcome
- as a student, submit to one of them
- give and outcome score on that submission and re-check score. math should now
  reflect the submitted and graded assignment as most recent
- give an outcome score to the other assignment the student did not make a
  submission for.
- math should now reflect that assignment as the most recent

ensure decaying average scores are rounded to 2 decimals

fixes CNVS-19108

test plan:
- already handled above as long as you didn't see a score with a long trailing
  decimal on results. It would only happen due to floating point math issues.

Change-Id: Ia7b68eec443bbd5b64a0fa72293b9671dfb79e9d
Reviewed-on: https://gerrit.instructure.com/50019
Tested-by: Jenkins
Reviewed-by: John Corrigan <jcorrigan@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-03-09 21:39:08 +00:00
James Williams 349e411315 allow teachers with concluded enrollments to view hidden tabs
test plan:
* create a course with a teacher
* set the enrollment term end date for teachers
 in the past
* teachers should still be able to all tabs on
 the left-hand side inside the course (including
 the files tab)

closes #CNVS-13353

Change-Id: I1ee41567edb1fad7620f18e7b822c47f09e2ab38
Reviewed-on: https://gerrit.instructure.com/49998
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-09 20:35:23 +00:00
Jeremy Stanley 979468b674 fix cache issue when restoring a user's enrollment
test plan:
 * have a student in a course
 * as an admin, go to the student's course user page
   by selecting "User Details" from the gear menu on the
   People page
 * click "More User Details"
 * in the Membership(s) box, click "Conclude this enrollment"
   and then "Restore this enrollment" (which will appear in its
   place)
 * verify that the student still has access to the course

fixes CNVS-3284

Change-Id: If782d7923aefdff5910a5a44e58a357be7c26dfe
Reviewed-on: https://gerrit.instructure.com/49976
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Tested-by: Jenkins
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-03-06 18:53:07 +00:00
James Williams 03b13c50a1 retain quiz question migration id when de-duped
(also de-dups questions with mis-matched answer ids)

test plan:
* create a quiz with an essay question or file upload question
* copy the entire course (quiz + question bank)
* re-copy the course, but selectively select only the quiz
* it should not have duplicated the quiz questions

closes #CNVS-18593

Change-Id: I508d20aaeae4878e5634d182cd835ddcd8642468
Reviewed-on: https://gerrit.instructure.com/49941
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-03-06 17:41:31 +00:00
Dan Minkevitch a777f3948c Changes SOC2 Start Date
closes CNVS-19060

The date for requiring new users to accept terms has been changed to 2015-05-05

Change-Id: I3ca4e569062c6ab26047a2038bdd5cecce359835
Reviewed-on: https://gerrit.instructure.com/49910
Reviewed-by: Jon Willesen <jonw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Tested-by: Jenkins
Product-Review: Jon Willesen <jonw@instructure.com>
2015-03-05 22:05:15 +00:00
Jeremy Stanley b19f89d6ff preserve "Until" time when copying discussion topics
test plan:
 - create an ungraded discussion topic with "Available at"
   and "Until" dates
 - copy the course
 - confirm the dates are preserved
 - confirm both dates move appropriately when you shift dates

fixes CNVS-19043

Change-Id: I81b694b87e745dc098e2c6b306c2c0d6656c38ca
Reviewed-on: https://gerrit.instructure.com/49898
Reviewed-by: Dan Minkevitch <dan@instructure.com>
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jon Willesen <jonw@instructure.com>
2015-03-05 17:12:43 +00:00
Joel Hough bca69aaef8 dependent destroy communication channel's notification policies and delayed messages
fixes CNVS-18976

test plan
- create communication channel
- set notification preferences to 'daily' for some notification
- cause a message of that type to be sent (i.e. queued for sending
 later)
- destroy! the communication channel from the console
- ensure that the channel is destroyed

Change-Id: I10e58c9381bf9307e0fc0c5c870ccbfc24671314
Reviewed-on: https://gerrit.instructure.com/49842
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
Tested-by: Jenkins
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-03-05 17:03:38 +00:00
James Williams 035cf861d4 don't allow users to create conferences without the permission
test plan:
* enable a web conference plugin
* add a teacher to a course
* create a group
* as the teacher, should be able to create
 conferences for the course and group

* as an account admin, disable the permission
 to "Create conferences" from the teacher role
* the teacher should no longer be able to create
 conferences

closes #CNVS-5370

Change-Id: Ic0955bd09b09e5026754f754077889904918cbbb
Reviewed-on: https://gerrit.instructure.com/49856
Tested-by: Jenkins
Reviewed-by: Dan Minkevitch <dan@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-03-05 16:25:25 +00:00
Michael Nomitch 6f84469096 DA - fix participants with visibility for group discussions
fixes CNVS-18897

test plan:
  - turn DA on
  - make an active user with a verified email address
  - make a group assignment discussion & assign to a
    group this user is in & publish it
  - check  /users/:id/messages and the user
    should have been notified about the post
    - if they get 2 notifications that is okay
      (it is a different bug)
  - make an ungraded group discussion in a course
    - check that participating users get
      notifications as well

Change-Id: Ib83315bf109a72fc657f151182851eaa50e90983
Reviewed-on: https://gerrit.instructure.com/49618
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-03-05 16:24:26 +00:00
Brad Horrocks 04ca108451 Google docs tab will appear when using file extension filters
Fixes PLAT-936

Test Plan:

Attempt to load google docs tab on an assignment submission
with file extension restrictions turned on

Change-Id: Iaa11ef90b36e9732579dc2179a22719bd9148d61
Reviewed-on: https://gerrit.instructure.com/49698
Reviewed-by: Nathan Mills <nathanm@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Brad Horrocks <bhorrocks@instructure.com>
Tested-by: Brad Horrocks <bhorrocks@instructure.com>
2015-03-05 15:00:49 +00:00
Ryan Taylor 96a604111a Prevents pick count erroring on nil
Adds a default value of 0 when pick count isn't being set properly.

Closes CNVS-18856

Test Plan:
  - Create quiz with question groups and pick count of nil
  - Confirm that the preview page still works without error or silent
    redirection to quiz show page.

Change-Id: I2523e93aa3af31520e87ca0107e5f82db1b7a92c
Reviewed-on: https://gerrit.instructure.com/49469
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Tested-by: Jenkins
QA-Review: Robert Lamb <rlamb@instructure.com>
Product-Review: Ryan Taylor <rtaylor@instructure.com>
2015-03-05 02:48:27 +00:00
Cody Cutrer 15ca8d65a2 remove basic auth support
2012 has definitely come and gone

Change-Id: Ifa6c74048b0afe38a6892ea305594ce81c4bc381
Reviewed-on: https://gerrit.instructure.com/49832
Tested-by: Jenkins
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-03-04 19:50:50 +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
James Williams 6c00886edd improve qti and course copy warnings
test plan:
* quiz imports and course copying should
 be unaffected

closes #CNVS-19012

Change-Id: I6000fce1d6f08459bb7266c97b9d47424bedc1de
Reviewed-on: https://gerrit.instructure.com/49762
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-03-04 13:51:26 +00:00
Jeremy Stanley d4a0ecc59b fix publishing wiki page after renaming on modules page
test plan:
 - have a module with an unpublished wiki page
 - from the modules page, rename the wiki page via the gear menu
   and "edit" item
 - without reloading the page, click the cloud icon to publish
   the wiki page
 - go to the Pages tab and ensure only the new name appears
   (publishing the page didn't create a new published page with
    the old name, leaving the renamed page unpublished)

fixes CNVS-18693

Change-Id: I1a1995f81dfe1d02cebc558bbaee716e930c8354
Reviewed-on: https://gerrit.instructure.com/49593
Tested-by: Jenkins
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-03-03 16:34:35 +00:00
James Williams d50fffb713 include updated_at in Conversation#preload_users_and_context_codes
without updated_at, it's possible to fetch stale
conversation_context_codes, which ends up causing
the wrong tags to be added (because it tries to infer them)

test plan:
* create a course with two students
* as one student, send a message from that student to the other,
 selecting the course from the drop-down
* create another course with the same two students
* send another message, this time using the other course
 in the drop-down
* view the sent messages, filtering by course
* should show each message in the right filter

closes #CNVS-18315

Change-Id: Ia0418489c2ce632bde36bcb899844f86c892b3c6
Reviewed-on: https://gerrit.instructure.com/49516
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-03-03 13:49:59 +00:00
James Williams 1eaf4bcda6 allow section-limited teachers to create appointment groups
test plan:
* enable scheduler

* create a course with multiple sections
* enroll a teacher into a section and limit them to
 that section
* as that teacher, should be able to make appointment groups
 for the section they have rights to (but not the others)
* should not be able to make a course-wide group

* for unrestricted teachers, should behave just as before

closes #CNVS-8770

Change-Id: I679143e5f2b036ee4b3de3f38b0d2aa7cec68aa4
Reviewed-on: https://gerrit.instructure.com/49433
Tested-by: Jenkins
Reviewed-by: Joel Hough <joel@instructure.com>
Reviewed-by: Jonathan Featherstone <jfeatherstone@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-03-02 21:01:45 +00:00
Michael Nomitch dd4c2006b8 bucketing assignment index api
fixes CNVS-17809

test plan:
  - make a request to the assignments index api
    with the param bucket=
    - "ungraded"
    - "upcoming"
    - "future"
    - "past"
    - "overdue"
  - as a student, the assignments in each bucket
    accurately reflect assignment overrides for
    this student
  - as a teacher, default assignment due dates
    are applied
  - as an observer watching a single student, buckets
    reflect that student's submissions
  - as a full course observer, due dates reflect which
    section they are in

Change-Id: I69ed0fe063173324a2e848f4b3b49ea42d843744
Reviewed-on: https://gerrit.instructure.com/47437
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-03-02 20:04:53 +00:00
Cody Cutrer dc8f37287a don't (directly) depend on libxml-ruby
nokogiri is better maintained, and java compatible (both
are based on libxml2)

Change-Id: Ia7c8edea15ec001cf4861b00494e480832bd2c63
Reviewed-on: https://gerrit.instructure.com/49467
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2015-03-02 20:01:02 +00:00
James Williams 3f0fe14021 evaluate quiz module tags with manually graded submissions
test plan:
* have a course with a student
* create and publish a quiz
* create a module with the quiz as a required item
* manually give the student a grade for the quiz
 in the gradebook
* should still fulfill the module requirements as
though the student had done the quiz themselves

closes #CNVS-3801

Change-Id: I4ef12bc5a0401627f377007818832b1ad9ad0b3f
Reviewed-on: https://gerrit.instructure.com/49679
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-03-02 18:38:25 +00:00
Steven Burnett 992d13ceee fixes podcast media links
fixes the rss page crashing when a media link
was added to a discussion page.

fixes CNVS-10547

test plan:
- create a discussion with podcast and podcast reply enabled
- post a video from the side wiki bar(any format)
- click to get the rss feed of the current discussion
  notice no crashing.

Change-Id: I02353a05ff10a3448f36693adca5893acfeef1c9
Reviewed-on: https://gerrit.instructure.com/49388
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-03-02 17:20:51 +00:00
Ethan Gunderson bff5b98bd4 Properly return course progress for out of shard users
refs CAT-843

Test Plan:
  1. As an out-of-shard user, enroll in a course that has
     a few modules/assignments
  2. Make some progress on that course
  3. Go to your gallery dashboard, you should see
     your progress in that course.

Change-Id: I35b2dac404fbc7cccc1062f5edd93c7201ad75a9
Reviewed-on: https://gerrit.instructure.com/48603
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Product-Review: Dave Donahue <ddonahue@instructure.com>
Tested-by: Jenkins
QA-Review: Dave Donahue <ddonahue@instructure.com>
2015-03-02 00:51:27 +00:00
Matthew Berns aa8b5f6dc8 Updates teacher learning mastery gradebook for fancy math
fixes CNVS-11656

test plan:
- enable the teacher and student learning mastery gradebook feature flags
- go to gradebook and select the Learning Mastery tab
- outcome scores per student and aggregate totals should appear the same as
  they do on master
- hover mouse over outcome title to trigger popover
- popover should include a path to the outcome, as well as a pie graph with a
  key to the right of it that shows colors for 'exceeds expectations',
  'meets expectation', and 'does not meet expectations'
- popver should then show mastery points needed, outcome description,
  then a content box that includes the calculation method, along with
  method description/example.
- click a student name to go to student learning mastery gradebook
- all things should appear the same was as they did on
  https://gerrit.instructure.com/#/c/45777/ excluding a minor change to
  the wording for most recent assessment
- masquerade as a student and go to /grades in a course
- all popover content should still be the same as when viewing this page as a
  teacher

Change-Id: Ibe4214a4217c4fb42824e66934b49dccff13fe17
Reviewed-on: https://gerrit.instructure.com/48004
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
Tested-by: Jenkins
2015-02-28 00:56:25 +00:00
Joel Hough b68984052d don't send summaries to bouncing channels
fixes CNVS-18827

test plan
- cause a summary message to be sent to a bouncing communication
 channel
- ensure that the message is not sent

Change-Id: I966a386c6d822db873c4dee19e061b5ca12d060a
Reviewed-on: https://gerrit.instructure.com/49376
Tested-by: Jenkins
Reviewed-by: Matthew Wheeler <mwheeler@instructure.com>
QA-Review: Derek Hansen <dhansen@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-02-27 23:56:58 +00:00
Cameron Matheson 6036360b79 turnitin: use a unique identifier for courses
fixes CNVS-17473

Test plan:
  * create two new shards
  * create a course in each shard (the courses should both have id 1)
  * in the rails console, try course.turnitin_id for each shard.  they
  * should be different

Change-Id: I70892e35eb53b32ede26cd00505142962c9785be
Reviewed-on: https://gerrit.instructure.com/49196
Tested-by: Jenkins
Reviewed-by: Strand McCutchen <smccutchen@instructure.com>
Reviewed-by: Josh Simpson <jsimpson@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Cameron Matheson <cameron@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
2015-02-27 22:05:18 +00:00
Simon Williams e0e14be4f6 remove remnants of canvas collections
test plan:
- basic regression test of discussions

Change-Id: I36a8726f3c77c7197597de7e3ad67d0227e0cd1a
Reviewed-on: https://gerrit.instructure.com/48361
Reviewed-by: James Williams  <jamesw@instructure.com>
Tested-by: Jenkins
Product-Review: Simon Williams <simon@instructure.com>
QA-Review: Simon Williams <simon@instructure.com>
2015-02-27 21:58:39 +00:00
Michael Nomitch a1315792db DA - public users scopes not filtered
fixes CNVS-18595

test plan:
  - make a course with DA on and some assignments
    only visible to certain sections
  - make it public to all
    - when logged out you can see all the
      assignments on the index page
    - when logged in as a user, DA filters assignments
      out of the index page by section (like normal)
  - make it public to authenticated users
    - when logged in as a user enrolled in the course,
      DA filters assignments out of the index page
    - when logged in as a user who is NOT enrolled,
      you see all the assignments on the index page
    - when logged out you cant access this page
  - make it a private course
    - when logged out or logged in as a student NOT in
      the course you cant see the assignment index
    - when logged in & enrolled DA filters like normal

Change-Id: Id9b19883baab20b4aa871d61ecf29620a5212d05
Reviewed-on: https://gerrit.instructure.com/49176
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-02-27 20:03:06 +00:00
Michael Nomitch c1624e71a9 DA - remove dupe grading counts
fixes CNVS-18849

test plan:
  - in course with DA on
  - make a student in 2 sections
  - make a submittable assignment
  - submit from only this student
  - as the teacher on the homepage,
    check that in the TODO list the count
    of submissions to grade is 1 and not 2

Change-Id: I1f8dfdb8223cd3bf072bb0730b99cbe5cf940b5e
Reviewed-on: https://gerrit.instructure.com/49520
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-02-27 20:02:03 +00:00
Brian Finney a9b68e3abc Ensure submission is complete before showing answers
Fixes CNVS-18802

Test plan
 - Create a quiz with multiple attempts and 'Let Students See The
 Correct Answers' 'Only After Their Last Attempt'
 - Take quiz untill you are on your final attempt
 - Answers should not be visible during final attempt
 - When final attempt is completed answers should now be visible

Change-Id: Ibf729afbe491b958d58b6b813379c9b40e678088
Reviewed-on: https://gerrit.instructure.com/49507
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Brian Finney <bfinney@instructure.com>
2015-02-27 18:29:50 +00:00
Simon Williams da552c4f91 mirror group discussion message attachment
fixes CNVS-7687

test plan:
- create a group discussion topic with an attachment
- go to one of the group subtopics
- the attachment should be shown there
- you should be able to download it

Change-Id: I5ab5e72e30717b745ebb5e329325574d68e0085c
Reviewed-on: https://gerrit.instructure.com/49179
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-02-27 03:08:19 +00:00
Steven Burnett 85e03335d5 fixes timestamp on eportfolio page
fixes CNVS-12484

test plan:
- go to eportfolio page
- modify your portfolio in some way
- go back to the dashboard notice time change/date change

Change-Id: I0661f6a8364b86d6d8e09bca7862cd740ddfd93a
Reviewed-on: https://gerrit.instructure.com/49405
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Matt Berns <mberns@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-02-26 22:00:17 +00:00
Joel Hough 8f3b4f8864 send push notifications to apns sandbox
fixes CNVS-18871

test plan
- send a push notification to an apns sandbox device

Change-Id: I4d4a3b9e8213e46f5eb0bfb33b575e296561af15
Reviewed-on: https://gerrit.instructure.com/49452
Reviewed-by: Miles Wright <mwright@instructure.com>
Tested-by: Jenkins
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2015-02-26 17:32:46 +00:00
Zach Wily 892aa98958 lay groundwork for transitioning to smarter attachment verifiers
This commit adds a new form of attachment verifier. Rather than just
being the `uuid` from the attachment object, it is a signed JWT that
includes the attachment id, the viewing user id, and a viewing context.

The existing code that checks the verifier now checks to see if it's
a UUID and returns success if it is (to preserve legacy behavior). It
attempts to decode and verify the token, and verify that the user
captured in the token still has permission to :read or :download the
attachment.

The context captured in the token is currently unused, but may prove
useful for debugging or future purposes. The context is just an
asset_string for a model.

The only place generating new verifiers with this commit is the helper
ApplicationController#verified_file_download_url, which is only used by
content exports and eportfolios.

We also shoot increments to statsd when legacy and new verifiers are
used, so we can see when legacy verifier usage is low enough to disable.

Test plan:
 * Create a course export.
 * View the export at /courses/X/content_exports
 * Verify that the verifier= in the download URL is decoded correctly
   at jwt.io. It should have a user_id, an id, and a context.
 * Verify that a you can successfully download the export.
 * Use the files API and verify that urls still have the
   old-style verifier=<40-character UUID> on them, and that these
   links still work without authentication (such as an incognito tab
   or curl)

 * enable eportfolios in account settings
 * upload a file to user files
 * create an eportfolio, and attach a user file to it
 * save the eportfolio
 * confirm that the download link
   (which looks like /eportfolios/X/entries/Y/files/ZZZ)
   redirects to a file download link with a new verifier

fixes CNVS-18858
fixes CNVS-18861

Change-Id: I3db21469462dfdb8f8067f509a01a55d7cb23abd
Reviewed-on: https://gerrit.instructure.com/48637
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-02-26 17:17:30 +00:00
Brian Palmer c212a473fd SIS CSV diffing
This opt-in preprocessing pass does a diff on the current SIS Import against
the last successful import tagged with the same "data set identifier",
and generates a new zip of CSVs containing only the diff between the
two. It then continues with the import as normal, applying that diff'd
zip, greatly speeding up large imports where most data doesn't change.

closes CNVS-18432

test plan:

Exercise the new diffing options using the diffing_data_set_identifier
and diffing_remaster_data_set api options. See the new API
documentation for details and expected limitations. Edge cases include:
- zips that contain multiple CSVs for the same data type (won't diff)
- failed SIS imports (shouldn't diff against these)
- remasters should skip doing the diff, but should be diffed against on
  the next import

We don't expose any functionality for downloading SIS data that has been
uploaded, but you can grab it from the rails console:

> SisBatch.find(<batch id>).attachment.authenticated_s3_url
and
> SisBatch.find(<batch id>).generated_diff.authenticated_s3_url

Change-Id: I40d5e5ca8c376cecd685f4d06012f11bac021599
Reviewed-on: https://gerrit.instructure.com/48428
Tested-by: Jenkins
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Linda Feng <lfeng@instructure.com>
2015-02-26 15:53:01 +00:00
Jeremy Stanley 2aad9da12a forward context module actions to root topic
test plan:
 * create a group discussion topic
 * put it in a module
 * set up a "must contribute" requirement
 * as a student who is a member of a group, reply to the
   discussion topic
 * confirm that the module completion requirement is fulfilled

fixes CNVS-1444

Change-Id: Ie76c2be03fbc1421528c3b917ea57caba9d99b7b
Reviewed-on: https://gerrit.instructure.com/49502
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-02-26 15:16:21 +00:00
James Williams 09b2d1a7f5 touch content after changing course public visibility settings
also fixes an issue with logging false setting changes

test plan:
* create a course with content (assignments, quizzes, etc)
* set the course as public
* in another browser/incognito window should be able to view the
 content
* in the course settings, turn off the public setting
* refresh the content pages in the other window
* should be unauthorized now (i.e. it didn't cache the setting)

(bonus test)
* enable "Disable comments on announcements" for the course
 (under the more options section)
* after refreshing, save another change to the course
* check the course activity logs in the account admin tools
* should not have logged a false change to the course settings

closes #CNVS-18580 #CNVS-18656

Change-Id: I65e4169ecb158207cd52126c31c52cf93a4a7cae
Reviewed-on: https://gerrit.instructure.com/49165
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2015-02-26 12:37:48 +00:00
Jeremy Stanley 8827091476 don't copy assignment groups on selective copy
test plan:
 0. create a course with some assignments in separate assignment groups
 1. do a course copy without selecting content. the assignment groups
    should be copied to the new course, with the assignments in there.
 2. do a course copy and select an entire assignment group, plus
    some (but not all) assignments in another assignment group.
    the selected group and its assignments should be copied to the new
    course. the individually selected assignments should be in the
    "Imported Assignments" group
 3. create a new course with an assignment group having the same name
    as one from step 0. add an assignment to the group, and set a
    "drop lowest assignment" rule on the group. selectively import
    an assignment from the course in step 0 in the group having the
    same name as this group. the assignment should be imported into
    the "Imported Assignments" group, and the group with the same name
    should be unaffected (with its drop rule intact).

fixes CNVS-18650

Change-Id: I49266dfc42753566c9d6dbef74b6c70cfabd7e33
Reviewed-on: https://gerrit.instructure.com/49285
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-02-25 16:52:35 +00:00
Simon Williams e38b564d54 allow admins with :read_course_content to see unpublished discussions
previously, admins needed the :manage_courses permission, which felt too
heavy for this use case.

fixes CNVS-17996

test plan:
- create a custom account admin role
- give them the :read_course_content permission
- go to a course with unpublished discussions
- they should be able to see them

Change-Id: I5a572ed0c59f7f2d1100b49d9857dce969f510df
Reviewed-on: https://gerrit.instructure.com/48322
Tested-by: Jenkins
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2015-02-25 00:37:38 +00:00
Dan Minkevitch a58f641c96 Adds date check for terms of use
For SOC2 Compliance, we need to set
a date after which users must accept
terms of use if they are just registering
or being imported.

closes CNVS-18692

Change-Id: I9b195367dd304083ca7be8f27f51724a390ce348
Reviewed-on: https://gerrit.instructure.com/49127
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-02-24 17:07:56 +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 96204c7331 text change for bigbluebutton recording setting
closes #CNVS-16022

Change-Id: I1c82c76c0ea59ccb078a2f4be72bb3f013c3fbf8
Reviewed-on: https://gerrit.instructure.com/49268
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-02-24 13:23:21 +00:00
Jacob Fugal c67d57f97e show cross-shard notifications for built-in roles
fixes CNVS-18062

when the account notification is targeted at specific built in roles,
they should still show on other shards that have a different local
instance of that role

test-plan:
 * have multiple shards
 * create a global (i.e. in siteadmin) account notification for a
   specific role (e.g. teachers) and without being checked as a survey
   (so you don't have to search for a user that's currently displaying
   it)
 * login as a user in an account on a different shard than siteadmin
 * announcement should display to the user

Change-Id: I389577c3505b148784fa5f3612550ce2167066ca
Reviewed-on: https://gerrit.instructure.com/49254
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins
QA-Review: August Thornton <august@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2015-02-24 01:11:14 +00:00
Jeremy Stanley c2719cabe1 don't create thumbnails for very large images
test plan:
 1. enable new files
 2. upload a sane-sized image file (jpg/gif/png)
    with less than 100 million pixels
 3. within a minute or so, a thumbnail image should
    be generated for the image, and visible after the
    new files page refreshes
 4. upload an image with more than 100 million pixels
    (the size of the file in bytes isn't relevant;
     you can use 100mpx.png, attached to the ticket,
     which is a 12800x8000 image which compresses down
     to 13K because it's solid blackness).
    Canvas should not generate a thumbnail for it.
    A generic icon should be used (not a solid black
    square).

fixes CNVS-17995

Change-Id: Ie5ed1f57de65fa105cb3f23ceb0b895b676375fe
Reviewed-on: https://gerrit.instructure.com/48973
Tested-by: Jenkins
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jahnavi Yetukuri <jyetukuri@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
2015-02-23 20:43:05 +00:00
James Williams 146bcd0d1d match true/false answers on text if response_id fails
test plan:
* import the package referenced in the ticket
* they should not have import warnings
* the true-false questions should have their correct
 answers specified

closes #CNVS-18069

Change-Id: I46d31499805909ca9dfb066746937098ccac170b
Reviewed-on: https://gerrit.instructure.com/48787
Tested-by: Jenkins
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2015-02-23 17:07:24 +00:00
Brian Finney aef17194b1 Check version when finding questions from a pool
Fixes CNVS-18016

Test plan:
 - create a question bank
 - create a quiz with a question group and associate it with the
 question bank
 - take the quiz, see your questions
 - change the questions in the question bank
 - take the quiz, see your changes

Change-Id: I2fd65eb1a5daaba3bda1a96ee6dcb2f2b54b2533
Reviewed-on: https://gerrit.instructure.com/48596
Tested-by: Jenkins
Reviewed-by: Ryan Taylor <rtaylor@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2015-02-23 16:56:03 +00:00
James Williams 855933a81b don't allow students to reply to topics locked on date
test plan:
* create a group discussion
* set the "available from" date in the future
* visit the discussion as a student in the group
* should not be able to reply

* also should not be able to edit own replies as
 a student if the topic is locked

* general regression testing on discussion topics,
 specifically locking/unlocking and closing for comments

closes #CNVS-18320

Change-Id: Ib617df7e10f18978f7e0cc4912647de0eefb581f
Reviewed-on: https://gerrit.instructure.com/48396
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins
QA-Review: Adam Stone <astone@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2015-02-23 13:17:37 +00:00
Spencer Olson 690aeb7c17 set up permissions for grading periods
closes CNVS-18438

test plan:
  1. create a root-account, a sub-account (belonging to the root-account),
    and a course belonging to the root-account (not belonging to the
    sub-account). Create an admin for your root-account and an admin for
    your sub-account, and a teacher and student for your course.
  2. create grading periods for the root-account, sub-account,
    and course. For the example below i'm using the ids 1, 5, and 10
    for the account, sub-account, and course, respectively.
    In rails console:
    $ root_gp_group = Account.find(1).grading_period_groups.create!
    $ sub_gp_group = Account.find(5).grading_period_groups.create!
    $ course_gp_group = Course.find(10).grading_period_groups.create!
    $ root_gp = root_gp_group.grading_periods.create!(
        start_date: Time.now, end_date: 2.days.from_now, weight: 0.50)
    $ sub_gp = sub_gp_group.grading_periods.create!(
        start_date: Time.now, end_date: 2.days.from_now, weight: 0.50)
    $ course_gp = root_gp_group.grading_periods.create!(
        start_date: Time.now, end_date: 2.days.from_now, weight: 0.50)
  3. check the permissions for your root-admin, sub-admin, teacher,
    and student (while still in rails console). example below assumes
    root-admin, sub-admin, teacher, and student ids are 100, 200, 300,
    and 400 respectively.
    $ root_admin = User.find(100)
    $ sub_admin = User.find(200)
    $ teacher = User.find(300)
    $ student = User.find(400)
    $ root_gp.rights_status(root_admin, :read, :manage)
        -- should return {read: true, manage: true}
    $ root_gp.rights_status(sub_admin, :read, :manage)
        -- should return {read: true, manage: false}
    $ root_gp.rights_status(teacher, :read, :manage)
        -- should return {read: true, manage: false}
    $ root_gp.rights_status(student, :read, :manage)
        -- should return {read: true, manage: false}
    $ sub_gp.rights_status(root_admin, :read, :manage)
        -- should return {read: true, manage: true}
    $ sub_gp.rights_status(sub_admin, :read, :manage)
        -- should return {read: true, manage: true}
    $ sub_gp.rights_status(teacher, :read, :manage)
        -- should return {read: false, manage: false}
    $ sub_gp.rights_status(student, :read, :manage)
        -- should return {read: false, manage: false}
    $ course_gp.rights_status(root_admin, :read, :manage)
        -- should return {read: true, manage: true}
    $ course_gp.rights_status(sub_admin, :read, :manage)
        -- should return {read: false, manage: false}
    $ course_gp.rights_status(teacher, :read, :manage)
        -- should return {read: true, manage: true}
    $ course_gp.rights_status(student, :read, :manage)
        -- should return {read: true, manage: false}

Change-Id: Ib5262ebcaa0554096ac9ddaacab017d45717bea6
Reviewed-on: https://gerrit.instructure.com/48524
Tested-by: Jenkins
Reviewed-by: Cameron Sutter <csutter@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Spencer Olson <solson@instructure.com>
2015-02-21 00:25:21 +00:00
Brad Horrocks 6cfc4c5d65 Use google docs setting for google drive service
Google Drive will show and hide based on the google docs account setting

fixes: PLAT-911

Test plan:
- google drive checkbox doesn't show up in account settings
- when google drive plugin is enabled, and google doc account setting is set. google drive shows up in the user service area
- make sure google docs, and google drive user services enable and disable properly

Change-Id: Ida49bc6d6f073af5d29ef5a0443e32da59851be5
Reviewed-on: https://gerrit.instructure.com/49003
Tested-by: Jenkins
Reviewed-by: Brad Horrocks <bhorrocks@instructure.com>
Reviewed-by: Nathan Mills <nathanm@instructure.com>
Reviewed-by: Brad Humphrey <brad@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Nathan Mills <nathanm@instructure.com>
2015-02-20 21:31:49 +00:00