Commit Graph

471 Commits

Author SHA1 Message Date
Brian Palmer 5cd5e648a6 optimizations for submissions for_students api, refs #5806
* fix a bug in Api.map_ids that was causing a worthless SELECT for each id given
 * pre-load all the assignments and manually set them on the
   submissions, to avoid those individual queries
 * if sis ids are given, resolve them to AR ids all in one query, rather
   than individually
 * allow excluding attachments and discussion_entries using the
   response_fields/exclude_response_fields functionality

Change-Id: Ib48016f8440959a08637385f0ccaa23d40e7adde
Reviewed-on: https://gerrit.instructure.com/5975
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-10-04 17:11:46 -06:00
Brian Whitmer ab1fddba77 basic lti tweaks for certification
fixes #5812

Change-Id: I34bd12bace487280d5531c4d84b1d8395059c716
Reviewed-on: https://gerrit.instructure.com/5597
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-10-04 10:59:21 -06:00
Zach Pendleton 9572eb1fa2 add "mute" function to assignments. fixes #5101
"Mute Assignment" links in gradebook and speedgrader
stop all announcements, emails, and stream items for grades
and comments from appearing until the teacher unmutes the
assignment.

Change-Id: Id74b305b568ff86e2a0e6f9319cfa40bb98b1bcd
Reviewed-on: https://gerrit.instructure.com/5779
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Zach Pendleton <zachp@instructure.com>
2011-09-30 17:28:25 -06:00
JT Olds cb5d048c77 store grade publishing messages
Change-Id: Icfb13244dd46cdeb54b07ef4426d3ba14825b591
Reviewed-on: https://gerrit.instructure.com/5939
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-30 13:46:59 -06:00
JT Olds 858b33549f make course terms sticky
refs #5407

Change-Id: I3b8fc96198e6dd583619b078294874dc7cfba19c
Reviewed-on: https://gerrit.instructure.com/5878
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-30 11:00:27 -06:00
JT Olds 8ac681f201 adding start and end date stickiness
Change-Id: Ifd23b2731725619009884ee56f0c8b1964c6a996
Reviewed-on: https://gerrit.instructure.com/5875
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-30 11:00:09 -06:00
JT Olds 96312879f5 plumb sis stickiness override option through to the csv importer
refs #5407

Change-Id: I2532160ac519e9618e95043bd9818cf3a18b78db
Reviewed-on: https://gerrit.instructure.com/5874
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-30 10:36:06 -06:00
JT Olds ba64a08d4a handle grade result passback when there is either no course or section
Change-Id: I7d20b373e93fc4a9703434a9eab3fc718735df66
Reviewed-on: https://gerrit.instructure.com/5865
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-30 10:35:56 -06:00
Jacob Fugal 5ecdfa444f https => http was an accident
Change-Id: I4dc02758171dac8a32e195a61aebb80be960a0e7
Reviewed-on: https://gerrit.instructure.com/5926
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2011-09-29 16:41:12 -06:00
Jacob Fugal 7dd98cb064 fix google docs integration
use src from <content> element to download, instead of constructing our
own url (fragile!). also, use https instead of http.

Change-Id: I9e2ca48558b63522bc730309d64411208ad92f9c
Reviewed-on: https://gerrit.instructure.com/5922
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Jacob Fugal <jacob@instructure.com>
2011-09-29 16:15:58 -06:00
Ryan Shaw f9acb060ed upgrade compass to latest version
Change-Id: Idc2281df9d35ca8ec9713050fafd6bd1c32d0da3
Reviewed-on: https://gerrit.instructure.com/5851
Reviewed-by: Zach Pendleton <zachp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-29 12:44:23 -06:00
Bryan Madsen 7491111db3 exclude selenium specs from rcov task
Change-Id: I88607b916ba03f16deaeed11aff91023ef57892e
Reviewed-on: https://gerrit.instructure.com/5887
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-28 12:02:46 -06:00
Brian Palmer 33faf34207 include the port in BLTI Oauth request if it's non-standard
Thanks to Gabe O'Brien for the initial patch

Change-Id: I0b589e9cceb531607b8609d71f6da3687829a116
Reviewed-on: https://gerrit.instructure.com/5883
Reviewed-by: Zach Wily <zach@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-28 11:41:27 -06:00
JT Olds 02e4132107 refactor sticky sis fields
Change-Id: I1cddc633b11b8937f8a3b36c2fa0a00d4d75b513
Reviewed-on: https://gerrit.instructure.com/5745
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-27 16:34:37 -06:00
Jon Jensen b3cd35662e assignment-level turnitin settings, closes #4938
Change-Id: I036391d450eed4ebe81e98ee8d0f106a26c164c3
Reviewed-on: https://gerrit.instructure.com/5802
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-27 16:02:01 -06:00
Brian Palmer bda484aef6 use instance_exec for plugin t calls in 1.9
this matches the expected behavior of all the plugin lambda blocks,
which is that no args will be passed in

