Commit Graph

2218 Commits

Author SHA1 Message Date
Braden Anderson 7137d14d21 recipient search: order by sortable name
fixes CNVS-13163

test plan:
  * create a course with multiple students with full names
  * open conversations
  * open the recipient finder
  * verify that students are sorted by sortable name

Change-Id: Iadd24972c2851f3c9ccb8164ab988e271e95d27e
Reviewed-on: https://gerrit.instructure.com/35281
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-23 22:58:43 +00:00
Braden Anderson fcee090ce8 record enrollment time on task
fixes ALYT-29

test plan:
  * access pages in a course for at least two minutes
  * open the course people page
  * verify that Total Activity reflects your time spent

Change-Id: I3b7765ae9469a9ce1d4258b7edfc161cf196f17b
Reviewed-on: https://gerrit.instructure.com/35377
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
QA-Review: August Thornton <august@instructure.com>
2014-05-23 22:58:10 +00:00
James Williams 3181ac8b11 improve cc 1.3 support
test plan:
* import the test assignment fixtures as a common cartridge file
* there should be an assignment in the course

* also test import of flat manifest xml files

closes #CNVS-5906 #CNVS-13219

Change-Id: I0b765ed0d140516f78a5f4fb5dbe9b81ac77ecd4
Reviewed-on: https://gerrit.instructure.com/35394
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-05-23 21:11:59 +00:00
Ethan Vizitei 3c19c96287 apply dual timezone filters
closes: CNVS-9814

add support throughout our formatting layer
to give us a way to convert values
to the wall clock time of the timezone for
a course (or really any other way we choose),
and then apply that to several selected
date/time displays.

TEST PLAN:

- Login as a user who's part of a course
with at least some data in each tab
- Check the following areas to ensure that
the correct timezone-differentiated hover
text is showing up:
  * Announcements -> Date Sent column
  * Announcement Detail -> Date Sent (top right)
  * Assignments -> Due Date column
  * Assignment Detail -> Due Date (bottom table)
  * Collaborations -> Start Date
  * Discussions -> Last Post Date
  * Discussions -> Due Date
  * Discussion Detail -> Post date of each reply
  * Modules -> (if locked) shows date to unlock
  * Quizzes -> Due Date
  * Syllabus -> Dates on the left
  * Syllabus -> Due dates on the right
  * Settings -> Course Details -> start/end date
  * Settings -> Sections -> start/end date
  * Recent activity page -> Everything

Change-Id: I048c2de85d9f9b196d35c6c65ae104dab7441eee
Reviewed-on: https://gerrit.instructure.com/34861
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Drew Bowman <dbowman@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-05-23 19:01:34 +00:00
Michael Nomitch afd21dedea designers and TAs can see same overrides as teachers
fixes CNVS-7852

test plan:
  - as teacher create an assignment with different due dates for
    a couple sections
  - as a TA that is limited to one section
  - in the assignment index you can see all due dates
  - in the assignment show page you can see all due dates
  - in assignment edit page you have same access as a teacher
    - changing dates works as expected

Change-Id: I3616751d7158fa3252852fc78be40cb660fe9cf4
Reviewed-on: https://gerrit.instructure.com/35190
Reviewed-by: Simon Williams <simon@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Coraline Ehmke <coraline@instructure.com>
QA-Review: Anna Koalenz <akoalenz@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-05-23 18:22:12 +00:00
Jon Jensen 0a9a954a5d extract User.enrollment_conditions from user.rb, refs CAT-147
they're not relevant to *a* User, and they're needed by things other than
User.reflections.

test plan:
n/a, just refactoring to a (hopefully) better spot. existing and new specs
should cover all of this

Change-Id: I66ab5314582113ac549af5662bcf08a8ca5df580
Reviewed-on: https://gerrit.instructure.com/35082
Reviewed-by: Dave Donahue <ddonahue@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2014-05-22 20:54:03 +00:00
Nick Cloward 3958a5cf44 add reset content event
fixes: CNVS-12590

Adds a course content event type to the course audit logs.

Test Case:

  - Create a course.
  - Reset its content.
  - The event and its data should be reflected for both
    the source course and new course from resetting the
    course data.

