Commit Graph

402 Commits

Author SHA1 Message Date
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