Change-Id: I60cfc3dd411d6e7b0655c8ba7307f524c9601930
Reviewed-on: https://gerrit.instructure.com/5839
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-09-27 11:03:01 -06:00
Brian Palmer 0432c66a24 remove deprecated ruby syntax
these are syntax errors in 1.9.x

Change-Id: I7cbd66643cb371e4be9f8da0365bf1e988ee5de8
Reviewed-on: https://gerrit.instructure.com/5833
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-09-27 10:28:22 -06:00
Brian Palmer 60aa7baf5e add encoding magic comments to files with utf-8 chars
Change-Id: Ieba9245724da8aeeb816d7f178bb704b3dcda80f
Reviewed-on: https://gerrit.instructure.com/5832
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-09-27 10:27:35 -06:00
Brian Palmer 3dc8ecc4df don't drop sis rows if transaction timeout is reached
Change-Id: Ib6744eb6410727afbd8b86f55d379d1c126a96db
Reviewed-on: https://gerrit.instructure.com/5830
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-09-26 23:52:30 -06:00
Ryan Florence 0f9d86d0d8 Added JavaScript Specs and Client-side Templates
- New rake task `rake jst:compile` to precompile
  JavaScript templates into functions.

  Add handlebars templates to app/views/jst and
  they'll get compiled to public/javascripts/jst

- New rake task `rake jasmine` and `jasmine:ci` to
  run JavaScript specs.

  Add specs to spec/coffeescripts and they'll get
  compiled into spec/javascripts

- Added Guard gem `$ guard` that watches
  coffeescript and handlebars files and compiles
  them when changes are made.

- Created Handlebars Ruby class that precompiles
  the templates into JavaScript functions

- Added JS Template constructor to abstract
  our tempting API



Change-Id: Ie993d0fc50d49b161ed94dbc066c4475cefdc427
Reviewed-on: https://gerrit.instructure.com/5813
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Ryan Shaw <ryan@instructure.com>
2011-09-26 16:49:18 -06:00
Bryan Madsen d259963460 enable parallelization of selenium tests
Change-Id: I2cbe3f19df3df1442a45479337607bb829b54188
Reviewed-on: https://gerrit.instructure.com/5739
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-26 15:45:35 -06:00
Zach Wily 45da003382 be sure to always look up media objects correctly to support migrated content
Change-Id: I69d18407e08b38c6f3d320908485eb65c209cac6
Reviewed-on: https://gerrit.instructure.com/5811
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-26 12:26:13 -06:00
JT Olds 006cde7157 new generic-format importer classes
notable changes:
 * nothing is processed as a sis-import blocking error now. bad imports now
   result in warnings, while just skipping bad data
 * we no longer check for duplicates before going to the database

Change-Id: Iedc96b29d92caccdc6a71ae1de8100a1c82dd137
Reviewed-on: https://gerrit.instructure.com/5724
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-26 11:24:58 -06:00
Bracken Mosbacker 1b05087175 some common cartridge tweaks to accomodate another vendor
* replace backslashes in file paths with forward slashes
 * remove empty namespace declarations in weblink documents
 * create a misc top-level module for top-level items

refs #4153

Change-Id: I7c4c8763f58c86519a17280e2d38895c3219d258
Reviewed-on: https://gerrit.instructure.com/5770
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-23 13:28:10 -06:00
Bracken Mosbacker 349eacb763 add assessment importing to common cartridge importer
refs #4153

Change-Id: I60a4e8d88f8d121f8b928564f257819b3bca1d26
Reviewed-on: https://gerrit.instructure.com/5726
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:28:03 -06:00
Bracken Mosbacker 169e54d87b added blti links to cc importer
Also had to change the export/importing of blti links
from canvas

refs #4153

Change-Id: Iae2d6e9c677d310d7e824fa78885c8aca2c1af83
Reviewed-on: https://gerrit.instructure.com/5703
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:27:54 -06:00
Bracken Mosbacker 58dcf16c92 add links and discussions to cc importer
This also fixed some problems with the web content
part of the importer and made the spec run the full
migration from a cc package

refs #4153