Change-Id: I473d2e237491d890c20aace57f9c7675d70d22c7
Reviewed-on: https://gerrit.instructure.com/33726
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-05-22 14:53:34 +00:00
Derek DeVries 1343e2379c add api for quiz submission extensions
quiz submissions can have their time limit or number of attempts extended.
we can extend both existing quiz submissions, and also those that don't exist
yet. adding this functionality to the existing quiz submissions api would
muddle up responsibilities. So instead we post all extensions to a the
quiz extensions api which is specifically meant for adding extensions to a
submission whether it has been started yet or not.

Also add 'manually_unlocked' to the quiz submissions api. this field lets us
know if a student can take a quiz after it has been locked for everyone else.

fixes CNVS-13165

test plan
  - There is a new attribute added to quiz_submissions objects in the api
    called 'manually_unlocked'. This attribute will now show up when returning
    results back from
    - GET /api/v1/courses/:course_id/quizzes/:quiz_id/submissions (index)
    - GET /api/v1/courses/:course_id/quizzes/:quiz_id/submissions/:id (show)

  - There is a new endpoint to create quiz extensions. This should work to
    create quiz extensions for users that both have existing quiz submissions
    started, and users who have not yet started a quiz:
    - POST /api/v1/courses/:course_id/quizzes/:quiz_id/extensions (create)
  - Check Permissions on the new quiz extension endpoint. Only teachers should
    be able to extend the quizzes.
  - Check that all the documentation looks okay for quiz extensions.

Change-Id: Ie23113c1f30e139a1e376475fb35a2cf3ce0212c
Reviewed-on: https://gerrit.instructure.com/35111
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ahmad Amireh <ahmad@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-05-21 21:30:15 +00:00
Ryan Shaw afc1150b7b A feature flag to toggle html5/flash first video playback
this is a simple feature flag that will let us
toggle between:
a. trying html5 first then falling back to flash
   if not enabled or trying flash first.
b. trying flash first, then falling back to html5
   if unavailable.

test plan:
1. with feature flag not turned on, watch a video.
it should use flash to play it.
2. turn on the feature flag for domain_root_account
3. watch a video, it should use html5

Change-Id: I08aab043f89d049863dcbbd49aa1c4fcd8dc2895
Reviewed-on: https://gerrit.instructure.com/34248
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: David Julia <djulia@pivotallabs.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
Product-Review: Ben Hutchings <benh@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
2014-05-21 19:48:23 +00:00
Cody Cutrer 8178266194 split yaml file loading out of Setting
refs CNVS-13024

Setting wasn't properly being initialized as unsharded because
it was loading before Switchman. The reason we need Setting before
switchman is just for yaml loading, so split that into its own
class.

Change-Id: I5456e103cb216dba2d5af4e9c20a697b468c923b
Reviewed-on: https://gerrit.instructure.com/35043
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-05-21 18:27:06 +00:00
James Williams dea0db86d4 add option to open external url module items in new tab
test plan:
* should be able to create and edit external url module items
 with an option to require the urls to be opened in a new tab

* on the modules index page, clicking on these items should
 directly link to the url in a new window, but also redirect
 the open canvas page to the module item page (so to register
 progression, and show the sequence footer)

* navigation through the sequence footer should be unaffected

* should work with draft state enabled and disabled

fixes #CNVS-12579

Change-Id: Ic0b33014acd43f72b05258705a87221c4b8d61c3
Reviewed-on: https://gerrit.instructure.com/35123
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Hilary Scharton <hilary@instructure.com>
2014-05-21 11:55:54 +00:00
Stanley Stuart e115ae8ad8 ember quizzes: take quiz button
Adds the "Take Quiz" button from the old quiz show page to ember
quizzes.

Test Plan:
  - As a teacher
    - You should pretty much always be able to take the quiz if it is
      published.
    - You should not see the Take Quiz button if the quiz is not
      published.
  - As a student:
    - You should be able to see the Take Quiz button only if the quiz
      is published.
    - You should be able to see the Take Quiz button if you have not
      taken the quiz.
    - You should be able to see the Take Quiz button if you have
      completed the quiz and you have enough remaining attempts left.
      If you have 0 attempts left on a quiz, you should not see the button.
    - If the quiz has unlimited attempts, you should always be able to
      see the Take Quiz button. It should say "Resume the Quiz/Survey"
      if you are in the process of taking the quiz.

fixes CNVS-12436

Change-Id: Ib6c3d2aa2637563a84bc6be4ae12561205c7ed2b
Reviewed-on: https://gerrit.instructure.com/34944
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2014-05-20 23:56:09 +00:00
Cameron Matheson ac4b8facae allow people to opt out of coffee source maps
CANVAS_SOURCE_MAPS=0 in your environment lets you opt out.