Change-Id: I1700043b578fe79586104cf13b260c78c3166194
Reviewed-on: https://gerrit.instructure.com/5702
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:27:47 -06:00
Bracken Mosbacker d6a02307cb added an import package identifier
This will allow a UI where the user doesn't need to identify
the type of package they're uploading. For now it's only used
for common cartridge/canvas cartridge packages.

refs #4153

Change-Id: I2488777316660c9af60f544884429de7355f358f
Reviewed-on: https://gerrit.instructure.com/5701
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:27:28 -06:00
Bracken Mosbacker 81a10db574 moved migration classes into a proper namespace
refs #4153

Change-Id: I08035c5e6439d46c8ca61fb9409b1c2972567933
Reviewed-on: https://gerrit.instructure.com/5700
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-23 13:27:16 -06:00
Bracken Mosbacker bfb4378490 move canvas-specific import code into its own namespace
refs #4153

Change-Id: Id09baee420203ba6a6d723e9096168d9968af7c2
Reviewed-on: https://gerrit.instructure.com/5699
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:10:34 -06:00
Bracken Mosbacker 0db446b9f4 start standard common cartridge importing
refs #4153

Change-Id: I2e1048b94261a3005c239fe19cafb1b3714d0161
Reviewed-on: https://gerrit.instructure.com/5698
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-23 13:10:28 -06:00
Ryan Shaw 502fece07f allow uploading gradebook csv with just sis_id
you only need one of the following:
Student Name, ID, SIS User ID, SIS Login ID
per row in the gradebook csv uploads

fixes: #5725

Change-Id: Ic5785d14b146d68603654beba122ca1f73cd9c1e
Reviewed-on: https://gerrit.instructure.com/5771
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-23 10:22:53 -06:00
Zach Pendleton 488da4fd2e only display undeleted messages in dashboard. fixes #5460
Stop storing recent messages in conversation stream, as streams
don't exist on user level and so can't reflect user differences
in deleted messages.

Change-Id: I4750f7c58bf80e9f06060eb089fe83cfc5668d2b
Reviewed-on: https://gerrit.instructure.com/5646
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-22 15:35:32 -06:00
Brian Palmer 3115001a13 user_json when the user has no pseudonym, fixes #5489
Change-Id: I24a44f0a717aa7efeb906c4381ca7a9ea5989a0d
Reviewed-on: https://gerrit.instructure.com/5760
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-09-21 15:47:44 -06:00
Brian Palmer 09d8f54763 handle the new sis id columns in gradebook csv uploads
fixes #5597

Change-Id: I9b817c2789db256c740ef9cab7538d0ac6d36a33
Reviewed-on: https://gerrit.instructure.com/5757
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-21 13:09:07 -06:00
Cody Cutrer 483786ba7e fix the -and-a-half of precalculated account associations importing enrollments
Change-Id: Ia783d496c34ff3000402108c64eca55b811b94de
Reviewed-on: https://gerrit.instructure.com/5721
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-09-20 11:21:30 -06:00
JT Olds 9016452480 handle nil sis_communication_channels appropriately
refs sis batch id 8860, error report 2538380

Change-Id: I6576ee0a38fc163e88746d753ddd3400b54f21c9
Reviewed-on: https://gerrit.instructure.com/5712
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-17 15:06:43 -06:00
Brian Palmer 829f7f79a7 api attachment_json improvements, fixes #5642
* correctly return attachments with Assigment contexts
 * filter out nil responses from attachment_json

Change-Id: I8c6df46d47ab817bc9d7771257aef9212471e392
Reviewed-on: https://gerrit.instructure.com/5681
Reviewed-by: BJ Homer <bj@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-16 14:15:59 -06:00
Jon Jensen 941886c525 convert charsets when processing incoming messages
fixes #5638

Change-Id: I260387ad7e4551b47023690cacdc348e7e693d0b
Reviewed-on: https://gerrit.instructure.com/5672
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-09-16 11:49:59 -06:00
Cody Cutrer 06fe062709 don't log users out when doing a sis import fixes #5583
Change-Id: I3450f1d7369f7710cf5627597f38ea7e9f5fea0a
Reviewed-on: https://gerrit.instructure.com/5659
Reviewed-by: JT Olds <jt@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-14 15:53:09 -06:00
Brian Palmer 6211f062b0 api read access to the user profile
users can always read their own profile, and also the profiles of any
user who they have :view_statistics permissions on. when accessing their
own profile, users get their calendar ics feed url back as well.

closes #4756, #4746

Change-Id: Icfbbe3514a4b2425bcb041c726dc35ac4cdd3d12
Reviewed-on: https://gerrit.instructure.com/5649
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-09-14 08:48:09 -06:00
Brian Palmer c580847b6a add link to the course .ics feed in the course api
in the process fixed the public_feed action doing the work to render
both formats, as well a related i18n error