Test plan:
* rm **/*.map
* export CANVAS_SOURCE_MAPS=0
* bundle exec rake js:generate
* ls **/*.map   #<-- should not list anything

Change-Id: I547c7f73c690e05987ff4e78a6f05ffa16e84ca7
Reviewed-on: https://gerrit.instructure.com/35213
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Stanley Stuart <stanley@instructure.com>
Product-Review: Cameron Matheson <cameron@instructure.com>
QA-Review: Cameron Matheson <cameron@instructure.com>
2014-05-20 22:55:05 +00:00
Joel Hough 0d186e3c1a group leaders
fixes CNVS-11833

test plan
- regression test teacher view of groups page

a group can only have one group leader, and that user must be in
the group. anything that can be done to remove a user from a
group should revoke their leadership if they have it. a user's
leadership should not be revoked unless the teacher revokes it,
a different leader is chosen, or that user leaves the group. a
leader's user should have a user icon on it and their name should
appear next to the group's name

a few test cases:
- set group leader using gear menu on user in group
- revoke the leadership of the user using the gear menu
- ensure that the group is now leaderless

- set a group leader
- set a different user as leader
- ensure that a screenreader identifies the group leader link as "Group
  Leader"
- ensure that the first user is no longer the leader

- set a group leader
- remove that user from the group by dragging and dropping
- ensure that the user is no longer the group leader

- set a group leader
- move the user to another group using the option on the gear
 menu
- ensure that the user is not the leader of their original or new
 group

- in a large-roster course, add users to a group user the plus
 button next to the gear menu
- set a group leader using the gear menu next to a user
- fill a group up to it's maximum limit of students
- ensure that the "full" label shows up for that group
- ensure that when you narrow the browser size, you can
still tell that the group is full

Change-Id: I8bb1b62e0f36a37a24e050878c945f822fe9f66c
Reviewed-on: https://gerrit.instructure.com/34360
Reviewed-by: Ethan Vizitei <evizitei@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Ethan Vizitei <evizitei@instructure.com>
2014-05-20 22:22:12 +00:00
Ryan Shaw 5e629d7a89 speed canvas:compile_assets up a little more
3 things:
* make the default for `rake css:generate` use sass-cache
  so it is faster both for local development and jenkins
* added 2 new optional params you can pass to 
  `canvas:compile_assets` to tell it to use the 
  sass_cache and to have it run canvas:check_syntax. 
  e.g. if you do:
  `canvas:compile_assets[false, true, true]` it will 
  not generate docs and use the sass cache, but
  will also run canvas:check_syntax. We should
  do that on our jenkins build process. shawn and I
  talked and he is going to do some stuff to ensure
  tmp/sassc_* is there and recent.

if you run rake `canvas:compile_assets` (with no args)
it will still force regenerating all sass files,
which I think is what we want since that's the task
we run when deploying.

Change-Id: Ief6f1a0f02a05de0a9e4a6895f6b2a8e3b0c0b0b
Reviewed-on: https://gerrit.instructure.com/34567
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Shawn Meredith <shawn@instructure.com>
Product-Review: Shawn Meredith <shawn@instructure.com>
2014-05-20 16:48:06 +00:00
Ryan Shaw f901f2754a use autoprefixer to +,- css rules to match the browsers we support
AKA: run all of our compiled sass through autoprefixer
so we don't serve css designed for browsers we
don't support and so that we do output css for the
browsers we do support.

This will result in us sending the browser A LOT less
css. see this patch for how much it will remove from
our current css:
https://gist.github.com/ryankshaw/fd0ea0a8af4596569dcb

The idea going forward would be to write your css
prefix-free and just let autoprefixer handle the
rest for you.

Also, now that this exists, we could (and should)
retroactively go through the code base and remove
some of these places where we have these prefixes
to keep our css more maintainable.

test plan:
open /styleguide (or any canvas page) in ie10 (or any browser)
it should look exactly the same as it did before

Change-Id: I7e55518d69580af692a8f04ac6fe2b491f7678af
Reviewed-on: https://gerrit.instructure.com/34940
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Colleen Palmer <cpalmer@instructure.com>
Reviewed-by: Tyler Pickett <tpickett+gerrit@instructure.com>
Product-Review: Ryan Shaw <ryan@instructure.com>
QA-Review: Ryan Shaw <ryan@instructure.com>
2014-05-20 16:35:45 +00:00
Braden Anderson bca75d629e fix mysql migration
fixes CNVS-13046