refs #4746

Change-Id: Ic58a98e67c0df15632d8a7393c1f6fe881d9680f
Reviewed-on: https://gerrit.instructure.com/5640
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Reviewed-by: Mark Suman <marks@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-13 13:11:30 -06:00
Cody Cutrer 24485249b1 remove unused columns from courses
Change-Id: I064fbde82894820bacc8604779a75c8aeb060092
Reviewed-on: https://gerrit.instructure.com/5633
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-09-13 12:53:03 -06:00
Brian Palmer b317f0d264 clean up user querying in the api, refs #4756, #4746
Finding users is a bit different, since the user's sis information is
actually stored on the pseudonym. Before, we were working around this in
the submissions api. I've generalized it to work everywhere that uses
the Api find functionality, and in the process fixed the page views api
so that it works with sis ids.

This is necessary as we add more user apis, like the upcoming
/users/:user_id profile API.

Also added the /users/self shortcut to query the various user apis for
the user accessing the api.

Also for consistency, deprecate users/activity_stream in favor of
users/self/activity_stream

Change-Id: Icb0776231070b838bb341893d12b1061b90c5d04
Reviewed-on: https://gerrit.instructure.com/5628
Reviewed-by: Jacob Fugal <jacob@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-13 12:33:45 -06:00
Jon Jensen b4f518d5f1 conversations api, closes #4753
also streamlined conversations json and made it more consistent

Change-Id: I422d9eaf5e2e8d228c184302cb2e95d2755f50d4
Reviewed-on: https://gerrit.instructure.com/5399
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-13 09:28:57 -06:00
Brian Palmer 76f50e249e use json_opts in stream_json_array
Change-Id: Ic5f63807e2ed8b4a5a7319b6396c455b282da4ff
Reviewed-on: https://gerrit.instructure.com/5622
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-12 14:39:57 -06:00
Mark Suman 7344996b8c When a submission has comments, add them to the stream item.
refs #5567

Change-Id: I5ce2c92d76e09cb0f015c6b09d25dc9950cc3a27
Reviewed-on: https://gerrit.instructure.com/5546
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-12 09:25:53 -06:00
JT Olds f43bbcdce5 support funky characters in username/passwords for http url parsing
Change-Id: Ia0346a08a1e6bfdafdabe14b3b3be813965ef07f
Reviewed-on: https://gerrit.instructure.com/5482
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-08 14:21:50 -06:00
Cody Cutrer 6238c7a044 more gracefully handle pre-existing communication channels for sis imports
Change-Id: I6b2522d299a51576b3ca85e14f9e702de9f30f14
Reviewed-on: https://gerrit.instructure.com/5474
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-08 08:40:29 -06:00
Mark Suman 6229f61c79 Add context_type and url to the stream item json response.
These two fields will make it much easier to part what the stream item
is and what its action should be.

closes #5531

Change-Id: I73949d296724391d036dbe7d0043021f73380cb0
Reviewed-on: https://gerrit.instructure.com/5457
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-07 09:22:04 -06:00
Brian Palmer fb7732a8dc user page views api
Change-Id: I7a011cf924e2ce909b1d4ae4aca134e6c14168e8
Reviewed-on: https://gerrit.instructure.com/4986
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-09-06 16:18:59 -06:00
Brian Palmer 10870a8ee8 i18n functionality in content_zipper for submission rendering
fixes #5121

Change-Id: I438f5203de4f297930fc43d53554c0e9107f9f52
Reviewed-on: https://gerrit.instructure.com/5439
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-06 16:18:35 -06:00
Zach Wily cb703c969e add some url filtering to cutycapt websnap processing
Change-Id: I2931e6d10d6b58409c1fd9fe97061d3bda7609b3
Reviewed-on: https://gerrit.instructure.com/5413
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-06 14:46:14 -06:00
Cody Cutrer 6656cea6ab fix adding only users by login fixes #5523
Change-Id: I6868357afb9920c91aaa06e1748babdcf63ec7e8
Reviewed-on: https://gerrit.instructure.com/5442
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-06 12:50:18 -06:00
Jon Jensen 92e7afcda4 $.toSentence for arrays
Change-Id: Ic4f422c028eccce8c1431806a9c192146e09d2d6
Reviewed-on: https://gerrit.instructure.com/5388
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-09-01 15:30:15 -06:00
Cody Cutrer 191f9d4998 optimize and fix account associations during user sis import
It wasn't handling removing the association on the transition to deleted state.

Change-Id: Ia9f0714b8eba200531b5e2764c1c4f152f8ff8be
Reviewed-on: https://gerrit.instructure.com/5380
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-01 15:14:59 -06:00
Cody Cutrer 555d004cfd speed up SIS imports dramatically
Change-Id: Ida224803f82aaddc8cf3d2821d0b222a79a28817
Reviewed-on: https://gerrit.instructure.com/5382
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-09-01 14:50:49 -06:00
Bracken Mosbacker 795d10776f clear whitespace on sis csv imports
Also clear old whitespace that was missed before this fix

closes #5448

Change-Id: I6096685223c43bfec9fd0c669c737af422687e10
Reviewed-on: https://gerrit.instructure.com/5354
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-31 18:26:42 -06:00
Cody Cutrer 563af3816f recognize enrollment csvs with only section_id
Change-Id: I913dae88e3517d9a1dbcece39aa033f8e4affa40
Reviewed-on: https://gerrit.instructure.com/5352
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-31 10:23:12 -06:00
Jon Jensen be9dd5671a lock down linkification
Change-Id: Ice456817a8fff4ec3b3e61880fbc6594ab825ab0
Reviewed-on: https://gerrit.instructure.com/5350
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-30 16:55:06 -06:00
Jacob Fugal 1a761c2d1f explicit utc db times in update_all
update_all's update hash doesn't have any magic performed on bare Time
objects; it assumes any Time object it's given is already in UTC. using
a TimeWithZone object (regardless of timezone), which Fixnum#ago and
friends happen to return, is still fine.

Change-Id: I297b2a3211b896b5225ebcfaaee3c1eb56e55fb6
Reviewed-on: https://gerrit.instructure.com/5351
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-30 16:46:25 -06:00
Cody Cutrer 443d925902 add start_date/end_date to enrollment sis imports closes #5408
Change-Id: Ic300cd25ea87210e0cb61d11a433a89bd56dcb3d
Reviewed-on: https://gerrit.instructure.com/5325
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-30 15:45:04 -06:00
Brian Palmer ba7be770fa support fractional values in grading schemes, closes #5397
this required changing the data format, so a version column is added to
the table and backwards compatibility code is included. import/export is
aware of this as well.

Change-Id: I753060a6886e3896cbfbad69d16bcc2f1310d466
Reviewed-on: https://gerrit.instructure.com/5296
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-29 12:04:28 -06:00
Brian Palmer b4d0163f2c fix race condition with unzipped files' tmp files
the tmp file was getting closed before FileInContext does its thing.

Change-Id: Ib2145552e18f9162c0ae87e5626bb5c6a12a3a0b
Reviewed-on: https://gerrit.instructure.com/4772
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-26 16:18:01 -06:00
Jon Jensen f9c88ae0da case-insensitive lookups when adding users to course, fixes #4980
Change-Id: I676ce5c7e2735a3d240dcd53ec5021140edaf945
Reviewed-on: https://gerrit.instructure.com/5277
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-25 15:24:33 -06:00
Bracken Mosbacker 15c6635af0 allow importing question bank packages with the same ids
A qti-specific import allowed this before, but now it can
be configured for other migration types

closes #5044

Change-Id: I96e63725ca42937980c73f80f794848848cd59b1
Reviewed-on: https://gerrit.instructure.com/5268
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-25 14:00:31 -06:00
Brian Palmer ff5fd14f1d include context info in stream item api, closes #5377
Change-Id: I3e4f716c3676fe2546c7df7501716efddd997075
Reviewed-on: https://gerrit.instructure.com/5227
Reviewed-by: Mark Suman <marks@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-24 15:16:25 -06:00
Brian Palmer 99d4540804 limit maximum per_page in api calls
Change-Id: Ia22e751b9430fd8f019bff7fcd406340c0532c2f
Reviewed-on: https://gerrit.instructure.com/5194
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-24 15:16:16 -06:00
Brian Palmer 68d6b13d7f fix twitter poller x-ratelimit-reset handling
Change-Id: I2b1362c7a00329b6d425d94a3123b7ff065c8ff5
Reviewed-on: https://gerrit.instructure.com/4955
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-24 15:15:41 -06:00
Cody Cutrer caae827136 alerts, closes #4317
* Daily job to evaluate alerts
   * Spawns a new job for each root account (for parallelization).
     It could be broken down to per-course level if needed (i.e.
     if there is a *huge* root account).
   * Evaluating criteria at a course level using efficient queries.
 * UI for CRUD on alerts
   * Render existing alerts
   * Delete existing alerts
   * Create a new alert
   * CRUD for criteria, recipients, repetition
   * Validations
 * Improve instructure_helper's formErrors to support passing errors
   for specific elements
 * Improve Rails' :include to be able to :exclude an :include
   inherited from a named scope
 * Specs!!
 * Note that we want to slowly roll this out, so there is a setting on
   root accounts to enable it