test plan:
  * bundle exec rake db:migrate:redo VERSION=20140410164418

Change-Id: Ibc826b7a3aeebd5345390d9389d88b5f7c84cade
Reviewed-on: https://gerrit.instructure.com/35080
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Anthus Williams <awilliams@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-20 16:33:48 +00:00
Cody Cutrer 09076c680b use a cookie to remember site admin delegated logins
fixes CNVS-10415

test plan:
 * configure site admin with its own domain, and to use CAS auth
 * log in at site admin
 * go to another account with the same base domain (i.e.
   siteadmin.canvas.dev and accounta.canvas.dev)
 * it should redirect you to site admin's CAS server; and likely
   directly log you in to canvas, cause you're still logged in
   there
 * go directly to a course on a different account without being
   logged in; it should send you to site admin cas
 * log out on the site admin domain and the other domain
 * go to the other domain to log in; it should no longer redirect
   you to site admin cas

Change-Id: I72d5327193832264228305f73e849282c48780d3
Reviewed-on: https://gerrit.instructure.com/34425
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-20 13:44:16 +00:00
James Williams 1d7f77d4fc export canvas meta data in qti exports
test plan:
* create a quiz with a description
* export the quiz in a qti export
* import into another course
* should retain the description

fixes #CNVS-8852

Change-Id: I454db916692b6bc58b908322301d5956c99d9901
Reviewed-on: https://gerrit.instructure.com/34886
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-05-20 12:35:36 +00:00
Jon Jensen e7582b1a40 spec: slight global speedup
change how we default to UTC for tests. this way we:
1. don't create Account.default if a given spec doesn't need it
   (explicitly or otherwise)
2. don't do an unnecessary Account#update_attributes before every spec

test plan:
specs, duh

Change-Id: Icd425b0e2b27bbfa6c95b713ae69c5fa36e14c14
Reviewed-on: https://gerrit.instructure.com/35069
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Jon Jensen <jon@instructure.com>
QA-Review: Jon Jensen <jon@instructure.com>
2014-05-19 22:12:09 +00:00
Stanley Stuart 52217621a7 move quiz_submissions to student_quiz_submissions
test plan:
  - Query the quizzes api using JSONAPI header.
  - You should not see "student_quiz_submissions" if you are a student,
    but should if you are a teacher.
  - You should see "quiz_submission" with the id of your quiz submission
    if you have one, otherwise it should be null.
  - Ember quizzes show should still work

closes CNVS-13031

Change-Id: I5935af55ad09cf04d2bd76ee5b40b2d252b1675d
Reviewed-on: https://gerrit.instructure.com/34722
Reviewed-by: Derek DeVries <ddevries@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Stanley Stuart <stanley@instructure.com>
2014-05-19 19:40:18 +00:00
Liz Abinante e04a49235e AssignmentOverrides refactor
fixes CNVS-10793
fixes CNVS-12360

test plan
=========
- assignment overrides should still work
- general regression of assignment#new, #edit, quizzes#new, #edit, discussions#new, #edit
- check API end points for above overrides

Change-Id: I211ad888ac14d7e863ab67bfcb27d56a85e62aac
Reviewed-on: https://gerrit.instructure.com/29980
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Simon Williams <simon@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
Product-Review: Liz Abinante <labinante@instructure.com>
2014-05-16 21:12:45 +00:00
James Williams adef31b24b retain user avatar information on user merge (if none exists)
test plan:
* enable avatars
* set an avatar for a user
* merge the user into another one without an avatar
* the new user should have the old avatar

* merge a user with an avatar into another
 one with an avatar
* confirm that it does not overwrite the original

fixes #CNVS-13079

Change-Id: Ic45a42c19f82c57a3524a19bc3ca43a253689f50
Reviewed-on: https://gerrit.instructure.com/34993
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-05-16 12:47:13 +00:00
Simon Williams 598efbcb49 user merge supports versions
closes CNVS-12967

test plan (backend):
- create some submissions, quiz submissions, rubric assessments, and wiki pages
  as a user
- merge that user into another user
- the version objects associated with those objects should have an updated user
  id