So I ran an alert with just an interaction criterion on a test
cluster against 50,000 courses, and it took less than 10 minutes
without any parallelization.  That seems like acceptable
performance to me (since there are only just over 3000 courses
in production that would even be elligible to have alerts sent
right now).  Of course, that's probably skewed because I'm sure
a bunch of those 50,000 courses were essentially empty.

Change-Id: Ie028ef206c9155b9a72fb2a820f3e0e516de562a
Reviewed-on: https://gerrit.instructure.com/4799
Reviewed-by: Jon Jensen <jon@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-24 10:19:44 -06:00
Zach Wily 455cb264d6 don't stop processing incoming email on a failure
Change-Id: I9c8aef5a3e71bcedc179eb0172c2c4c8bc80cd85
Reviewed-on: https://gerrit.instructure.com/5230
Reviewed-by: Jon Jensen <jon@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 22:11:11 -06:00
Brian Palmer f483a19a3c api to retrieve all courses in an account
Change-Id: Ic849f61d38f4887c241b97c72edc08ed06434c20
Reviewed-on: https://gerrit.instructure.com/4973
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 15:58:51 -06:00
Brian Palmer b4de1b0e37 account list/show apis, for account_users
Change-Id: I787d05965b6dc5cee461f1b3041418de89d5304f
Reviewed-on: https://gerrit.instructure.com/4964
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-23 15:51:46 -06:00
Cody Cutrer ba786a4508 statelessly enforce enrollment date restrictions fixes #4996
Change-Id: I978c1524518fd17bbffca73071f7b500ca79c435
Reviewed-on: https://gerrit.instructure.com/5166
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-23 12:23:22 -06:00
Brian Palmer 3d9eead696 api for the activity stream, closes #4740
Change-Id: If3a56f635dd6dbd93edc920f0bd0c5cadd709490
Reviewed-on: https://gerrit.instructure.com/4748
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-23 09:13:20 -06:00
Jon Jensen 46fbd65c0b Merge remote-tracking branch 'origin/dev/conversations'
Conflicts:
	app/models/course.rb
	app/views/context/inbox.html.erb

Change-Id: I62c650ebd0bb20dd1f0a9a43843bf7f8d0b86c83
2011-08-20 08:22:14 -06:00
Jacob Fugal 64ed879371 put in name, subject, and fake body for Added To Conversation notification
Change-Id: Ia194aac3984805ff91b7600023f8a4b915ddff7e
Reviewed-on: https://gerrit.instructure.com/5180
Reviewed-by: Zach Wily <zach@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-20 07:55:55 -06:00
Jacob Fugal b543701f17 conversation message notifications prefs
Change-Id: Ida26bebdda7991afa132cbacb3e0eef283ba2020
Reviewed-on: https://gerrit.instructure.com/5163
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-19 16:53:38 -06:00
Jon Jensen 1da705b410 make i18n:export more flexible, fix a couple bugs
Change-Id: Ic149e693162e8fee15bffca26d9472a176608505
Reviewed-on: https://gerrit.instructure.com/5155
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-19 15:17:25 -06:00
Cody Cutrer de92627373 optimize course, section, and xlist sis imports
optimize crosslisting itself:

 * use ids where possible to avoid unnecessarily loading up objects
 * Don't worry about keeping track of if we need to save; we're gonna
   save anyway
 * update account associations on any account change, not just root
   account change (if you re-crosslist a section from one sub-account
   to another sub-account, the users may no longer be associated with
   the first sub-account).

optimize sis imports:

 * really batch up update_account_associations

Change-Id: Ic0fbe1601afcbcd3e6540e69febc2e6a1a94157f
Reviewed-on: https://gerrit.instructure.com/5137
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 10:21:56 -06:00
Cody Cutrer 4bb161c9a4 optimize sis enrollment imports
* Attempt to cache the course/section between rows
 * On section change, calculate the new account associations *once*,
   and use the new User#update_account_associations incremental mode
   for strictly new enrollments
 * Keep the account_assocations account_chain cache intact between
   calls
 * Fall back to global update_account_associations if too few
   enrollments in the section, if not a strictly new enrollment, or
   if the user is already going to be globally updated

Change-Id: I884a394aef4f4b81f4472ee3a57f89c1f72ae371
Reviewed-on: https://gerrit.instructure.com/5136
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 10:21:49 -06:00
Cody Cutrer f997efd263 re-write update_account_associations for SPEED!
* Manually cache account chains (query cache gets dumped after every
   update or delete)
 * Use batch queries and preloads to make the number of queries
   constant wrt how many users are getting updated
 * Simplify calculation - find the root account ids, and merge the
   account chains together
 * Fix depth to be defined as the minimum depth to reach that account
   (rather than whichever path happened to be processed last)
 * Add incremental mode to only add accounts, rather than re-calculate
   all associations (only for User)
 * Don't auto-create the default section during
   update_account_associations; it costs a query and possibly an
   insert, causes angst with schools that don't want it, etc.
   Instead, always create associations against a 'nil' section so
   that a course has the proper associations.

Change-Id: I7d476d45f41d9c3e382fac9b5c0c0aaa5369b956
Reviewed-on: https://gerrit.instructure.com/5135
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: JT Olds <jt@instructure.com>
2011-08-19 10:21:42 -06:00
Zach Wily 6a26aed599 always immediately update enrollments when the restrictions change
Previously we were trying to be too smart about when we'd do the updates, and
we were missing some cases - like when a start_date is moved to the future.
Now we'll just run the update any time the dates change, which should catch
those edge cases. The update was also put in a strand to avoid any race
conditions caused by someone doing a lot of close-together updates of those
dates.

Change-Id: I655ac530ee04725ff1aad2118b7a35649759571f
Reviewed-on: https://gerrit.instructure.com/5118
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Whitmer <brian@instructure.com>
2011-08-18 22:57:23 -06:00
Zach Wily 660abfcdc4 kill the "file added" notifications
We decided that this doesn't make sense, and is way too noisy.

Change-Id: I1ce7d9caa499ed6237b44278256993740db9fcd6
Reviewed-on: https://gerrit.instructure.com/5124
Reviewed-by: Brian Whitmer <brian@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-17 14:44:00 -06:00
JT Olds 41785a0ea2 support importing enrollments that are enrolled to cross-listed courses
if an enrollment belongs to a course/section pair, and then the section is
crosslisted to another course while the enrollment data stays with the
original course/section pair, the next time that enrollment gets imported
canvas shouldn't bail, but should instead pick the new crosslisted course

Change-Id: Ieb93ab19be6ee620fcf39463fc31db82048f3ea8
Reviewed-on: https://gerrit.instructure.com/5125
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-17 14:39:31 -06:00
Zach Wily 8d01083315 fix importing active enrollments in courses with date restrictions
Previously we were allowing 'active' to override any term date restrictions.
Now we interpret 'active' to mean 'active excluding any other date-based
restrictions'.

Also fixed a bug that was causing inactive to be treated as active.

Change-Id: Idf435e7b5c129c410f828b6393d7d50fc366fbde
Reviewed-on: https://gerrit.instructure.com/5119
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-17 12:26:10 -06:00
Jacob Fugal 0cc2f48b32 Merge remote-tracking branch 'origin/stable/2011-08-20' into dev/conversations
Conflicts:
	app/controllers/context_controller.rb
	config/assets.yml
	spec/integration/files_spec.rb
	spec/models/user_spec.rb

also removed test "ContextController GET 'inbox_item' should exclude
recipients if protect_recipients" since ContextMessage inbox items
aren't used any more on this branch.

Change-Id: I99d0e4914cb1bf9617993c1cb1afdbca0e9ba32f
2011-08-16 15:45:39 -06:00
Bracken Mosbacker 97875c1dfb qti options hash refactor
refs #55

Change-Id: I791f596eca1d236cef77282f8be3dcc24abd8a8b
Reviewed-on: https://gerrit.instructure.com/5088
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-15 15:36:35 -06:00
JT Olds 40973e156d support http basic auth for grade exchange
Change-Id: Ie61bc71ee82bc3c019dd25a9b58e7ff13aa44f54
Reviewed-on: https://gerrit.instructure.com/5049
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-11 12:37:39 -06:00
Brian Palmer 39dc3f9cf0 use the redis data instance rather than rails cache for oauth codes
Change-Id: I882dc9fb4ad14388e8cae4e129e7175f3f140087
Reviewed-on: https://gerrit.instructure.com/4990
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Zach Wily <zach@instructure.com>
2011-08-10 13:10:49 -06:00
Brian Palmer 6f65fa37f8 only allow api_key to replace authenticity_token if basic auth is used
allowing api_key to replace authenticity_token for normal cookie
sessions would open us up to a CSRF attack, by allowing a malicious user
to use the api_key without explicitly having the user credentials.

fixes #5162