test plan (user facing):
- upload multiple submissions to a file assignment
- merge the student with another student
- as a teacher, go to the students submission in SpeedGrader
- attempt to download the submission, it should work

Change-Id: I96caf214e5bb43eeb8251470c71f708125cfdf41
Reviewed-on: https://gerrit.instructure.com/34887
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Simon Williams <simon@instructure.com>
2014-05-16 01:41:22 +00:00
Ryan Shaw 9c15db5732 Upgrade MediaElementJS to 2.14.12
This commit just updates the vendor mediaElementJS code
so that we can see clearly what changed from upgrading
and what our changes are (yes, sadly we have to make
modifications to mediaelement-and-player.js's source)

so don't focus on QAing this in isolation. the actual changes
come in the commit after this.

refs: #CNVS-12293

Change-Id: I71f18f8dc8f30acd5cbb0730b1a97065e2aed2e3
Reviewed-on: https://gerrit.instructure.com/34015
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: Clare Strong <clare@instructure.com>
Reviewed-by: Paul Hinze <paulh@instructure.com>
2014-05-15 23:02:35 +00:00
Cody Cutrer 5d4d842ef2 send delayed jobs stats to statsd
closes CNVS-12739

log timing for pops, time spent in queue, time to perform job,
sliced by tag (where applicable), shard, and job shard.

test plan:
 * configure statsd.yml to go to 127.0.0.1 port 7856
 * nc -lu 127.0.0.1 7856
 * run jobs
 * you should see lots of job timings sent to netcat

Change-Id: I60a4b6b10d30edd96011e8e8bc8aa6104dfc6daa
Reviewed-on: https://gerrit.instructure.com/34724
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-05-15 21:16:14 +00:00
James Williams fa9cdafdc6 only export active learning outcomes and groups
test plan:
* create a course with multiple learning outcomes
* delete one of them
* copy the course
* the deleted outcome should not re-appear in the copy

fixes #CNVS-4358

Change-Id: I2ec16a250d2bcaf70ab0e06d5711e18a2839c415
Reviewed-on: https://gerrit.instructure.com/34798
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-05-15 18:40:55 +00:00
Nick Cloward 19ea2789dd canvas event stream
fixes: CNVS-10477

Test Plan:

Make sure auditing still works.

Change-Id: I021c0772ad0cf337d452b55bf690d15ce1a61a09
Reviewed-on: https://gerrit.instructure.com/31494
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-05-14 19:09:24 +00:00
Derek DeVries e1381ae75c publish and unpublish with the api instead of changing workflow state directly
fixes CNVS-12975

test plan:
  - create a quiz with two questions (save but don't publish)
  - turn on fabulous quizzes
  - view the number of questions for the quiz on the ember quiz index page
  - it should show you the correct number
  - publish the quiz
  - refresh the page
  - it should continue to show you the correct number of questions

Change-Id: If9cd041f47b339771f8ffa3e9e3953195efc540d
Reviewed-on: https://gerrit.instructure.com/34835
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jason Madsen <jmadsen@instructure.com>
QA-Review: Caleb Guanzon <cguanzon@instructure.com>
Product-Review: Derek DeVries <ddevries@instructure.com>
2014-05-14 16:54:50 +00:00
James Williams 5f927946c5 import/export learning outcome alignments
test plan:
* create a course with a question bank and
questions
* create learning outcomes (either on the course
or account level)
* align outcome(s) to the question bank(s)
* copy the course, or import/export it
* confirm that the question banks in the new course
retain their alignments

fixes #CNVS-5917

Change-Id: I16a80371af4433a4debdcc29d09d7fa1f43bc41e
Reviewed-on: https://gerrit.instructure.com/34572
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
2014-05-14 12:31:11 +00:00
Cody Cutrer 4777aac2df Merge pull request #445 from sfu/feature-sis-user-names
Add full & sortable name fields to SIS User Import

Change-Id: Ib8617572802ca69913b422d22301299ab75c211f
Reviewed-on: https://gerrit.instructure.com/34548
Reviewed-by: Cody Cutrer <cody@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
2014-05-13 14:26:23 -06:00
Cody Cutrer c6090faa0a allow enrolling users via sis from another root account
fixes CNVS-12963

test plan:
 * set up a trust from account A to account B
 * enable sis imports for account A and account B
 * add a user to account B with an SIS ID
 * add a course to account A with an SIS ID
 * do an sis import to account A for enrollments as user
   that is an admin in both account A and account B;
   specify the course from account A as the target,
   the user from account B, and add another column
   root_account with account B's domain
 * it should succeed, and enroll the user from account B
 * unenroll the user manually
 * do the import as a user that's an admin in account A,
   but not account B - it should fail citing permissions
 * remove the trust link from A to B
 * do the import as the user that's an admin in both;
   it should fail citing no usable login

Change-Id: Ie5b7b71bfe563da9c49d3aa2321586994634ccb5
Reviewed-on: https://gerrit.instructure.com/32133
QA-Review: August Thornton <august@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-13 17:19:48 +00:00
Cody Cutrer 66715b770f more optimization for scheduler
closes CNVS-12936

test plan:
 * basic regression test of scheduler functionality

Change-Id: I7cd7de55e36a66e18fdf01de85d0240bee69c437
Reviewed-on: https://gerrit.instructure.com/34555
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-13 17:02:50 +00:00
Joel Hough 38c0bfd032 remove old conversations and conversation submission comments
fixes CNVS-12330, CNVS-9234, CNVS-8099

before you check out
- configure a user to use old conversations

test plan
- ensure that everyone get new conversations, always, even if
 they explicitly told us that they really like old conversations
 better

- as a student with an existing conversation with a teacher,
 make an assignment submission and a submission comment
- as the teacher, ensure that your unread message count did not
 increase because of the submission comment

Change-Id: If5ae7143abbc5cf5e035f5ed9ea2e5728f70cd45
Reviewed-on: https://gerrit.instructure.com/34343
Reviewed-by: Braden Anderson <banderson@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Steven Shepherd <sshepherd@instructure.com>
Product-Review: Joel Hough <joel@instructure.com>
2014-05-12 23:38:34 +00:00
Dave Donahue 5880ea9f92 add optional section info to courses API response (fixes CNVS-12991)
Test plan:
* Hit the courses index API (/api/v1/courses)
* Note that section enrollment info is not returned
* Now, add 'sections' to the include[] parameter
* Note that section enrollment info is returned and
  is in the context of the current user. Section names,
  IDs, and dates should all be included, along with the
  type of enrollment.

Change-Id: I0c6e0c4c049a0d0596c7e66bfdd4db72aa0f51b0
Reviewed-on: https://gerrit.instructure.com/34695
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Landon Wilkins <lwilkins@instructure.com>
Product-Review: Marc LeGendre <marc@instructure.com>
QA-Review: Marc LeGendre <marc@instructure.com>
2014-05-12 22:28:33 +00:00
Ryan Shaw 018035906a fix minor misspelling
Change-Id: I802de01b5d80abb4dd09d9d05a625923db6b48dc
Reviewed-on: https://gerrit.instructure.com/34335
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-05-12 18:58:07 +00:00
Jacob Fugal 7a722f690c update timestamp on discussions when merging users
fixes CNVS-12782

discussions cache some material in the "materialized view". that
material may include references to the use being deleted in a user
merge. the source material was already being updated correctly by the
merge, but the materialized view was not expiring. updating the
updated_at on the appropriate topics will force the necessary
materialized views to be refreshed.

test-plan:
 - create two distinct users, A and B
 - as user A, create a discussion topic
 - as user B, create a second discussion topic
 - as user A, reply to user B's discussion topic
 - merge user A into user B
 - view the first discussion topic; user B should display as the author
 - view the second discussion topic; user B should display as the
   reply's author

Change-Id: I48948e171b6645a371e92c8413fa289695d3d1a2
Reviewed-on: https://gerrit.instructure.com/34445
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Joel Hough <joel@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Jacob Fugal <jacob@instructure.com>
2014-05-12 16:51:03 +00:00
James Williams 2ba4531f73 migration refactor: account question banks import
test plan:
* course migration regressions (canvas cc, course copy)

* in addition:
 use the content migrations api to queue a content migration
 for an account ("/accounts/:account_id/content_migrations")
 to import a qti/cc package.
* confirm that the question banks from the package
 that would have been normally imported into a course are now
 imported into the account

closes #CNVS-12529

Change-Id: I2ef306341d2f7defe03c63a981679a3987f1aaa0
Reviewed-on: https://gerrit.instructure.com/34303
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
Product-Review: James Williams  <jamesw@instructure.com>
2014-05-12 16:30:10 +00:00
Cameron Matheson 33b4eb55f9 canvadocs
This commit adds support for document previews from a Box View
compatible API.

closes CNVS-12416

Test plan:
* NOTE: check everywhere for previews (speedgrader, files list,
  individual files page, etc?)
* Enable Scribd and Crocodoc
  * attachments should be previewable in scribd or crocodoc (submission
    attachments should go to Crocodoc)
* Enable Canvadocs
  * Files that previously previewed in scribd should now go to
    Canvadocs.  Nothing should ever go to scribd.
  * New submission attachments should continue to use Crocodoc (for
    supported file types)
  * Other attachments should preview in Canvadocs

Change-Id: I173e4fabc0ae677cdddd4bd065777a90360c1f34
Reviewed-on: https://gerrit.instructure.com/34535
Reviewed-by: Simon Williams <simon@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
Product-Review: Matt Fairbourn <mfairbourn@instructure.com>
QA-Review: Amber Taniuchi <amber@instructure.com>
2014-05-09 22:38:57 +00:00
Cody Cutrer d1d4878404 return sis pseudonyms from trusted accounts
fixes CNVS-11814

and be sure to identify the account somehow

test plan:
 * set up a trust between account A to account B
 * add a user to account B with an SIS pseudonym
 * enroll the user in a course in account A
 * course gradebook csv and quiz statistics csv should show the
   pseudonym from account B, and account B's domain
 * an API call to list students in the course shoud show the
   pseudonym from account B, and account B's domain

Change-Id: Id656d06b8119bdcb31cc3e567d49cd6ce7c8428f
Reviewed-on: https://gerrit.instructure.com/31812
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
QA-Review: August Thornton <august@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-09 20:20:42 +00:00
Braden Anderson 05d4cf6620 individual gradebook view: outcomes
fixes CNVS-11439

test plan:
  * enable Individual Gradebook View
  * open a course's gradebook
  * switch to individual view
  * select the learning mastery tab
  * select a student
  * select an outcome
  * verify that displayed outcome results are accessible

Change-Id: I89bbcb81fe3049acf2595737ee921d5a0b91c90b
Reviewed-on: https://gerrit.instructure.com/33967
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Mike Nomitch <mnomitch@instructure.com>
Reviewed-by: Cameron Sutter <csutter@instructure.com>
Reviewed-by: Liz Abinante <labinante@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-09 19:31:46 +00:00
Drew Bowman 0d42fd2204 allow users to manage group membership limits
fixes CNVS-11830
fixes CNVS-11831

test plan

 - add a course group
 - set the max members in the group creation dialog
 - verify that the limit is enforced

 - enforced it a course group
 - change the max members in the group edit dialog
 - verify that the new limit is enforced

 - edit the group set
 - change the max members limit for the group set
 - verify that the limit is changed for all of the groups in the set

Change-Id: I6f112d29d6c5ca662da1598e29db2f3081f30148
Reviewed-on: https://gerrit.instructure.com/33722
Reviewed-by: Joel Hough <joel@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Product-Review: Drew Bowman <dbowman@instructure.com>
2014-05-09 16:49:47 +00:00
Nick Cloward 5d4dda1c68 add option for course state changes (log auditing)
fixes: CNVS-347

Adds state change logging activity for courses.  This change also adds an event
source field to all the course activity events.  The options for this is api,
manual, and sis.

Note: This also adds a fix for the event stream record object to force request_id to
be a string.  Event stream will try to insert an integer into a text column which
Cassandra will complain about and throw an error.

Test Plan:
  - Test for each type of Event:
    * Concluded
    * Unconcluded
    * Published
    * Deleted
    * Restored
    * Updated
    * Created
    * Copied To
    * Copied From

  - Test each type of event and each source.  Note that some events can only
    have certain sources.  Also make sure SIS migrations show that the source
    is type SIS.

Change-Id: Ic2308e1d10e6fc1cc6437221d7842eaf1a596f46
Reviewed-on: https://gerrit.instructure.com/30343
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: James Williams  <jamesw@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Product-Review: Nick Cloward <ncloward@instructure.com>
2014-05-09 16:09:20 +00:00
Duane Johnson ebfec31d2a Add integration_id to submissions API
Added integration_id to the user (pseudonym) as well as the
assignments when querying for submissions.

Test Plan:
- query for submissions from a student with an sis_id and
  an integration_id, and for an assignment with an integration_id
- use grouped=false
- results should have integration_id for students, and
  integration_id for assignments
- e.g. curl -H 'Authorization: Bearer [your API key]' \
  -XGET http://localhost:3000/api/v1/courses/1/students/submissions \
  -F 'include[]=assignment' -F 'student_ids=all' -F 'grouped=false'

Fixes SIS-252

Change-Id: I0339fa19bc50dfea3719598924a90746b62f7ebe
Reviewed-on: https://gerrit.instructure.com/34456
Reviewed-by: Eric Adams <eadams@instructure.com>
Product-Review: Eric Adams <eadams@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
2014-05-09 15:46:39 +00:00
Braden Anderson 4fafdda484 discussions: separate group discussions from group assignments
fixes CNVS-4475

pre-checkout plan:
  * create a course
  * open people->groups
  * create a student group with multiple students
  * open discussions
  * create two topics
  * make one topic a group assignment

test plan:
  * open the topics you created
  * verify that a "group discussion" option replaced "group assignment"
  * verify that your group assignment is a group discussion
  * verify that your group discussion uses the same group set
  * verify that the old behavior of presenting child topics is retained
  * verify that your non-group topic is not a group discussion
  * verify that the "group discussion" flag cannot be changed for topics
      with replies

  * create a new discussion topic
  * verify that "group discussion" is available for ungraded topics
  * verify that changes to the field persist

  * create a new graded group discussion topic
  * post to one of the subtopics as a student in its group
  * open the gradebook as the teacher
  * verify that the student who posted has a submission but the other
      group members do not
  * verify that group members can be graded individually

Change-Id: Iada30628f0abdb7d7df4267d695553baf8b952d3
Reviewed-on: https://gerrit.instructure.com/33253
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Trevor deHaan <tdehaan@instructure.com>
Reviewed-by: Jon Willesen <jonw@instructure.com>
Product-Review: Braden Anderson <banderson@instructure.com>
2014-05-08 21:18:40 +00:00
Rob Orton 06b9c69e26 move access tokens on user merge
fixes CNVS-12919

test plan
 - have an access token on user1
 - merge user1 into user2
 - access token should now belong to user2

Change-Id: Ied578d6c921585f15eb3575704f9bb6c5a801266
Reviewed-on: https://gerrit.instructure.com/34514
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Jenkins <jenkins@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
QA-Review: Nathan Rogowski <nathan@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-08 17:04:43 +00:00
Derek DeVries b3beec0368 switch to using the karma binary in node_modules/.bin
fixes CNVS-12918

Change-Id: If1abbcdb84d26a1a30d60030bcf490bb35f2a9ec
Reviewed-on: https://gerrit.instructure.com/34493
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Ryan Florence <ryanf@instructure.com>
Product-Review: Ryan Florence <ryanf@instructure.com>
QA-Review: Ryan Florence <ryanf@instructure.com>
2014-05-08 14:45:40 +00:00
James Williams 6251e981fe treat "//url" as an absolute url in imported html converter
test plan:
* import that package reference in the ticket
* should not have 1000+ missing link warnings

fixes #CNVS-12911

Change-Id: Icea97472635a93b22bac0c3f571496ffe2bcf458
Reviewed-on: https://gerrit.instructure.com/34465
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Jeremy Stanley <jeremy@instructure.com>
Product-Review: Jeremy Stanley <jeremy@instructure.com>
QA-Review: Clare Strong <clare@instructure.com>
2014-05-08 12:12:44 +00:00
Cody Cutrer 196dfdc0ae ignore bogus last_logged_out timestamps
fixes CNVS-7297

test plan:
 * set your clock in the future
 * log in then log out
 * fix your clock
 * log in - it should not kick you out

Change-Id: Ie6b9749b921dd8c20f6b1e6be6b5abee977d52b4
Reviewed-on: https://gerrit.instructure.com/34489
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
QA-Review: Jeremy Putnam <jeremyp@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
2014-05-07 21:45:37 +00:00
Cody Cutrer d8f24a7889 avoid 500 when being attacked with invalid URIs
Change-Id: I965e9f560ba0e6f89e3b5378a5bfea95d18e46dc
Reviewed-on: https://gerrit.instructure.com/34299
Tested-by: Jenkins <jenkins@instructure.com>
Reviewed-by: Rob Orton <rob@instructure.com>
Product-Review: Cody Cutrer <cody@instructure.com>
QA-Review: Cody Cutrer <cody@instructure.com>
2014-05-06 21:48:26 +00:00