Change-Id: Ia2604a6930d660dd04a8783fc983a3fe381ff48d
Reviewed-on: https://gerrit.instructure.com/5028
Reviewed-by: Cody Cutrer <cody@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-10 13:02:26 -06:00
JT Olds 12d9fa334b support falling back to a fallback account with course sis imports
Change-Id: I368e59b6abf65ed5adce5d75b0e9b066066ece1f
Reviewed-on: https://gerrit.instructure.com/4974
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
2011-08-05 13:25:10 -06:00
Cody Cutrer 16fef763ec put localization js bundles in a separate assets file
so developers can run rake i18n:generate_js without having a dirty assets.yml

Have to be magical about merging though two using erb in the real assets.yml.

Also split _core.js into _core_en.js (committed to repo) and everything else
in _core.js (not in repo), for the same reason.

Change-Id: I4749ee5818b9e7d4e1244c6e8295790bb1235e34
Reviewed-on: https://gerrit.instructure.com/4972
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Jon Jensen <jon@instructure.com>
2011-08-05 12:52:08 -06:00
Jacob Fugal 2d6e299627 Merge branch 'master' into 'dev/conversations'
Conflicts:
	app/views/context/roster.html.erb
	config/assets.yml
	config/locales/es.yml
	public/javascripts/instructure_helper.js

Change-Id: If38ea0164ad505a3f540446162d1d7898d11eec2
2011-08-05 09:55:58 -06:00
JT Olds b895750052 folder_controller optimizations stopped sending filename field
data.filename was not being populated, so the filename field
of the multipart request was empty, causing rack to just throw
it away. NOTE: rack throws away fields if you provide filename=""
with content-disposition file.

fixes #5154

Change-Id: If6f0a3a818aaa2f97ee4aded4bea80063209b12a
Reviewed-on: https://gerrit.instructure.com/4840
Tested-by: Hudson <hudson@instructure.com>
Tested-by: Selenium <selenium@instructure.com>
Reviewed-by: Brian Palmer <brianp@instructure.com>
2011-08-04 16:49:55 -06:00
Brian Palmer a2e35e8e11 fix api support for sis ids in url with special chars, closes #5176
periods were being interpreted as the beginning of a file extension,
rather than part of the sis id. fixing this meant completely changing
our routing, unfortunately, since rails resourceful routing is very
oriented on numeric ids, with format extensions.

the .json extension is now optional for api requests, in api v2 we'll
drop it completely. there is the unfortunate edge case that a sis id
ending in ".json" can't be send through the v1 api -- except...

we also now support hex encoding sis ids in the api calls. this allows
arbitrary strings to be used. in theory this could just use uri
encoding, which is also "supported", but there are bugs in various
releases of apache and the rack/rails stack that make this impossible to
use with some characters, such as "." and "/".

the api documentation has been updated as well

Change-Id: Ifa4b529dffee0f30ef5384f94c64aa6e8f8f2542
Reviewed-on: https://gerrit.instructure.com/4940
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-04 16:25:21 -06:00
Cody Cutrer 828a58b9e3 don't fail zipping empty folders. fixes #5002
Change-Id: I510facebfc85fd617013741d862d3417b66ce341
Reviewed-on: https://gerrit.instructure.com/4949
Reviewed-by: Brian Palmer <brianp@instructure.com>
Tested-by: Hudson <hudson@instructure.com>
2011-08-04 12:44:02 -06:00
Brian Whitmer 13dce134d4 support query parameters in Basic LTI
External tools were not working if there were query parameters
in the URL (http://dr-chuck.com/ims/php-simple/tool.php?a=1&b=2).
This should now work correctly.

Change-Id: Ibc0b0d61deed508058cadd07bbc2387194926f9e
Reviewed-on: https://gerrit.instructure.com/4936
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Bracken Mosbacker <bracken@instructure.com>
2011-08-04 11:43:04 -06:00
JT Olds c930cfd6db don't bail when an abstract course is not available
fixes #5183

Change-Id: I2425b901bcbc454ec5238694c337cda1b4e1de81
Reviewed-on: https://gerrit.instructure.com/4904
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-04 10:06:08 -06:00
JT Olds b92427222e allow unchanged passwords to be reset via sis
fixes #5182

Change-Id: I5c7a6705714b3991048b468ad5961875311f1348
Reviewed-on: https://gerrit.instructure.com/4903
Tested-by: Hudson <hudson@instructure.com>
Reviewed-by: Cody Cutrer <cody@instructure.com>
Reviewed-by: Jacob Fugal <jacob@instructure.com>
2011-08-04 10:06:00 -06:00